ReasonJun

Bitcoin : Block Structure 본문

Blockchain/Bitcoin

Bitcoin : Block Structure

ReasonJun 2023. 9. 27. 01:20
728x90

Block Structure (Size : 1MB)

Size Field Description
4 bytes Block Size Size of Block
80 bytes Block Header Block Header Info
1 ~ 9 bytes Transaction Counter Number of transactions in the current block (0 ~ 3000)
Variable Transaction Transaction list in Block

 

Block Header Structure

Size Field Description
4 bytes Version version info (95%^ => 2016 Block Upgrade)
32 bytes Previous Block Hash Previous Block Header Hash
32 bytes Merkle Root Hash Root of Transactions
4 bytes Timestamp Block generation time (UNIX Epoch)
4 bytes Difficulty Target Difficulty Level of PoW
4 bytes Nonce Result of PoW

 

Create Block

  1. Select Mempool (level db) Tx (average : 2000)
  2. Create Coinbase Tx (transaction for the revenue the block creator will receive)
  3. Compute Merkle Root
  4. Configure Block Header (version, previous block hash, Merkle Root, Timestamp, Difficulty (Difficulty changed based on 2016))
  5. Find Nonce
  6. Propagate Block 

 

How to connect to Block

 

 

Why Bitcoin imposed a limit on block size?

This is due to the performance of Database Lock to process transactions. 

This resulted in only about 2000 Tx per block. (3 to 7 tps)

Due to this block size limitation, miners have implemented ways to maximize transaction fees. 

They only select transactions with high fees or small transaction data volumes.

As the number of Bitcoin users increased, the price of fees increased.

In 2017, a hard fork (Segwit) occurred. 

728x90
Comments