Bitcoin Forum
December 09, 2016, 07:52:22 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Are We All Generating The Exact Same Hashes?  (Read 1228 times)
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
March 24, 2011, 03:45:40 AM
 #1

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.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
theymos
Administrator
Legendary
*
Online Online

Activity: 2506


View Profile
March 24, 2011, 03:59:58 AM
 #2

There is a "salt" in the form of your unique public key. See:
https://en.bitcoin.it/wiki/Block_hashing_algorithm

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
FreeMoney
Legendary
*
Offline Offline

Activity: 1246


Strength in numbers


View Profile WWW
March 24, 2011, 04:20:24 AM
 #3

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.

Play Bitcoin Poker at sealswithclubs.eu. We're active and open to everyone.
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280


View Profile
March 24, 2011, 04:21:39 AM
 #4

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???
theymos
Administrator
Legendary
*
Online Online

Activity: 2506


View Profile
March 24, 2011, 04:51:46 AM
 #5

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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Syke
Legendary
*
Offline Offline

Activity: 2086


View Profile
March 24, 2011, 07:07:38 AM
 #6

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".

Buy & Hold
da2ce7
Legendary
*
Offline Offline

Activity: 1218


Live and Let Live


View Profile
March 24, 2011, 07: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.

One off NP-Hard.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!