Skip to content

Test Pool role behavior if bad coinbase_output is provided#1306

Merged
plebhash merged 2 commits into
stratum-mining:mainfrom
jbesraa:2024-12-18-pool-bad-cb-config
Jan 8, 2025
Merged

Test Pool role behavior if bad coinbase_output is provided#1306
plebhash merged 2 commits into
stratum-mining:mainfrom
jbesraa:2024-12-18-pool-bad-cb-config

Conversation

@jbesraa

@jbesraa jbesraa commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

resolves #1305

@codecov

codecov Bot commented Dec 18, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.14%. Comparing base (dbc349b) to head (3201b7e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1306      +/-   ##
==========================================
- Coverage   19.30%   19.14%   -0.16%     
==========================================
  Files         164      166       +2     
  Lines       10853    10987     +134     
==========================================
+ Hits         2095     2104       +9     
- Misses       8758     8883     +125     
Flag Coverage Δ
binary_codec_sv2-coverage ?
binary_serde_sv2-coverage 3.65% <ø> (ø)
binary_sv2-coverage 5.48% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
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.29% <ø> (ø)
jd_client-coverage 0.00% <ø> (ø)
jd_server-coverage 7.79% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 2.39% <ø> (ø)
mining-coverage 2.51% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.70% <ø> (ø)
noise_sv2-coverage 4.35% <ø> (ø)
pool_sv2-coverage 2.05% <ø> (+0.66%) ⬆️
protocols 24.74% <ø> (ø)
roles 6.55% <ø> (+<0.01%) ⬆️
roles_logic_sv2-coverage 8.11% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.60% <ø> (ø)
utils 25.13% <ø> (ø)
v1-coverage 2.47% <ø> (ø)

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.

@github-actions

github-actions Bot commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2024-12-18-pool-bad-cb-config
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.14
(+1.11%)
2.24
(95.57%)
📈 view plot
🚷 view threshold
473.00
(-0.13%)
490.59
(96.41%)
📈 view plot
🚷 view threshold
732.00
(-0.55%)
759.04
(96.44%)
📈 view plot
🚷 view threshold
8.00
(+57.54%)
11.74
(68.12%)
📈 view plot
🚷 view threshold
39.00
(+0.95%)
41.68
(93.56%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
8.28
(+0.66%)
8.40
(98.59%)
📈 view plot
🚷 view threshold
2,137.00📈 view plot
🚷 view threshold
3,155.00
(-0.12%)
3,167.49
(99.61%)
📈 view plot
🚷 view threshold
38.00
(+6.76%)
41.67
(91.19%)
📈 view plot
🚷 view threshold
141.00
(+0.94%)
144.51
(97.57%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
6.32
(+0.34%)
6.45
(98.06%)
📈 view plot
🚷 view threshold
1,750.00
(-0.03%)
1,767.59
(99.00%)
📈 view plot
🚷 view threshold
2,548.00
(-0.15%)
2,575.51
(98.93%)
📈 view plot
🚷 view threshold
20.00
(+16.26%)
24.32
(82.24%)
📈 view plot
🚷 view threshold
105.00
(+0.31%)
108.74
(96.56%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
14.79
(+0.44%)
14.94
(99.03%)
📈 view plot
🚷 view threshold
4,694.00
(-0.01%)
4,711.59
(99.63%)
📈 view plot
🚷 view threshold
6,745.00
(-0.16%)
6,786.72
(99.39%)
📈 view plot
🚷 view threshold
55.00
(+20.44%)
62.99
(87.31%)
📈 view plot
🚷 view threshold
222.00
(+0.37%)
226.13
(98.17%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
27.79
(+0.69%)
28.06
(99.06%)
📈 view plot
🚷 view threshold
10,645.00
(+0.36%)
10,697.70
(99.51%)
📈 view plot
🚷 view threshold
15,502.00
(+0.40%)
15,592.49
(99.42%)
📈 view plot
🚷 view threshold
92.00
(+9.89%)
99.06
(92.88%)
📈 view plot
🚷 view threshold
338.00
(+0.74%)
343.13
(98.51%)
client_sv2_open_channel📈 view plot
🚷 view threshold
4.49
(+1.98%)
4.58
(98.05%)
📈 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.77
(98.59%)
📈 view plot
🚷 view threshold
12.00
(+46.43%)
14.03
(85.51%)
📈 view plot
🚷 view threshold
65.00
(+3.41%)
67.64
(96.10%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
14.09
(+0.48%)
14.20
(99.20%)
📈 view plot
🚷 view threshold
5,064.00
(-0.01%)
5,081.59
(99.65%)
📈 view plot
🚷 view threshold
7,316.00
(-0.14%)
7,352.82
(99.50%)
📈 view plot
🚷 view threshold
45.00
(+22.95%)
48.43
(92.92%)
📈 view plot
🚷 view threshold
187.00
(+0.54%)
190.83
(97.99%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
22.97
(+1.15%)
23.06
(99.58%)
📈 view plot
🚷 view threshold
8,040.00
(+0.10%)
8,057.34
(99.78%)
📈 view plot
🚷 view threshold
11,683.00
(-0.01%)
11,713.53
(99.74%)
📈 view plot
🚷 view threshold
87.00
(+14.82%)
89.91
(96.76%)
📈 view plot
🚷 view threshold
310.00
(+1.95%)
312.62
(99.16%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
4.71
(+0.51%)
4.79
(98.43%)
📈 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.15%)
15.36
(78.10%)
📈 view plot
🚷 view threshold
68.00
(+0.64%)
70.09
(97.02%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
16.23
(+0.46%)
16.32
(99.42%)
📈 view plot
🚷 view threshold
5,963.00
(-0.01%)
5,980.59
(99.71%)
📈 view plot
🚷 view threshold
8,650.00
(-0.16%)
8,692.73
(99.51%)
📈 view plot
🚷 view threshold
53.00
(+30.46%)
56.32
(94.11%)
📈 view plot
🚷 view threshold
209.00
(+0.37%)
212.09
(98.54%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
35.76
(+0.43%)
35.95
(99.45%)
📈 view plot
🚷 view threshold
14,888.00
(+0.14%)
14,918.80
(99.79%)
📈 view plot
🚷 view threshold
21,866.00
(+0.10%)
21,918.09
(99.76%)
📈 view plot
🚷 view threshold
111.00
(+17.62%)
119.52
(92.88%)
📈 view plot
🚷 view threshold
381.00
(+0.36%)
385.72
(98.78%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2024-12-18-pool-bad-cb-config
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.73
(-1.22%)
60.47
(73.98%)
client_sv2_handle_message_mining📈 view plot
🚷 view threshold
88.99
(+13.81%)
110.54
(80.50%)
client_sv2_mining_message_submit_standard📈 view plot
🚷 view threshold
14.68
(+0.09%)
14.73
(99.68%)
client_sv2_mining_message_submit_standard_serialize📈 view plot
🚷 view threshold
296.98
(+11.60%)
302.69
(98.11%)
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
🚷 view threshold
636.60
(+3.14%)
663.21
(95.99%)
client_sv2_open_channel📈 view plot
🚷 view threshold
164.61
(-0.85%)
179.56
(91.67%)
client_sv2_open_channel_serialize📈 view plot
🚷 view threshold
278.60
(-2.57%)
316.39
(88.06%)
client_sv2_open_channel_serialize_deserialize📈 view plot
🚷 view threshold
390.67
(+2.06%)
402.94
(96.96%)
client_sv2_setup_connection📈 view plot
🚷 view threshold
162.18
(+1.32%)
171.44
(94.60%)
client_sv2_setup_connection_serialize📈 view plot
🚷 view threshold
452.39
(-3.56%)
559.56
(80.85%)
client_sv2_setup_connection_serialize_deserialize📈 view plot
🚷 view threshold
1,065.60
(+5.77%)
1,224.63
(87.01%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2024-12-18-pool-bad-cb-config
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,650.30
(+1.32%)
6,932.20
(95.93%)
client-submit-serialize-deserialize📈 view plot
🚷 view threshold
7,441.10
(+0.47%)
7,822.74
(95.12%)
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
🚷 view threshold
8,097.00
(-0.08%)
9,443.60
(85.74%)
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
🚷 view threshold
879.74
(+1.40%)
944.01
(93.19%)
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
🚷 view threshold
665.63
(-1.31%)
718.54
(92.64%)
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
🚷 view threshold
245.22
(-1.93%)
275.15
(89.12%)
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
🚷 view threshold
155.24
(-1.36%)
165.75
(93.66%)
client-sv1-get-submit📈 view plot
🚷 view threshold
6,425.30
(+1.20%)
6,803.46
(94.44%)
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
🚷 view threshold
318.74
(+12.07%)
341.36
(93.37%)
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
🚷 view threshold
731.88
(+0.47%)
780.60
(93.76%)
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
🚷 view threshold
585.73
(-0.88%)
629.65
(93.02%)
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
🚷 view threshold
203.10
(-1.70%)
227.02
(89.46%)
🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Branch2024-12-18-pool-bad-cb-config
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.33%)
8.67
(97.81%)
📈 view plot
🚷 view threshold
3.66
(-1.66%)
3.86
(94.86%)
📈 view plot
🚷 view threshold
5.11
(-2.05%)
5.45
(93.76%)
📈 view plot
🚷 view threshold
10.00
(+18.30%)
16.26
(61.49%)
📈 view plot
🚷 view threshold
95.00
(+3.97%)
96.81
(98.13%)
get_submit📈 view plot
🚷 view threshold
95.35
(-0.01%)
95.61
(99.72%)
📈 view plot
🚷 view threshold
59.26
(-0.24%)
59.71
(99.26%)
📈 view plot
🚷 view threshold
85.08
(-0.28%)
85.82
(99.13%)
📈 view plot
🚷 view threshold
45.00
(+0.73%)
60.17
(74.79%)
📈 view plot
🚷 view threshold
287.00
(+2.24%)
291.77
(98.36%)
get_subscribe📈 view plot
🚷 view threshold
7.95
(-0.52%)
8.23
(96.64%)
📈 view plot
🚷 view threshold
2.76
(-1.94%)
2.94
(93.72%)
📈 view plot
🚷 view threshold
3.83
(-2.31%)
4.14
(92.52%)
📈 view plot
🚷 view threshold
12.00
(-3.88%)
20.64
(58.13%)
📈 view plot
🚷 view threshold
116.00
(+1.28%)
117.93
(98.36%)
serialize_authorize📈 view plot
🚷 view threshold
12.30
(+0.32%)
12.50
(98.35%)
📈 view plot
🚷 view threshold
5.24
(-1.10%)
5.43
(96.57%)
📈 view plot
🚷 view threshold
7.28
(-1.38%)
7.60
(95.72%)
📈 view plot
🚷 view threshold
10.00
(-1.92%)
18.79
(53.21%)
📈 view plot
🚷 view threshold
142.00
(+2.93%)
143.26
(99.12%)
serialize_deserialize_authorize📈 view plot
🚷 view threshold
24.76
(+0.19%)
25.19
(98.31%)
📈 view plot
🚷 view threshold
9.79
(-0.72%)
10.01
(97.76%)
📈 view plot
🚷 view threshold
13.79
(-0.89%)
14.17
(97.25%)
📈 view plot
🚷 view threshold
32.00
(-10.92%)
45.95
(69.64%)
📈 view plot
🚷 view threshold
309.00
(+1.78%)
313.59
(98.54%)
serialize_deserialize_handle_authorize📈 view plot
🚷 view threshold
30.40
(+0.24%)
30.73
(98.93%)
📈 view plot
🚷 view threshold
11.99
(-0.51%)
12.19
(98.39%)
📈 view plot
🚷 view threshold
16.95
(-0.66%)
17.30
(97.99%)
📈 view plot
🚷 view threshold
58.00
(+3.82%)
67.58
(85.83%)
📈 view plot
🚷 view threshold
376.00
(+1.33%)
379.43
(99.10%)
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.23%)
105.51
(99.29%)
📈 view plot
🚷 view threshold
109.00
(+2.23%)
125.75
(86.68%)
📈 view plot
🚷 view threshold
607.00
(+1.54%)
610.40
(99.44%)
serialize_deserialize_handle_subscribe📈 view plot
🚷 view threshold
28.00
(+0.31%)
28.39
(98.63%)
📈 view plot
🚷 view threshold
9.58
(-0.56%)
9.76
(98.13%)
📈 view plot
🚷 view threshold
13.51
(-0.74%)
13.84
(97.66%)
📈 view plot
🚷 view threshold
69.00
(+6.81%)
78.12
(88.33%)
📈 view plot
🚷 view threshold
404.00
(+1.18%)
409.81
(98.58%)
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.48%)
87.37
(78.98%)
📈 view plot
🚷 view threshold
503.00
(+1.95%)
504.94
(99.61%)
serialize_deserialize_subscribe📈 view plot
🚷 view threshold
23.37
(+0.20%)
23.82
(98.12%)
📈 view plot
🚷 view threshold
8.13
(-0.69%)
8.32
(97.75%)
📈 view plot
🚷 view threshold
11.42
(-0.86%)
11.75
(97.24%)
📈 view plot
🚷 view threshold
38.00
(-2.43%)
50.96
(74.57%)
📈 view plot
🚷 view threshold
336.00
(+1.30%)
342.44
(98.12%)
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.26%)
88.65
(99.19%)
📈 view plot
🚷 view threshold
50.00
(+4.01%)
66.77
(74.88%)
📈 view plot
🚷 view threshold
333.00
(+2.33%)
337.48
(98.67%)
serialize_subscribe📈 view plot
🚷 view threshold
11.47
(+0.65%)
11.60
(98.93%)
📈 view plot
🚷 view threshold
4.11
(-1.22%)
4.28
(95.98%)
📈 view plot
🚷 view threshold
5.69
(-1.60%)
6.00
(94.86%)
📈 view plot
🚷 view threshold
16.00
(+15.19%)
24.06
(66.49%)
📈 view plot
🚷 view threshold
163.00
(+2.82%)
164.58
(99.04%)
🐰 View full continuous benchmarking report in Bencher

@jbesraa

jbesraa commented Dec 18, 2024

Copy link
Copy Markdown
Contributor Author

Should I add a commit to remove the equivalent MG test?

@plebhash

plebhash commented Jan 6, 2025

Copy link
Copy Markdown
Member

we should probably also use this PR to get rid of:

  • test/bad-pool-config-test
  • the corresponding execution job on .github/workflows/mg.yaml

@plebhash plebhash added this to the 1.3.0 milestone Jan 6, 2025
Comment thread roles/pool/src/lib/mod.rs Outdated
@plebhash plebhash added the ready-to-be-merged triggers auto rebase bot label Jan 8, 2025
@plebhash

plebhash commented Jan 8, 2025

Copy link
Copy Markdown
Member

we should probably also use this PR to get rid of:

  • test/bad-pool-config-test
  • the corresponding execution job on .github/workflows/mg.yaml

@jbesraa we missed this:

there's also two references to bad-pool-config-test on mg-aggregate-results job:

bad-pool-config-test,

if [ "${{ needs.bad-pool-config-test.result }}" != "success" ] ||

that is leading to a (kind of silent) error message on workflow execution:

Invalid workflow file: .github/workflows/mg.yaml#L160
The workflow is not valid. .github/workflows/mg.yaml (Line: 160, Col: 7): Job 'mg-aggregate-results' depends on unknown job 'bad-pool-config-test'.


rebasing 9b02874 to fix this and proceed with merging

@plebhash plebhash merged commit 7483090 into stratum-mining:main Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI/CD ready-to-be-merged triggers auto rebase bot unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit test for bad coinbase_output config behavior in Pool role

2 participants