Bitcoin Forum
December 08, 2016, 04:25:13 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: hashing question  (Read 1634 times)
crash893
Newbie
*
Offline Offline

Activity: 22


View Profile
June 15, 2011, 05:55:11 AM
 #1

Sorry this may have been published before but i was just curious


as i understand it the the 0000hash = (block data + random data) to get the correct hash (in this case with the N amount of leading "0")


is that random (like a salt but im not sure if it is called a salt) data coordinated in anyway with other users

is the salt generatoed randomly or is it brute force

any information would be great


Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
fonzo
Newbie
*
Offline Offline

Activity: 11


View Profile
June 15, 2012, 11:40:36 AM
 #2

I believe the number or preceeding 0s is set according to the required difficulty to achieve a roughly 10 minute interval.

In terms of salt, it's a bit like hashing the transaction data with millions of different salts until you achieve an output with n preceeding 0s.

https://en.bitcoin.it/wiki/Difficulty
riX
Sr. Member
****
Offline Offline

Activity: 327



View Profile
June 15, 2012, 11:43:59 AM
 #3

If you're thinking about coordinating the nonce with other users to not calculate the same hashes, it is not needed, since you have different block data (the address the reward is payed out to).

Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 1890



View Profile WWW
June 15, 2012, 11:45:16 AM
 #4

The nonce ("random data") is incremented sequentially from 0 to 2^32-1. There's also an extraNonce in the coinbase transaction, which I believe is also incremented sequentially.

Some data is chosen randomly by each miner (such as the payout address of the coinbase transaction) and affects the Merkle root which is also part of the hashed data.

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
tevirk
Newbie
*
Offline Offline

Activity: 15



View Profile
June 16, 2012, 03:57:57 PM
 #5

Note that with the GPU hardware most miners use, scanning the whole 2^32 range of nonce values takes a matter of seconds.  Mining software will scan the whole range looking for a valid hash for the block and then increment the timestamp or reorder some transactions so it can try again.
Nolybab
Newbie
*
Offline Offline

Activity: 26



View Profile
June 16, 2012, 08:47:18 PM
 #6

Note that with the GPU hardware most miners use, scanning the whole 2^32 range of nonce values takes a matter of seconds.  Mining software will scan the whole range looking for a valid hash for the block and then increment the timestamp or reorder some transactions so it can try again.

Why would the miner increment the timestamp or reorder to try again? Once they get a valid hash for a block, wouldn't they just want to simply claim the 50 coins and move on?
Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 1890



View Profile WWW
June 16, 2012, 08:53:51 PM
 #7

Note that with the GPU hardware most miners use, scanning the whole 2^32 range of nonce values takes a matter of seconds.  Mining software will scan the whole range looking for a valid hash for the block and then increment the timestamp or reorder some transactions so it can try again.
Why would the miner increment the timestamp or reorder to try again? Once they get a valid hash for a block, wouldn't they just want to simply claim the 50 coins and move on?
The miner will scan the whole range looking for a valid hash. Only one time in ~1.6 million this scan will result in finding a valid hash. If it doesn't, the miner will tweak the header, typically by increasing the timestamp or the extraNonce.

1EofoZNBhWQ3kxfKnvWkhtMns4AivZArhr   |   Who am I?   |   bitcoin-otc WoT
Bitcoil - Exchange bitcoins for ILS (thread)   |   Israel Bitcoin community homepage (thread)
Analysis of Bitcoin Pooled Mining Reward Systems (thread, summary)  |   PureMining - Infinite-term, deterministic mining bond
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!