Merkle Proofs & Light Clients
A Merkle Proof (Inclusion Proof) is a logarithmic-sized dataset (O(log N)) that proves a specific key-value pair exists within a trie identified by a specific State Root.
"A notary who doesn't look at your whole bank account history, but just verifies the signatures on a single transaction to confirm it's valid."
Engineer's Note
In Ethereum, a proof is a list of RLP-encoded nodes. A 'Light Client' starts with a trusted 32-byte State Root. To verify an account balance, it only needs the path of nodes from the root to the leaf. It hashes the leaf, then uses the neighbor data in the proof to re-calculate the hash of the parent, repeating this until it reaches the root. If the final hash matches the trusted State Root, the balance is verified without needing the full 500GB+ state.
Key Takeaways
A full node searches the trie and collects all nodes along the search path into a list.
The verifier re-calculates the Keccak-256 hash of each node in the proof, moving bottom-up.
Enables hardware wallets and mobile apps to interact with the blockchain with full cryptographic security.