A block is two things: a small header of 80 bytes, and the list of transactions it confirms, usually a few thousand.
The header, six fields
- Version: which rules and signals the miner uses.
- Previous block hash: the link to the block before.
- Merkle root: one hash summarising every transaction in the block.
- Timestamp: the time the miner wrote, within limits nodes check.
- Bits: the current difficulty target, in compact form.
- Nonce: the number the miner changes while searching for a valid hash.
The Merkle root is built by hashing transactions in pairs, then the pairs in pairs, until one hash remains. Change a single transaction and the root changes, and with it the block hash.
The coinbase transaction
The first transaction of every block is special. It has no real input: it creates the block subsidy out of nothing and collects all the fees of the block, paid to an address the miner chooses. Its coins can only be spent after 100 more blocks.
▶ SEE IT IN THE MACHINEAt BLOCK HASH, the press strikes the block once its header has a valid hash, and the timestamp dial records it.