Skip to content
    Blockchain notesMerkle Tree

    Unit 2 – Technologies Borrowed in Blockchain · 19

    Merkle Tree

    A Merkle tree repeatedly hashes pairs of child values until one root hash summarizes a set of records. A Merkle proof can show that one item belongs to the set using only a small number of hashes.

    Animated diagram

    Like a tournament bracket, pairs combine round by round until one final result represents all players

    Transactions → Pair hashes → Branch hashes → Merkle root. Follow the flow to see how merkle tree fits into a blockchain system.

    Make the invisible feel visible.

    A Merkle tree repeatedly hashes pairs of child values until one root hash summarizes a set of records. A Merkle proof can show that one item belongs to the set using only a small number of hashes.

    Think of it like this

    Like a tournament bracket, pairs combine round by round until one final result represents all players.

    Under the hood

    How it works, step by step

    01

    Start with the idea

    A Merkle tree repeatedly hashes pairs of child values until one root hash summarizes a set of records. A Merkle proof can show that one item belongs to the set using only a small number of hashes.

    02

    Follow the example

    A light wallet checks a transaction’s inclusion by hashing the transaction with sibling hashes up the tree to the block’s Merkle root.

    03

    Notice the benefit

    Merkle proofs let clients verify membership without downloading every transaction in a block.

    04

    Check the limitation

    The root commits to the data but does not describe it; correctness also relies on secure hashing and a trusted or verified root.

    Make it concrete

    Merkle Tree in practice

    Merkle Tree in practice

    A light wallet checks a transaction’s inclusion by hashing the transaction with sibling hashes up the tree to the block’s Merkle root.

    Key point: The root commits to the data but does not describe it; correctness also relies on secure hashing and a trusted or verified root.

    Balanced view

    Advantages & disadvantages

    Advantages

    • Merkle proofs let clients verify membership without downloading every transaction in a block.

    Disadvantages

    • The root commits to the data but does not describe it; correctness also relies on secure hashing and a trusted or verified root.

    Keep these close

    Takeaways & common traps

    What to remember

    • A Merkle tree repeatedly hashes pairs of child values until one root hash summarizes a set of records. A Merkle proof can show that one item belongs to the set using only a small number of hashes.
    • Merkle proofs let clients verify membership without downloading every transaction in a block.
    • The root commits to the data but does not describe it; correctness also relies on secure hashing and a trusted or verified root.

    Watch out for

    • Do not assume merkle tree guarantees more than its design can prove.
    • Do not ignore the trade-off: The root commits to the data but does not describe it; correctness also relies on secure hashing and a trusted or verified root.

    Quick check

    Questions people ask

    Why is merkle tree useful?

    Merkle proofs let clients verify membership without downloading every transaction in a block.

    What is an important limitation?

    The root commits to the data but does not describe it; correctness also relies on secure hashing and a trusted or verified root.