Normative spec: The ZK proof system across an interop set is normatively defined in the ZK proof system specification. This page explains what changes when a ZK dispute game covers more than one chain; it does not restate the spec.
One proposal for the whole set
A ZK dispute game’s root claim is a super root. Its preimage holds one(chainId, outputRoot) pair for each chain in the set, sorted by chain ID. A proposal is valid only if every pair is correct, so a wrong output root for any one chain makes the whole proposal invalid.
Withdrawals still happen on each chain. When a user proves a withdrawal, the chain’s OptimismPortal calls rootClaimByChainId on the game to read its own chain’s output root from the stored preimage. Every chain in the set proves its withdrawals against the same games.
A super root at a timestamp needs every chain’s state at that timestamp to be verified, including its cross-chain messages. op-supernode advances the safe and finalized heads of every chain in the set together, so the latest super root that can be proposed is set by the chain that is furthest behind. If one chain’s batcher stalls, new proposals stall for the whole set, and so do withdrawals that are waiting for a newer proposal.
Shared contracts
The chains in an interop set share these L1 contracts:
Because the contracts are shared:
- An
OPContractsManagerupgrade of any member chain upgrades them for the whole set. - Every member resolves its pause state and its Guardian through the shared
ETHLockbox, so one pause covers the whole set. - Every member uses the same
AnchorStateRegistryfinality delay andDelayedWETHwithdrawal delay. Each portal keeps its own proof maturity delay.
ETHLockbox, which holds the ETH of every chain in the set. The soundness of the proof system, and the safeguards that back it up, protect every chain’s funds at once.
One proof for every chain
A proof for an interop set re-derives and executes every chain, then checks the cross-chain messages between them. The programs are the same as for a single chain. What changes with more chains:- Range proofs can be split by chain. A range proof can cover every chain or only some of them, so the proposer can split a timestamp’s derivation and execution between chains when it is too large for one request.
- Consolidation cannot. A consolidation proof always covers every chain at each timestamp, because a message on one chain can depend on any other chain in the set. The consolidation of one timestamp is the smallest request the proposer can make for it.
- Cost grows with the set. Each chain adds blocks to derive and execute, and each cross-chain message adds a check in consolidation. An attacker can fill blocks on any chain in the set with transactions that are expensive to prove, including cross-chain messages.
maxProveDuration, must leave room for the worst-case proving time of the whole set, not of one chain. See How a proof is built and Completeness.
The prestate pins the chain set
The proof programs read chain configuration only from a registry compiled into them, and that includes the interop set’s dependency set. The chain set in a game’s starting super root must equal the compiled dependency set, or the programs reject the proof. So theabsolutePrestate identifies the exact chain set its proofs can cover.
Two consequences follow:
- The chain set is fixed. Changing the dependency set would need new programs and a governance change of the
absolutePrestate. A new prestate alone is not enough, and the L1 contracts do not support changing a set either: membership is permanent, and there is no supported way to add a chain to an existing set, split a set, or remove a chain from one. - A custom interop set needs its own build. A standard prestate covers the dependency sets in the superchain-registry at its release. A set whose dependency set is not in the registry builds the programs with its own configuration. See Build a prestate for a custom chain.
Off-chain services for a set
The services are the same as for a single chain, run once for the whole set:- One
op-zk-proposerproposes and defends the set’s games on the sharedDisputeGameFactory. It reads super roots from anop-supernodethat follows every chain in the set, and needs an L2 execution node for every chain to collect the data the proof reads. See Configure op-zk-proposer. op-challengerchecks every game against its ownop-supernode, which must also follow every chain in the set. A source that misses a chain computes different super roots and challenges valid proposals. See Configure op-challenger for ZK dispute games.op-dispute-monmonitors the sharedDisputeGameFactory. See Chain monitoring.
Form an interop set with ZK proofs
Independent chains become an interop set withOPContractsManagerMigrator.migrate(). The migration happens once and cannot be reversed, and it takes every chain joining the set in one call. It deploys the shared DisputeGameFactory, AnchorStateRegistry, and ETHLockbox, reuses the DelayedWETH of the chain with the lowest chain ID as the shared one, and moves each chain’s portal and ETH to them. It reverts if the chains disagree on the finality delay or the DelayedWETH withdrawal delay.
The migration also sets the set’s starting anchor state, the super root that the first game builds on. The contracts cannot check this super root against L2 state, so verify it against your own op-supernode before you sign.
migrate() can register ZK_DISPUTE_GAME on the new shared DisputeGameFactory, but it cannot make it the respected game type: the starting respected game type must be SUPER_CANNON_KONA or SUPER_PERMISSIONED. To switch the set to ZK proofs afterwards, either:
- run
OPContractsManager.upgrade()on any member chain with theoverrides.cfg.startingRespectedGameTypeinstruction, as in Migrating to ZK proofs, or - have the Guardian call
setRespectedGameType(10)on the sharedAnchorStateRegistry.
ZK_DISPUTE_GAME the same way, with upgrade() on a member chain. Either way, run a funded proposer and a challenger for the whole set before ZK becomes the respected game type.
migrate() retires every game created before it, because the shared AnchorStateRegistry starts with its retirement timestamp at the migration block. A withdrawal proven before the migration must be proven again against a game from the shared DisputeGameFactory, and waits a new proof maturity delay. Games in progress at the migration still resolve against each chain’s old contracts, and their bonds can still be claimed. Switching the respected game type later does not retire games.
For the steps of a two-chain migrate(), see Merging two chains into a shared dispute game. See Path C of the migration specification for the normative rules.
Next steps
- Read ZK proof system for how the programs build a proof.
- Read ZK proofs security for the safeguards that protect the set.
- Read the interop explainer for how cross-chain messages work.