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 --nominal-hashrate-multiplier to mining-device #1195

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Oct 8, 2024

close #1188

first commit

  • introduces a mechanism for advertising a custom nominal hashrate (by multiplying measured hashrate with a constant)
  • fixes measure_hashrate so it also takes handicap into consideration (otherwise measure_hashrate will return something that doesn't reflect what will happen during the actual mining when handicap is used)

second commit

  • makes sure we use all available parallelism (there were some weird subtractions that didn't seem to make sense cc @Fi3)

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1195/merge
Testbedsv2

⚠️ WARNING: The following Measures do not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkEstimated Cyclesestimated cyclesInstructionsinstructionsL1 AccessesaccessesL2 AccessesaccessesRAM Accessesaccesses
client_sv2_handle_message_common📈 view plot
⚠️ NO THRESHOLD
2,137.00📈 view plot
⚠️ NO THRESHOLD
473.00📈 view plot
⚠️ NO THRESHOLD
732.00📈 view plot
⚠️ NO THRESHOLD
8.00📈 view plot
⚠️ NO THRESHOLD
39.00
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
8,204.00📈 view plot
⚠️ NO THRESHOLD
2,137.00📈 view plot
⚠️ NO THRESHOLD
3,159.00📈 view plot
⚠️ NO THRESHOLD
36.00📈 view plot
⚠️ NO THRESHOLD
139.00
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
6,331.00📈 view plot
⚠️ NO THRESHOLD
1,750.00📈 view plot
⚠️ NO THRESHOLD
2,546.00📈 view plot
⚠️ NO THRESHOLD
22.00📈 view plot
⚠️ NO THRESHOLD
105.00
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
14,694.00📈 view plot
⚠️ NO THRESHOLD
4,694.00📈 view plot
⚠️ NO THRESHOLD
6,754.00📈 view plot
⚠️ NO THRESHOLD
48.00📈 view plot
⚠️ NO THRESHOLD
220.00
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
27,514.00📈 view plot
⚠️ NO THRESHOLD
10,585.00📈 view plot
⚠️ NO THRESHOLD
15,399.00📈 view plot
⚠️ NO THRESHOLD
85.00📈 view plot
⚠️ NO THRESHOLD
334.00
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
4,375.00📈 view plot
⚠️ NO THRESHOLD
1,461.00📈 view plot
⚠️ NO THRESHOLD
2,160.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
62.00
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
13,948.00📈 view plot
⚠️ NO THRESHOLD
5,064.00📈 view plot
⚠️ NO THRESHOLD
7,328.00📈 view plot
⚠️ NO THRESHOLD
36.00📈 view plot
⚠️ NO THRESHOLD
184.00
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
22,707.00📈 view plot
⚠️ NO THRESHOLD
8,027.00📈 view plot
⚠️ NO THRESHOLD
11,672.00📈 view plot
⚠️ NO THRESHOLD
79.00📈 view plot
⚠️ NO THRESHOLD
304.00
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
4,711.00📈 view plot
⚠️ NO THRESHOLD
1,502.00📈 view plot
⚠️ NO THRESHOLD
2,276.00📈 view plot
⚠️ NO THRESHOLD
11.00📈 view plot
⚠️ NO THRESHOLD
68.00
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
16,140.00📈 view plot
⚠️ NO THRESHOLD
5,963.00📈 view plot
⚠️ NO THRESHOLD
8,665.00📈 view plot
⚠️ NO THRESHOLD
39.00📈 view plot
⚠️ NO THRESHOLD
208.00
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
35,514.00📈 view plot
⚠️ NO THRESHOLD
14,855.00📈 view plot
⚠️ NO THRESHOLD
21,824.00📈 view plot
⚠️ NO THRESHOLD
92.00📈 view plot
⚠️ NO THRESHOLD
378.00
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1195/merge
Testbedsv1

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
client-submit-serialize📈 view plot
⚠️ NO THRESHOLD
6,728.50
client-submit-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
7,842.00
client-submit-serialize-deserialize-handle/client-submit-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
8,400.10
client-sv1-authorize-serialize-deserialize-handle/client-sv1-authorize-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
923.29
client-sv1-authorize-serialize-deserialize/client-sv1-authorize-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
725.91
client-sv1-authorize-serialize/client-sv1-authorize-serialize📈 view plot
⚠️ NO THRESHOLD
244.70
client-sv1-get-authorize/client-sv1-get-authorize📈 view plot
⚠️ NO THRESHOLD
156.59
client-sv1-get-submit📈 view plot
⚠️ NO THRESHOLD
6,555.30
client-sv1-get-subscribe/client-sv1-get-subscribe📈 view plot
⚠️ NO THRESHOLD
274.12
client-sv1-subscribe-serialize-deserialize-handle/client-sv1-subscribe-serialize-deserialize-handle📈 view plot
⚠️ NO THRESHOLD
764.57
client-sv1-subscribe-serialize-deserialize/client-sv1-subscribe-serialize-deserialize📈 view plot
⚠️ NO THRESHOLD
628.17
client-sv1-subscribe-serialize/client-sv1-subscribe-serialize📈 view plot
⚠️ NO THRESHOLD
204.54
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1195/merge
Testbedsv1

⚠️ WARNING: The following Measures do not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkEstimated Cyclesestimated cyclesInstructionsinstructionsL1 AccessesaccessesL2 AccessesaccessesRAM Accessesaccesses
get_authorize📈 view plot
⚠️ NO THRESHOLD
8,587.00📈 view plot
⚠️ NO THRESHOLD
3,772.00📈 view plot
⚠️ NO THRESHOLD
5,292.00📈 view plot
⚠️ NO THRESHOLD
8.00📈 view plot
⚠️ NO THRESHOLD
93.00
get_submit📈 view plot
⚠️ NO THRESHOLD
95,472.00📈 view plot
⚠️ NO THRESHOLD
59,522.00📈 view plot
⚠️ NO THRESHOLD
85,507.00📈 view plot
⚠️ NO THRESHOLD
47.00📈 view plot
⚠️ NO THRESHOLD
278.00
get_subscribe📈 view plot
⚠️ NO THRESHOLD
8,110.00📈 view plot
⚠️ NO THRESHOLD
2,848.00📈 view plot
⚠️ NO THRESHOLD
3,980.00📈 view plot
⚠️ NO THRESHOLD
14.00📈 view plot
⚠️ NO THRESHOLD
116.00
serialize_authorize📈 view plot
⚠️ NO THRESHOLD
12,366.00📈 view plot
⚠️ NO THRESHOLD
5,343.00📈 view plot
⚠️ NO THRESHOLD
7,456.00📈 view plot
⚠️ NO THRESHOLD
9.00📈 view plot
⚠️ NO THRESHOLD
139.00
serialize_deserialize_authorize📈 view plot
⚠️ NO THRESHOLD
24,893.00📈 view plot
⚠️ NO THRESHOLD
9,920.00📈 view plot
⚠️ NO THRESHOLD
14,018.00📈 view plot
⚠️ NO THRESHOLD
33.00📈 view plot
⚠️ NO THRESHOLD
306.00
serialize_deserialize_handle_authorize📈 view plot
⚠️ NO THRESHOLD
30,443.00📈 view plot
⚠️ NO THRESHOLD
12,097.00📈 view plot
⚠️ NO THRESHOLD
17,138.00📈 view plot
⚠️ NO THRESHOLD
57.00📈 view plot
⚠️ NO THRESHOLD
372.00
serialize_deserialize_handle_submit📈 view plot
⚠️ NO THRESHOLD
126,475.00📈 view plot
⚠️ NO THRESHOLD
73,363.00📈 view plot
⚠️ NO THRESHOLD
105,195.00📈 view plot
⚠️ NO THRESHOLD
112.00📈 view plot
⚠️ NO THRESHOLD
592.00
serialize_deserialize_handle_subscribe📈 view plot
⚠️ NO THRESHOLD
27,995.00📈 view plot
⚠️ NO THRESHOLD
9,666.00📈 view plot
⚠️ NO THRESHOLD
13,675.00📈 view plot
⚠️ NO THRESHOLD
64.00📈 view plot
⚠️ NO THRESHOLD
400.00
serialize_deserialize_submit📈 view plot
⚠️ NO THRESHOLD
115,411.00📈 view plot
⚠️ NO THRESHOLD
68,223.00📈 view plot
⚠️ NO THRESHOLD
97,936.00📈 view plot
⚠️ NO THRESHOLD
65.00📈 view plot
⚠️ NO THRESHOLD
490.00
serialize_deserialize_subscribe📈 view plot
⚠️ NO THRESHOLD
23,431.00📈 view plot
⚠️ NO THRESHOLD
8,225.00📈 view plot
⚠️ NO THRESHOLD
11,591.00📈 view plot
⚠️ NO THRESHOLD
37.00📈 view plot
⚠️ NO THRESHOLD
333.00
serialize_submit📈 view plot
⚠️ NO THRESHOLD
99,865.00📈 view plot
⚠️ NO THRESHOLD
61,566.00📈 view plot
⚠️ NO THRESHOLD
88,350.00📈 view plot
⚠️ NO THRESHOLD
49.00📈 view plot
⚠️ NO THRESHOLD
322.00
serialize_subscribe📈 view plot
⚠️ NO THRESHOLD
11,439.00📈 view plot
⚠️ NO THRESHOLD
4,195.00📈 view plot
⚠️ NO THRESHOLD
5,839.00📈 view plot
⚠️ NO THRESHOLD
14.00📈 view plot
⚠️ NO THRESHOLD
158.00
🐰 View full continuous benchmarking report in Bencher

Copy link
Contributor

github-actions bot commented Oct 8, 2024

🐰 Bencher Report

Branch1195/merge
Testbedsv2

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
client_sv2_handle_message_common📈 view plot
⚠️ NO THRESHOLD
44.63
client_sv2_handle_message_mining📈 view plot
⚠️ NO THRESHOLD
81.27
client_sv2_mining_message_submit_standard📈 view plot
⚠️ NO THRESHOLD
14.67
client_sv2_mining_message_submit_standard_serialize📈 view plot
⚠️ NO THRESHOLD
254.39
client_sv2_mining_message_submit_standard_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
596.05
client_sv2_open_channel📈 view plot
⚠️ NO THRESHOLD
163.27
client_sv2_open_channel_serialize📈 view plot
⚠️ NO THRESHOLD
271.12
client_sv2_open_channel_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
379.02
client_sv2_setup_connection📈 view plot
⚠️ NO THRESHOLD
158.17
client_sv2_setup_connection_serialize📈 view plot
⚠️ NO THRESHOLD
435.66
client_sv2_setup_connection_serialize_deserialize📈 view plot
⚠️ NO THRESHOLD
1,003.80
🐰 View full continuous benchmarking report in Bencher

@plebhash plebhash force-pushed the nominal-hashrate-multiplier branch 2 times, most recently from 1142146 to e34e92b Compare October 8, 2024 22:54
Copy link
Collaborator

@GitGab19 GitGab19 left a comment

Choose a reason for hiding this comment

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

tACK.
Could you just add the new nominal-hashrate-multiplier param in the README.md?

@plebhash plebhash merged commit e65cb32 into stratum-mining:main Oct 9, 2024
34 checks passed
@plebhash plebhash deleted the nominal-hashrate-multiplier branch October 9, 2024 15:27
@plebhash plebhash restored the nominal-hashrate-multiplier branch October 9, 2024 15:27
@plebhash plebhash deleted the nominal-hashrate-multiplier branch October 9, 2024 15:27
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.

mining-device cpu miner does not hit the target
3 participants