A cryptographic data structure used in Bitcoin to efficiently summarize and verify all transactions in a block. The Merkle root — a single hash at the top of the tree — is included in the block header and allows any transaction to be verified without downloading the entire block.
A cryptographic data structure used in Bitcoin to efficiently summarize and verify all transactions in a block. The Merkle root — a single hash at the top of the tree — is included in the block header and allows any transaction to be verified without downloading the entire block.
A Merkle tree (named after Ralph Merkle) is a binary tree of hashes. In Bitcoin, every transaction in a block is hashed, then pairs of hashes are combined and hashed again, repeating upward until a single Merkle root remains. This root is stored in the block header and cryptographically commits to every transaction in the block. Changing even one transaction would produce a completely different Merkle root.
The practical power of Merkle trees lies in efficient verification. To prove that a specific transaction is included in a block, you don't need to download all transactions — you only need the transaction itself plus a small number of intermediate hashes called a Merkle proof (or Merkle path). For a block with 1,000 transactions, a Merkle proof requires only about 10 hashes rather than all 1,000 transaction hashes. This logarithmic efficiency is what makes lightweight (SPV) wallets feasible.
Merkle trees are fundamental to Bitcoin's scalability and security architecture. They allow nodes with limited storage to verify transaction inclusion without storing the full blockchain. They also enable pruning — full nodes can discard spent transaction data while retaining the Merkle roots to verify integrity. The concept has been extended in Taproot's MAST (Merklized Abstract Syntax Trees), which applies the same efficiency principle to Bitcoin's scripting system.
To prove a transaction is in a block, you provide the transaction hash plus the sibling hashes at each level of the tree. The verifier can recompute the path up to the root and check it against the known Merkle root in the block header. This requires only log2(N) hashes for N transactions — roughly 20 hashes for a million transactions.
Merkle trees enable Simplified Payment Verification (SPV), which Satoshi described in the Bitcoin whitepaper. SPV allows lightweight clients to verify transactions by downloading only block headers (80 bytes each) instead of full blocks. This was essential for making Bitcoin usable on devices with limited storage and bandwidth.
No. Merkle trees are used throughout computer science and cryptography. Git uses them for version control, certificate transparency logs use them for auditing, and virtually every blockchain uses some variant. Bitcoin popularized their application in distributed ledger technology, but the concept dates back to 1979.