Scaling Verifiable Computation Using Efficient Set Accumulators

Alex Ozdemir, Riad S. Wahby, Barry Whitehat, Dan Boneh

This paper, presented at USENIX Security '20, addresses one of the most significant bottlenecks in blockchain scalability and verifiable outsourcing: the cost of managing large-scale state updates.

TL;DR

The authors replace standard Merkle trees with RSA accumulators optimized for SNARKs to scale verifiable computation. By introducing a novel "MultiSwap" operation and efficient hashing techniques, they achieve up to a 3.3x increase in the number of transactions that can be processed in a single proof compared to existing state-of-the-art methods.

What Problem Does This Paper Address?

Verifiable computation allows a weak client (like a phone or a smart contract) to offload heavy tasks to a powerful server. The server returns the result along with a SNARK—a succinct proof that the work was done correctly.

In systems like ZK-Rollups, the "work" involves updating a massive database (the state). Currently, this state is managed using Merkle trees. To prove a state update, the SNARK must verify a path from a leaf to the root for every single transaction in a batch. This is expensive: the cost grows logarithmically with the total number of accounts and linearly with the number of transactions. As the state grows to millions of users, the "proving cost" becomes an insurmountable wall, limiting how many transactions can fit into a single block.

Methods

The researchers propose using RSA accumulators instead of Merkle trees. While Merkle trees are based on hashes, RSA accumulators are based on modular exponentiation. Their key advantage is that proofs for multiple elements can be "batched" into a single constant-sized proof.

The paper introduces several novel techniques to make this work efficiently inside a SNARK:

  • MultiSwap: RSA accumulators are naturally unordered sets. MultiSwap is a new primitive that provides the sequential semantics needed for financial transactions (e.g., Alice sends to Bob, then Bob sends to Charlie) while still allowing for batched verification.
  • Hashing to Primes via Advice: RSA accumulators require hashing inputs to prime numbers. Doing this directly in a SNARK is incredibly slow. The authors use "advice"—the prover provides a Pocklington primality certificate, which the SNARK can verify much faster than it could find a prime itself.
  • Division-Intractable Hashing: They introduce a simplified hash construction ($H(x) + \Delta$) that is significantly cheaper to implement in constraints than standard SNARK-friendly hashes like Poseidon.
  • Multiprecision Optimizations: They optimized the underlying arithmetic for large integers to minimize the number of R1CS constraints.

Datasets

The authors evaluated their system using custom-built benchmarks rather than static datasets:

  1. Set Operations Benchmark: A raw comparison of "swaps" (removing one element and inserting another) between RSA accumulators and Merkle trees.
  2. Rollup Payment System: A simulated distributed payment application involving signature verification, validity checks, and state updates.
  3. RAM Abstraction: A cost-model analysis for using these accumulators to provide persistent random-access memory for verifiable programs.

They compared their results against Merkle trees using the Poseidon hash, which is currently considered the most efficient hash function for SNARKs.

Key Insights and Ideas

  • Size Independence: The "Aha!" moment is that once a batch is large enough, the cost of an RSA accumulator update is independent of the total state size. A Merkle tree gets more expensive as you add more users; an RSA accumulator does not.
  • The Power of Advice: By shifting the burden of "finding" values (like primes or roots) to the prover and only "verifying" them in the SNARK, the authors bypassed the traditional computational limits of circuit-based proofs.
  • Hybrid RAM: They realized that combining RSA accumulators with address-ordered transcripts (a technique from the BCGT approach) creates a persistent RAM that is cheaper than "Pantry-style" Merkle RAM for almost all practical sizes.

Key Results

  • Break-even Points: For a state of $2^{20}$ (approx. 1 million) elements, RSA accumulators become more efficient than Merkle trees at batches of ~1,300 operations.
  • Rollup Efficiency: In a payment system context, the RSA approach surpasses Merkle trees at just ~600 transactions.
  • Throughput Increase: In a proof with a budget of 1 billion constraints, RSA accumulators can process 3.3x more swaps than a Merkle tree.
  • Verification Speed: Verification remains extremely fast, taking only about 7ms regardless of the batch size.

Limitations and Future Work

  • Trusted Setup: RSA accumulators require a "trusted setup" to generate a modulus $N$ whose factorization is unknown. While common in SNARKs, it remains a security hurdle. The authors suggest future work could explore "class groups" to eliminate this requirement.
  • Prover Overhead: While the SNARK proof is smaller, the prover has to perform heavy modular exponentiations outside the SNARK to generate the "advice." For massive states (over $2^{25}$ elements), this becomes a significant time and memory bottleneck, though it is highly parallelizable.
  • Zero-Knowledge: This specific implementation focuses on scalability (verifiability) rather than privacy (zero-knowledge), though the authors note that ZK properties could be added in future iterations.

Summary updated

BibTeX
@inproceedings{ozdemir2020scaling,
  author = {Alex Ozdemir and Riad S. Wahby and Barry Whitehat and Dan Boneh},
  title = {{Scaling Verifiable Computation Using Efficient Set Accumulators}},
  booktitle = {USENIX Security},
  year = {2020},
}
Figure