## What a Merkle tree is A **Merkle tree** is a tree of hashes that summarizes a large set of data. Each data item is hashed to make a **leaf**. Pairs of hashes are then concatenated and hashed again, level by level, until one hash remains. That final hash is the **Merkle root**. Because the root depends on every leaf and on their order, changing any item changes the root. ## Why it matters Merkle trees let you check data cheaply and prove that an item belongs to a set. The proof is a **Merkle proof**, which is the list of sibling hashes along the path from a leaf to the root. It grows logarithmically with the number of items. - **Tamper evidence:** Altering any leaf changes every hash above it, so the root no longer matches. - **Compact proofs:** Proving one item is in a set of N items takes only about logâ‚‚(N) hashes, not all N items. - **Lightweight verification:** Bitcoin's **SPV** clients keep only block headers and use Merkle proofs to confirm a payment is in a block. - **Flexible commitments:** Bitcoin's **Taproot** uses Merkle trees to commit to many spending scripts and reveals only the one that is used.