Bitcoin Forum

Other => Beginners & Help => Topic started by: adhoc on January 13, 2012, 11:37:35 AM



Title: The mining nonce - is everyone calculating the same hashes?
Post by: adhoc on January 13, 2012, 11:37:35 AM
With regards to the nonce used for mining, all information I can find on it seems to indicate that to mine a block you set the nonce to 0, and then continually hash-then-increment until you find a hash that is below the target. If all miners are following this algorithm, doesn't that mean that everyone hashes a block with the nonce at 0, then 1, etc meaning if two people have the same block they are essentially just duplicating effort? If this is the case, wouldn't it be better to assign the nonce to a random value either as the initialization value or on every attempt?

Thanks


Title: Re: The mining nonce - is everyone calculating the same hashes?
Post by: Come-from-Beyond on January 13, 2012, 12:05:16 PM
Everyone who mines solo has (almost) unique hash coz very 1st transaction is generation of 50 coins to his address which is unique as well.

Everyone who mines on a pool has (almost) unique hash coz pool software gives unique work to every miner.

So there is no need to assign nonce to a random value. It doesn't change ur chance to find a good nonce.


Title: Re: The mining nonce - is everyone calculating the same hashes?
Post by: slush on January 13, 2012, 12:09:41 PM
Mining jobs do not differ only in the nonce, read about merkle root hash and nExtraNonce on the bitcoin.it wiki...


Title: Re: The mining nonce - is everyone calculating the same hashes?
Post by: Eveofwar on January 13, 2012, 12:12:06 PM
Maybe DeathAndTaxes' explanation in this thread helps some.

https://bitcointalk.org/index.php?topic=58497.0


Title: Re: The mining nonce - is everyone calculating the same hashes?
Post by: adhoc on January 13, 2012, 12:22:07 PM
ah that's a good point, I forgot about the generation transaction - thanks