-
Notifications
You must be signed in to change notification settings - Fork 127
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
mining-device
cpu miner does not hit the target
#1188
Comments
Also, I noticed we are multiplying the target with the number of threads here: stratum/roles/test-utils/mining-device/src/lib/mod.rs Lines 200 to 201 in c05d8cd
I don't think it's correct (cc @Fi3). If you agree on both removing this, and adding the parameter I was mentioning, I can open a PR to fix this, so unblocks the integration test @jbesraa is writing |
it is the number cores, I think that the above code is correct |
Yes, but the |
it compute it in a single core. Then when we hash we use all the available |
at the beginning wasn't parallel then sjors asked to add it cause sometimes (for specific use cases that I do not remember) is good to have a little bit more power |
I see, but I still don't get why there's the |
porting over from #1066 (comment) so it doesn't get lost once we fix this issue with
we can assert that:
we can assert things like channel ids and job ids |
@Fi3 one question that remains unanswered:
why are we substracting 3 here? |
I noticed that that is a problem (independently of the discussion we're having here) if |
I don't think it's the reason behind handicap. Here's the description from the README: "This value is used to slow down the cpu miner, it represents the number of micro-seconds that are awaited between hashes [default: 0]". |
if if so it feels reasonable that |
I guess for not overwhelm the cpu |
When running the
mining-device
locally I was not able to hit thetarget
set here https://github.com/stratum-mining/stratum/blob/main/roles/test-utils/mining-device/src/lib/mod.rs#L201The test was not run for too long, probably for a couple of minutes. While in practice that might not be a problem, in test environment we want shares to be submitted in a matter of seconds in order to not run the test for too long.
The text was updated successfully, but these errors were encountered: