DEV Community

gxqwb
gxqwb

Posted on

Verkle Trees vs Merkle Patricia Tries: The Fight Over Ethereum's State

Every blockchain node must answer the same awkward question: how do I know this value belongs to the official state without storing the whole state? The answer is a commitment scheme, and Ethereum's current answer is a structure most clients know by its abbreviation. A replacement has been in preparation for years, not because the old one is broken, but because the thing researchers want to do next, stateless validation, makes proof size the dominant cost.

A Merkle Patricia Trie proves a value by replaying a path of hashes, while a Verkle tree proves it by opening a polynomial commitment, so proof size stops growing with the width of each node.

Part One: Hashes at every node versus one commitment per node

The Merkle Patricia Trie is a hexary tree keyed by the nibbles of an account address. Each node is hashed with Keccak, and the parent stores the hashes of its children. To prove that an account has a certain balance, a verifier receives the value plus the hash of every sibling node along the path from the root down. The verifier recomputes each parent hash and checks it against the root. The proof is a list, and the list grows with the depth and branching factor of the path.

A Verkle tree keeps the same idea of a root commitment but changes how each node commits to its children. Instead of storing a hash of a vector of children, a node stores a vector commitment to a polynomial that interpolates those children. Proving that the fifth child has a certain value means opening the polynomial at the corresponding evaluation point, with an inner product argument that stays small no matter how wide the node is. Width becomes almost free: a node with 256 children costs roughly the same to prove as one with 16. The tree gets flatter, with a depth of around four or five levels for a 32-byte key, and the proof collapses to a few group elements and scalars.

The trade is visible immediately. Hash proofs are fast to generate and check but bulky; polynomial-commitment proofs are compact but need elliptic curve arithmetic. Ethereum's design uses a Pedersen-style commitment over a chosen curve with an inner product argument that avoids a per-application ceremony.

Part Two: What a smaller witness is worth

Consider the scale of the problem. Ethereum's state is measured in hundreds of gigabytes for a full archive node, and a block touches accounts scattered across that structure. Under the Merkle Patricia Trie, the witness for a busy block is on the order of hundreds of kilobytes to a megabyte; as an order-of-magnitude estimate, a stateless validator receiving thousands of blocks a day would download tens of gigabytes of proof data each month just to follow the chain. With Verkle proofs, the same witness is expected to fall to a few kilobytes or tens of kilobytes, a reduction of roughly two orders of magnitude.

That number changes the architecture, not just the bandwidth bill. A stateless validator needs no local state database, boots in seconds, and can verify blocks on modest hardware. At today's witness sizes, sending that much data to every validator pushes bandwidth requirements toward enterprise connections. The global market for blockchain infrastructure is measured in the billions of dollars per year, and the cost of running a validator is a direct input into how decentralized a network can actually remain.

If a block witness falls from roughly a megabyte to a few kilobytes, stateless validation stops being a bandwidth problem and becomes a cryptography problem instead.

That shift has a second-order effect: verification CPU becomes the bottleneck. Checking a Verkle proof involves multi-scalar multiplication on a curve whose arithmetic is newer and less optimized than Keccak. Benchmarks have improved steadily, but the first implementations were an order of magnitude slower than hash checking, and client teams have had to write new field arithmetic and batching code to close the gap.

Part Three: The migration is the hard part

Neither structure can be swapped in with a configuration flag. The state root is part of consensus: every client must compute the same root from the same operations, so changing the commitment scheme means a hard fork that all clients adopt at the same block. Existing state must be converted into the new format, and that conversion itself has to be deterministic, verifiable, and bounded in time. A one-time migration of hundreds of gigabytes across a decentralised network is a scheduling problem as much as a coding problem.

Gas pricing is another obstacle. Witness size determines how expensive it is to prove a state access, so moving to smaller proofs changes the cost model for every opcode that touches storage. Mispricing one of them opens a denial-of-service vector where a cheap transaction forces an expensive proof. Client diversity adds more work: multiple implementations in different languages must agree on curve arithmetic, serialization, and proof verification down to the last bit.

The Merkle Patricia Trie, for its part, is not standing still. State expiry and history pruning can bound how much a node must keep, but they do not shrink the per-block witness, which is the quantity that matters for statelessness. The honest summary is that the old structure is well understood, heavily audited, and slow to prove; the new one is compact, relatively young, and expensive to verify.

Part Four: An everyday analogy

Picture a vast underground archive where any citizen can ask whether a particular document exists. The current system keeps a ledger at every junction: to prove a document is real, an attendant walks you through the corridors, and at each turn hands over the signed logbook entry for that corridor so you can check it against the master register. The answer is trustworthy, but the stack of logbook pages grows with every turn, and the clerk spends most of the day photocopying.

The proposed system replaces the corridor logs with a sealed certificate at the entrance. One small envelope, verified with a special reader, proves that the document sits in a particular slot without listing every corridor you would have walked through. The envelope is lighter by a factor of a hundred, so a single guard can check far more requests. The catch is that the reader is a new machine: it is slower per check than a logbook, and every archive must agree to buy the same model on the same day.

What is actually transferable

Proof size and verification speed are separate budgets. A structure that minimizes bytes may spend them on elliptic curve operations, and a structure that minimizes CPU may ship megabytes over the wire. Measure both before declaring a winner, because the right answer depends on whether your bottleneck is the network or the processor.

Migration cost belongs in the design, not after it. A commitment scheme that requires a coordinated switch of every implementation carries a risk no benchmark captures, and a long transition period is often the price of compactness.

For teams outside Ethereum, the idea is simpler: the shape of a commitment determines who can afford to verify. Shrinking witnesses changes the set of machines able to participate in consensus.

Verkle trees and Merkle Patricia tries are not two encodings of the same data but two answers to whether a proof should be cheap to verify or cheap to produce, and the choice decides who can afford to validate.

The smaller proof is worth years of work only if the verifier it enables is one the network actually wants to have.

SOL: HCqPmPJM3NVtS6YrmVaTZYnuP8XZ2PFgQZKT94VK1LkS
Creating this takes real effort — thank you for the support.

Top comments (0)