Bitcoin Forum
April 25, 2024, 12:52:08 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Are We All Generating The Exact Same Hashes?  (Read 1465 times)
gigabytecoin (OP)
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


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.
1714006328
Hero Member
*
Offline Offline

Posts: 1714006328

View Profile Personal Message (Offline)

Ignore
1714006328
Reply with quote  #2

1714006328
Report to moderator
1714006328
Hero Member
*
Offline Offline

Posts: 1714006328

View Profile Personal Message (Offline)

Ignore
1714006328
Reply with quote  #2

1714006328
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714006328
Hero Member
*
Offline Offline

Posts: 1714006328

View Profile Personal Message (Offline)

Ignore
1714006328
Reply with quote  #2

1714006328
Report to moderator
1714006328
Hero Member
*
Offline Offline

Posts: 1714006328

View Profile Personal Message (Offline)

Ignore
1714006328
Reply with quote  #2

1714006328
Report to moderator
1714006328
Hero Member
*
Offline Offline

Posts: 1714006328

View Profile Personal Message (Offline)

Ignore
1714006328
Reply with quote  #2

1714006328
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5180
Merit: 12884


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
Merit: 1014


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 (OP)
Sr. Member
****
Offline Offline

Activity: 280
Merit: 252


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
*
Offline Offline

Activity: 5180
Merit: 12884


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: 3878
Merit: 1193


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: 1222
Merit: 1016


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!