Normative spec: The ZK proof program and its verifier is normatively defined in the ZK proof system specification. This page explains how the OP Stack implementation builds proofs; it does not restate the spec.
What a proof attests to
The ZK dispute game builds the proof’s public values from its own state whenprove() is called:
- the hash of the L1 block before the game’s creation block,
- the starting super root (the parent game’s claim, or the anchor state),
- the proposed super root,
- the proposal’s timestamp, and
- the address submitting the proof.
The programs
Proofs are produced by programs that run inside the SP1 zkVM. They are built from Kona, the Rust implementation of the OP Stack state transition, so the derivation and execution rules they prove are the ones Kona implements. Three programs make up a proof:super-rangeruns in two modes. In range mode, it derives and executes the blocks of one or more chains over a range of timestamps. In consolidation mode, it checks the cross-chain messages across every chain for the same range, replaces any block whose messages are invalid, and computes the resulting super roots.log-commitmentcommits to the logs in a block’s receipts. When a cross-chain message refers to an older block, consolidation can check the message against this commitment instead of loading every receipt of that block.super-aggregationverifies the range and consolidation proofs inside the zkVM, checks that together they cover every chain at every timestamp of the game in order, and commits the public values the game expects.
How a proof is built
The prover, in practiceop-zk-proposer, defends a game in these steps:
- It reads the game’s span: the timestamps from the starting super root to the proposed one.
- It splits the span into chunks so each proof request stays within the prover’s limits. Each chunk gets a range proof and a consolidation proof.
- For each chunk, it collects a witness: every piece of L1 and L2 data the program will read, gathered in advance from its L1 and L2 nodes. The program reads only from this witness.
- It requests the range proofs, any log-commitment proofs that consolidation needs, and the consolidation proofs, which verify those log-commitment proofs. It then requests an aggregation proof over the range and consolidation proofs. It buys the proofs from the Succinct Prover Network, or generates them on local GPUs.
- It submits the aggregation proof to the game with
prove().
Absolute prestate
Each game is configured with anabsolutePrestate: a 32-byte identity of the ZK program that its proofs must come from. For SP1, it is the verification key of the super-aggregation program. The game passes it to the verifier with every proof, so a proof produced by any other program fails.
The super-aggregation program embeds the verification key of the super-range program, and super-range embeds the key of log-commitment. One absolutePrestate therefore pins all three programs.
A verification key is derived from the program’s compiled binary. Two consequences follow:
- Every new build commit has a new prestate. The programs embed the commit they were built from, so a build from a different commit has a different key even if no code changed. A final release is tagged on the same commit as its last release candidate, so the two share a prestate. Updating the ZK program on a chain means updating its
absolutePrestate. - Chain configuration is part of the program. The programs read chain configurations, such as the rollup config and the dependency set, only from a registry compiled into them. They reject chains they do not know. A chain whose configuration is not in the superchain-registry needs its own build, with its own prestate.
Verifier
The game does not depend on a specific proof system. It calls a verifier contract through a genericIZKVerifier interface, which takes a program identity, the public values, and the proof, and reverts if the proof is invalid.
For SP1, the verifier is SP1PlonkAdapter, a small contract that implements IZKVerifier by calling Succinct’s audited SP1 PLONK verifier. A proof generated by an SP1 SDK only verifies on a verifier for the same PLONK circuit, so the proposer checks that the verifier behind each game matches its SDK before it spends anything on proving.
The verifier and the absolutePrestate are set per chain and can be changed without redeploying the game implementation. Games already in progress keep the verifier and prestate they were created with.
Next steps
- Read ZK proofs security for what happens when a valid proposal cannot be proven in time.
- Read ZK proof system components for the services that generate proofs.
- Read the SP1 integration README for the implementation details of the programs.