Closed jholdstock closed 1 year ago
Seems to apply to all other device types, not just CUDA
It's pretty standard behavior for miners. They generally don't throw away any solutions. One major reason is that it's typical for them to submit solutions to lower difficulty targets to pools which the pool then checks if it's actually a solution to the real network target. The submissions act as partial shares that prove they are doing useful work in order to be eligible for their relative portion of pool payouts. Multiple submissions demonstrates more work and thus increases their relative payout.
Another one is they can't really be sure if a submission will be orphaned or not, so it could be the case that their first block is orphaned and then they threw away another valid solution that might itself have been selected to build on.
I know that it's especially noticeable on low diff networks like testnet/simnet, but with any real difficulty levels when solo mining it rarely happens in practice. On the other hand, when pool mining, you want to submit every solution for the aforementioned reason.
OK great, so long as it isnt a bug I guess this can be closed.
All of the results returned by a single execution of the CUDA kernel are submitted to dcrd, despite being solutions for the same block template. I'm not sure if this is deliberate or if it constitutes a problem, but it seems wasteful and can cause unnecessary orphan blocks to be broadcast around the network.
https://github.com/decred/gominer/blob/d725cda10e79b05246def1e38215582cc2c83366/cudevice.go#L390-L403