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

improve framing-sv2 modularization #847

Closed
wants to merge 2 commits into from

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Apr 13, 2024

close #846

This PR splits src/framing2.rs into smaller submodules:

src
 └── framing
     ├── mod.rs (submodule declarations)
     ├── either_frame.rs (`EitherFrame` enum declaration + `impl` blocks)
     ├── frame.rs (`Frame` trait declaration)
     ├── noise_frame.rs (`NoiseFrame` struct declaration + `impl` blocks)
     └── sv2_frame.rs (`Sv2Frame` struct declaration + `impl` blocks)

@plebhash plebhash changed the base branch from main to dev April 13, 2024 00:54
Copy link
Contributor

🐰Bencher

ReportSat, April 13, 2024 at 00:58:23 UTC
ProjectStratum v2 (SRI)
Branchmodularize-framing-sv2
Testbedsv2
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
client_sv2_handle_message_common✅ (view plot)2073.000 (+1.43%)2136.411 (97.03%)✅ (view plot)473.000 (+0.76%)489.299 (96.67%)✅ (view plot)733.000 (+0.29%)760.260 (96.41%)✅ (view plot)9.000 (+37.50%)10.005 (89.95%)✅ (view plot)37.000 (+1.16%)38.935 (95.03%)
client_sv2_handle_message_mining✅ (view plot)8283.000 (+1.26%)8347.534 (99.23%)✅ (view plot)2137.000 (+0.75%)2174.337 (98.28%)✅ (view plot)3158.000 (+0.75%)3220.738 (98.05%)✅ (view plot)38.000 (-3.61%)43.990 (86.38%)✅ (view plot)141.000 (+1.79%)142.357 (99.05%)
client_sv2_mining_message_submit_standard✅ (view plot)6330.000 (+0.66%)6423.997 (98.54%)✅ (view plot)1750.000 (+0.03%)1767.103 (99.03%)✅ (view plot)2550.000 (-0.12%)2581.520 (98.78%)✅ (view plot)21.000 (+20.73%)22.895 (91.72%)✅ (view plot)105.000 (+0.73%)107.895 (97.32%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14871.000 (+0.80%)15069.931 (98.68%)✅ (view plot)4694.000 (+0.01%)4711.103 (99.64%)✅ (view plot)6751.000 (-0.06%)6781.552 (99.55%)✅ (view plot)49.000 (+3.59%)52.317 (93.66%)✅ (view plot)225.000 (+1.46%)230.993 (97.41%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27636.000 (+0.74%)27877.632 (99.13%)✅ (view plot)10545.000 (+0.05%)10560.549 (99.85%)✅ (view plot)15336.000 (-0.01%)15365.340 (99.81%)✅ (view plot)87.000 (+4.10%)88.951 (97.81%)✅ (view plot)339.000 (+1.60%)346.378 (97.87%)
client_sv2_open_channel✅ (view plot)4531.000 (+1.14%)4620.907 (98.05%)✅ (view plot)1461.000 (+0.08%)1478.311 (98.83%)✅ (view plot)2151.000 (-0.09%)2179.129 (98.71%)✅ (view plot)14.000 (+22.55%)14.922 (93.82%)✅ (view plot)66.000 (+1.78%)68.466 (96.40%)
client_sv2_open_channel_serialize✅ (view plot)14338.000 (+1.07%)14460.285 (99.15%)✅ (view plot)5064.000 (+0.02%)5081.311 (99.66%)✅ (view plot)7313.000 (-0.07%)7346.179 (99.55%)✅ (view plot)40.000 (+8.55%)41.682 (95.96%)✅ (view plot)195.000 (+2.13%)198.879 (98.05%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22814.000 (+1.03%)23020.401 (99.10%)✅ (view plot)7987.000 (+0.08%)8003.004 (99.80%)✅ (view plot)11609.000 (-0.04%)11643.463 (99.70%)✅ (view plot)78.000 (+9.07%)79.155 (98.54%)✅ (view plot)309.000 (+1.92%)315.066 (98.07%)
client_sv2_setup_connection✅ (view plot)4703.000 (-0.02%)4782.940 (98.33%)✅ (view plot)1502.000 (+0.08%)1519.311 (98.86%)✅ (view plot)2278.000 (+0.10%)2305.269 (98.82%)✅ (view plot)9.000 (-4.19%)14.336 (62.78%)✅ (view plot)68.000 (-0.04%)70.036 (97.09%)
client_sv2_setup_connection_serialize✅ (view plot)16338.000 (+0.67%)16446.478 (99.34%)✅ (view plot)5963.000 (+0.02%)5980.311 (99.71%)✅ (view plot)8653.000 (-0.04%)8684.864 (99.63%)✅ (view plot)46.000 (+4.91%)48.036 (95.76%)✅ (view plot)213.000 (+1.38%)216.313 (98.47%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35624.000 (+0.35%)35733.230 (99.69%)✅ (view plot)14814.000 (+0.04%)14830.004 (99.89%)✅ (view plot)21744.000 (-0.03%)21779.069 (99.84%)✅ (view plot)109.000 (+12.55%)110.016 (99.08%)✅ (view plot)381.000 (+0.53%)384.323 (99.14%)

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

Copy link
Contributor

🐰Bencher

ReportSat, April 13, 2024 at 00:58:24 UTC
ProjectStratum v2 (SRI)
Branch847/merge
Testbedsv1
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)7151.200 (+3.41%)7276.428 (98.28%)
client-submit-serialize-deserialize✅ (view plot)8089.400 (+3.28%)8262.454 (97.91%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8607.300 (+2.28%)8832.170 (97.45%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)923.620 (+2.68%)931.336 (99.17%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)699.160 (+0.37%)716.238 (97.62%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize🚨 (view plot | view alert)260.300 (+4.99%)255.924 (101.71%)
client-sv1-get-authorize/client-sv1-get-authorize🚨 (view plot | view alert)162.960 (+3.76%)161.209 (101.09%)
client-sv1-get-submit✅ (view plot)6946.700 (+4.02%)7055.497 (98.46%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)278.700 (-0.16%)292.466 (95.29%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle🚨 (view plot | view alert)781.040 (+4.41%)779.492 (100.20%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize🚨 (view plot | view alert)643.660 (+4.44%)642.647 (100.16%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)209.950 (+1.40%)220.837 (95.07%)

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

Copy link
Contributor

🐰Bencher

ReportSat, April 13, 2024 at 00:58:24 UTC
ProjectStratum v2 (SRI)
Branchmodularize-framing-sv2
Testbedsv2
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)44.432 (-0.11%)45.216 (98.27%)
client_sv2_handle_message_mining✅ (view plot)74.448 (+3.65%)80.651 (92.31%)
client_sv2_mining_message_submit_standard✅ (view plot)14.636 (-0.14%)14.694 (99.60%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)256.990 (-3.48%)289.282 (88.84%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)598.810 (+1.26%)619.127 (96.72%)
client_sv2_open_channel✅ (view plot)171.810 (+3.52%)172.812 (99.42%)
client_sv2_open_channel_serialize✅ (view plot)278.770 (-1.87%)294.877 (94.54%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)372.370 (-1.27%)408.689 (91.11%)
client_sv2_setup_connection✅ (view plot)165.190 (+0.88%)176.603 (93.54%)
client_sv2_setup_connection_serialize✅ (view plot)464.960 (-1.63%)497.157 (93.52%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)957.090 (-2.28%)1052.213 (90.96%)

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

Copy link
Contributor

🐰Bencher

ReportSat, April 13, 2024 at 00:58:26 UTC
ProjectStratum v2 (SRI)
Branchmodularize-framing-sv2
Testbedsv1
BenchmarkEstimated CyclesEstimated Cycles Results
estimated cycles | (Δ%)
Estimated Cycles Upper Boundary
estimated cycles | (%)
InstructionsInstructions Results
instructions | (Δ%)
Instructions Upper Boundary
instructions | (%)
L1 AccessesL1 Accesses Results
accesses | (Δ%)
L1 Accesses Upper Boundary
accesses | (%)
L2 AccessesL2 Accesses Results
accesses | (Δ%)
L2 Accesses Upper Boundary
accesses | (%)
RAM AccessesRAM Accesses Results
accesses | (Δ%)
RAM Accesses Upper Boundary
accesses | (%)
get_authorize✅ (view plot)8478.000 (+0.19%)8548.406 (99.18%)✅ (view plot)3746.000 (-0.17%)3777.552 (99.16%)✅ (view plot)5248.000 (-0.24%)5302.188 (98.98%)✅ (view plot)9.000 (+13.79%)10.666 (84.38%)✅ (view plot)91.000 (+0.74%)92.055 (98.85%)
get_submit✅ (view plot)95579.000 (+0.02%)95678.915 (99.90%)✅ (view plot)59439.000 (-0.03%)59536.619 (99.84%)✅ (view plot)85349.000 (-0.05%)85518.286 (99.80%)✅ (view plot)58.000 (+5.28%)60.727 (95.51%)✅ (view plot)284.000 (+0.43%)284.813 (99.71%)
get_subscribe✅ (view plot)8049.000 (+0.50%)8097.399 (99.40%)✅ (view plot)2841.000 (-0.07%)2850.674 (99.66%)✅ (view plot)3964.000 (-0.18%)3983.193 (99.52%)✅ (view plot)19.000 (+18.30%)19.931 (95.33%)✅ (view plot)114.000 (+0.83%)115.230 (98.93%)
serialize_authorize✅ (view plot)12231.000 (+0.06%)12386.348 (98.75%)✅ (view plot)5317.000 (-0.12%)5348.552 (99.41%)✅ (view plot)7411.000 (-0.17%)7463.920 (99.29%)✅ (view plot)12.000 (+10.31%)13.337 (89.97%)✅ (view plot)136.000 (+0.31%)139.341 (97.60%)
serialize_deserialize_authorize✅ (view plot)24472.000 (-0.08%)24595.279 (99.50%)✅ (view plot)9898.000 (-0.13%)9959.676 (99.38%)✅ (view plot)13957.000 (-0.17%)14067.683 (99.21%)✅ (view plot)38.000 (+4.07%)41.233 (92.16%)✅ (view plot)295.000 (-0.03%)297.088 (99.30%)
serialize_deserialize_handle_authorize✅ (view plot)30161.000 (-0.01%)30246.227 (99.72%)✅ (view plot)12101.000 (-0.05%)12132.552 (99.74%)✅ (view plot)17121.000 (-0.08%)17179.781 (99.66%)✅ (view plot)60.000 (+4.21%)61.486 (97.58%)✅ (view plot)364.000 (-0.01%)366.584 (99.29%)
serialize_deserialize_handle_submit✅ (view plot)126400.000 (-0.02%)126493.363 (99.93%)✅ (view plot)73224.000 (-0.03%)73320.272 (99.87%)✅ (view plot)104940.000 (-0.04%)105112.725 (99.84%)✅ (view plot)127.000 (+5.75%)129.376 (98.16%)✅ (view plot)595.000 (-0.07%)598.675 (99.39%)
serialize_deserialize_handle_subscribe✅ (view plot)27511.000 (+0.14%)27546.617 (99.87%)✅ (view plot)9643.000 (-0.02%)9652.674 (99.90%)✅ (view plot)13636.000 (-0.05%)13656.206 (99.85%)✅ (view plot)66.000 (+2.74%)69.326 (95.20%)✅ (view plot)387.000 (+0.27%)388.571 (99.60%)
serialize_deserialize_submit✅ (view plot)114985.000 (-0.07%)115277.726 (99.75%)✅ (view plot)68001.000 (-0.06%)68193.545 (99.72%)✅ (view plot)97555.000 (-0.07%)97883.552 (99.66%)✅ (view plot)70.000 (+1.58%)73.721 (94.95%)✅ (view plot)488.000 (-0.13%)491.098 (99.37%)
serialize_deserialize_subscribe✅ (view plot)22904.000 (+0.02%)22962.796 (99.74%)✅ (view plot)8195.000 (-0.04%)8212.689 (99.78%)✅ (view plot)11539.000 (-0.07%)11572.766 (99.71%)✅ (view plot)40.000 (+2.64%)43.727 (91.48%)✅ (view plot)319.000 (+0.06%)320.439 (99.55%)
serialize_submit✅ (view plot)99896.000 (+0.01%)100086.703 (99.81%)✅ (view plot)61483.000 (-0.03%)61580.619 (99.84%)✅ (view plot)88196.000 (-0.04%)88361.750 (99.81%)✅ (view plot)58.000 (+4.48%)60.022 (96.63%)✅ (view plot)326.000 (+0.30%)327.529 (99.53%)
serialize_subscribe✅ (view plot)11378.000 (+0.28%)11498.852 (98.95%)✅ (view plot)4188.000 (-0.04%)4197.674 (99.77%)✅ (view plot)5823.000 (-0.12%)5839.687 (99.71%)✅ (view plot)19.000 (+16.98%)19.082 (99.57%)✅ (view plot)156.000 (+0.45%)159.368 (97.89%)

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

@plebhash plebhash self-assigned this Apr 13, 2024
@plebhash plebhash added the refactor Implies refactoring code label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Implies refactoring code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust Docs: protocols crates
1 participant