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

better import for libsecp256k1 #894

Merged

Conversation

rockcoolsaint
Copy link
Contributor

fixes issue raised in #749

This was essentially a refactoring issue

@plebhash
Copy link
Collaborator

plebhash commented May 4, 2024

I think this PR is diverging from the description of #749

this PR should be removing these lines:

secp256k1 = { version = "0.28.2", default-features = false, features =["alloc","rand","rand-std"] }

secp256k1 = { version = "0.28.2", default-features = false, features =["alloc","rand","rand-std"] }

and adding it to common/Cargo.toml

@rockcoolsaint rockcoolsaint force-pushed the innocent/import-libsecp256k1 branch 2 times, most recently from 5a8c738 to b39684d Compare May 11, 2024 10:26
Copy link
Contributor

github-actions bot commented May 11, 2024

🐰Bencher

ReportSun, May 12, 2024 at 13:54:27 UTC
ProjectStratum v2 (SRI)
Branchinnocent/import-libsecp256k1
Testbedsv2
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)44.00 (-1.26%)45.39 (96.94%)
client_sv2_handle_message_mining✅ (view plot)76.00 (+3.38%)82.36 (92.28%)
client_sv2_mining_message_submit_standard✅ (view plot)14.63 (-0.14%)14.69 (99.62%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)260.16 (-1.63%)282.92 (91.96%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)578.21 (-2.60%)626.08 (92.35%)
client_sv2_open_channel✅ (view plot)166.63 (+0.00%)178.17 (93.52%)
client_sv2_open_channel_serialize✅ (view plot)276.37 (-2.73%)295.42 (93.55%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)372.39 (-1.08%)401.00 (92.87%)
client_sv2_setup_connection✅ (view plot)164.82 (+0.29%)174.72 (94.34%)
client_sv2_setup_connection_serialize✅ (view plot)469.80 (-0.28%)498.66 (94.21%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)959.20 (-1.22%)1,044.48 (91.84%)

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

Copy link
Contributor

github-actions bot commented May 11, 2024

🐰Bencher

ReportSun, May 12, 2024 at 13:54:26 UTC
ProjectStratum v2 (SRI)
Branch894/merge
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)6,961.90 (+0.47%)7,251.94 (96.00%)
client-submit-serialize-deserialize✅ (view plot)7,924.50 (+0.86%)8,245.75 (96.10%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8,415.90 (-0.16%)8,789.91 (95.75%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)879.87 (-2.14%)926.63 (94.95%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)691.83 (-0.93%)720.13 (96.07%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize✅ (view plot)249.23 (+0.07%)258.63 (96.37%)
client-sv1-get-authorize/client-sv1-get-authorize✅ (view plot)157.12 (+0.12%)159.96 (98.23%)
client-sv1-get-submit✅ (view plot)6,816.40 (+2.02%)7,008.57 (97.26%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)277.21 (-0.50%)290.60 (95.39%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle✅ (view plot)747.54 (-0.41%)785.57 (95.16%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize✅ (view plot)633.15 (+2.31%)646.44 (97.94%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)203.21 (-1.82%)220.13 (92.31%)

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

Copy link
Contributor

github-actions bot commented May 11, 2024

🐰Bencher

ReportSun, May 12, 2024 at 13:54:30 UTC
ProjectStratum v2 (SRI)
Branchinnocent/import-libsecp256k1
Testbedsv2
Click to view all benchmark results
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)2,061.00 (+0.33%)2,131.76 (96.68%)✅ (view plot)473.00 (+0.44%)486.00 (97.33%)✅ (view plot)736.00 (+0.52%)754.30 (97.57%)✅ (view plot)6.00 (-16.51%)11.45 (52.40%)✅ (view plot)37.00 (+0.69%)38.62 (95.79%)
client_sv2_handle_message_mining✅ (view plot)8,275.00 (+0.74%)8,362.98 (98.95%)✅ (view plot)2,137.00 (+0.42%)2,170.57 (98.45%)✅ (view plot)3,160.00 (+0.47%)3,213.55 (98.33%)✅ (view plot)36.00 (-6.96%)43.23 (83.28%)✅ (view plot)141.00 (+1.23%)142.75 (98.77%)
client_sv2_mining_message_submit_standard✅ (view plot)6,318.00 (+0.45%)6,395.24 (98.79%)✅ (view plot)1,750.00 (+0.02%)1,762.64 (99.28%)✅ (view plot)2,553.00 (-0.01%)2,574.23 (99.18%)✅ (view plot)18.00 (+0.95%)22.51 (79.98%)✅ (view plot)105.00 (+0.76%)107.07 (98.07%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14,885.00 (+0.55%)15,069.85 (98.77%)✅ (view plot)4,694.00 (+0.01%)4,706.64 (99.73%)✅ (view plot)6,755.00 (+0.02%)6,774.04 (99.72%)✅ (view plot)44.00 (-6.82%)52.77 (83.38%)✅ (view plot)226.00 (+1.23%)231.02 (97.83%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27,602.00 (+0.33%)27,889.57 (98.97%)✅ (view plot)10,545.00 (+0.03%)10,558.31 (99.87%)✅ (view plot)15,337.00 (-0.00%)15,358.44 (99.86%)✅ (view plot)87.00 (+2.72%)91.05 (95.55%)✅ (view plot)338.00 (+0.67%)346.34 (97.59%)
client_sv2_open_channel✅ (view plot)4,527.00 (+0.62%)4,613.52 (98.12%)✅ (view plot)1,461.00 (+0.05%)1,473.92 (99.12%)✅ (view plot)2,152.00 (-0.02%)2,171.78 (99.09%)✅ (view plot)13.00 (+6.82%)15.43 (84.24%)✅ (view plot)66.00 (+1.06%)68.21 (96.77%)
client_sv2_open_channel_serialize✅ (view plot)14,246.00 (+0.09%)14,471.65 (98.44%)✅ (view plot)5,064.00 (+0.01%)5,076.92 (99.75%)✅ (view plot)7,321.00 (+0.04%)7,338.77 (99.76%)✅ (view plot)34.00 (-7.51%)41.58 (81.76%)✅ (view plot)193.00 (+0.34%)199.17 (96.90%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22,760.00 (+0.36%)23,074.60 (98.64%)✅ (view plot)7,987.00 (+0.04%)8,000.89 (99.83%)✅ (view plot)11,615.00 (+0.02%)11,635.42 (99.82%)✅ (view plot)73.00 (-0.21%)81.09 (90.03%)✅ (view plot)308.00 (+0.75%)316.33 (97.37%)
client_sv2_setup_connection✅ (view plot)4,703.00 (+0.03%)4,762.91 (98.74%)✅ (view plot)1,502.00 (+0.05%)1,514.92 (99.15%)✅ (view plot)2,278.00 (+0.05%)2,298.65 (99.10%)✅ (view plot)9.00 (-1.85%)13.06 (68.91%)✅ (view plot)68.00 (+0.05%)69.51 (97.83%)
client_sv2_setup_connection_serialize✅ (view plot)16,368.00 (+0.54%)16,484.79 (99.29%)✅ (view plot)5,963.00 (+0.01%)5,975.92 (99.78%)✅ (view plot)8,653.00 (-0.02%)8,676.17 (99.73%)✅ (view plot)45.00 (+0.61%)49.03 (91.77%)✅ (view plot)214.00 (+1.19%)217.21 (98.52%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35,616.00 (+0.17%)35,773.11 (99.56%)✅ (view plot)14,814.00 (+0.02%)14,827.89 (99.91%)✅ (view plot)21,746.00 (-0.01%)21,770.36 (99.89%)✅ (view plot)107.00 (+5.69%)115.88 (92.34%)✅ (view plot)381.00 (+0.26%)384.64 (99.05%)

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

Copy link
Contributor

github-actions bot commented May 11, 2024

🐰Bencher

ReportSun, May 12, 2024 at 13:54:30 UTC
ProjectStratum v2 (SRI)
Branchinnocent/import-libsecp256k1
Testbedsv1
Click to view all benchmark results
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)8,440.00 (+0.22%)8,692.72 (97.09%)✅ (view plot)3,746.00 (+0.24%)3,846.52 (97.39%)✅ (view plot)5,250.00 (+0.21%)5,386.68 (97.46%)✅ (view plot)8.00 (-1.07%)10.30 (77.64%)✅ (view plot)90.00 (+0.25%)93.44 (96.32%)
get_submit✅ (view plot)95,553.00 (+0.01%)96,114.10 (99.42%)✅ (view plot)59,439.00 (-0.03%)59,755.56 (99.47%)✅ (view plot)85,348.00 (-0.04%)85,798.04 (99.48%)✅ (view plot)60.00 (+7.14%)63.72 (94.17%)✅ (view plot)283.00 (+0.23%)287.77 (98.34%)
get_subscribe✅ (view plot)8,015.00 (+0.48%)8,260.41 (97.03%)✅ (view plot)2,841.00 (+0.41%)2,936.33 (96.75%)✅ (view plot)3,965.00 (+0.32%)4,093.52 (96.86%)✅ (view plot)19.00 (+14.32%)20.42 (93.04%)✅ (view plot)113.00 (+0.35%)116.71 (96.82%)
serialize_authorize✅ (view plot)12,159.00 (-0.14%)12,440.32 (97.74%)✅ (view plot)5,317.00 (+0.17%)5,417.52 (98.14%)✅ (view plot)7,414.00 (+0.16%)7,550.76 (98.19%)✅ (view plot)11.00 (-0.47%)13.44 (81.85%)✅ (view plot)134.00 (-0.61%)138.77 (96.56%)
serialize_deserialize_authorize✅ (view plot)24,472.00 (+0.09%)24,664.51 (99.22%)✅ (view plot)9,898.00 (+0.05%)10,008.74 (98.89%)✅ (view plot)13,957.00 (+0.03%)14,119.61 (98.85%)✅ (view plot)38.00 (+2.23%)41.66 (91.22%)✅ (view plot)295.00 (+0.13%)297.11 (99.29%)
serialize_deserialize_handle_authorize✅ (view plot)30,169.00 (+0.09%)30,319.70 (99.50%)✅ (view plot)12,101.00 (+0.07%)12,201.52 (99.18%)✅ (view plot)17,119.00 (+0.04%)17,265.32 (99.15%)✅ (view plot)62.00 (+5.39%)64.54 (96.07%)✅ (view plot)364.00 (+0.04%)366.46 (99.33%)
serialize_deserialize_handle_submit✅ (view plot)126,476.00 (+0.05%)127,015.83 (99.57%)✅ (view plot)73,224.00 (-0.02%)73,595.63 (99.50%)✅ (view plot)104,936.00 (-0.03%)105,470.57 (99.49%)✅ (view plot)129.00 (+5.93%)134.25 (96.09%)✅ (view plot)597.00 (+0.28%)599.56 (99.57%)
serialize_deserialize_handle_subscribe✅ (view plot)27,515.00 (+0.19%)27,609.50 (99.66%)✅ (view plot)9,643.00 (+0.12%)9,738.33 (99.02%)✅ (view plot)13,635.00 (+0.09%)13,770.24 (99.02%)✅ (view plot)67.00 (+2.51%)70.71 (94.75%)✅ (view plot)387.00 (+0.22%)388.53 (99.61%)
serialize_deserialize_submit✅ (view plot)115,065.00 (+0.01%)115,587.16 (99.55%)✅ (view plot)68,001.00 (-0.05%)68,357.37 (99.48%)✅ (view plot)97,550.00 (-0.06%)98,072.21 (99.47%)✅ (view plot)73.00 (+4.72%)75.31 (96.93%)✅ (view plot)490.00 (+0.32%)492.69 (99.45%)
serialize_deserialize_subscribe✅ (view plot)22,908.00 (+0.17%)23,091.32 (99.21%)✅ (view plot)8,195.00 (+0.13%)8,292.20 (98.83%)✅ (view plot)11,538.00 (+0.10%)11,673.70 (98.84%)✅ (view plot)41.00 (+3.57%)43.90 (93.40%)✅ (view plot)319.00 (+0.19%)321.13 (99.34%)
serialize_submit✅ (view plot)99,836.00 (-0.03%)100,418.48 (99.42%)✅ (view plot)61,483.00 (-0.03%)61,804.94 (99.48%)✅ (view plot)88,196.00 (-0.04%)88,652.53 (99.49%)✅ (view plot)60.00 (+6.32%)62.79 (95.56%)✅ (view plot)324.00 (-0.14%)328.78 (98.55%)
serialize_subscribe✅ (view plot)11,310.00 (+0.00%)11,565.89 (97.79%)✅ (view plot)4,188.00 (+0.28%)4,283.33 (97.77%)✅ (view plot)5,825.00 (+0.24%)5,953.53 (97.84%)✅ (view plot)19.00 (+13.37%)19.86 (95.65%)✅ (view plot)154.00 (-0.46%)158.69 (97.05%)

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

@rockcoolsaint rockcoolsaint force-pushed the innocent/import-libsecp256k1 branch 2 times, most recently from b1884b5 to 1e96848 Compare May 11, 2024 11:10
@rockcoolsaint
Copy link
Contributor Author

rockcoolsaint commented May 11, 2024

@plebhash I don't get error on cargo fmt and cargo clippy in development
I don't understand why they're both failing here

@rockcoolsaint rockcoolsaint force-pushed the innocent/import-libsecp256k1 branch 3 times, most recently from efd707f to 5dc6f06 Compare May 11, 2024 18:05
@plebhash
Copy link
Collaborator

plebhash commented May 11, 2024

@plebhash I don't get error on cargo fmt and cargo clippy in development I don't understand why they're both failing here

our fmt CI uses the nightly toolchain:

toolchain: nightly

so you have to do cargo +nightly fmt locally

@rockcoolsaint rockcoolsaint force-pushed the innocent/import-libsecp256k1 branch 3 times, most recently from 9cca452 to c3ad8e2 Compare May 12, 2024 13:46
@plebhash plebhash merged commit 73a7850 into stratum-mining:dev May 13, 2024
13 checks passed
This was referenced May 23, 2024
Fi3 pushed a commit that referenced this pull request May 28, 2024
@plebhash plebhash mentioned this pull request May 28, 2024
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.

2 participants