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

Separate lib code from bin in mining-device #1163

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

Conversation

jbesraa
Copy link
Contributor

@jbesraa jbesraa commented Sep 12, 2024

Resolving MiningDevice in the list here #1093

Copy link
Contributor

github-actions bot commented Sep 12, 2024

🐰 Bencher Report

Branch1163/merge
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.34
(-0.78%)
46.64
(95.08%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
74.73
(-0.71%)
92.51
(80.78%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.75
(+0.51%)
14.82
(99.53%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
266.14
(-0.77%)
291.93
(91.17%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
588.71
(-0.70%)
650.54
(90.50%)
client_sv2_open_channel📈 view plot
🚷 view threshold
166.19
(+0.14%)
177.70
(93.52%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
270.58
(-2.20%)
307.23
(88.07%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
375.84
(-0.50%)
458.45
(81.98%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
160.61
(-0.84%)
185.73
(86.48%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
441.05
(-3.41%)
567.44
(77.73%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
996.19
(-0.11%)
1,161.71
(85.75%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Sep 12, 2024

🐰 Bencher Report

Branch1163/merge
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,473.00
(+0.32%)
8,792.29
(96.37%)
📈 view plot
🚷 view threshold
3,772.00
(+0.63%)
3,881.80
(97.17%)
📈 view plot
🚷 view threshold
5,298.00
(+0.77%)
5,440.80
(97.38%)
📈 view plot
🚷 view threshold
5.00
(-28.49%)
11.65
(42.91%)
📈 view plot
🚷 view threshold
90.00
(-0.10%)
95.27
(94.46%)
get_submit📈 view plot
🚷 view threshold
95,426.00
(-0.05%)
96,197.54
(99.20%)
📈 view plot
🚷 view threshold
59,522.00
(+0.09%)
59,796.39
(99.54%)
📈 view plot
🚷 view threshold
85,511.00
(+0.11%)
85,875.51
(99.58%)
📈 view plot
🚷 view threshold
44.00
(-7.72%)
71.51
(61.53%)
📈 view plot
🚷 view threshold
277.00
(-1.31%)
289.97
(95.53%)
get_subscribe📈 view plot
🚷 view threshold
8,038.00
(+0.35%)
8,359.33
(96.16%)
📈 view plot
🚷 view threshold
2,848.00
(+0.40%)
2,963.89
(96.09%)
📈 view plot
🚷 view threshold
3,983.00
(+0.44%)
4,135.87
(96.30%)
📈 view plot
🚷 view threshold
13.00
(+0.67%)
23.19
(56.05%)
📈 view plot
🚷 view threshold
114.00
(+0.26%)
119.59
(95.33%)
serialize_authorize📈 view plot
🚷 view threshold
12,248.00
(-0.05%)
12,633.21
(96.95%)
📈 view plot
🚷 view threshold
5,343.00
(+0.44%)
5,452.80
(97.99%)
📈 view plot
🚷 view threshold
7,463.00
(+0.59%)
7,603.24
(98.16%)
📈 view plot
🚷 view threshold
5.00
(-45.35%)
15.05
(33.22%)
📈 view plot
🚷 view threshold
136.00
(-0.62%)
143.64
(94.68%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,919.00
(+1.24%)
25,149.73
(99.08%)
📈 view plot
🚷 view threshold
9,920.00
(+0.25%)
10,053.34
(98.67%)
📈 view plot
🚷 view threshold
14,019.00
(+0.37%)
14,198.49
(98.74%)
📈 view plot
🚷 view threshold
31.00
(-11.57%)
44.44
(69.75%)
📈 view plot
🚷 view threshold
307.00
(+2.63%)
313.42
(97.95%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,477.00
(+0.71%)
30,722.33
(99.20%)
📈 view plot
🚷 view threshold
12,097.00
(+0.06%)
12,226.88
(98.94%)
📈 view plot
🚷 view threshold
17,137.00
(+0.12%)
17,308.26
(99.01%)
📈 view plot
🚷 view threshold
57.00
(+1.50%)
68.54
(83.16%)
📈 view plot
🚷 view threshold
373.00
(+1.48%)
380.70
(97.98%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,637.00
(+0.14%)
127,172.51
(99.58%)
📈 view plot
🚷 view threshold
73,363.00
(+0.12%)
73,673.56
(99.58%)
📈 view plot
🚷 view threshold
105,192.00
(+0.14%)
105,620.06
(99.59%)
📈 view plot
🚷 view threshold
110.00
(-0.21%)
142.21
(77.35%)
📈 view plot
🚷 view threshold
597.00
(+0.15%)
604.61
(98.74%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
28,059.00
(+1.25%)
28,581.96
(98.17%)
📈 view plot
🚷 view threshold
9,666.00
(+0.21%)
9,779.51
(98.84%)
📈 view plot
🚷 view threshold
13,674.00
(+0.22%)
13,830.21
(98.87%)
📈 view plot
🚷 view threshold
63.00
(-1.15%)
75.81
(83.11%)
📈 view plot
🚷 view threshold
402.00
(+2.32%)
415.97
(96.64%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,517.00
(+0.29%)
115,902.67
(99.67%)
📈 view plot
🚷 view threshold
68,223.00
(+0.20%)
68,476.22
(99.63%)
📈 view plot
🚷 view threshold
97,932.00
(+0.23%)
98,289.76
(99.64%)
📈 view plot
🚷 view threshold
66.00
(+3.12%)
81.83
(80.66%)
📈 view plot
🚷 view threshold
493.00
(+0.55%)
499.16
(98.77%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,461.00
(+1.40%)
23,994.03
(97.78%)
📈 view plot
🚷 view threshold
8,225.00
(+0.30%)
8,335.17
(98.68%)
📈 view plot
🚷 view threshold
11,591.00
(+0.34%)
11,737.26
(98.75%)
📈 view plot
🚷 view threshold
36.00
(-4.64%)
45.07
(79.88%)
📈 view plot
🚷 view threshold
334.00
(+2.57%)
347.76
(96.04%)
serialize_submit📈 view plot
🚷 view threshold
99,823.00
(-0.05%)
100,540.07
(99.29%)
📈 view plot
🚷 view threshold
61,566.00
(+0.09%)
61,845.08
(99.55%)
📈 view plot
🚷 view threshold
88,353.00
(+0.11%)
88,727.51
(99.58%)
📈 view plot
🚷 view threshold
47.00
(-3.94%)
70.56
(66.61%)
📈 view plot
🚷 view threshold
321.00
(-1.20%)
333.37
(96.29%)
serialize_subscribe📈 view plot
🚷 view threshold
11,367.00
(-0.17%)
11,758.47
(96.67%)
📈 view plot
🚷 view threshold
4,195.00
(+0.27%)
4,310.89
(97.31%)
📈 view plot
🚷 view threshold
5,842.00
(+0.34%)
5,992.88
(97.48%)
📈 view plot
🚷 view threshold
13.00
(-4.81%)
22.27
(58.38%)
📈 view plot
🚷 view threshold
156.00
(-0.65%)
164.46
(94.86%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Sep 12, 2024

🐰 Bencher Report

Branch1163/merge
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,839.90
(+0.20%)
7,517.80
(90.98%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,799.90
(-0.45%)
8,709.26
(89.56%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,301.50
(-1.30%)
9,190.55
(90.33%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
922.19
(+0.62%)
985.29
(93.60%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
720.73
(+0.64%)
764.59
(94.26%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
247.17
(-1.09%)
263.03
(93.97%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
160.12
(+1.41%)
166.54
(96.14%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,594.50
(-0.18%)
7,245.79
(91.01%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
281.23
(+1.80%)
301.10
(93.40%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
792.92
(+3.22%)
833.72
(95.11%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
644.36
(+2.46%)
682.92
(94.35%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
208.68
(-0.10%)
229.15
(91.07%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Sep 12, 2024

🐰 Bencher Report

Branch1163/merge
Testbedsv2
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,095.00
(+0.89%)
2,207.00
(94.93%)
📈 view plot
🚷 view threshold
473.00
(+0.22%)
490.85
(96.36%)
📈 view plot
🚷 view threshold
735.00
(+0.14%)
762.02
(96.45%)
📈 view plot
🚷 view threshold
6.00
(+1.61%)
14.38
(41.72%)
📈 view plot
🚷 view threshold
38.00
(+1.29%)
41.18
(92.28%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8,208.00
(+0.10%)
8,351.42
(98.28%)
📈 view plot
🚷 view threshold
2,137.00
(+0.17%)
2,180.13
(98.02%)
📈 view plot
🚷 view threshold
3,158.00
(+0.12%)
3,229.51
(97.79%)
📈 view plot
🚷 view threshold
37.00
(+0.89%)
45.36
(81.57%)
📈 view plot
🚷 view threshold
139.00
(+0.05%)
142.35
(97.64%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,293.00
(+0.22%)
6,416.72
(98.07%)
📈 view plot
🚷 view threshold
1,750.00
(-0.02%)
1,768.22
(98.97%)
📈 view plot
🚷 view threshold
2,548.00
(-0.22%)
2,580.96
(98.72%)
📈 view plot
🚷 view threshold
21.00
(+22.96%)
24.94
(84.20%)
📈 view plot
🚷 view threshold
104.00
(0.00%)
107.77
(96.50%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,762.00
(+0.11%)
15,054.95
(98.05%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,712.22
(99.61%)
📈 view plot
🚷 view threshold
6,752.00
(-0.08%)
6,784.03
(99.53%)
📈 view plot
🚷 view threshold
48.00
(+7.92%)
55.26
(86.86%)
📈 view plot
🚷 view threshold
222.00
(+0.04%)
230.47
(96.32%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27,574.00
(+0.26%)
27,894.79
(98.85%)
📈 view plot
🚷 view threshold
10,585.00
(+0.17%)
10,639.17
(99.49%)
📈 view plot
🚷 view threshold
15,399.00
(+0.15%)
15,481.58
(99.47%)
📈 view plot
🚷 view threshold
83.00
(+1.54%)
90.55
(91.66%)
📈 view plot
🚷 view threshold
336.00
(+0.35%)
345.92
(97.13%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,379.00
(-0.96%)
4,669.95
(93.77%)
📈 view plot
🚷 view threshold
1,461.00
(+0.03%)
1,478.08
(98.84%)
📈 view plot
🚷 view threshold
2,159.00
(+0.08%)
2,186.13
(98.76%)
📈 view plot
🚷 view threshold
10.00
(+2.61%)
18.50
(54.04%)
📈 view plot
🚷 view threshold
62.00
(-2.06%)
69.89
(88.71%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14,054.00
(-0.38%)
14,526.57
(96.75%)
📈 view plot
🚷 view threshold
5,064.00
(+0.01%)
5,081.08
(99.66%)
📈 view plot
🚷 view threshold
7,324.00
(+0.01%)
7,353.60
(99.60%)
📈 view plot
🚷 view threshold
37.00
(+4.62%)
43.74
(84.59%)
📈 view plot
🚷 view threshold
187.00
(-0.96%)
200.71
(93.17%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,677.00
(+0.18%)
23,033.73
(98.45%)
📈 view plot
🚷 view threshold
8,027.00
(+0.24%)
8,079.45
(99.35%)
📈 view plot
🚷 view threshold
11,672.00
(+0.19%)
11,755.89
(99.29%)
📈 view plot
🚷 view threshold
80.00
(+8.59%)
85.19
(93.91%)
📈 view plot
🚷 view threshold
303.00
(-0.13%)
314.84
(96.24%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,677.00
(-0.22%)
4,784.36
(97.76%)
📈 view plot
🚷 view threshold
1,502.00
(+0.03%)
1,519.08
(98.88%)
📈 view plot
🚷 view threshold
2,277.00
(-0.02%)
2,305.01
(98.78%)
📈 view plot
🚷 view threshold
11.00
(+19.69%)
15.73
(69.91%)
📈 view plot
🚷 view threshold
67.00
(-0.80%)
70.29
(95.33%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,144.00
(-0.33%)
16,512.28
(97.77%)
📈 view plot
🚷 view threshold
5,963.00
(+0.01%)
5,980.08
(99.71%)
📈 view plot
🚷 view threshold
8,664.00
(+0.04%)
8,692.80
(99.67%)
📈 view plot
🚷 view threshold
40.00
(-3.19%)
54.88
(72.89%)
📈 view plot
🚷 view threshold
208.00
(-0.68%)
217.80
(95.50%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,510.00
(-0.10%)
35,780.46
(99.24%)
📈 view plot
🚷 view threshold
14,855.00
(+0.13%)
14,908.51
(99.64%)
📈 view plot
🚷 view threshold
21,825.00
(+0.15%)
21,911.89
(99.60%)
📈 view plot
🚷 view threshold
91.00
(-3.44%)
115.94
(78.49%)
📈 view plot
🚷 view threshold
378.00
(-0.40%)
385.08
(98.16%)
🐰 View full continuous benchmarking report in Bencher

@@ -24,3 +29,6 @@ tracing = { version = "0.1" }
tracing-subscriber = "0.3"
sha2 = "0.10.6"
tokio = "^1.38.0"

[features]
abort_mining = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is the purpose of this feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this to replicate exactly the MG test, which says that the mining-device should not start mining https://github.com/stratum-mining/stratum/pull/1163/files#diff-cc06b104e73cde20ec61e683c5b4eb74e5422641e422652485c1026dd72a7a98R255

In practice I do not think its needed tbh because anyway the mining-device wont be able to open a channel

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok so why do we have it? can't we get away with not having this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the redundant flag

Copy link
Collaborator

Choose a reason for hiding this comment

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

Removed the redundant flag

I don't understand, abort_mining seems to be still there

@jbesraa jbesraa force-pushed the 2024-09-12-mining-device-lib-separation branch 2 times, most recently from a7ffeff to 36ea0a2 Compare September 17, 2024 12:47
@jbesraa jbesraa marked this pull request as ready for review September 17, 2024 12:49
Copy link
Contributor

🐰 Bencher Report

Branch1163/merge@fbf7d9bb-09d4-4be7-9558-156e90760eef
Testbedsv2
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,125.00
(+2.33%)
2,208.06
(96.24%)
📈 view plot
🚷 view threshold
473.00
(+0.23%)
490.92
(96.35%)
📈 view plot
🚷 view threshold
735.00
(+0.14%)
762.13
(96.44%)
📈 view plot
🚷 view threshold
5.00
(-15.08%)
14.40
(34.72%)
📈 view plot
🚷 view threshold
39.00
(+3.94%)
41.21
(94.63%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8,128.00
(-0.87%)
8,352.65
(97.31%)
📈 view plot
🚷 view threshold
2,137.00
(+0.17%)
2,180.29
(98.01%)
📈 view plot
🚷 view threshold
3,163.00
(+0.28%)
3,229.86
(97.93%)
📈 view plot
🚷 view threshold
34.00
(-7.23%)
45.40
(74.89%)
📈 view plot
🚷 view threshold
137.00
(-1.38%)
142.39
(96.21%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6,247.00
(-0.50%)
6,417.04
(97.35%)
📈 view plot
🚷 view threshold
1,750.00
(-0.02%)
1,768.29
(98.97%)
📈 view plot
🚷 view threshold
2,552.00
(-0.06%)
2,581.07
(98.87%)
📈 view plot
🚷 view threshold
18.00
(+5.68%)
24.81
(72.56%)
📈 view plot
🚷 view threshold
103.00
(-0.95%)
107.79
(95.56%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14,632.00
(-0.77%)
15,056.68
(97.18%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,712.29
(99.61%)
📈 view plot
🚷 view threshold
6,762.00
(+0.07%)
6,784.22
(99.67%)
📈 view plot
🚷 view threshold
41.00
(-7.64%)
55.17
(74.31%)
📈 view plot
🚷 view threshold
219.00
(-1.30%)
230.52
(95.00%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27,464.00
(-0.14%)
27,894.09
(98.46%)
📈 view plot
🚷 view threshold
10,585.00
(+0.18%)
10,639.13
(99.49%)
📈 view plot
🚷 view threshold
15,404.00
(+0.19%)
15,481.76
(99.50%)
📈 view plot
🚷 view threshold
81.00
(-0.87%)
90.55
(89.45%)
📈 view plot
🚷 view threshold
333.00
(-0.54%)
345.93
(96.26%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4,363.00
(-1.33%)
4,671.08
(93.40%)
📈 view plot
🚷 view threshold
1,461.00
(+0.03%)
1,478.14
(98.84%)
📈 view plot
🚷 view threshold
2,163.00
(+0.27%)
2,186.25
(98.94%)
📈 view plot
🚷 view threshold
6.00
(-38.37%)
18.56
(32.33%)
📈 view plot
🚷 view threshold
62.00
(-2.07%)
69.92
(88.68%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
13,978.00
(-0.92%)
14,529.17
(96.21%)
📈 view plot
🚷 view threshold
5,064.00
(+0.01%)
5,081.14
(99.66%)
📈 view plot
🚷 view threshold
7,328.00
(+0.07%)
7,353.77
(99.65%)
📈 view plot
🚷 view threshold
35.00
(-0.97%)
43.74
(80.02%)
📈 view plot
🚷 view threshold
185.00
(-2.02%)
200.78
(92.14%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22,635.00
(-0.01%)
23,034.74
(98.26%)
📈 view plot
🚷 view threshold
8,027.00
(+0.24%)
8,079.39
(99.35%)
📈 view plot
🚷 view threshold
11,675.00
(+0.22%)
11,755.88
(99.31%)
📈 view plot
🚷 view threshold
78.00
(+5.90%)
85.14
(91.61%)
📈 view plot
🚷 view threshold
302.00
(-0.46%)
314.88
(95.91%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4,703.00
(+0.33%)
4,785.03
(98.29%)
📈 view plot
🚷 view threshold
1,502.00
(+0.03%)
1,519.14
(98.87%)
📈 view plot
🚷 view threshold
2,278.00
(+0.02%)
2,305.12
(98.82%)
📈 view plot
🚷 view threshold
9.00
(-1.92%)
15.73
(57.23%)
📈 view plot
🚷 view threshold
68.00
(+0.66%)
70.30
(96.72%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16,140.00
(-0.36%)
16,513.60
(97.74%)
📈 view plot
🚷 view threshold
5,963.00
(+0.01%)
5,980.14
(99.71%)
📈 view plot
🚷 view threshold
8,665.00
(+0.05%)
8,692.85
(99.68%)
📈 view plot
🚷 view threshold
39.00
(-5.67%)
54.92
(71.02%)
📈 view plot
🚷 view threshold
208.00
(-0.69%)
217.84
(95.48%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35,594.00
(+0.13%)
35,782.26
(99.47%)
📈 view plot
🚷 view threshold
14,855.00
(+0.13%)
14,908.45
(99.64%)
📈 view plot
🚷 view threshold
21,819.00
(+0.13%)
21,911.53
(99.58%)
📈 view plot
🚷 view threshold
95.00
(+0.72%)
116.04
(81.87%)
📈 view plot
🚷 view threshold
380.00
(+0.12%)
385.10
(98.68%)
🐰 View full continuous benchmarking report in Bencher

Copy link
Collaborator

@rrybarczyk rrybarczyk left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Collaborator

@rrybarczyk rrybarczyk left a comment

Choose a reason for hiding this comment

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

Need to understand why we removed the info log containing the req_id and then fix the cargo clippy error in the CI.

) -> Result<SendTo<()>, Error> {
self.channel_opened = true;
self.channel_id = Some(m.channel_id);
let req_id = m.get_request_id_as_u32();
Copy link
Collaborator

Choose a reason for hiding this comment

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

The cargo clippy CI fails on this line with:

warning: unused variable: `req_id`
   --> test-utils/mining-device/src/lib/mod.rs:389:13
    |
389 |         let req_id = m.get_request_id_as_u32();
    |             ^^^^^^ help: if this is intentional, prefix it with an underscore: `_req_id`
    |
    = note: `#[warn(unused_variables)]` on by default

The reason it fails is because the main branch immediately uses this req_id in an info! log on L438 with:

        info!(
            "MINING DEVICE: channel opened with: group id {}, channel id {}, request id {}",
            m.group_channel_id, m.channel_id, req_id
        );

Why did we remove this log? Are there any other logs that got removed? Are there any other changes in the code in this PR beyond breaking up the logic into the mod.rs file?

@jbesraa jbesraa force-pushed the 2024-09-12-mining-device-lib-separation branch from 36ea0a2 to 7c27cc7 Compare September 20, 2024 13:38
Isolating the library code into a `lib/mod.rs` and consume it in
`main.rs`.
@jbesraa jbesraa force-pushed the 2024-09-12-mining-device-lib-separation branch from 7c27cc7 to b3b55e7 Compare September 20, 2024 13:57
..cargo does not allow hyphens in library target name
@jbesraa jbesraa force-pushed the 2024-09-12-mining-device-lib-separation branch from b3b55e7 to 19a6968 Compare September 20, 2024 14:01
Copy link
Contributor

🐰 Bencher Report

Branch1163/merge@838c7910-2edb-49e4-99b3-692a1b114978
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,442.00
(-0.04%)
8,791.97
(96.02%)
📈 view plot
🚷 view threshold
3,775.00
(+0.71%)
3,881.87
(97.25%)
📈 view plot
🚷 view threshold
5,302.00
(+0.85%)
5,440.90
(97.45%)
📈 view plot
🚷 view threshold
5.00
(-28.49%)
11.65
(42.91%)
📈 view plot
🚷 view threshold
89.00
(-1.21%)
95.27
(93.41%)
get_submit📈 view plot
🚷 view threshold
95,395.00
(-0.08%)
96,197.51
(99.17%)
📈 view plot
🚷 view threshold
59,525.00
(+0.09%)
59,796.46
(99.55%)
📈 view plot
🚷 view threshold
85,515.00
(+0.12%)
85,875.61
(99.58%)
📈 view plot
🚷 view threshold
44.00
(-7.72%)
71.51
(61.53%)
📈 view plot
🚷 view threshold
276.00
(-1.66%)
289.99
(95.17%)
get_subscribe📈 view plot
🚷 view threshold
8,007.00
(-0.03%)
8,359.00
(95.79%)
📈 view plot
🚷 view threshold
2,851.00
(+0.50%)
2,963.94
(96.19%)
📈 view plot
🚷 view threshold
3,987.00
(+0.54%)
4,135.94
(96.40%)
📈 view plot
🚷 view threshold
13.00
(+0.67%)
23.19
(56.05%)
📈 view plot
🚷 view threshold
113.00
(-0.61%)
119.58
(94.50%)
serialize_authorize📈 view plot
🚷 view threshold
12,217.00
(-0.31%)
12,633.11
(96.71%)
📈 view plot
🚷 view threshold
5,346.00
(+0.50%)
5,452.87
(98.04%)
📈 view plot
🚷 view threshold
7,467.00
(+0.64%)
7,603.35
(98.21%)
📈 view plot
🚷 view threshold
5.00
(-45.35%)
15.05
(33.22%)
📈 view plot
🚷 view threshold
135.00
(-1.34%)
143.64
(93.98%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24,888.00
(+1.12%)
25,148.18
(98.97%)
📈 view plot
🚷 view threshold
9,923.00
(+0.28%)
10,053.41
(98.70%)
📈 view plot
🚷 view threshold
14,023.00
(+0.40%)
14,198.59
(98.76%)
📈 view plot
🚷 view threshold
31.00
(-11.57%)
44.44
(69.75%)
📈 view plot
🚷 view threshold
306.00
(+2.30%)
313.37
(97.65%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30,446.00
(+0.61%)
30,721.04
(99.10%)
📈 view plot
🚷 view threshold
12,100.00
(+0.09%)
12,226.92
(98.96%)
📈 view plot
🚷 view threshold
17,141.00
(+0.14%)
17,308.32
(99.03%)
📈 view plot
🚷 view threshold
57.00
(+1.50%)
68.54
(83.16%)
📈 view plot
🚷 view threshold
372.00
(+1.21%)
380.66
(97.72%)
serialize_deserialize_handle_submit📈 view plot
🚷 view threshold
126,637.00
(+0.14%)
127,172.51
(99.58%)
📈 view plot
🚷 view threshold
73,363.00
(+0.12%)
73,673.56
(99.58%)
📈 view plot
🚷 view threshold
105,192.00
(+0.14%)
105,620.06
(99.59%)
📈 view plot
🚷 view threshold
110.00
(-0.21%)
142.21
(77.35%)
📈 view plot
🚷 view threshold
597.00
(+0.15%)
604.61
(98.74%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
28,028.00
(+1.14%)
28,580.80
(98.07%)
📈 view plot
🚷 view threshold
9,669.00
(+0.24%)
9,779.57
(98.87%)
📈 view plot
🚷 view threshold
13,678.00
(+0.24%)
13,830.30
(98.90%)
📈 view plot
🚷 view threshold
63.00
(-1.15%)
75.81
(83.11%)
📈 view plot
🚷 view threshold
401.00
(+2.07%)
415.94
(96.41%)
serialize_deserialize_submit📈 view plot
🚷 view threshold
115,517.00
(+0.29%)
115,902.67
(99.67%)
📈 view plot
🚷 view threshold
68,223.00
(+0.20%)
68,476.22
(99.63%)
📈 view plot
🚷 view threshold
97,932.00
(+0.23%)
98,289.76
(99.64%)
📈 view plot
🚷 view threshold
66.00
(+3.12%)
81.83
(80.66%)
📈 view plot
🚷 view threshold
493.00
(+0.55%)
499.16
(98.77%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23,430.00
(+1.27%)
23,992.92
(97.65%)
📈 view plot
🚷 view threshold
8,228.00
(+0.33%)
8,335.23
(98.71%)
📈 view plot
🚷 view threshold
11,595.00
(+0.38%)
11,737.37
(98.79%)
📈 view plot
🚷 view threshold
36.00
(-4.64%)
45.07
(79.88%)
📈 view plot
🚷 view threshold
333.00
(+2.27%)
347.73
(95.76%)
serialize_submit📈 view plot
🚷 view threshold
99,792.00
(-0.08%)
100,540.07
(99.26%)
📈 view plot
🚷 view threshold
61,569.00
(+0.09%)
61,845.15
(99.55%)
📈 view plot
🚷 view threshold
88,357.00
(+0.11%)
88,727.60
(99.58%)
📈 view plot
🚷 view threshold
47.00
(-3.94%)
70.56
(66.61%)
📈 view plot
🚷 view threshold
320.00
(-1.51%)
333.40
(95.98%)
serialize_subscribe📈 view plot
🚷 view threshold
11,336.00
(-0.44%)
11,758.46
(96.41%)
📈 view plot
🚷 view threshold
4,198.00
(+0.34%)
4,310.94
(97.38%)
📈 view plot
🚷 view threshold
5,846.00
(+0.40%)
5,992.95
(97.55%)
📈 view plot
🚷 view threshold
13.00
(-4.81%)
22.27
(58.38%)
📈 view plot
🚷 view threshold
155.00
(-1.28%)
164.47
(94.24%)
🐰 View full continuous benchmarking report in Bencher

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.

3 participants