Honest Actors (ZK Dispute Game)
Table of Contents
Overview
The ZKDisputeGame has three honest roles: the proposer, the prover and the challenger. Only the prover runs the
ZK program. All roles read super roots through
superroot_atTimestamp from a source that follows the
chains in the interop set.
The same party MAY play several roles. In particular, a proposer is expected to prove its own challenged games.
Valid Claim
Consider a game with l1Head block H, l2SequenceNumber t and rootClaim r. Its validity is decided from
the superroot_atTimestamp(t) response of the super root source:
- If the response's
current_l1number is at or below the number ofH, the source has not progressed pastHand no decision is made. The actor waits for the source to make progress. - If the response has no verified
data, the claim is invalid: the timestamp is not yet backed by the verified chain. - If
data.verified_required_l1number is above the number ofH, the claim is invalid. The proof bindsl1Head, so a root that needs L1 data afterHcan never be proven. - Otherwise the claim is valid if and only if
data.super_rootequalsr.
A game whose parent resolved as CHALLENGER_WINS is invalid regardless of its root claim.
Honest Proposer
An honest proposer:
- SHOULD create games only while
ZK_DISPUTE_GAMEis the respected game type. Games created while it is not respected can never become the anchor state or back withdrawals. - MUST propose the verified super root (
data.super_root) at the chosen timestamp, with its preimage as the packedSuperRootProofinextraData. The timestamp SHOULD be at or below the safe (or finalized) timestamp reported by the super root source. - MUST use as parent either
parentIndex = type(uint32).max, to start from the anchor state, or a validZK_DISPUTE_GAMEthat was created whileZK_DISPUTE_GAMEwas the respected game type, is not blacklisted or retired, has not resolved asCHALLENGER_WINS, and has anl2SequenceNumberstrictly above the anchor's. It SHOULD choose the highest such game. - SHOULD NOT create games when the anchor root differs from the verified super root at the anchor's timestamp.
- MUST NOT create a game unless it can produce proofs for the registered
absolutePrestateandverifier. For SP1, the aggregation program's verification key MUST equalabsolutePrestate, and theVERIFIER_HASH()of the verifier wrapped by the registeredSP1PlonkAdapterMUST match the PLONK circuit of the prover's SP1 SDK.
Honest Prover
An honest prover:
- SHOULD prove every challenged game that it considers valid before the game's prove deadline. See Proof Generation.
- MUST submit each proof from the address committed to as
proverin the proof's public values, because the proof bindsmsg.sender. - MAY prove unchallenged valid games to end them before the challenge deadline.
- MUST keep the program artifacts for every
absolutePrestateused by games that can still be live, otherwise it can no longer defend those games.
Honest Challenger
An honest challenger challenges a game when all of the following hold:
claimData.statusisUnchallengedand the challenge deadline has not passed; and- the parent resolved as
CHALLENGER_WINS, or the claim is invalid per Valid Claim.
Before challenging or resolving an unchallenged game inside its challenge window because its parent resolved as
CHALLENGER_WINS, the challenger MUST confirm the parent's status at a finalized L1 block, and MUST challenge the
game before resolving it, because resolving it unchallenged credits all bonds to address(0). The challenge MUST
include challengerBond.
It resolves every game whose parent is resolved and for which any of the following holds:
- the parent resolved as
CHALLENGER_WINS; - a valid proof was provided; or
- the current deadline has passed.
For bonds, the challenger calls claimCredit() for each of its addresses that has credit. When none of its
addresses has credit in a resolved game, it calls closeGame() so that the anchor state can advance.
Timeliness
Honest actions MUST land on L1 before the relevant deadline: challenges within maxChallengeDuration of game
creation, and proofs within maxProveDuration of the challenge.