Author

Topic: Are We All Generating The Exact Same Hashes? (Read 1490 times)

legendary
Activity: 1222
Merit: 1016
Live and Let Live
March 24, 2011, 02:14:12 AM
#7
Right. It doesn't matter what your nonce is. You could start at 1 and increment by 3. You could start at 10000000 and decrement by 17. Every attempted nonce has the same chance of "cracking the block".

Assuming that SHA256 is uniform and well distributed.  Cheesy  That in for our needs it appears to be close enough to.
legendary
Activity: 3878
Merit: 1193
Ok then. Thanks guys! That answers my question. I was wrong.

So a nonce can be basically anything then?

Like 0, or 0a9257n02370?
Right. It doesn't matter what your nonce is. You could start at 1 and increment by 3. You could start at 10000000 and decrement by 17. Every attempted nonce has the same chance of "cracking the block".
administrator
Activity: 5222
Merit: 13032
I thought the nonce stared at 1 for everyone and the public key in the generate transaction ensured we were not redoing work. I may have gotten that out of some oversimplified explanation though.

You're right. It starts at 1 and increments. The public key is what makes your block unique.
sr. member
Activity: 280
Merit: 252
Ok then. Thanks guys! That answers my question. I was wrong.

So a nonce can be basically anything then?

Like 0, or 0a9257n02370?

Any links to the nonce specifications???
legendary
Activity: 1246
Merit: 1016
Strength in numbers
A cryptographic nonce is pseudo-random.

I thought the nonce stared at 1 for everyone and the public key in the generate transaction ensured we were not redoing work. I may have gotten that out of some oversimplified explanation though.
administrator
Activity: 5222
Merit: 13032
There is a "salt" in the form of your unique public key. See:
https://en.bitcoin.it/wiki/Block_hashing_algorithm
sr. member
Activity: 280
Merit: 252
This is how I imagine the mining system to work...

There is a certain block value that needs to be "cracked" next.

Code:
1. You take a hash of the current block's value plus the number 0 (as the nonce).

2. If the resulting hash is less than the value of the target number, you "win".

3. If it is larger than the value of the target number you add 1 to the nonce and then hash the block's value plus 1.

4. Repeat step 2.

Tell me if I am wrong on the above please, that will answer the question I am about to ask!

Are we all generating the exact same hashes? Is there no random "salt" that we each add to the hash strings to make then unique?

Couldn't a "cheater" safely assume that the first 10 million nonces were going to be wrong, and start at 10 million and 1st nonce to get a "head start" on everybody else that is mining?

Just trying to wrap my head around Satoshi's genius.
Jump to: