In this track: Connect everything together
advanced · 6 MIN READ

Build and verify a Merkle proof

Reproduce a complete four-leaf membership path.

LET’S PICTURE IT

Follow two neighboring branches from one record to an accepted top fingerprint.

SEE IT FOR YOURSELF
Build a root and follow one membership proofStep 1 / 4
Build a root and follow one membership proofA0x03783f…b760B0x1f675b…9111C0x017e66…8f72D0x6c3fd3…79f2A0x03783f…b760B0x1f675b…9111C0x017e66…8f72D0x6c3fd3…79f2hash(A,B)0x69de75…24a0hash(C,D)0xe62e1d…b5a4A0x03783f…b760B0x1f675b…9111C0x017e66…8f72D0x6c3fd3…79f2hash(A,B)0x69de75…24a0hash(C,D)0xe62e1d…b5a4ROOT0x4e2b32…5956A0x03783f…b760B0x1f675b…9111C0x017e66…8f72D0x6c3fd3…79f2hash(A,B)0x69de75…24a0hash(C,D)0xe62e1d…b5a4ROOT0x4e2b32…5956

This example hashes UTF-8 A, B, C and D. The displayed hashes are abbreviated, and the tree uses the playground’s sorted-pair convention.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Use the specified convention

Enter A, B, C and D as distinct UTF-8 items. The playground uses single-hashed leaves, sorted pairs and promoted odd nodes.

Select A’s proof

The needed siblings are B’s leaf hash and parent CD. Combine from the leaf upward using complete hash bytes.

Compare the expected root

The acceptance target below supplies the root for this exact convention. Another tree format can produce a different root from the same text list.

Test a negative case

Change A’s text while retaining its proof. Verification should fail against the original root. Explain where the trusted-root assumption enters.

Your acceptance target

items: A, B, C, D
root: 0x4e2b32e9c7b10ee15f38192ed65b95656a84e32531157b9384ef0d3cabe95956
proof A:
0x1f675bff07515f5df96737194ea945c36c41e7b4fcef307b7cd4d0e602a69111
0xe62e1dfc08d58fd144947903447473a090c958fe34e2425d578237fcdf1ab5a4

Use only local examples and public sample addresses. State the assumptions and limits alongside the result.

TURN UNDERSTANDING INTO PRACTICEOpen the Merkle trees →
QUICK CHECK · NO PRESSURE

Should an edited leaf normally pass against the original root and proof?

Your progress stays in this browser.
Keep exploring the original referenceethereum.org ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.