익명 02:38

What is the format of a Bitcoin block body?

What is the format of a Bitcoin block body?

To my understanding, the miners solve the nonce to get a valid block header based on the difficulty target. In the header, you have the Merkle root, which is generated from the transactions included in the block. Based on the documentation, the nodes validate the transactions. Does this mean the miner doesn't need to verify the transactions in the mempool?

I have been searching for examples of what a block submission looks like. I know blocks can be submitted via the RPC. Even though this won't be practical, however, say I was building a miner. Does anyone know what format is used to submit the block concretely? Are there any known practical implementations understandable by dummies? Looking for code or whatever.



Top Answer/Comment:

does this mean the miner doesn't need to verify the transactions in the mempool ?

Miners must verify the transactions they include in a block, because if they don't, some invalid transaction may be included in the block. A block with an invalid transaction will not be accepted by the network, i.e. full nodes, which means that the miner wasted electricity and did not receive any reward.

Bitcoin block consists of:

  1. block header
    • version
    • prev_block
    • merkle_root
    • timestamp
    • bits
    • nonce
  2. transaction counter
  3. transactions
상단 광고의 [X] 버튼을 누르면 내용이 보입니다