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

add lockfiles.yaml + rm and gitignore some unnecessary lockfiles #1102

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Aug 14, 2024

The crates on roles and utils generate binaries, which means it's a good engineering practice to keep {roles, utils}/Cargo.lock on our git history.

The root cause of the issues described on #1044 comes from the fact that we often bump dependency versions on Cargo.toml files without committing the same updates to the respective Cargo.lock.

This PR introduces a new CI action that blocks PRs that change dependencies on the binary workspaces from being merged if they don't update Cargo.lock files accordingly.

We also remove and gitignore {protocols,benches/Cargo.lock} since there's no need to keep them in the repository

This was referenced Aug 14, 2024
Copy link
Contributor

github-actions bot commented Aug 14, 2024

🐰Bencher

ReportWed, August 28, 2024 at 19:27:29 UTC
ProjectStratum v2 (SRI)
Branchroles-lock-ci
Testbedsv2

🚨 1 ALERT: Threshold Boundary Limit exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
client_sv2_setup_connection_serialize_deserializeLatency (nanoseconds (ns))🚨 (view plot | view alert)1,050.70 (+8.03%)1,043.00 (100.74%)

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client_sv2_handle_message_common✅ (view plot)45.31 (+1.52%)45.49 (99.61%)
client_sv2_handle_message_mining✅ (view plot)72.72 (-0.57%)80.50 (90.33%)
client_sv2_mining_message_submit_standard✅ (view plot)14.66 (+0.08%)14.70 (99.78%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)270.72 (+1.87%)285.45 (94.84%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)586.14 (-1.32%)628.18 (93.31%)
client_sv2_open_channel✅ (view plot)166.93 (+0.81%)171.07 (97.58%)
client_sv2_open_channel_serialize✅ (view plot)273.11 (-3.40%)293.52 (93.05%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)402.33 (+6.53%)419.85 (95.83%)
client_sv2_setup_connection✅ (view plot)161.92 (-0.97%)174.13 (92.99%)
client_sv2_setup_connection_serialize✅ (view plot)485.77 (+2.56%)502.73 (96.63%)
client_sv2_setup_connection_serialize_deserialize🚨 (view plot | view alert)1,050.70 (+8.03%)1,043.00 (100.74%)

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

Copy link
Contributor

github-actions bot commented Aug 14, 2024

🐰Bencher

ReportWed, August 28, 2024 at 19:27:39 UTC
ProjectStratum v2 (SRI)
Branch1102/merge
Testbedsv1
Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns) | (Δ%)
Latency Upper Boundary
nanoseconds (ns) | (%)
client-submit-serialize✅ (view plot)6,809.90 (-0.74%)7,357.96 (92.55%)
client-submit-serialize-deserialize✅ (view plot)7,813.20 (+0.31%)8,336.19 (93.73%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle✅ (view plot)8,473.60 (+1.31%)8,845.45 (95.80%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle✅ (view plot)904.72 (+0.30%)941.07 (96.14%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize✅ (view plot)701.71 (+0.12%)730.02 (96.12%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize✅ (view plot)253.11 (+1.74%)256.06 (98.85%)
client-sv1-get-authorize/client-sv1-get-authorize✅ (view plot)156.10 (-0.63%)161.81 (96.47%)
client-sv1-get-submit✅ (view plot)6,620.10 (-0.33%)7,122.30 (92.95%)
client-sv1-get-subscribe/client-sv1-get-subscribe✅ (view plot)270.49 (-3.08%)293.65 (92.11%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle✅ (view plot)761.04 (+1.28%)785.85 (96.84%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize✅ (view plot)630.41 (+2.51%)638.36 (98.76%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize✅ (view plot)207.78 (+0.40%)218.98 (94.88%)

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

Copy link
Contributor

github-actions bot commented Aug 14, 2024

🐰Bencher

ReportWed, August 28, 2024 at 19:27:29 UTC
ProjectStratum v2 (SRI)
Branchroles-lock-ci
Testbedsv1

🚨 7 ALERTS: Threshold Boundary Limits exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
serialize_deserialize_authorizeRAM Accesses (accesses)🚨 (view plot | view alert)304.00 (+2.90%)299.69 (101.44%)
serialize_deserialize_handle_authorizeEstimated Cycles (estimated cycles)🚨 (view plot | view alert)30,418.00 (+0.86%)30,400.08 (100.06%)
serialize_deserialize_handle_authorizeRAM Accesses (accesses)🚨 (view plot | view alert)372.00 (+2.18%)368.27 (101.01%)
serialize_deserialize_handle_subscribeEstimated Cycles (estimated cycles)🚨 (view plot | view alert)28,032.00 (+2.03%)27,723.63 (101.11%)
serialize_deserialize_handle_subscribeRAM Accesses (accesses)🚨 (view plot | view alert)401.00 (+3.78%)391.73 (102.37%)
serialize_deserialize_subscribeEstimated Cycles (estimated cycles)🚨 (view plot | view alert)23,447.00 (+2.34%)23,219.58 (100.98%)
serialize_deserialize_subscribeRAM Accesses (accesses)🚨 (view plot | view alert)334.00 (+4.54%)325.40 (102.64%)

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,470.00 (+0.34%)8,736.94 (96.94%)✅ (view plot)3,746.00 (+0.04%)3,862.29 (96.99%)✅ (view plot)5,250.00 (-0.04%)5,413.49 (96.98%)✅ (view plot)7.00 (-6.21%)10.56 (66.27%)✅ (view plot)91.00 (+1.05%)94.12 (96.68%)
get_submit✅ (view plot)95,413.00 (-0.16%)96,144.49 (99.24%)✅ (view plot)59,439.00 (-0.07%)59,764.31 (99.46%)✅ (view plot)85,368.00 (-0.06%)85,822.67 (99.47%)✅ (view plot)42.00 (-21.70%)63.16 (66.49%)✅ (view plot)281.00 (-0.42%)288.68 (97.34%)
get_subscribe✅ (view plot)8,093.00 (+1.32%)8,293.78 (97.58%)✅ (view plot)2,841.00 (+0.36%)2,943.90 (96.50%)✅ (view plot)3,968.00 (+0.29%)4,106.98 (96.62%)✅ (view plot)13.00 (-13.83%)21.06 (61.73%)✅ (view plot)116.00 (+2.64%)117.79 (98.48%)
serialize_authorize✅ (view plot)12,317.00 (+0.72%)12,555.29 (98.10%)✅ (view plot)5,317.00 (+0.03%)5,433.29 (97.86%)✅ (view plot)7,412.00 (-0.03%)7,575.90 (97.84%)✅ (view plot)8.00 (-21.37%)13.83 (57.86%)✅ (view plot)139.00 (+2.12%)141.58 (98.18%)
serialize_deserialize_authorize✅ (view plot)24,755.00 (+1.05%)24,776.02 (99.92%)✅ (view plot)9,868.00 (-0.40%)10,037.75 (98.31%)✅ (view plot)13,925.00 (-0.40%)14,171.57 (98.26%)✅ (view plot)38.00 (+6.41%)42.25 (89.95%)🚨 (view plot | view alert)304.00 (+2.90%)299.69 (101.44%)
serialize_deserialize_handle_authorize🚨 (view plot | view alert)30,418.00 (+0.86%)30,400.08 (100.06%)✅ (view plot)12,071.00 (-0.23%)12,217.07 (98.80%)✅ (view plot)17,088.00 (-0.21%)17,290.61 (98.83%)✅ (view plot)62.00 (+6.66%)64.52 (96.10%)🚨 (view plot | view alert)372.00 (+2.18%)368.27 (101.01%)
serialize_deserialize_handle_submit✅ (view plot)126,484.00 (+0.04%)127,065.93 (99.54%)✅ (view plot)73,280.00 (+0.03%)73,605.10 (99.56%)✅ (view plot)105,054.00 (+0.05%)105,498.82 (99.58%)✅ (view plot)107.00 (-9.01%)132.82 (80.56%)✅ (view plot)597.00 (+0.28%)601.64 (99.23%)
serialize_deserialize_handle_subscribe🚨 (view plot | view alert)28,032.00 (+2.03%)27,723.63 (101.11%)✅ (view plot)9,659.00 (+0.27%)9,746.29 (99.10%)✅ (view plot)13,657.00 (+0.23%)13,781.57 (99.10%)✅ (view plot)68.00 (+4.34%)73.35 (92.71%)🚨 (view plot | view alert)401.00 (+3.78%)391.73 (102.37%)
serialize_deserialize_submit✅ (view plot)115,181.00 (+0.04%)115,717.41 (99.54%)✅ (view plot)68,057.00 (-0.03%)68,403.47 (99.49%)✅ (view plot)97,656.00 (-0.03%)98,165.60 (99.48%)✅ (view plot)61.00 (-10.03%)77.08 (79.13%)✅ (view plot)492.00 (+0.68%)494.66 (99.46%)
serialize_deserialize_subscribe🚨 (view plot | view alert)23,447.00 (+2.34%)23,219.58 (100.98%)✅ (view plot)8,211.00 (+0.28%)8,302.98 (98.89%)✅ (view plot)11,562.00 (+0.25%)11,690.87 (98.90%)✅ (view plot)39.00 (+0.49%)44.09 (88.45%)🚨 (view plot | view alert)334.00 (+4.54%)325.40 (102.64%)
serialize_submit✅ (view plot)99,882.00 (-0.04%)100,499.67 (99.39%)✅ (view plot)61,483.00 (-0.06%)61,812.84 (99.47%)✅ (view plot)88,207.00 (-0.07%)88,675.45 (99.47%)✅ (view plot)46.00 (-14.38%)64.69 (71.11%)✅ (view plot)327.00 (+0.52%)331.85 (98.54%)
serialize_subscribe✅ (view plot)11,494.00 (+1.22%)11,676.34 (98.44%)✅ (view plot)4,188.00 (+0.24%)4,290.90 (97.60%)✅ (view plot)5,824.00 (+0.18%)5,964.69 (97.64%)✅ (view plot)14.00 (-10.22%)19.91 (70.33%)✅ (view plot)160.00 (+2.49%)162.08 (98.72%)

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

Copy link
Contributor

github-actions bot commented Aug 14, 2024

🐰Bencher

ReportWed, August 28, 2024 at 19:27:33 UTC
ProjectStratum v2 (SRI)
Branchroles-lock-ci
Testbedsv2

🚨 3 ALERTS: Threshold Boundary Limits exceeded!
BenchmarkMeasure (units)ViewValueLower BoundaryUpper Boundary
client_sv2_handle_message_commonEstimated Cycles (estimated cycles)🚨 (view plot | view alert)2,167.00 (+5.19%)2,147.87 (100.89%)
client_sv2_handle_message_commonRAM Accesses (accesses)🚨 (view plot | view alert)40.00 (+8.42%)39.09 (102.34%)
client_sv2_mining_message_submit_standardL2 Accesses (accesses)🚨 (view plot | view alert)23.00 (+31.20%)22.41 (102.61%)

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 | view alert)2,167.00 (+5.19%)2,147.87 (100.89%)✅ (view plot)473.00 (+0.38%)485.55 (97.41%)✅ (view plot)732.00 (-0.04%)753.13 (97.19%)✅ (view plot)7.00 (-4.35%)11.51 (60.80%)🚨 (view plot | view alert)40.00 (+8.42%)39.09 (102.34%)
client_sv2_handle_message_mining✅ (view plot)8,200.00 (-0.06%)8,335.67 (98.37%)✅ (view plot)2,137.00 (+0.33%)2,171.64 (98.41%)✅ (view plot)3,160.00 (+0.36%)3,215.76 (98.27%)✅ (view plot)35.00 (-7.56%)43.24 (80.95%)✅ (view plot)139.00 (-0.03%)142.00 (97.89%)
client_sv2_mining_message_submit_standard✅ (view plot)6,369.00 (+1.37%)6,393.99 (99.61%)✅ (view plot)1,750.00 (-0.04%)1,764.21 (99.19%)✅ (view plot)2,544.00 (-0.42%)2,575.52 (98.78%)🚨 (view plot | view alert)23.00 (+31.20%)22.41 (102.61%)✅ (view plot)106.00 (+1.91%)106.99 (99.07%)
client_sv2_mining_message_submit_standard_serialize✅ (view plot)14,788.00 (+0.01%)15,020.92 (98.45%)✅ (view plot)4,694.00 (-0.01%)4,708.21 (99.70%)✅ (view plot)6,753.00 (-0.04%)6,775.59 (99.67%)✅ (view plot)46.00 (-1.84%)51.29 (89.69%)✅ (view plot)223.00 (+0.12%)229.58 (97.13%)
client_sv2_mining_message_submit_standard_serialize_deserialize✅ (view plot)27,578.00 (+0.28%)27,843.61 (99.05%)✅ (view plot)10,585.00 (+0.33%)10,593.40 (99.92%)✅ (view plot)15,398.00 (+0.30%)15,412.35 (99.91%)✅ (view plot)84.00 (+1.13%)88.63 (94.78%)✅ (view plot)336.00 (+0.23%)344.78 (97.45%)
client_sv2_open_channel✅ (view plot)4,447.00 (-0.52%)4,627.73 (96.09%)✅ (view plot)1,461.00 (+0.04%)1,473.35 (99.16%)✅ (view plot)2,157.00 (+0.16%)2,172.42 (99.29%)✅ (view plot)10.00 (-16.88%)15.04 (66.50%)✅ (view plot)64.00 (-0.73%)68.88 (92.91%)
client_sv2_open_channel_serialize✅ (view plot)14,114.00 (-0.58%)14,443.47 (97.72%)✅ (view plot)5,064.00 (+0.01%)5,076.35 (99.76%)✅ (view plot)7,324.00 (+0.06%)7,339.95 (99.78%)✅ (view plot)35.00 (-4.35%)41.26 (84.82%)✅ (view plot)189.00 (-1.17%)198.30 (95.31%)
client_sv2_open_channel_serialize_deserialize✅ (view plot)22,707.00 (+0.26%)22,994.11 (98.75%)✅ (view plot)8,027.00 (+0.45%)8,030.55 (99.96%)✅ (view plot)11,672.00 (+0.41%)11,678.94 (99.94%)✅ (view plot)79.00 (+6.82%)82.54 (95.71%)✅ (view plot)304.00 (-0.12%)313.86 (96.86%)
client_sv2_setup_connection✅ (view plot)4,749.00 (+1.10%)4,762.39 (99.72%)✅ (view plot)1,502.00 (+0.04%)1,514.35 (99.18%)✅ (view plot)2,274.00 (-0.12%)2,297.33 (98.98%)✅ (view plot)12.00 (+23.75%)14.79 (81.13%)✅ (view plot)69.00 (+1.81%)69.63 (99.10%)
client_sv2_setup_connection_serialize✅ (view plot)16,212.00 (-0.27%)16,468.04 (98.45%)✅ (view plot)5,963.00 (+0.01%)5,975.35 (99.79%)✅ (view plot)8,662.00 (+0.07%)8,676.05 (99.84%)✅ (view plot)40.00 (-10.81%)49.21 (81.28%)✅ (view plot)210.00 (-0.35%)216.84 (96.85%)
client_sv2_setup_connection_serialize_deserialize✅ (view plot)35,620.00 (+0.22%)35,735.04 (99.68%)✅ (view plot)14,855.00 (+0.25%)14,858.47 (99.98%)✅ (view plot)21,820.00 (+0.26%)21,824.52 (99.98%)✅ (view plot)93.00 (-5.64%)111.27 (83.58%)✅ (view plot)381.00 (+0.37%)384.01 (99.22%)

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

@plebhash plebhash force-pushed the roles-lock-ci branch 3 times, most recently from e0279d3 to bf27924 Compare August 15, 2024 13:18
@plebhash plebhash changed the title add roles-lockfile.yaml add lockfiles.yaml Aug 15, 2024
@plebhash
Copy link
Collaborator Author

plebhash commented Aug 21, 2024

#1044 was closed, even though it was deleting protocols/Cargo.lock + benches/Cargo.lock and adding them to .gitignore

those were still desirable changes, as stated on this comment #1044 (comment)

so I'm also including those changes to this PR

@jbesraa please let me know your thoughts here

@plebhash plebhash changed the title add lockfiles.yaml add lockfiles.yaml + rm and gitignore some unnecessary lockfiles Aug 21, 2024
@plebhash plebhash added this to the 1.1.0 milestone Aug 21, 2024
@jbesraa
Copy link
Contributor

jbesraa commented Aug 22, 2024

#1044 was closed, even though it was deleting protocols/Cargo.lock + benches/Cargo.lock and adding them to .gitignore

those were still desirable changes, as stated on this comment #1044 (comment)

so I'm also including those changes to this PR

@jbesraa please let me know your thoughts here

I am a bit confused tbh.

I think it was mentioned that we are not publishing the binaries anymore right? users just git clone and cargo install & run which I think anyway ignores cargo.lock file(unless you provide --locked flag) but I honestly dont understand the need for maintaining the cargo.lock now(new ci, new discussions, is this really critical/important now?) while it was outdated for a long time and despite that things were working. I would suggest to remove lock files and when we encounter a problem we can deal with it.

@Fi3
Copy link
Collaborator

Fi3 commented Aug 22, 2024

having lock files for binary crates is good practice this is another reason to keep roles and protocols in different workspaces

@jbesraa
Copy link
Contributor

jbesraa commented Aug 23, 2024

@plebhash I dont wanna block this. Feel free to CP or add your own commits to ignore the libraries .lock files and add the one needed. Happy with any solution you end-up with here.
I do think that in the not so far future we will remove all of those lock files anyway because we are aiming to move things to libraries and have something like #1115 to manage the user API and thats where we should probably maintain good practices for .lock files.

@plebhash plebhash changed the base branch from dev to main August 28, 2024 16:55
@plebhash plebhash merged commit 894913e into stratum-mining:main Aug 28, 2024
34 checks passed
@plebhash plebhash deleted the roles-lock-ci branch August 28, 2024 19:41
@plebhash plebhash removed this from the 1.1.0 milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✅
Development

Successfully merging this pull request may close these issues.

4 participants