Repository navigation
Conversation
Use the maximum U512 difficulty for throughput measurements so solutions are effectively unreachable and each search processes its complete range. Prepare job contexts outside timed Criterion loops, use exact inclusive range sizes, and remove the early-exit solution-finding benchmark.
Contributor
Author
|
Don't need this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Mining throughput benchmarks could include context-construction overhead or stop early when a low-difficulty target produced a solution. This makes measured hash rates less representative of steady-state mining.
What changed
U512::MAXdifficulty (target1) for CLI, Criterion, and WGPU hashrate throughput measurements.Validation
cargo fmt --all -- --checkcargo clippy -p miner-cli -p engine-cpu -p engine-gpu --all-targets --locked -- -D warningscargo check -p engine-cpu --bench cpu_engine_bench --lockedcargo check -p engine-gpu --bench gpu_engine_bench --example hashrate --lockedcargo test -p miner-cli --lockedcargo run -p miner-cli --locked -- benchmark --cpu-workers 1 --gpu-devices 0 --duration 1Risks and mitigations
The Criterion suite no longer measures solution-discovery latency. That case mixed variable early exits with throughput measurements; functional solution discovery remains covered by engine tests.
Follow-ups
None.