Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoolSv2 integration tests #1066

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jbesraa
Copy link
Contributor

@jbesraa jbesraa commented Jul 19, 2024

Blocked by #1155 and #1156

for more context:

@jbesraa jbesraa changed the title 2024 07 15 roles testing Roles integration tests Jul 19, 2024
Copy link
Contributor

github-actions bot commented Jul 19, 2024

🐰Bencher

ReportWed, September 4, 2024 at 10:48:46 UTC
ProjectStratum V2 (SRI)
Branch2024-07-15-roles-testing
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Lower Boundary
nanoseconds (ns) | (%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)44.06 (-1.28%)43.50 (98.74%)45.76 (96.28%)
client_sv2_handle_message_mining✅ (view plot)74.43 (+0.42%)63.60 (85.45%)84.64 (87.94%)
client_sv2_mining_message_submit_standard✅ (view plot)14.66 (-0.03%)14.59 (99.54%)14.73 (99.49%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)264.92 (-0.68%)246.56 (93.07%)286.89 (92.34%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)592.67 (-0.22%)556.43 (93.88%)631.57 (93.84%)
client_sv2_open_channel✅ (view plot)169.17 (+1.90%)159.22 (94.12%)172.82 (97.89%)
client_sv2_open_channel_serialize✅ (view plot)288.12 (+2.43%)265.42 (92.12%)297.13 (96.97%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)373.74 (-0.99%)324.55 (86.84%)430.42 (86.83%)
client_sv2_setup_connection✅ (view plot)162.55 (-0.47%)150.02 (92.29%)176.60 (92.05%)
client_sv2_setup_connection_serialize✅ (view plot)468.57 (-0.21%)412.51 (88.04%)526.63 (88.98%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)1,049.00 (+6.58%)883.36 (84.21%)1,085.16 (96.67%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented Jul 19, 2024

🐰 Bencher Report

Branch1066/merge
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client-submit-serialize📈 view plot
🚷 view threshold
6,704.80
(-1.74%)
7,524.53
(89.11%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,640.70
(-2.45%)
8,720.69
(87.62%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,348.90
(-0.76%)
9,197.64
(90.77%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
948.09
(+3.38%)
988.20
(95.94%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
728.23
(+1.66%)
765.54
(95.13%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
246.63
(-1.31%)
263.18
(93.71%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
160.58
(+1.69%)
166.67
(96.35%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,560.00
(-0.71%)
7,252.02
(90.46%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
280.11
(+1.41%)
301.25
(92.98%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
794.09
(+3.44%)
831.98
(95.45%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
649.99
(+3.36%)
683.81
(95.05%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
205.76
(-1.50%)
229.34
(89.72%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Jul 19, 2024

🐰Bencher

ReportWed, September 4, 2024 at 10:49:04 UTC
ProjectStratum V2 (SRI)
Branch2024-07-15-roles-testing
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Lower Boundary
estimated cycles | (%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Lower Boundary
instructions | (%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Lower Boundary
accesses | (%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Lower Boundary
accesses | (%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Lower Boundary
accesses | (%)
RAM Accesses Upper Boundary
accesses | (%)
client_sv2_handle_message_common✅ (view plot)2,091.00 (+1.04%)1,973.26 (94.37%)2,165.54 (96.56%)✅ (view plot)473.00 (+0.33%)457.50 (96.72%)485.42 (97.44%)✅ (view plot)736.00 (+0.38%)712.12 (96.76%)754.38 (97.56%)✅ (view plot)5.00 (-19.35%)-0.50 (-10.10%)12.90 (38.75%)✅ (view plot)38.00 (+1.90%)34.63 (91.13%)39.95 (95.12%)
client_sv2_handle_message_mining✅ (view plot)8,146.00 (-0.67%)8,077.03 (99.15%)8,325.23 (97.85%)✅ (view plot)2,137.00 (+0.21%)2,093.47 (97.96%)2,171.45 (98.41%)✅ (view plot)3,166.00 (+0.41%)3,089.90 (97.60%)3,215.96 (98.45%)✅ (view plot)30.00 (-18.28%)29.64 (98.79%)43.78 (68.52%)✅ (view plot)138.00 (-0.71%)136.20 (98.70%)141.78 (97.34%)
client_sv2_mining_message_submit_standard✅ (view plot)6,243.00 (-0.58%)6,169.82 (98.83%)6,388.88 (97.72%)✅ (view plot)1,750.00 (-0.01%)1,736.93 (99.25%)1,763.39 (99.24%)✅ (view plot)2,553.00 (-0.02%)2,532.57 (99.20%)2,574.43 (99.17%)✅ (view plot)17.00 (-1.39%)11.19 (65.83%)23.29 (73.00%)✅ (view plot)103.00 (-0.95%)101.01 (98.07%)106.97 (96.29%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14,632.00 (-0.88%)14,522.97 (99.25%)15,001.69 (97.54%)✅ (view plot)4,694.00 (-0.00%)4,680.93 (99.72%)4,707.39 (99.72%)✅ (view plot)6,762.00 (+0.08%)6,736.50 (99.62%)6,776.46 (99.79%)✅ (view plot)41.00 (-8.75%)36.59 (89.26%)53.27 (76.97%)✅ (view plot)219.00 (-1.49%)215.61 (98.45%)229.03 (95.62%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27,490.00 (-0.06%)27,185.28 (98.89%)27,828.12 (98.78%)✅ (view plot)10,585.00 (+0.22%)10,506.82 (99.26%)10,616.30 (99.71%)✅ (view plot)15,405.00 (+0.24%)15,288.63 (99.24%)15,447.87 (99.72%)✅ (view plot)79.00 (-3.56%)74.91 (94.82%)88.93 (88.83%)✅ (view plot)334.00 (-0.33%)326.13 (97.64%)344.09 (97.07%)
client_sv2_open_channel✅ (view plot)4,371.00 (-1.52%)4,252.44 (97.29%)4,624.04 (94.53%)✅ (view plot)1,461.00 (+0.05%)1,447.53 (99.08%)1,472.99 (99.19%)✅ (view plot)2,161.00 (+0.25%)2,135.53 (98.82%)2,175.55 (99.33%)✅ (view plot)8.00 (-24.31%)4.71 (58.85%)16.43 (48.69%)✅ (view plot)62.00 (-2.68%)58.72 (94.72%)68.70 (90.25%)
client_sv2_open_channel_serialize✅ (view plot)13,958.00 (-1.30%)13,839.00 (99.15%)14,443.44 (96.64%)✅ (view plot)5,064.00 (+0.01%)5,050.53 (99.73%)5,075.99 (99.76%)✅ (view plot)7,333.00 (+0.15%)7,299.50 (99.54%)7,343.94 (99.85%)✅ (view plot)30.00 (-15.01%)28.70 (95.67%)41.90 (71.60%)✅ (view plot)185.00 (-2.53%)181.38 (98.04%)198.22 (93.33%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22,589.00 (-0.24%)22,317.12 (98.80%)22,968.94 (98.35%)✅ (view plot)8,027.00 (+0.30%)7,949.34 (99.03%)8,055.98 (99.64%)✅ (view plot)11,679.00 (+0.32%)11,563.24 (99.01%)11,720.82 (99.64%)✅ (view plot)75.00 (+2.00%)64.31 (85.74%)82.75 (90.63%)✅ (view plot)301.00 (-0.92%)294.62 (97.88%)313.00 (96.17%)
client_sv2_setup_connection✅ (view plot)4,669.00 (-0.42%)4,614.24 (98.83%)4,763.28 (98.02%)✅ (view plot)1,502.00 (+0.05%)1,488.53 (99.10%)1,513.99 (99.21%)✅ (view plot)2,279.00 (+0.09%)2,256.55 (99.01%)2,297.17 (99.21%)✅ (view plot)9.00 (-4.15%)4.12 (45.83%)14.66 (61.41%)✅ (view plot)67.00 (-0.84%)65.45 (97.68%)69.69 (96.14%)
client_sv2_setup_connection_serialize✅ (view plot)16,136.00 (-0.49%)15,971.56 (98.98%)16,459.48 (98.03%)✅ (view plot)5,963.00 (+0.01%)5,949.53 (99.77%)5,974.99 (99.80%)✅ (view plot)8,666.00 (+0.08%)8,635.20 (99.64%)8,682.44 (99.81%)✅ (view plot)38.00 (-9.76%)31.60 (83.17%)52.62 (72.22%)✅ (view plot)208.00 (-0.90%)203.38 (97.78%)216.40 (96.12%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35,548.00 (+0.01%)35,356.61 (99.46%)35,734.63 (99.48%)✅ (view plot)14,855.00 (+0.17%)14,775.66 (99.47%)14,884.56 (99.80%)✅ (view plot)21,823.00 (+0.18%)21,692.88 (99.40%)21,873.46 (99.77%)✅ (view plot)92.00 (-3.17%)77.39 (84.12%)112.63 (81.68%)✅ (view plot)379.00 (-0.17%)375.25 (99.01%)384.03 (98.69%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link
Contributor

github-actions bot commented Jul 19, 2024

🐰Bencher

ReportWed, September 4, 2024 at 10:48:57 UTC
ProjectStratum V2 (SRI)
Branch2024-07-15-roles-testing
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Lower Boundary
estimated cycles | (%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Lower Boundary
instructions | (%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Lower Boundary
accesses | (%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Lower Boundary
accesses | (%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Lower Boundary
accesses | (%)
RAM Accesses Upper Boundary
accesses | (%)
get_authorize✅ (view plot)8,545.00 (+1.24%)8,159.42 (95.49%)8,721.39 (97.98%)✅ (view plot)3,772.00 (+0.67%)3,637.25 (96.43%)3,856.67 (97.80%)✅ (view plot)5,295.00 (+0.76%)5,104.82 (96.41%)5,405.60 (97.95%)✅ (view plot)6.00 (-18.64%)4.32 (71.92%)10.43 (57.50%)✅ (view plot)92.00 (+2.28%)85.89 (93.36%)94.01 (97.86%)
get_submit✅ (view plot)95,442.00 (-0.06%)94,920.89 (99.45%)96,082.84 (99.33%)✅ (view plot)59,522.00 (+0.09%)59,202.38 (99.46%)59,738.96 (99.64%)✅ (view plot)85,507.00 (+0.11%)85,037.11 (99.45%)85,791.14 (99.67%)✅ (view plot)48.00 (-3.37%)33.17 (69.10%)66.18 (72.53%)✅ (view plot)277.00 (-1.47%)273.88 (98.87%)288.37 (96.06%)
get_subscribe✅ (view plot)8,064.00 (+0.78%)7,714.93 (95.67%)8,288.41 (97.29%)✅ (view plot)2,848.00 (+0.46%)2,729.94 (95.85%)2,940.02 (96.87%)✅ (view plot)3,984.00 (+0.54%)3,822.38 (95.94%)4,103.08 (97.10%)✅ (view plot)11.00 (-19.27%)6.12 (55.59%)21.13 (52.05%)✅ (view plot)115.00 (+1.36%)108.77 (94.59%)118.13 (97.35%)
serialize_authorize✅ (view plot)12,328.00 (+0.69%)11,937.07 (96.83%)12,550.24 (98.23%)✅ (view plot)5,343.00 (+0.47%)5,208.25 (97.48%)5,427.67 (98.44%)✅ (view plot)7,458.00 (+0.55%)7,266.83 (97.44%)7,567.98 (98.55%)✅ (view plot)8.00 (-16.80%)5.58 (69.81%)13.65 (58.62%)✅ (view plot)138.00 (+1.08%)131.26 (95.11%)141.78 (97.33%)
serialize_deserialize_authorize✅ (view plot)24,931.00 (+1.45%)24,191.53 (97.03%)24,956.36 (99.90%)✅ (view plot)9,920.00 (+0.22%)9,771.33 (98.50%)10,025.98 (98.94%)✅ (view plot)14,016.00 (+0.33%)13,783.28 (98.34%)14,156.24 (99.01%)✅ (view plot)34.00 (-5.15%)29.45 (86.62%)42.24 (80.49%)✅ (view plot)307.00 (+3.07%)288.30 (93.91%)307.41 (99.87%)
serialize_deserialize_handle_authorize✅ (view plot)30,431.00 (+0.67%)29,896.45 (98.24%)30,560.82 (99.58%)✅ (view plot)12,097.00 (+0.04%)11,979.66 (99.03%)12,204.65 (99.12%)✅ (view plot)17,141.00 (+0.13%)16,961.17 (98.95%)17,275.33 (99.22%)✅ (view plot)54.00 (-5.90%)49.91 (92.43%)64.86 (83.26%)✅ (view plot)372.00 (+1.53%)357.53 (96.11%)375.24 (99.14%)
serialize_deserialize_handle_submit✅ (view plot)126,463.00 (+0.01%)125,862.45 (99.53%)127,037.79 (99.55%)✅ (view plot)73,363.00 (+0.13%)72,944.06 (99.43%)73,594.90 (99.68%)✅ (view plot)105,198.00 (+0.16%)104,563.73 (99.40%)105,498.81 (99.71%)✅ (view plot)109.00 (-3.12%)89.58 (82.18%)135.44 (80.48%)✅ (view plot)592.00 (-0.65%)589.28 (99.54%)602.50 (98.26%)
serialize_deserialize_handle_subscribe✅ (view plot)27,971.00 (+1.20%)27,032.16 (96.64%)28,246.15 (99.03%)✅ (view plot)9,666.00 (+0.25%)9,533.49 (98.63%)9,750.93 (99.13%)✅ (view plot)13,681.00 (+0.31%)13,488.04 (98.59%)13,789.11 (99.22%)✅ (view plot)58.00 (-10.12%)55.78 (96.17%)73.28 (79.15%)✅ (view plot)400.00 (+2.35%)374.92 (93.73%)406.68 (98.36%)
serialize_deserialize_submit✅ (view plot)115,445.00 (+0.25%)114,592.21 (99.26%)115,728.83 (99.75%)✅ (view plot)68,223.00 (+0.21%)67,769.39 (99.34%)68,393.34 (99.75%)✅ (view plot)97,935.00 (+0.25%)97,231.04 (99.28%)98,159.23 (99.77%)✅ (view plot)65.00 (-0.25%)52.35 (80.54%)77.97 (83.36%)✅ (view plot)491.00 (+0.27%)483.17 (98.40%)496.24 (98.94%)
serialize_deserialize_subscribe✅ (view plot)23,469.00 (+1.75%)22,459.72 (95.70%)23,669.47 (99.15%)✅ (view plot)8,225.00 (+0.34%)8,087.05 (98.32%)8,306.49 (99.02%)✅ (view plot)11,589.00 (+0.37%)11,394.83 (98.32%)11,696.67 (99.08%)✅ (view plot)38.00 (-0.68%)32.87 (86.51%)43.64 (87.07%)✅ (view plot)334.00 (+3.20%)308.34 (92.32%)338.94 (98.54%)
serialize_submit✅ (view plot)99,835.00 (-0.05%)99,344.10 (99.51%)100,435.24 (99.40%)✅ (view plot)61,566.00 (+0.08%)61,242.93 (99.48%)61,786.99 (99.64%)✅ (view plot)88,350.00 (+0.10%)87,874.59 (99.46%)88,642.16 (99.67%)✅ (view plot)50.00 (-1.68%)36.56 (73.12%)65.15 (76.74%)✅ (view plot)321.00 (-1.25%)318.46 (99.21%)331.65 (96.79%)
serialize_subscribe✅ (view plot)11,405.00 (+0.24%)11,072.39 (97.08%)11,682.22 (97.63%)✅ (view plot)4,195.00 (+0.31%)4,076.94 (97.19%)4,287.02 (97.85%)✅ (view plot)5,840.00 (+0.35%)5,679.27 (97.25%)5,960.06 (97.99%)✅ (view plot)14.00 (-2.87%)8.70 (62.17%)20.12 (69.57%)✅ (view plot)157.00 (+0.17%)150.78 (96.04%)162.69 (96.51%)

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@jbesraa jbesraa force-pushed the 2024-07-15-roles-testing branch 3 times, most recently from 8ace1ac to e90b991 Compare July 24, 2024 09:36
@pavlenex pavlenex added this to the 1.1.0 milestone Jul 30, 2024
@plebhash plebhash mentioned this pull request Jul 31, 2024
@jbesraa jbesraa force-pushed the 2024-07-15-roles-testing branch 2 times, most recently from c0dbde4 to fbb8464 Compare August 5, 2024 14:20
roles/pool/src/lib/mod.rs Outdated Show resolved Hide resolved
@jbesraa jbesraa force-pushed the 2024-07-15-roles-testing branch 8 times, most recently from a3f154b to 0be5cc6 Compare August 11, 2024 15:25
@jbesraa jbesraa force-pushed the 2024-07-15-roles-testing branch 9 times, most recently from ebdc14c to 69c5dcf Compare September 16, 2024 14:37
Handle errors in `start` function for better user experience and to be
able to catch errors in test environment, for example without
introducing error handling, we do not get a proper response if the
provided `coinbase_output` in the config is valid.
Adds a new property `state` to the pool struct. The main goal is
providing abilities to mutate the state internally, i.e. only by the
role itself, and abilities to view the state by the role runner.
@jbesraa
Copy link
Contributor Author

jbesraa commented Sep 16, 2024

@Shourya742 @plebhash Thanks for the ongoing review. This is ready for another round when you have a minute

Copy link
Contributor

🐰 Bencher Report

Branch1066/merge@28c806ce-5a65-47aa-9752-94de629827a2
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
get_authorize📈 view plot
🚷 view threshold
8,458.00
(+0.15%)
8,791.85
(96.20%)
📈 view plot
🚷 view threshold
3,746.00
(-0.05%)
3,881.06
(96.52%)
📈 view plot
🚷 view threshold
5,253.00
(-0.07%)
5,439.43
(96.57%)
📈 view plot
🚷 view threshold
4.00
(-42.60%)
11.70
(34.18%)
📈 view plot
🚷 view threshold
91.00
(+0.99%)
95.30
(95.49%)
get_submit📈 view plot
🚷 view threshold
95,371.00
(-0.11%)
96,198.50
(99.14%)
📈 view plot
🚷 view threshold
59,439.00
(-0.05%)
59,794.64
(99.41%)
📈 view plot
🚷 view threshold
85,371.00
(-0.05%)
85,872.03
(99.42%)
📈 view plot
🚷 view threshold
40.00
(-16.22%)
71.74
(55.76%)
📈 view plot
🚷 view threshold
280.00
(-0.26%)
289.94
(96.57%)
get_subscribe📈 view plot
🚷 view threshold
8,089.00
(+1.00%)
8,360.24
(96.76%)
📈 view plot
🚷 view threshold
2,841.00
(+0.16%)
2,963.72
(95.86%)
📈 view plot
🚷 view threshold
3,969.00
(+0.09%)
4,135.55
(95.97%)
📈 view plot
🚷 view threshold
12.00
(-7.08%)
23.19
(51.74%)
📈 view plot
🚷 view threshold
116.00
(+2.03%)
119.66
(96.94%)
serialize_authorize📈 view plot
🚷 view threshold
12,309.00
(+0.44%)
12,633.81
(97.43%)
📈 view plot
🚷 view threshold
5,317.00
(-0.04%)
5,452.06
(97.52%)
📈 view plot
🚷 view threshold
7,414.00
(-0.06%)
7,601.73
(97.53%)
📈 view plot
🚷 view threshold
6.00
(-34.69%)
15.09
(39.77%)
📈 view plot
🚷 view threshold
139.00
(+1.56%)
143.68
(96.74%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,735.00
(+0.52%)
25,132.43
(98.42%)
📈 view plot
🚷 view threshold
9,868.00
(-0.27%)
10,052.66
(98.16%)
📈 view plot
🚷 view threshold
13,930.00
(-0.26%)
14,196.67
(98.12%)
📈 view plot
🚷 view threshold
33.00
(-6.05%)
44.54
(74.09%)
📈 view plot
🚷 view threshold
304.00
(+1.66%)
313.05
(97.11%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,360.00
(+0.33%)
30,711.76
(98.85%)
📈 view plot
🚷 view threshold
12,071.00
(-0.15%)
12,226.82
(98.73%)
📈 view plot
🚷 view threshold
17,095.00
(-0.13%)
17,307.67
(98.77%)
📈 view plot
🚷 view threshold
56.00
(-0.35%)
68.57
(81.67%)
📈 view plot
🚷 view threshold
371.00
(+0.96%)
380.45
(97.52%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,446.00
(-0.01%)
127,166.02
(99.43%)
📈 view plot
🚷 view threshold
73,280.00
(+0.01%)
73,670.59
(99.47%)
📈 view plot
🚷 view threshold
105,056.00
(+0.01%)
105,614.71
(99.47%)
📈 view plot
🚷 view threshold
106.00
(-3.85%)
142.27
(74.51%)
📈 view plot
🚷 view threshold
596.00
(-0.01%)
604.60
(98.58%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,974.00
(+0.96%)
28,571.38
(97.91%)
📈 view plot
🚷 view threshold
9,659.00
(+0.14%)
9,779.09
(98.77%)
📈 view plot
🚷 view threshold
13,664.00
(+0.15%)
13,829.57
(98.80%)
📈 view plot
🚷 view threshold
62.00
(-2.76%)
75.87
(81.72%)
📈 view plot
🚷 view threshold
400.00
(+1.85%)
415.71
(96.22%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,215.00
(+0.03%)
115,885.39
(99.42%)
📈 view plot
🚷 view threshold
68,057.00
(-0.04%)
68,470.14
(99.40%)
📈 view plot
🚷 view threshold
97,655.00
(-0.05%)
98,279.16
(99.36%)
📈 view plot
🚷 view threshold
61.00
(-4.66%)
81.87
(74.51%)
📈 view plot
🚷 view threshold
493.00
(+0.56%)
499.11
(98.78%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,431.00
(+1.29%)
23,986.42
(97.68%)
📈 view plot
🚷 view threshold
8,211.00
(+0.13%)
8,334.51
(98.52%)
📈 view plot
🚷 view threshold
11,566.00
(+0.13%)
11,736.07
(98.55%)
📈 view plot
🚷 view threshold
35.00
(-7.42%)
45.33
(77.21%)
📈 view plot
🚷 view threshold
334.00
(+2.61%)
347.61
(96.08%)
serialize_submit📈 view plot
🚷 view threshold
99,840.00
(-0.04%)
100,540.23
(99.30%)
📈 view plot
🚷 view threshold
61,483.00
(-0.05%)
61,843.34
(99.42%)
📈 view plot
🚷 view threshold
88,210.00
(-0.05%)
88,724.12
(99.42%)
📈 view plot
🚷 view threshold
44.00
(-10.16%)
70.72
(62.21%)
📈 view plot
🚷 view threshold
326.00
(+0.31%)
333.30
(97.81%)
serialize_subscribe📈 view plot
🚷 view threshold
11,494.00
(+0.94%)
11,761.51
(97.73%)
📈 view plot
🚷 view threshold
4,188.00
(+0.11%)
4,310.72
(97.15%)
📈 view plot
🚷 view threshold
5,824.00
(+0.03%)
5,992.48
(97.19%)
📈 view plot
🚷 view threshold
14.00
(+2.34%)
22.28
(62.85%)
📈 view plot
🚷 view threshold
160.00
(+1.89%)
164.59
(97.21%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

@Shourya742 Shourya742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Just few nits and questions.

Comment on lines 191 to 193
listening_address: Option<std::net::SocketAddr>,
coinbase_outputs: Option<Vec<pool_sv2::mining_pool::CoinbaseOutput>>,
template_provider_address: Option<std::net::SocketAddr>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
listening_address: Option<std::net::SocketAddr>,
coinbase_outputs: Option<Vec<pool_sv2::mining_pool::CoinbaseOutput>>,
template_provider_address: Option<std::net::SocketAddr>,
listening_address: Option<SocketAddr>,
coinbase_outputs: Option<Vec<pool_sv2::mining_pool::CoinbaseOutput>>,
template_provider_address: Option<SocketAddr>,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed

Comment on lines 255 to 285
pub async fn start_template_provider_and_pool() -> Result<(PoolSv2, u16, TemplateProvider, u16), ()>
{
let (template_provider, template_provider_port) = start_template_provider().await;
let template_provider_address =
SocketAddr::from_str(&format!("127.0.0.1:{}", template_provider_port)).unwrap();
let test_pool = TestPoolSv2::new(None, None, Some(template_provider_address));
let pool = test_pool.pool.clone();
let state = pool.state().await.safe_lock(|s| s.clone()).unwrap();
assert_eq!(state, pool_sv2::PoolState::Initial);
let _pool = pool.clone();
tokio::task::spawn(async move {
assert!(_pool.start().await.is_ok());
});
// Wait for the pool to start.
tokio::time::sleep(Duration::from_secs(1)).await;
let pool_listening_address =
SocketAddr::from_str(&format!("127.0.0.1:{}", test_pool.port)).unwrap();
loop {
if is_port_open(pool_listening_address) {
break;
}
}
let state = pool.state().await.safe_lock(|s| s.clone()).unwrap();
assert_eq!(state, pool_sv2::PoolState::Running);
template_provider.stop();
Ok((
pool,
test_pool.port,
template_provider,
template_provider_port,
))
Copy link
Contributor

@Shourya742 Shourya742 Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we having a method to spun up both template provider and pool together in common module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main motivation here is to provide users(devs) with a single function to start both the TP and a Pool so they don't need to rewrite all of this code again and again

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this seems convenient at a first glance, I wonder how it will scale?

if we think that there's 7 different roles, and there could be scenarios where we want more than one instance (e.g.: 2 proxies connected to the same pool), the combinatorial possibilities can explode very quickly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should more useful in testing scenarios that involve the pool, i.e., the MG tests that are prefixed with pool_. All the pool tests need to start a TP before starting the pool so I wanted to avoid duplicating the code.

An example can be seen here: https://github.com/stratum-mining/stratum/pull/1164/files#diff-2a0b80af72100f3ef6475d64910e57bfa2194a668b3a7692391a53f964340fb4R68
all the code from L38 to L68 can be removed and the test will be much nicer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, once we use it in a test(in #1164 for example), we can remove this test that is ONLY calling this function

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following this logic, we would need to implement similar methods for JDC and TP setup as well. This approach becomes problematic when setting up a full Job Declarator configuration, as both methods would be ineffective due to the need for TP instances to use different ports. For each test, we may end up with some duplicated setup code, which could serve as a framework.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this?

Suggested change
pub async fn start_template_provider_and_pool() -> Result<(PoolSv2, u16, TemplateProvider, u16), ()>
{
let (template_provider, template_provider_port) = start_template_provider().await;
let template_provider_address =
SocketAddr::from_str(&format!("127.0.0.1:{}", template_provider_port)).unwrap();
let test_pool = TestPoolSv2::new(None, None, Some(template_provider_address));
let pool = test_pool.pool.clone();
let state = pool.state().await.safe_lock(|s| s.clone()).unwrap();
assert_eq!(state, pool_sv2::PoolState::Initial);
let _pool = pool.clone();
tokio::task::spawn(async move {
assert!(_pool.start().await.is_ok());
});
// Wait for the pool to start.
tokio::time::sleep(Duration::from_secs(1)).await;
let pool_listening_address =
SocketAddr::from_str(&format!("127.0.0.1:{}", test_pool.port)).unwrap();
loop {
if is_port_open(pool_listening_address) {
break;
}
}
let state = pool.state().await.safe_lock(|s| s.clone()).unwrap();
assert_eq!(state, pool_sv2::PoolState::Running);
template_provider.stop();
Ok((
pool,
test_pool.port,
template_provider,
template_provider_port,
))
pub async fn start_template_provider_and_pool(tp_port: Option<..>) -> Result<(PoolSv2, u16, TemplateProvider, u16), ()>
{
let (template_provider, template_provider_port) = start_template_provider(tp_port).await;
let template_provider_address =
SocketAddr::from_str(&format!("127.0.0.1:{}", template_provider_port)).unwrap();
let test_pool = TestPoolSv2::new(None, None, Some(template_provider_address));
let pool = test_pool.pool.clone();
let state = pool.state().await.safe_lock(|s| s.clone()).unwrap();
assert_eq!(state, pool_sv2::PoolState::Initial);
let _pool = pool.clone();
tokio::task::spawn(async move {
assert!(_pool.start().await.is_ok());
});
// Wait for the pool to start.
tokio::time::sleep(Duration::from_secs(1)).await;
let pool_listening_address =
SocketAddr::from_str(&format!("127.0.0.1:{}", test_pool.port)).unwrap();
loop {
if is_port_open(pool_listening_address) {
break;
}
}
let state = pool.state().await.safe_lock(|s| s.clone()).unwrap();
assert_eq!(state, pool_sv2::PoolState::Running);
template_provider.stop();
Ok((
pool,
test_pool.port,
template_provider,
template_provider_port,
))

And you are right, at the beginning there is a bit of overhead needing to add the different start functions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still not convinced about this. The example I provided was just one specific case. If, for instance, we want to change other configuration properties of any of the involved entities, it would require further modifications to the function signature. All functions should adhere to the Open/Closed Principle: they should be open for extension but closed to modification.

Copy link
Contributor

🐰 Bencher Report

Branch1066/merge@c89fd41a-035b-4524-8b3e-14517a3e6428
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
get_authorize📈 view plot
🚷 view threshold
8,424.00
(-0.25%)
8,791.61
(95.82%)
📈 view plot
🚷 view threshold
3,746.00
(-0.05%)
3,881.06
(96.52%)
📈 view plot
🚷 view threshold
5,254.00
(-0.05%)
5,439.44
(96.59%)
📈 view plot
🚷 view threshold
4.00
(-42.60%)
11.70
(34.18%)
📈 view plot
🚷 view threshold
90.00
(-0.11%)
95.29
(94.45%)
get_submit📈 view plot
🚷 view threshold
95,299.00
(-0.19%)
96,199.03
(99.06%)
📈 view plot
🚷 view threshold
59,439.00
(-0.05%)
59,794.64
(99.41%)
📈 view plot
🚷 view threshold
85,374.00
(-0.04%)
85,872.04
(99.42%)
📈 view plot
🚷 view threshold
39.00
(-18.30%)
71.76
(54.35%)
📈 view plot
🚷 view threshold
278.00
(-0.97%)
289.96
(95.88%)
get_subscribe📈 view plot
🚷 view threshold
8,025.00
(+0.20%)
8,359.06
(96.00%)
📈 view plot
🚷 view threshold
2,841.00
(+0.16%)
2,963.72
(95.86%)
📈 view plot
🚷 view threshold
3,970.00
(+0.12%)
4,135.56
(96.00%)
📈 view plot
🚷 view threshold
13.00
(+0.60%)
23.20
(56.04%)
📈 view plot
🚷 view threshold
114.00
(+0.28%)
119.61
(95.31%)
serialize_authorize📈 view plot
🚷 view threshold
12,275.00
(+0.17%)
12,633.29
(97.16%)
📈 view plot
🚷 view threshold
5,317.00
(-0.04%)
5,452.06
(97.52%)
📈 view plot
🚷 view threshold
7,415.00
(-0.05%)
7,601.73
(97.54%)
📈 view plot
🚷 view threshold
6.00
(-34.69%)
15.09
(39.77%)
📈 view plot
🚷 view threshold
138.00
(+0.83%)
143.65
(96.06%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,659.00
(+0.21%)
25,130.83
(98.12%)
📈 view plot
🚷 view threshold
9,868.00
(-0.27%)
10,052.66
(98.16%)
📈 view plot
🚷 view threshold
13,934.00
(-0.23%)
14,196.66
(98.15%)
📈 view plot
🚷 view threshold
31.00
(-11.70%)
44.58
(69.54%)
📈 view plot
🚷 view threshold
302.00
(+1.00%)
312.99
(96.49%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,284.00
(+0.08%)
30,710.34
(98.61%)
📈 view plot
🚷 view threshold
12,071.00
(-0.15%)
12,226.82
(98.73%)
📈 view plot
🚷 view threshold
17,099.00
(-0.10%)
17,307.67
(98.79%)
📈 view plot
🚷 view threshold
54.00
(-3.88%)
68.57
(78.75%)
📈 view plot
🚷 view threshold
369.00
(+0.42%)
380.41
(97.00%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,426.00
(-0.02%)
127,165.91
(99.42%)
📈 view plot
🚷 view threshold
73,280.00
(+0.01%)
73,670.59
(99.47%)
📈 view plot
🚷 view threshold
105,061.00
(+0.02%)
105,614.76
(99.48%)
📈 view plot
🚷 view threshold
101.00
(-8.36%)
142.31
(70.97%)
📈 view plot
🚷 view threshold
596.00
(-0.01%)
604.60
(98.58%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,906.00
(+0.71%)
28,569.43
(97.68%)
📈 view plot
🚷 view threshold
9,659.00
(+0.14%)
9,779.09
(98.77%)
📈 view plot
🚷 view threshold
13,666.00
(+0.16%)
13,829.60
(98.82%)
📈 view plot
🚷 view threshold
62.00
(-2.76%)
75.87
(81.72%)
📈 view plot
🚷 view threshold
398.00
(+1.35%)
415.65
(95.75%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,173.00
(-0.00%)
115,884.99
(99.39%)
📈 view plot
🚷 view threshold
68,057.00
(-0.04%)
68,470.14
(99.40%)
📈 view plot
🚷 view threshold
97,658.00
(-0.04%)
98,279.17
(99.37%)
📈 view plot
🚷 view threshold
59.00
(-7.77%)
81.89
(72.05%)
📈 view plot
🚷 view threshold
492.00
(+0.35%)
499.08
(98.58%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,371.00
(+1.03%)
23,984.49
(97.44%)
📈 view plot
🚷 view threshold
8,211.00
(+0.13%)
8,334.51
(98.52%)
📈 view plot
🚷 view threshold
11,566.00
(+0.13%)
11,736.07
(98.55%)
📈 view plot
🚷 view threshold
37.00
(-2.17%)
45.31
(81.66%)
📈 view plot
🚷 view threshold
332.00
(+2.00%)
347.55
(95.53%)
serialize_submit📈 view plot
🚷 view threshold
99,756.00
(-0.12%)
100,540.32
(99.22%)
📈 view plot
🚷 view threshold
61,483.00
(-0.05%)
61,843.34
(99.42%)
📈 view plot
🚷 view threshold
88,216.00
(-0.05%)
88,724.13
(99.43%)
📈 view plot
🚷 view threshold
40.00
(-18.28%)
70.79
(56.50%)
📈 view plot
🚷 view threshold
324.00
(-0.30%)
333.28
(97.22%)
serialize_subscribe📈 view plot
🚷 view threshold
11,426.00
(+0.35%)
11,759.94
(97.16%)
📈 view plot
🚷 view threshold
4,188.00
(+0.11%)
4,310.72
(97.15%)
📈 view plot
🚷 view threshold
5,826.00
(+0.06%)
5,992.50
(97.22%)
📈 view plot
🚷 view threshold
14.00
(+2.34%)
22.28
(62.85%)
📈 view plot
🚷 view threshold
158.00
(+0.63%)
164.53
(96.03%)
🐰 View full continuous benchmarking report in Bencher

A utility struct that wraps the original `PoolSv2` and provide some
utility to start the pool role in testing env.
Copy link
Contributor

🐰 Bencher Report

Branch1066/merge@991ec8ba-ce5b-4816-8436-2155c9211599
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
estimated cycles
(Result Δ%)
Upper Boundary
estimated cycles
(Limit %)
InstructionsBenchmark Result
instructions
(Result Δ%)
Upper Boundary
instructions
(Limit %)
L1 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
L2 AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
RAM AccessesBenchmark Result
accesses
(Result Δ%)
Upper Boundary
accesses
(Limit %)
get_authorize📈 view plot
🚷 view threshold
8,424.00
(-0.25%)
8,791.61
(95.82%)
📈 view plot
🚷 view threshold
3,746.00
(-0.05%)
3,881.06
(96.52%)
📈 view plot
🚷 view threshold
5,254.00
(-0.05%)
5,439.44
(96.59%)
📈 view plot
🚷 view threshold
4.00
(-42.60%)
11.70
(34.18%)
📈 view plot
🚷 view threshold
90.00
(-0.11%)
95.29
(94.45%)
get_submit📈 view plot
🚷 view threshold
95,299.00
(-0.19%)
96,199.03
(99.06%)
📈 view plot
🚷 view threshold
59,439.00
(-0.05%)
59,794.64
(99.41%)
📈 view plot
🚷 view threshold
85,374.00
(-0.04%)
85,872.04
(99.42%)
📈 view plot
🚷 view threshold
39.00
(-18.30%)
71.76
(54.35%)
📈 view plot
🚷 view threshold
278.00
(-0.97%)
289.96
(95.88%)
get_subscribe📈 view plot
🚷 view threshold
8,025.00
(+0.20%)
8,359.06
(96.00%)
📈 view plot
🚷 view threshold
2,841.00
(+0.16%)
2,963.72
(95.86%)
📈 view plot
🚷 view threshold
3,970.00
(+0.12%)
4,135.56
(96.00%)
📈 view plot
🚷 view threshold
13.00
(+0.60%)
23.20
(56.04%)
📈 view plot
🚷 view threshold
114.00
(+0.28%)
119.61
(95.31%)
serialize_authorize📈 view plot
🚷 view threshold
12,275.00
(+0.17%)
12,633.29
(97.16%)
📈 view plot
🚷 view threshold
5,317.00
(-0.04%)
5,452.06
(97.52%)
📈 view plot
🚷 view threshold
7,415.00
(-0.05%)
7,601.73
(97.54%)
📈 view plot
🚷 view threshold
6.00
(-34.69%)
15.09
(39.77%)
📈 view plot
🚷 view threshold
138.00
(+0.83%)
143.65
(96.06%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,655.00
(+0.19%)
25,130.77
(98.11%)
📈 view plot
🚷 view threshold
9,868.00
(-0.27%)
10,052.66
(98.16%)
📈 view plot
🚷 view threshold
13,935.00
(-0.22%)
14,196.65
(98.16%)
📈 view plot
🚷 view threshold
30.00
(-14.53%)
44.61
(67.25%)
📈 view plot
🚷 view threshold
302.00
(+1.00%)
312.99
(96.49%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,322.00
(+0.21%)
30,710.93
(98.73%)
📈 view plot
🚷 view threshold
12,071.00
(-0.15%)
12,226.82
(98.73%)
📈 view plot
🚷 view threshold
17,097.00
(-0.11%)
17,307.67
(98.78%)
📈 view plot
🚷 view threshold
55.00
(-2.11%)
68.57
(80.21%)
📈 view plot
🚷 view threshold
370.00
(+0.69%)
380.43
(97.26%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,456.00
(-0.00%)
127,166.09
(99.44%)
📈 view plot
🚷 view threshold
73,280.00
(+0.01%)
73,670.59
(99.47%)
📈 view plot
🚷 view threshold
105,061.00
(+0.02%)
105,614.76
(99.48%)
📈 view plot
🚷 view threshold
100.00
(-9.26%)
142.33
(70.26%)
📈 view plot
🚷 view threshold
597.00
(+0.15%)
604.61
(98.74%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,952.00
(+0.88%)
28,570.71
(97.83%)
📈 view plot
🚷 view threshold
9,659.00
(+0.14%)
9,779.09
(98.77%)
📈 view plot
🚷 view threshold
13,662.00
(+0.13%)
13,829.53
(98.79%)
📈 view plot
🚷 view threshold
65.00
(+1.91%)
75.89
(85.65%)
📈 view plot
🚷 view threshold
399.00
(+1.60%)
415.68
(95.99%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,169.00
(-0.01%)
115,884.96
(99.38%)
📈 view plot
🚷 view threshold
68,057.00
(-0.04%)
68,470.14
(99.40%)
📈 view plot
🚷 view threshold
97,659.00
(-0.04%)
98,279.17
(99.37%)
📈 view plot
🚷 view threshold
58.00
(-9.32%)
81.90
(70.81%)
📈 view plot
🚷 view threshold
492.00
(+0.35%)
499.08
(98.58%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,371.00
(+1.03%)
23,984.49
(97.44%)
📈 view plot
🚷 view threshold
8,211.00
(+0.13%)
8,334.51
(98.52%)
📈 view plot
🚷 view threshold
11,566.00
(+0.13%)
11,736.07
(98.55%)
📈 view plot
🚷 view threshold
37.00
(-2.17%)
45.31
(81.66%)
📈 view plot
🚷 view threshold
332.00
(+2.00%)
347.55
(95.53%)
serialize_submit📈 view plot
🚷 view threshold
99,756.00
(-0.12%)
100,540.32
(99.22%)
📈 view plot
🚷 view threshold
61,483.00
(-0.05%)
61,843.34
(99.42%)
📈 view plot
🚷 view threshold
88,216.00
(-0.05%)
88,724.13
(99.43%)
📈 view plot
🚷 view threshold
40.00
(-18.28%)
70.79
(56.50%)
📈 view plot
🚷 view threshold
324.00
(-0.30%)
333.28
(97.22%)
serialize_subscribe📈 view plot
🚷 view threshold
11,426.00
(+0.35%)
11,759.94
(97.16%)
📈 view plot
🚷 view threshold
4,188.00
(+0.11%)
4,310.72
(97.15%)
📈 view plot
🚷 view threshold
5,826.00
(+0.06%)
5,992.50
(97.22%)
📈 view plot
🚷 view threshold
14.00
(+2.34%)
22.28
(62.85%)
📈 view plot
🚷 view threshold
158.00
(+0.63%)
164.53
(96.03%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

🐰 Bencher Report

Branch1066/merge@fe1f0c73-e7c5-4d4d-b7ea-e61ad6f00f5d
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
44.98
(+0.63%)
46.65
(96.41%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
73.17
(-2.63%)
92.27
(79.30%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.76
(+0.53%)
14.82
(99.58%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
265.80
(-0.83%)
291.36
(91.23%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
587.01
(-0.95%)
650.46
(90.25%)
client_sv2_open_channel📈 view plot
🚷 view threshold
161.89
(-2.43%)
177.87
(91.01%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
273.88
(-1.05%)
307.42
(89.09%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
374.96
(-0.72%)
459.10
(81.67%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
161.25
(-0.42%)
185.86
(86.76%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
438.55
(-3.96%)
568.47
(77.15%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
978.01
(-1.95%)
1,162.82
(84.11%)
🐰 View full continuous benchmarking report in Bencher

@jbesraa
Copy link
Contributor Author

jbesraa commented Sep 20, 2024

I have been working a bit on this PR in order to improve our testing abilities. I wanted to mainly be able to aggregate each exchanged message between two roles. In the test you can see now that there is an assertion on the messages https://github.com/stratum-mining/stratum/pull/1066/files#diff-2a0b80af72100f3ef6475d64910e57bfa2194a668b3a7692391a53f964340fb4R39
thanks to @Fi3 for the ton of help, and for being so patient.

The PR is currently not passing CI because its linking to a local version of demand-easy-sv2, because there is currently a problem when running demand-easy-sv2 and pool in the same codebase due to mismatching in crates versioning.

@Shourya742
Copy link
Contributor

I have been working a bit on this PR in order to improve our testing abilities. I wanted to mainly be able to aggregate each exchanged message between two roles. In the test you can see now that there is an assertion on the messages https://github.com/stratum-mining/stratum/pull/1066/files#diff-2a0b80af72100f3ef6475d64910e57bfa2194a668b3a7692391a53f964340fb4R39 thanks to @Fi3 for the ton of help, and for being so patient.

The PR is currently not passing CI because its linking to a local version of demand-easy-sv2, because there is currently a problem when running demand-easy-sv2 and pool in the same codebase due to mismatching in crates versioning.

Damn! This is amazing! Demand-easy-sv2 to the rescue—I knew it could help with the message syncing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress 🏗️
Development

Successfully merging this pull request may close these issues.

7 participants