Skip to content
CryptoAcademy logo CryptoAcademy
Menu
Intermediate Blockchain

Merkle tree

A tree of hashes that lets you verify that data belongs to a set efficiently.

Merkle tree at a glance
A Merkle tree hashes transactions in pairs until one root hash remains MERKLE ROOT a3f9…7c2e H(AB) hash of A + B H(CD) hash of C + D A tx 1 hash B tx 2 hash C tx 3 hash D tx 4 hash Proof of inclusion: tx 3 + hashes H(AB), a3f9… → 3 hashes are enough to prove tx 3 is in the block. Used by Simplified Payment Verification (SPV) wallets that do not download every transaction.

In simple terms

Transactions are hashed in pairs, layer by layer, until a single root hash remains. Change any transaction and the root changes.

Analogy

A tournament bracket: each match combines two players until one winner represents the whole tournament.

Going deeper

A membership proof is just the log₂(n) sibling hashes beside your leaf: hash them together and you recompute the block's root. This is what lets SPV wallets verify payments from headers alone, and what the scenario question "attacker edits an old transaction" tests.

Common mistake

Forgetting that the root only proves membership if you also trust the path of hashes.

Share this page

Send this link to a friend, or scan the QR code to open it on your phone.