> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimism.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ZK proof system components

> Learn which L1 contracts, proof programs, and off-chain services make up the OP Stack ZK proof system, and who runs each one.

> [!NOTE]
>
> **Normative spec:** The ZK dispute game's contracts and actors is normatively defined in the
> [ZK dispute game specification](https://specs.optimism.io/fault-proof/stage-one/zk/zk-dispute-game.html#contracts-involved). This page maps those contracts to the OP Stack's services; it does not restate the spec.

> [!WARNING]
>
> ZK proofs are experimental and under active development. Do not rely on them to secure a production chain yet.

The ZK proof system has three parts: contracts on L1 that hold proposals and settle disputes, programs that produce proofs, and off-chain services that propose, challenge, prove, and monitor.

```mermaid theme={null}
graph TD;
    ZKP[op-zk-proposer] -->|creates games, proves, resolves| DGF[DisputeGameFactory]
    DGF -->|clones| ZKG[ZKDisputeGame]
    CH[op-challenger] -->|challenges invalid games, resolves| ZKG
    MON[op-dispute-mon] -->|monitors| ZKG
    ZKP -->|requests proofs| SPN[Succinct Prover Network]
    ZKP -.->|or proves locally| GPU[Local NVIDIA GPUs]
    SPN -->|runs| PROG[super-range, log-commitment, super-aggregation]
    GPU -->|runs| PROG
    ZKG -->|verify| VER[SP1PlonkAdapter]
    ZKG -->|bonds| WETH[DelayedWETH]
    ZKG -->|validity, anchor| ASR[AnchorStateRegistry]
    PORTAL[OptimismPortal] -->|reads game results| ASR
```

## L1 contracts

| Contract | Role |
| - | - |
| `DisputeGameFactory` | Creates a game for each proposal, as a clone of the registered implementation with the chain's configuration appended. Stores the required init bond for each game type. |
| `ZKDisputeGame` | One game per proposal. Runs the challenge, prove, and resolve lifecycle and tracks bonds. See [ZK dispute game](https://docs.optimism.io/op-stack/zk-proofs/zk-dispute-game.md). |
| `SP1PlonkAdapter` | The verifier that games call. Implements the generic `IZKVerifier` interface on top of Succinct's SP1 PLONK verifier. |
| `AnchorStateRegistry` | Records the anchor state that new games build on, the respected game type, and the Guardian's blacklist and retirement timestamp. Decides when a game's result is final. |
| `DelayedWETH` | Holds every bond, and delays payouts so that funds from an incorrect game can be held back. The Guardian can pause withdrawals, and the `ProxyAdmin` owner can hold or recover funds. |
| `OptimismPortal` | Proves and finalizes withdrawals against games that the `AnchorStateRegistry` considers valid. Reads the chain's own output root from the game's super root. |
| `OPContractsManager` | Registers the release's game implementation on each chain's `DisputeGameFactory`, and sets each chain's game configuration, including its prestate and verifier. |

## Proof programs

The [SP1](https://github.com/succinctlabs/sp1) programs `super-range`, `log-commitment`, and `super-aggregation` produce the proofs. They are built from the Kona implementation of the OP Stack state transition and released together as `kona-sp1-program` releases. See [ZK proof system](https://docs.optimism.io/op-stack/zk-proofs/proof-system.md).

## Off-chain services

| Service | Role | Who runs it |
| - | - | - |
| [`op-zk-proposer`](https://docs.optimism.io/op-stack/components/op-zk-proposer) | Proposes the chain's super root on a fixed interval, generates and submits proofs for challenged games, resolves games, and claims bonds. Optionally proves every game it creates, for [fast finality](https://docs.optimism.io/op-stack/zk-proofs/explainer.md#fast-finality). | The chain operator |
| [`op-challenger`](https://docs.optimism.io/op-stack/components/op-challenger) | Checks every ZK game's proposal against its own super root source, challenges invalid proposals and children of failed parents, and resolves games. | The chain operator, and anyone else who wants to help secure the chain |
| `op-dispute-mon` | Monitors every game, compares each proposal with trusted nodes, and reports games that need action. See [Chain monitoring](https://docs.optimism.io/chain-operators/tools/chain-monitoring.md#dispute-mon). | The chain operator |
| Succinct Prover Network | Generates SP1 proofs on request, through an auction between independent provers, paid in PROVE. | Succinct and independent provers |

The proposer and challenger both depend on a source of super roots: an [`op-supernode`](https://docs.optimism.io/node-operators/guides/configuration/supernode) for an interop set, or the chain's `op-node` with its safe head database enabled for a chain on its own. The proposer also needs L1 execution and beacon nodes and an L2 execution node for each chain, to collect the data a proof reads.

## Next steps

* Set up [`op-zk-proposer`](https://docs.optimism.io/chain-operators/guides/configuration/zk-proposer).
* Set up [`op-challenger` for ZK dispute games](https://docs.optimism.io/chain-operators/guides/configuration/zk-challenger).
* Read [ZK proofs security](https://docs.optimism.io/op-stack/zk-proofs/security.md).
