Sunrise Mirror Online

zkrollup proof generation

Understanding zkRollup Proof Generation: A Practical Overview

June 13, 2026 By Sage Hoffman

Introduction: The Role of Proof Generation in Scalable Blockchains

zkRollups have emerged as a cornerstone technology for scaling Ethereum and other Layer-1 blockchains. At their core, these systems compress thousands of off-chain transactions into a single on-chain proof — a cryptographic attestation that all state transitions were executed correctly. For anyone working in DeFi infrastructure, understanding how these proofs are generated is not merely academic; it directly informs decisions about gas costs, latency, and security guarantees. This article provides a practical, jargon-comfortable breakdown of the proof generation pipeline, from circuit design to final verification.

Proof generation in a zkRollup involves several tightly coupled stages: transaction batching, circuit compilation, witness computation, and the actual proving algorithm. Each stage introduces tradeoffs between speed, memory, and the size of the resulting proof. The most widely deployed systems today — such as those using Groth16, PLONK, or STARK-based provers — follow a similar high-level workflow, though their concrete implementations differ significantly.

1. Circuit Construction and Arithmetic Representation

Every zkRollup proof begins with a circuit. A circuit is a mathematical representation of the state transition function — the precise set of rules that transforms one valid state (e.g., a Merkle tree of account balances) into the next after processing a batch of user transactions. Constructing this circuit is the most intellectually demanding step, and it determines the proving system's efficiency.

The circuit is expressed as a system of arithmetic constraints over a finite field. In practice, this means converting operations like signature verification (e.g., ECDSA or BLS), Merkle path checks, and balance updates into a set of polynomial equations. Developers typically use domain-specific languages (DSLs) such as Circom, SnarkJS, or the Cairo language for this purpose. For example, a simple transfer transaction might require the circuit to verify:

  1. The sender's signature against the public key stored on-chain.
  2. That the sender's balance is greater than or equal to the transfer amount.
  3. The correct update of both sender and receiver Merkle leaves.

Each of these operations corresponds to a specific number of constraints — the fundamental unit of circuit complexity. A typical zkRollup transaction batch of 1,000 transfers may require circuits with 10–50 million constraints, depending on the cryptographic primitives used. The number of constraints directly correlates with proving time and memory usage. For instance, a Groth16 prover for 10 million constraints might take 5–10 minutes and require 32 GB of RAM, whereas a STARK prover handling the same load could be faster but produce larger proofs.

2. Witness Generation and Commitments

Once the circuit is compiled, the prover must generate a witness — a complete assignment of values to every wire in the circuit that satisfies all constraints. This step is often called "execution" because it simulates the state transition to produce the resulting state root and auxiliary data.

The witness includes both public inputs (e.g., the previous state root, the new state root, a batch hash) and private inputs (e.g., individual transaction details, signatures, Merkle proofs). For a batch of 1,000 deposits and withdrawals, the witness file can easily exceed 100 MB. This is where memory optimization becomes critical: poorly designed circuits can cause witness generation to fail on standard server hardware.

After the witness is computed, the prover commits to it using polynomial commitment schemes (for SNARKs) or Merkle trees (for STARKs). In PLONK-based systems, this involves evaluating polynomials at secret random points via the Schwartz–Zippel lemma. The commitment is a compact fingerprint of the entire witness and is used later in the interactive or non-interactive proof protocol. For readers interested in how these mechanisms enable trustless trading infrastructure, you can explore now to see how zkRollup proofs are integrated into a live order-book exchange.

3. The Proving Algorithm: From Polynomials to Proof

With the witness committed, the prover runs the central algorithm — the actual proof generation. This is where the mathematical machinery of zero-knowledge comes to life. The prover's goal is to convince a verifier (the Ethereum network) that a set of polynomials satisfy certain constraints, without revealing the underlying witness.

The two dominant families of provers are:

  • Groth16: Requires a trusted setup per circuit, but produces the smallest proofs (single group element pair) and has the cheapest on-chain verification (under 300k gas). Proving time scales linearly with constraints, but memory usage is high due to multi-scalar multiplication (MSM) operations. Used by many early zkRollup implementations.
  • PLONK: Uses a universal trusted setup (one per curve) and supports updateable circuits. Proofs are slightly larger (around 1.2 KB) and verification gas is about 500k–700k. PLONK's advantage lies in its flexibility for upgrades and smaller memory footprint during proving.
  • STARKs: No trusted setup needed, relying on collision-resistant hash functions. Proofs are large (50–100 KB for typical batch sizes) but verification is fast and scalable. Proving time is dominated by fast Fourier transforms (FFTs) on large vectors, making them suitable for high-throughput applications where proof size is secondary.

During the proving phase, the prover executes a series of polynomial commitments, linearization steps, and evaluations. For example, in a PLONK proof, the prover:

  1. Evaluates the circuit's constraint polynomials at a random point.
  2. Constructs batched polynomial commitments to compress witness data.
  3. Computes a single "aggregation" or "linearization" polynomial that captures all constraints.
  4. Generates a non-interactive proof via the Fiat–Shamir transform, using the circuit's public verifier parameters.

A critical performance metric is proving throughput, measured in constraints per second. On a modern GPU (e.g., Nvidia A100), optimized code can achieve 100–500 million constraints per second for STARKs, but only 10–20 million for Groth16 due to the MSM bottleneck. For a batch of 10,000 transactions (roughly 50 million constraints), this translates to 2–10 minutes of proving time. Developers must carefully match the proving hardware to the batch size to maintain a reasonable user experience.

4. Verification and On-Chain Finality

After the proof is generated, it is submitted on-chain alongside a minimal set of public inputs (new state root, batch number, etc.). The Ethereum smart contract verifies the proof using a precompiled verification circuit. This step is deliberately cheap: verification typically consumes 200k–700k gas per batch, regardless of how many transactions were inside the batch. This is the core scaling advantage of zkRollups — the cost per transaction drops as batch size increases.

Verification involves checking that the proof satisfies the public univariate polynomial equations defined by the circuit. In Groth16, this is a single pairing check. In PLONK, it involves evaluating the linearization polynomial and checking an opening proof. STARK verification uses Merkle tree opening checks and FRI (Fast Reed–Solomon IOPP) verification, which is the most gas-intensive option.

Importantly, the verification contract must be carefully audited for edge cases — for example, handling malleable proofs or incorrect public input binding. A single vulnerability in the verifier can lead to state corruption. Many production systems use formal verification (e.g., Certora or K-framework) to mathematically prove the correctness of the on-chain verification logic.

For traders and liquidity providers, the speed of proof generation directly impacts withdrawal latency. A typical cycle might be: batch transactions every 5 minutes, generate proof for 10–20 minutes, then submit to L1 with a 12-second block time. Total delay: 15–25 minutes. This is orders of magnitude faster than optimistic rollups, which impose a 7-day fraud proof window. If you are evaluating platforms that minimize this latency, consider solutions that implement proof generation on specialized hardware — such as the architecture detailed at zkRollup Trading at Scale.

5. Practical Tradeoffs and Optimizations

Choosing a proving system for a zkRollup is rarely a purely technical decision — it involves business constraints like upgradeability, hardware availability, and audit costs. Here are the key tradeoffs to consider:

  • Proof size vs. verification cost: Groth16 offers the smallest on-chain footprint but requires a trusted setup that locks the circuit structure. PLONK provides flexibility at a slight gas premium. STARKs eliminate trust assumptions but blow up calldata costs.
  • Proving time vs. batch latency: A faster prover (e.g., using parallel MSM or FPGA acceleration) reduces the time users wait for withdrawals. However, more hardware means higher operational costs. Many rollups now use "prover markets" where multiple parties compete to generate the cheapest proof.
  • Circuit complexity vs. expressiveness: Simple UTXO-like circuits are fast to prove but cannot support arbitrary smart contracts. zkEVM circuits, which emulate the Ethereum Virtual Machine, require millions more constraints and significantly longer proving times. The tradeoff is between scalability and composability.

One emerging optimization is recursive proof composition: a single proof can verify another proof, enabling the compression of multiple zkRollup batches into one ultimate on-chain check. This technique, used in Halo2 and Nova, can reduce latency by batching proofs off-chain before final submission. Another is the use of lookup arguments (e.g., Caulk, plookup) to efficiently handle range checks and bitwise operations, which are common in DeFi transactions.

Conclusion

zkRollup proof generation is a sophisticated pipeline that combines circuit design, polynomial arithmetic, and hardware-aware optimization. Understanding the concrete steps — from constraint construction to on-chain verification — enables developers to make informed choices about proving systems, hardware provisioning, and batch parameters. As the ecosystem matures, we can expect further reductions in proving time through specialized accelerators (ASICs) and improved recursive techniques. For now, the practical takeaway is clear: the efficiency of a zkRollup is bounded not by blockchain throughput, but by the speed at which proofs can be generated off-chain. Mastering this pipeline is the key to building truly scalable financial infrastructure.

Explore the technical mechanics of zkRollup proof generation, from circuit construction to verifier efficiency. A practical guide for developers and traders.

From the report: zkrollup proof generation tips and insights

Cited references

S
Sage Hoffman

Trusted insights and updates