Bitcoin Forum
May 12, 2024, 07:58:57 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: hashing question  (Read 1798 times)
crash893 (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


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


1715500737
Hero Member
*
Offline Offline

Posts: 1715500737

View Profile Personal Message (Offline)

Ignore
1715500737
Reply with quote  #2

1715500737
Report to moderator
1715500737
Hero Member
*
Offline Offline

Posts: 1715500737

View Profile Personal Message (Offline)

Ignore
1715500737
Reply with quote  #2

1715500737
Report to moderator
1715500737
Hero Member
*
Offline Offline

Posts: 1715500737

View Profile Personal Message (Offline)

Ignore
1715500737
Reply with quote  #2

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

Posts: 1715500737

View Profile Personal Message (Offline)

Ignore
1715500737
Reply with quote  #2

1715500737
Report to moderator
1715500737
Hero Member
*
Offline Offline

Posts: 1715500737

View Profile Personal Message (Offline)

Ignore
1715500737
Reply with quote  #2

1715500737
Report to moderator
fonzo
Newbie
*
Offline Offline

Activity: 11
Merit: 0


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: 326
Merit: 252



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

Sorry, I can't help you with your lost password.

PGP key: 0x9F31802C79642F25
Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1054



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



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



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: 2058
Merit: 1054



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:  

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