amoveo-mining-pool
amoveo-mining-pool copied to clipboard
Pool Passing out Nonces to Miners
I'm observing that the pool is passing out nonces with work units. The nonce matches the bhash. There is some code in the miner that makes each thread pick a different set of nonces to work on. Would each separate miner that uses the bhash as the root nonce would be duplicating the same work as other miners?
(I'm not entirely sure if these are valid questions, so please forgive my ignorance.)
Should the pool pass out nonces at all? Instead, should the miner generate a random base nonce when it gets work?
Is there any reason to make a base nonce the bhash, or is any random 32 byte array just as good for a nonce to start working on?
Yes you are right. It was a mistake for the mining pool to generate and share the random nonce.
It might not be entirely a mistake to pass out nonces. If the pool keeps track of nonce ranges passed out to each miner, it could be passing out unique ranges to each miner.
I haven't run the math, but it also seems unlikely two miners would collide nonces if they each start with an independant random 32 bytes. Seems like that collision chance would depend on the difficulty, which is a dynamic value.
Yes, you are thinking in the right direction.
I think the pool just needs to keep a list of all the nonce it already paid out to, and make sure to not pay the same nonce more than once.