Overview
A block is the fundamental unit of Bitcoin's blockchain. Each block bundles together a set of validated transactions, links to the previous block through its hash, and contains a proof-of-work solution that demonstrates the computational effort expended to create it. Once accepted by the network, a block becomes a permanent part of the transaction history.
Block Structure
┌─────────────────────────────────────────┐
│ Block Header (80 bytes) │
│ ┌─────────────────────────────────────┐ │
│ │ Version (4 bytes) │ │
│ │ Previous Block Hash (32 bytes) │ │
│ │ Merkle Root (32 bytes) │ │
│ │ Timestamp (4 bytes) │ │
│ │ Difficulty Target (4 bytes) │ │
│ │ Nonce (4 bytes) │ │
│ └─────────────────────────────────────┘ │
│ │
│ Transaction Counter (variable) │
│ │
│ Transactions │
│ ┌──────────────────────┐ │
│ │ Coinbase Transaction │ (always first) │
│ │ TX 1 │ │
│ │ TX 2 │ │
│ │ ... │ │
│ │ TX n │ │
│ └──────────────────────┘ │
└─────────────────────────────────────────┘
How Blocks Are Created
- Miners collect unconfirmed transactions from the mempool
- They construct a candidate block with a coinbase transaction
- They compute the Merkle root of all included transactions
- They repeatedly hash the block header with different nonce values
- When a hash below the difficulty target is found, the block is broadcast to the network
- Other nodes verify the block and append it to their copy of the blockchain
Key Properties
- Ordered: Transactions within a block have a defined order, with the coinbase transaction always first
- Immutable: Once buried under subsequent blocks, altering a block would require redoing the proof of work for it and all subsequent blocks
- Size-limited: Blocks are constrained by a maximum weight of 4 million weight units, translating to roughly 1-4 MB depending on transaction composition