Crypto glossary

Merkle Patricia trie

Definition

The Merkle Patricia trie is the data structure Ethereum uses to store accounts and contract storage so that any value can be proven against a single root hash.

It combines two ideas. A Patricia trie, or radix tree, organises key-value pairs by the characters of their keys, sharing common prefixes efficiently. Making it a Merkle structure means each node is identified by the hash of its contents, so the hash at the top, the root, commits to every value below. Change one balance and the root changes.

Ethereum keeps several of these tries: one for the global state of accounts, one for each contract's storage and others for each block's transactions and receipts. Their roots are recorded in every block header. That lets light clients, bridges and rollups verify a single account balance or storage slot with a Merkle proof instead of trusting a node's answer.

The structure has become a bottleneck. Ethereum's hexary design produces large proofs, often kilobytes per value and potentially megabytes to prove everything a block touched, and random disk access makes syncing and execution slow. Those costs are the main motivation for replacing it with Verkle or binary trees to enable stateless clients.

Example

A cross-chain bridge proves that a user's deposit is recorded in a contract's storage on Ethereum by submitting a Merkle Patricia proof that hashes up to the state root of a finalised block.

Related terms