Bitcoin Forum
April 26, 2024, 07:15:47 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how do miners fill merkle_root field when mining?  (Read 1481 times)
PRCman (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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

I am not really understand this.
1714115747
Hero Member
*
Offline Offline

Posts: 1714115747

View Profile Personal Message (Offline)

Ignore
1714115747
Reply with quote  #2

1714115747
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714115747
Hero Member
*
Offline Offline

Posts: 1714115747

View Profile Personal Message (Offline)

Ignore
1714115747
Reply with quote  #2

1714115747
Report to moderator
1714115747
Hero Member
*
Offline Offline

Posts: 1714115747

View Profile Personal Message (Offline)

Ignore
1714115747
Reply with quote  #2

1714115747
Report to moderator
xf2_org
Member
**
Offline Offline

Activity: 98
Merit: 13


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 (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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?

Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


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 (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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?
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1174


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.

I do Bitcoin stuff.
Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1054



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 (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


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?
Meni Rosenfeld
Donator
Legendary
*
Offline Offline

Activity: 2058
Merit: 1054



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:  

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