Bitcoin Forum
December 03, 2016, 01:55:36 PM *
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: how do miners fill merkle_root field when mining?  (Read 1328 times)
PRCman
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 01, 2011, 03:42:33 AM
 #1

I am not really understand this.

16TaG8kMPMdsF1ABj2p2dbQX3WK4yG2bG3
1480773336
Hero Member
*
Offline Offline

Posts: 1480773336

View Profile Personal Message (Offline)

Ignore
1480773336
Reply with quote  #2

1480773336
Report to moderator
1480773336
Hero Member
*
Offline Offline

Posts: 1480773336

View Profile Personal Message (Offline)

Ignore
1480773336
Reply with quote  #2

1480773336
Report to moderator
1480773336
Hero Member
*
Offline Offline

Posts: 1480773336

View Profile Personal Message (Offline)

Ignore
1480773336
Reply with quote  #2

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

Activity: 70


View Profile
June 01, 2011, 04:25:49 AM
 #2

Miners do not fill in merkle_root.  Miners receive a fully initialized 80-byte block header, and have permission to change a few fields in that block header (nonce, ntime) before resubmitting.

PRCman
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 01, 2011, 04:56:45 AM
 #3

Miners do not fill in merkle_root.  Miners receive a fully initialized 80-byte block header, and have permission to change a few fields in that block header (nonce, ntime) before resubmitting.



And the client send the head to miners? how do the client fill the merkle_root?


16TaG8kMPMdsF1ABj2p2dbQX3WK4yG2bG3
Xenland
Legendary
*
Offline Offline

Activity: 980


I'm not just any shaman, I'm a Sha256man


View Profile
June 01, 2011, 06:46:54 AM
 #4

Miners do not fill in merkle_root.  Miners receive a fully initialized 80-byte block header, and have permission to change a few fields in that block header (nonce, ntime) before resubmitting.



And the client send the head to miners? how do the client fill the merkle_root?



I think that last miners set the header of the merkle root although the current miner CAN set the new one IF the block is solved. As to what the header data contains i believe is the "last block" so its like a chain that it follows backwards which is used for linking up the longest chain.

The following is just a thoery but i think that the chain is used in this manner to keep people from injecting counter fit bitcoins becuase all the miners as well of the clients all check for the money/balance in the previous block transactions and blancs
PRCman
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 01, 2011, 07:07:54 AM
 #5

Miners do not fill in merkle_root.  Miners receive a fully initialized 80-byte block header, and have permission to change a few fields in that block header (nonce, ntime) before resubmitting.



And the client send the head to miners? how do the client fill the merkle_root?



I think that last miners set the header of the merkle root although the current miner CAN set the new one IF the block is solved. As to what the header data contains i believe is the "last block" so its like a chain that it follows backwards which is used for linking up the longest chain.

The following is just a thoery but i think that the chain is used in this manner to keep people from injecting counter fit bitcoins becuase all the miners as well of the clients all check for the money/balance in the previous block transactions and blancs

You mean fill it after hash? won't it change the hash value?  Is this field be exclude from hash?

16TaG8kMPMdsF1ABj2p2dbQX3WK4yG2bG3
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1036


View Profile WWW
June 01, 2011, 09:59:58 AM
 #6

Miners receive the header, which contains: version number, previous block's hash, merkle root, timestamp, difficulty, nonce

This information is assembled by the bitcoin client they connect to, or the pool, and miners don't care what's in there.

The only thing they do, is try different values for nonce (knowing which bytes in the header constitute the nonce), and possibly the time stamp.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 1890



View Profile WWW
June 01, 2011, 11:27:02 AM
 #7

The Bitcoin server, after deciding which transactions to include in the block, builds a Merkle tree of the transactions, probably using some standard library. The hash at the root is the merkle root.

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
PRCman
Jr. Member
*
Offline Offline

Activity: 42


View Profile
June 01, 2011, 04:01:28 PM
 #8

The Bitcoin server, after deciding which transactions to include in the block, builds a Merkle tree of the transactions, probably using some standard library. The hash at the root is the merkle root.

Then after a transaction, the new merkle root generated and replace the old one
since the block header has changed, how can we verify the block?

16TaG8kMPMdsF1ABj2p2dbQX3WK4yG2bG3
Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 1890



View Profile WWW
June 01, 2011, 06:28:35 PM
 #9

The Bitcoin server, after deciding which transactions to include in the block, builds a Merkle tree of the transactions, probably using some standard library. The hash at the root is the merkle root.

Then after a transaction, the new merkle root generated and replace the old one
since the block header has changed, how can we verify the block?
You can't, this is the point, you can't add a new transaction to an already solved block. That's what guarantees their integrity.
If you're still trying to solve a block, when you add a new transaction, you start hashing the new block header with the new merkle root.

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!