Skip to content

Handle cargo build warnings#1337

Merged
GitGab19 merged 1 commit into
stratum-mining:mainfrom
jbesraa:2025-01-09-ignore-warnings
Jan 17, 2025
Merged

Handle cargo build warnings#1337
GitGab19 merged 1 commit into
stratum-mining:mainfrom
jbesraa:2025-01-09-ignore-warnings

Conversation

@jbesraa

@jbesraa jbesraa commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

resolves #1096 and #1048

None of the dead code is removed and only marked with dead_code macro.

@github-actions

github-actions Bot commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2025-01-09-ignore-warnings
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,387.40
(-2.42%)
6,949.43
(91.91%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,377.40
(-0.31%)
7,811.07
(94.45%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
7,973.60
(-1.42%)
9,412.02
(84.72%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
865.33
(-0.29%)
943.41
(91.72%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
676.33
(+0.18%)
717.19
(94.30%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
248.39
(-0.69%)
274.17
(90.60%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
157.43
(-0.03%)
165.36
(95.21%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,283.80
(-0.93%)
6,781.51
(92.66%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
278.15
(-1.53%)
328.15
(84.76%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
746.84
(+2.51%)
782.95
(95.39%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
579.67
(-1.84%)
629.28
(92.12%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
208.84
(+1.05%)
226.78
(92.09%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2025-01-09-ignore-warnings
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.61
(-1.41%)
60.01
(74.34%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
79.16
(+2.06%)
107.67
(73.52%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.66
(-0.06%)
14.72
(99.54%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
252.46
(-4.23%)
290.33
(86.96%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
626.19
(+1.66%)
661.01
(94.73%)
client_sv2_open_channel📈 view plot
🚷 view threshold
165.02
(-0.52%)
179.41
(91.98%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
301.35
(+5.09%)
318.68
(94.56%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
407.63
(+6.19%)
413.44
(98.59%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
162.15
(+1.22%)
171.58
(94.50%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
493.88
(+4.93%)
559.84
(88.22%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
1,044.00
(+3.54%)
1,218.83
(85.66%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2025-01-09-ignore-warnings
Testbedsv2
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
1e3 x estimated cycles
(Result Δ%)
Upper Boundary
1e3 x 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.13
(+0.71%)
2.24
(95.16%)
📈 view plot
🚷 view threshold
473.00
(-0.13%)
490.59
(96.41%)
📈 view plot
🚷 view threshold
734.00
(-0.28%)
759.04
(96.70%)
📈 view plot
🚷 view threshold
6.00
(+18.89%)
11.60
(51.73%)
📈 view plot
🚷 view threshold
39.00
(+0.91%)
41.72
(93.48%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8.28
(+0.61%)
8.40
(98.53%)
📈 view plot
🚷 view threshold
2,137.00📈 view plot
🚷 view threshold
3,156.00
(-0.09%)
3,167.46
(99.64%)
📈 view plot
🚷 view threshold
37.00
(+4.04%)
41.54
(89.07%)
📈 view plot
🚷 view threshold
141.00
(+0.93%)
144.54
(97.55%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6.32
(+0.21%)
6.45
(97.93%)
📈 view plot
🚷 view threshold
1,750.00
(-0.03%)
1,767.59
(99.00%)
📈 view plot
🚷 view threshold
2,550.00
(-0.07%)
2,575.49
(99.01%)
📈 view plot
🚷 view threshold
18.00
(+5.01%)
24.03
(74.92%)
📈 view plot
🚷 view threshold
105.00
(+0.30%)
108.76
(96.54%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14.75
(+0.18%)
14.94
(98.77%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,711.59
(99.63%)
📈 view plot
🚷 view threshold
6,747.00
(-0.13%)
6,786.75
(99.41%)
📈 view plot
🚷 view threshold
54.00
(+18.13%)
63.15
(85.51%)
📈 view plot
🚷 view threshold
221.00
(-0.07%)
226.12
(97.74%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27.76
(+0.58%)
28.06
(98.94%)
📈 view plot
🚷 view threshold
10,645.00
(+0.36%)
10,698.58
(99.50%)
📈 view plot
🚷 view threshold
15,502.00
(+0.40%)
15,593.90
(99.41%)
📈 view plot
🚷 view threshold
93.00
(+11.03%)
99.23
(93.73%)
📈 view plot
🚷 view threshold
337.00
(+0.44%)
343.15
(98.21%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4.49
(+1.96%)
4.58
(97.97%)
📈 view plot
🚷 view threshold
1,461.00
(-0.04%)
1,478.59
(98.81%)
📈 view plot
🚷 view threshold
2,154.00
(-0.31%)
2,184.79
(98.59%)
📈 view plot
🚷 view threshold
12.00
(+46.43%)
14.03
(85.51%)
📈 view plot
🚷 view threshold
65.00
(+3.35%)
67.74
(95.95%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14.08
(+0.42%)
14.20
(99.14%)
📈 view plot
🚷 view threshold
5,064.00
(-0.01%)
5,081.59
(99.65%)
📈 view plot
🚷 view threshold
7,318.00
(-0.11%)
7,352.83
(99.53%)
📈 view plot
🚷 view threshold
43.00
(+17.41%)
48.45
(88.75%)
📈 view plot
🚷 view threshold
187.00
(+0.53%)
190.86
(97.98%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22.94
(+1.01%)
23.07
(99.42%)
📈 view plot
🚷 view threshold
8,040.00
(+0.10%)
8,057.49
(99.78%)
📈 view plot
🚷 view threshold
11,683.00
(-0.02%)
11,713.43
(99.74%)
📈 view plot
🚷 view threshold
88.00
(+16.09%)
90.10
(97.67%)
📈 view plot
🚷 view threshold
309.00
(+1.61%)
312.77
(98.79%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4.71
(+0.50%)
4.79
(98.40%)
📈 view plot
🚷 view threshold
1,502.00
(-0.04%)
1,519.59
(98.84%)
📈 view plot
🚷 view threshold
2,275.00
(-0.16%)
2,301.01
(98.87%)
📈 view plot
🚷 view threshold
12.00
(+27.36%)
15.31
(78.39%)
📈 view plot
🚷 view threshold
68.00
(+0.61%)
70.13
(96.97%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16.22
(+0.41%)
16.33
(99.36%)
📈 view plot
🚷 view threshold
5,963.00
(-0.01%)
5,980.59
(99.71%)
📈 view plot
🚷 view threshold
8,652.00
(-0.14%)
8,692.74
(99.53%)
📈 view plot
🚷 view threshold
51.00
(+25.44%)
56.37
(90.48%)
📈 view plot
🚷 view threshold
209.00
(+0.36%)
212.13
(98.52%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35.72
(+0.34%)
35.95
(99.35%)
📈 view plot
🚷 view threshold
14,888.00
(+0.14%)
14,919.26
(99.79%)
📈 view plot
🚷 view threshold
21,867.00
(+0.11%)
21,918.56
(99.76%)
📈 view plot
🚷 view threshold
111.00
(+17.48%)
119.91
(92.57%)
📈 view plot
🚷 view threshold
380.00
(+0.10%)
385.72
(98.52%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2025-01-09-ignore-warnings
Testbedsv1
Click to view all benchmark results
BenchmarkEstimated CyclesBenchmark Result
1e3 x estimated cycles
(Result Δ%)
Upper Boundary
1e3 x estimated cycles
(Limit %)
InstructionsBenchmark Result
1e3 x instructions
(Result Δ%)
Upper Boundary
1e3 x instructions
(Limit %)
L1 AccessesBenchmark Result
1e3 x accesses
(Result Δ%)
Upper Boundary
1e3 x 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.48
(+0.32%)
8.67
(97.80%)
📈 view plot
🚷 view threshold
3.66
(-1.64%)
3.86
(94.85%)
📈 view plot
🚷 view threshold
5.11
(-2.03%)
5.45
(93.75%)
📈 view plot
🚷 view threshold
10.00
(+17.76%)
16.35
(61.16%)
📈 view plot
🚷 view threshold
95.00
(+3.91%)
96.91
(98.03%)
get_submit📈 view plot
🚷 view threshold
95.35
(-0.01%)
95.61
(99.72%)
📈 view plot
🚷 view threshold
59.26
(-0.23%)
59.71
(99.25%)
📈 view plot
🚷 view threshold
85.08
(-0.27%)
85.82
(99.13%)
📈 view plot
🚷 view threshold
45.00
(+0.59%)
60.28
(74.65%)
📈 view plot
🚷 view threshold
287.00
(+2.22%)
291.96
(98.30%)
get_subscribe📈 view plot
🚷 view threshold
7.95
(-0.52%)
8.23
(96.65%)
📈 view plot
🚷 view threshold
2.76
(-1.92%)
2.94
(93.72%)
📈 view plot
🚷 view threshold
3.83
(-2.28%)
4.14
(92.52%)
📈 view plot
🚷 view threshold
12.00
(-4.06%)
20.70
(57.98%)
📈 view plot
🚷 view threshold
116.00
(+1.26%)
117.97
(98.33%)
serialize_authorize📈 view plot
🚷 view threshold
12.30
(+0.31%)
12.50
(98.34%)
📈 view plot
🚷 view threshold
5.24
(-1.09%)
5.43
(96.56%)
📈 view plot
🚷 view threshold
7.28
(-1.37%)
7.60
(95.72%)
📈 view plot
🚷 view threshold
10.00
(-2.29%)
18.84
(53.07%)
📈 view plot
🚷 view threshold
142.00
(+2.90%)
143.41
(99.02%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24.76
(+0.18%)
25.19
(98.31%)
📈 view plot
🚷 view threshold
9.79
(-0.72%)
10.01
(97.75%)
📈 view plot
🚷 view threshold
13.79
(-0.88%)
14.18
(97.25%)
📈 view plot
🚷 view threshold
32.00
(-10.90%)
45.93
(69.67%)
📈 view plot
🚷 view threshold
309.00
(+1.76%)
313.75
(98.49%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30.40
(+0.24%)
30.73
(98.93%)
📈 view plot
🚷 view threshold
11.99
(-0.50%)
12.19
(98.39%)
📈 view plot
🚷 view threshold
16.95
(-0.65%)
17.30
(97.98%)
📈 view plot
🚷 view threshold
58.00
(+3.88%)
67.41
(86.04%)
📈 view plot
🚷 view threshold
376.00
(+1.33%)
379.53
(99.07%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126.55
(+0.08%)
126.78
(99.82%)
📈 view plot
🚷 view threshold
73.12
(-0.18%)
73.53
(99.43%)
📈 view plot
🚷 view threshold
104.76
(-0.22%)
105.51
(99.29%)
📈 view plot
🚷 view threshold
109.00
(+2.19%)
125.85
(86.61%)
📈 view plot
🚷 view threshold
607.00
(+1.53%)
610.67
(99.40%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
28.00
(+0.31%)
28.39
(98.64%)
📈 view plot
🚷 view threshold
9.58
(-0.55%)
9.76
(98.13%)
📈 view plot
🚷 view threshold
13.51
(-0.73%)
13.84
(97.66%)
📈 view plot
🚷 view threshold
69.00
(+6.85%)
78.03
(88.43%)
📈 view plot
🚷 view threshold
404.00
(+1.17%)
409.88
(98.56%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115.31
(+0.05%)
115.71
(99.65%)
📈 view plot
🚷 view threshold
67.89
(-0.24%)
68.42
(99.23%)
📈 view plot
🚷 view threshold
97.36
(-0.30%)
98.29
(99.05%)
📈 view plot
🚷 view threshold
69.00
(+5.31%)
87.60
(78.77%)
📈 view plot
🚷 view threshold
503.00
(+1.93%)
505.33
(99.54%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23.37
(+0.20%)
23.82
(98.12%)
📈 view plot
🚷 view threshold
8.13
(-0.68%)
8.32
(97.75%)
📈 view plot
🚷 view threshold
11.42
(-0.85%)
11.75
(97.23%)
📈 view plot
🚷 view threshold
38.00
(-2.51%)
51.04
(74.45%)
📈 view plot
🚷 view threshold
336.00
(+1.29%)
342.54
(98.09%)
serialize_submit📈 view plot
🚷 view threshold
99.84
(+0.05%)
100.09
(99.75%)
📈 view plot
🚷 view threshold
61.33
(-0.21%)
61.73
(99.34%)
📈 view plot
🚷 view threshold
87.93
(-0.25%)
88.65
(99.19%)
📈 view plot
🚷 view threshold
50.00
(+3.86%)
66.93
(74.70%)
📈 view plot
🚷 view threshold
333.00
(+2.31%)
337.72
(98.60%)
serialize_subscribe📈 view plot
🚷 view threshold
11.47
(+0.65%)
11.60
(98.92%)
📈 view plot
🚷 view threshold
4.11
(-1.21%)
4.28
(95.98%)
📈 view plot
🚷 view threshold
5.69
(-1.58%)
6.00
(94.86%)
📈 view plot
🚷 view threshold
16.00
(+14.80%)
24.21
(66.10%)
📈 view plot
🚷 view threshold
163.00
(+2.79%)
164.74
(98.94%)
🐰 View full continuous benchmarking report in Bencher

@codecov

codecov Bot commented Jan 9, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.14%. Comparing base (4190257) to head (4e881e9).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1337      +/-   ##
==========================================
+ Coverage   19.11%   19.14%   +0.02%     
==========================================
  Files         166      164       -2     
  Lines       11047    11030      -17     
==========================================
  Hits         2112     2112              
+ Misses       8935     8918      -17     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_serde_sv2-coverage 3.56% <ø> (ø)
binary_sv2-coverage 5.36% <ø> (ø)
bip32_derivation-coverage ?
buffer_sv2-coverage 25.02% <ø> (ø)
codec_sv2-coverage 0.01% <ø> (ø)
common_messages_sv2-coverage 0.13% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.28% <ø> (ø)
jd_client-coverage 0.00% <ø> (ø)
jd_server-coverage 7.79% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.45% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.70% <ø> (ø)
noise_sv2-coverage 4.46% <ø> (ø)
pool_sv2-coverage 2.05% <ø> (ø)
protocols 24.63% <ø> (ø)
roles 6.55% <ø> (ø)
roles_logic_sv2-coverage 7.95% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.60% <ø> (ø)
utils ?
v1-coverage 2.42% <ø> (ø)

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.

@GitGab19

GitGab19 commented Jan 9, 2025

Copy link
Copy Markdown
Member

The ones generated in protocols crates should be tackled in the corresponding refactoring

@jbesraa

jbesraa commented Jan 14, 2025

Copy link
Copy Markdown
Contributor Author

The ones generated in protocols crates should be tackled in the corresponding refactoring

hmm.. it might take a while until we get there. Any reason why not to remove dead code before that?

@GitGab19

Copy link
Copy Markdown
Member

The ones generated in protocols crates should be tackled in the corresponding refactoring

hmm.. it might take a while until we get there. Any reason why not to remove dead code before that?

I would say just to remember to properly fix the corresponding warnings during refactoring PRs.. but I'm not totally against disabling dead_code as you are doing here.

@jbesraa

jbesraa commented Jan 17, 2025

Copy link
Copy Markdown
Contributor Author

The ones generated in protocols crates should be tackled in the corresponding refactoring

hmm.. it might take a while until we get there. Any reason why not to remove dead code before that?

I would say just to remember to properly fix the corresponding warnings during refactoring PRs.. but I'm not totally against disabling dead_code as you are doing here.

going with dead_code macro sounds like a good middle ground 👍

@jbesraa jbesraa marked this pull request as ready for review January 17, 2025 08:48

@GitGab19 GitGab19 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

tACK

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.

Cleanup cargo build warnings

2 participants