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

docs roles_logic_sv2 #1263

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

Conversation

plebhash
Copy link
Collaborator

close #1014

Copy link
Contributor

github-actions bot commented Nov 22, 2024

🐰 Bencher Report

Branchroles-logic-sv2-docs
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
45.98
(+2.94%)
47.26
(97.29%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
72.81
(-4.42%)
94.03
(77.43%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.67
(+0.06%)
14.76
(99.38%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
268.31
(+1.28%)
298.74
(89.81%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
627.44
(+2.04%)
681.58
(92.06%)
client_sv2_open_channel📈 view plot
🚷 view threshold
162.96
(+2.86%)
193.32
(84.29%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
287.89
(+1.05%)
310.92
(92.59%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
376.17
(-1.73%)
414.21
(90.82%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
162.14
(+1.35%)
168.60
(96.17%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
500.51
(+6.04%)
555.47
(90.11%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
997.96
(+0.89%)
1,090.84
(91.49%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Nov 22, 2024

🐰 Bencher Report

Branchroles-logic-sv2-docs
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,421.00
(-0.47%)
8,728.27
(96.48%)
📈 view plot
🚷 view threshold
3,689.00
(-1.43%)
3,869.23
(95.34%)
📈 view plot
🚷 view threshold
5,156.00
(-1.70%)
5,450.73
(94.59%)
📈 view plot
🚷 view threshold
9.00
(+20.50%)
14.46
(62.25%)
📈 view plot
🚷 view threshold
92.00
(+1.33%)
95.68
(96.15%)
get_submit📈 view plot
🚷 view threshold
95,197.00
(-0.22%)
95,860.11
(99.31%)
📈 view plot
🚷 view threshold
59,346.00
(-0.17%)
59,715.00
(99.38%)
📈 view plot
🚷 view threshold
85,222.00
(-0.18%)
85,819.39
(99.30%)
📈 view plot
🚷 view threshold
49.00
(+10.29%)
61.21
(80.06%)
📈 view plot
🚷 view threshold
278.00
(-0.81%)
290.13
(95.82%)
get_subscribe📈 view plot
🚷 view threshold
7,902.00
(-1.40%)
8,279.67
(95.44%)
📈 view plot
🚷 view threshold
2,765.00
(-2.25%)
2,948.10
(93.79%)
📈 view plot
🚷 view threshold
3,847.00
(-2.63%)
4,141.97
(92.88%)
📈 view plot
🚷 view threshold
13.00
(+9.19%)
20.30
(64.05%)
📈 view plot
🚷 view threshold
114.00
(-0.34%)
118.61
(96.12%)
serialize_authorize📈 view plot
🚷 view threshold
12,146.00
(-1.08%)
12,565.25
(96.66%)
📈 view plot
🚷 view threshold
5,266.00
(-0.92%)
5,435.46
(96.88%)
📈 view plot
🚷 view threshold
7,326.00
(-1.11%)
7,607.12
(96.30%)
📈 view plot
🚷 view threshold
12.00
(+28.64%)
17.23
(69.65%)
📈 view plot
🚷 view threshold
136.00
(-1.30%)
142.57
(95.39%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,636.00
(-0.27%)
25,208.36
(97.73%)
📈 view plot
🚷 view threshold
9,838.00
(-0.45%)
10,042.16
(97.97%)
📈 view plot
🚷 view threshold
13,876.00
(-0.53%)
14,207.72
(97.67%)
📈 view plot
🚷 view threshold
38.00
(+9.28%)
44.13
(86.12%)
📈 view plot
🚷 view threshold
302.00
(-0.08%)
314.57
(96.01%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,152.00
(-0.57%)
30,749.68
(98.06%)
📈 view plot
🚷 view threshold
12,015.00
(-0.48%)
12,210.41
(98.40%)
📈 view plot
🚷 view threshold
16,997.00
(-0.57%)
17,313.63
(98.17%)
📈 view plot
🚷 view threshold
62.00
(+11.62%)
67.17
(92.30%)
📈 view plot
🚷 view threshold
367.00
(-0.84%)
381.15
(96.29%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,253.00
(-0.17%)
126,899.67
(99.49%)
📈 view plot
🚷 view threshold
73,200.00
(-0.10%)
73,534.48
(99.55%)
📈 view plot
🚷 view threshold
104,913.00
(-0.13%)
105,486.26
(99.46%)
📈 view plot
🚷 view threshold
110.00
(+3.52%)
128.19
(85.81%)
📈 view plot
🚷 view threshold
594.00
(-0.49%)
607.25
(97.82%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
27,756.00
(-0.40%)
28,558.65
(97.19%)
📈 view plot
🚷 view threshold
9,584.00
(-0.62%)
9,761.94
(98.18%)
📈 view plot
🚷 view threshold
13,531.00
(-0.79%)
13,828.51
(97.85%)
📈 view plot
🚷 view threshold
73.00
(+14.82%)
76.07
(95.96%)
📈 view plot
🚷 view threshold
396.00
(-0.36%)
415.38
(95.33%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,153.00
(-0.09%)
115,781.33
(99.46%)
📈 view plot
🚷 view threshold
68,060.00
(-0.05%)
68,419.09
(99.48%)
📈 view plot
🚷 view threshold
97,648.00
(-0.07%)
98,273.31
(99.36%)
📈 view plot
🚷 view threshold
71.00
(+12.54%)
80.86
(87.81%)
📈 view plot
🚷 view threshold
490.00
(-0.40%)
500.95
(97.81%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,176.00
(-0.48%)
23,939.59
(96.81%)
📈 view plot
🚷 view threshold
8,143.00
(-0.69%)
8,318.33
(97.89%)
📈 view plot
🚷 view threshold
11,451.00
(-0.83%)
11,736.37
(97.57%)
📈 view plot
🚷 view threshold
42.00
(+12.12%)
45.56
(92.18%)
📈 view plot
🚷 view threshold
329.00
(-0.32%)
346.24
(95.02%)
serialize_submit📈 view plot
🚷 view threshold
99,586.00
(-0.25%)
100,288.79
(99.30%)
📈 view plot
🚷 view threshold
61,408.00
(-0.14%)
61,744.26
(99.46%)
📈 view plot
🚷 view threshold
88,081.00
(-0.16%)
88,649.92
(99.36%)
📈 view plot
🚷 view threshold
54.00
(+15.45%)
64.66
(83.51%)
📈 view plot
🚷 view threshold
321.00
(-1.24%)
335.37
(95.72%)
serialize_subscribe📈 view plot
🚷 view threshold
11,347.00
(-0.52%)
11,675.06
(97.19%)
📈 view plot
🚷 view threshold
4,118.00
(-1.41%)
4,290.15
(95.99%)
📈 view plot
🚷 view threshold
5,707.00
(-1.74%)
5,994.76
(95.20%)
📈 view plot
🚷 view threshold
15.00
(+15.38%)
21.68
(69.19%)
📈 view plot
🚷 view threshold
159.00
(+0.57%)
163.72
(97.12%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Nov 22, 2024

🐰 Bencher Report

Branchroles-logic-sv2-docs
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,596.60
(-0.90%)
7,149.97
(92.26%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,490.70
(-0.69%)
8,140.84
(92.01%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,086.50
(-0.52%)
8,623.46
(93.77%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
848.66
(-1.67%)
918.11
(92.44%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
669.74
(-0.35%)
708.50
(94.53%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
245.53
(-1.25%)
269.40
(91.14%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
156.06
(-0.61%)
162.08
(96.29%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,375.50
(-1.16%)
7,136.76
(89.33%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
280.00
(+0.36%)
301.11
(92.99%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
723.90
(-0.58%)
777.53
(93.10%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
586.66
(-0.66%)
633.95
(92.54%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
204.87
(-0.36%)
214.52
(95.50%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Nov 22, 2024

🐰 Bencher Report

Branchroles-logic-sv2-docs
Testbedsv2

🚨 4 Alerts

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
client_sv2_handle_message_miningEstimated Cycles
estimated cycles
📈 plot
🚨 alert (🔔)
🚷 threshold
8,360.00
(+1.83%)
8,332.13
(100.33%)
client_sv2_handle_message_miningRAM Accesses
accesses
📈 plot
🚨 alert (🔔)
🚷 threshold
143.00
(+2.73%)
142.54
(100.33%)
client_sv2_mining_message_submit_standard_serialize_deserializeL2 Accesses
accesses
📈 plot
🚨 alert (🔔)
🚷 threshold
94.00
(+14.60%)
93.34
(100.71%)
client_sv2_open_channel_serializeL2 Accesses
accesses
📈 plot
🚨 alert (🔔)
🚷 threshold
45.00
(+27.26%)
45.00
(100.01%)
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 %)
client_sv2_handle_message_common📈 view plot
🚷 view threshold
2,129.00
(+1.33%)
2,216.85
(96.04%)
📈 view plot
🚷 view threshold
473.00
(-0.09%)
488.63
(96.80%)
📈 view plot
🚷 view threshold
734.00
(-0.27%)
757.33
(96.92%)
📈 view plot
🚷 view threshold
6.00
(+15.66%)
13.23
(45.35%)
📈 view plot
🚷 view threshold
39.00
(+1.94%)
41.42
(94.16%)
client_sv2_handle_message_mining📈 view plot
🚨 view alert (🔔)
🚷 view threshold
8,360.00
(+1.83%)
8,332.13
(100.33%)
📈 view plot
🚷 view threshold
2,137.00
(-0.03%)
2,143.08
(99.72%)
📈 view plot
🚷 view threshold
3,150.00
(-0.33%)
3,171.13
(99.33%)
📈 view plot
🚷 view threshold
41.00
(+15.88%)
41.51
(98.78%)
📈 view plot
🚨 view alert (🔔)
🚷 view threshold
143.00
(+2.73%)
142.54
(100.33%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,399.00
(+1.76%)
6,422.71
(99.63%)
📈 view plot
🚷 view threshold
1,750.00
(-0.06%)
1,766.96
(99.04%)
📈 view plot
🚷 view threshold
2,544.00
(-0.36%)
2,575.67
(98.77%)
📈 view plot
🚷 view threshold
22.00
(+29.41%)
24.40
(90.16%)
📈 view plot
🚷 view threshold
107.00
(+2.60%)
108.01
(99.06%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,896.00
(+1.16%)
14,944.07
(99.68%)
📈 view plot
🚷 view threshold
4,694.00
(-0.02%)
4,710.96
(99.64%)
📈 view plot
🚷 view threshold
6,741.00
(-0.25%)
6,783.59
(99.37%)
📈 view plot
🚷 view threshold
56.00
(+27.45%)
56.37
(99.35%)
📈 view plot
🚷 view threshold
225.00
(+1.64%)
226.96
(99.14%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27,868.00
(+1.14%)
27,906.61
(99.86%)
📈 view plot
🚷 view threshold
10,645.00
(+0.50%)
10,671.04
(99.76%)
📈 view plot
🚷 view threshold
15,498.00
(+0.54%)
15,545.52
(99.69%)
📈 view plot
🚨 view alert (🔔)
🚷 view threshold
94.00
(+14.60%)
93.34
(100.71%)
📈 view plot
🚷 view threshold
340.00
(+1.47%)
341.76
(99.49%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,485.00
(+2.19%)
4,566.45
(98.22%)
📈 view plot
🚷 view threshold
1,461.00
(-0.03%)
1,476.63
(98.94%)
📈 view plot
🚷 view threshold
2,155.00
(-0.25%)
2,183.51
(98.69%)
📈 view plot
🚷 view threshold
11.00
(+28.82%)
15.91
(69.15%)
📈 view plot
🚷 view threshold
65.00
(+4.08%)
67.31
(96.56%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14,120.00
(+0.64%)
14,287.04
(98.83%)
📈 view plot
🚷 view threshold
5,064.00
(-0.01%)
5,079.63
(99.69%)
📈 view plot
🚷 view threshold
7,315.00
(-0.16%)
7,350.81
(99.51%)
📈 view plot
🚨 view alert (🔔)
🚷 view threshold
45.00
(+27.26%)
45.00
(100.01%)
📈 view plot
🚷 view threshold
188.00
(+0.81%)
193.90
(96.96%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,892.00
(+0.99%)
22,940.20
(99.79%)
📈 view plot
🚷 view threshold
8,040.00
(+0.17%)
8,066.80
(99.67%)
📈 view plot
🚷 view threshold
11,687.00
(+0.09%)
11,737.66
(99.57%)
📈 view plot
🚷 view threshold
85.00
(+13.68%)
86.32
(98.48%)
📈 view plot
🚷 view threshold
308.00
(+1.53%)
310.39
(99.23%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,715.00
(+0.62%)
4,780.81
(98.62%)
📈 view plot
🚷 view threshold
1,502.00
(-0.03%)
1,517.63
(98.97%)
📈 view plot
🚷 view threshold
2,275.00
(-0.15%)
2,299.19
(98.95%)
📈 view plot
🚷 view threshold
12.00
(+24.27%)
16.54
(72.56%)
📈 view plot
🚷 view threshold
68.00
(+0.88%)
69.95
(97.22%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,248.00
(+0.56%)
16,387.95
(99.15%)
📈 view plot
🚷 view threshold
5,963.00
(-0.01%)
5,978.63
(99.74%)
📈 view plot
🚷 view threshold
8,653.00
(-0.13%)
8,690.87
(99.56%)
📈 view plot
🚷 view threshold
49.00
(+22.81%)
53.41
(91.74%)
📈 view plot
🚷 view threshold
210.00
(+0.78%)
214.31
(97.99%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,782.00
(+0.61%)
35,832.45
(99.86%)
📈 view plot
🚷 view threshold
14,888.00
(+0.21%)
14,912.07
(99.84%)
📈 view plot
🚷 view threshold
21,867.00
(+0.18%)
21,920.74
(99.75%)
📈 view plot
🚷 view threshold
109.00
(+18.07%)
112.29
(97.07%)
📈 view plot
🚷 view threshold
382.00
(+0.72%)
384.94
(99.24%)
🐰 View full continuous benchmarking report in Bencher

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 19.30%. Comparing base (5bcd54d) to head (573c626).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
protocols/v2/roles-logic-sv2/src/routing_logic.rs 0.00% 12 Missing ⚠️
protocols/v2/roles-logic-sv2/src/selectors.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1263   +/-   ##
=======================================
  Coverage   19.30%   19.30%           
=======================================
  Files         164      164           
  Lines       10849    10849           
=======================================
  Hits         2094     2094           
  Misses       8755     8755           
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <0.00%> (ø)
binary_serde_sv2-coverage 3.65% <0.00%> (ø)
binary_sv2-coverage 5.48% <0.00%> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.01% <0.00%> (ø)
common_messages_sv2-coverage 0.13% <0.00%> (ø)
const_sv2-coverage 0.00% <0.00%> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.29% <0.00%> (ø)
jd_client-coverage 0.00% <ø> (ø)
jd_server-coverage 7.79% <ø> (ø)
job_declaration_sv2-coverage 0.00% <0.00%> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.51% <0.00%> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.70% <ø> (ø)
noise_sv2-coverage 4.35% <0.00%> (ø)
pool_sv2-coverage 1.38% <ø> (ø)
protocols 24.72% <0.00%> (ø)
roles 6.55% <ø> (ø)
roles_logic_sv2-coverage 8.08% <0.00%> (ø)
sv2_ffi-coverage 0.00% <0.00%> (ø)
template_distribution_sv2-coverage 0.00% <0.00%> (ø)
translator_sv2-coverage 9.60% <ø> (ø)
utils 25.13% <ø> (ø)
v1-coverage 2.47% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plebhash plebhash changed the title [WIP] docs roles_logic_sv2 docs roles_logic_sv2 Nov 22, 2024
@plebhash plebhash force-pushed the roles-logic-sv2-docs branch from 9734571 to c3bf010 Compare November 22, 2024 22:02
@plebhash plebhash marked this pull request as ready for review November 22, 2024 22:02
@plebhash plebhash force-pushed the roles-logic-sv2-docs branch 5 times, most recently from c0bbc4f to f9b2125 Compare November 22, 2024 23:34
@plebhash
Copy link
Collaborator Author

we need to add a README.md

@plebhash plebhash marked this pull request as draft November 27, 2024 15:17
@plebhash plebhash marked this pull request as ready for review December 2, 2024 06:41
@plebhash plebhash force-pushed the roles-logic-sv2-docs branch from 426e910 to 14649c1 Compare December 2, 2024 07:19
@plebhash plebhash force-pushed the roles-logic-sv2-docs branch 3 times, most recently from e99baf1 to 736b05c Compare December 9, 2024 10:01
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. We're not adding documentation for some structs, enums, and methods right now because they're likely to change in the near future. This crate needs significant refactoring, which will involve architectural changes. While the current documentation isn't complete, it provides enough context to understand the crate. We'll add examples once the refactoring is finished.

@plebhash plebhash force-pushed the roles-logic-sv2-docs branch from 736b05c to 73b0561 Compare December 11, 2024 13:09
@plebhash
Copy link
Collaborator Author

plebhash commented Dec 11, 2024

ACK. We're not adding documentation for some structs, enums, and methods right now because they're likely to change in the near future. This crate needs significant refactoring, which will involve architectural changes. While the current documentation isn't complete, it provides enough context to understand the crate. We'll add examples once the refactoring is finished.

thanks!

I made one last round of modifications (based on #![deny(missing_docs)] 🙈) and I made sure to cover every single pub function/method.

The elements still missing docs are:

  • some pub struct members
  • some pub enum variants

all of them are obvious and meaning is self-evident... writing them would be extremely laborious and chatGPT proved a bit error-prone, so IMO it's fine to leave them like this

@plebhash plebhash force-pushed the roles-logic-sv2-docs branch from 73b0561 to 573c626 Compare December 11, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need Rust docs on protocols::v2::roles-logic-sv2
3 participants