Optimism

Optimism L2

Summary

We offer support for two types of rollup based on the Optimism (opens in a new tab) stack, namely rollups that do implement the OP Stack fault proof system (opens in a new tab) (e.g. Optimism Mainnet) and those that do not (e.g. Blast (opens in a new tab) and Fraxtal (opens in a new tab)).

This documentation focuses on Optimism mainnet which implements Fault Proofs.

High level overview

Optimism is EVM compatible and implements its account and storage tries using your standard Patricia Merkle Trie (opens in a new tab). We verify the returned proofs using Optimism's SecureMerkleTrie.sol library.

The OptimismPortalProxy implements a getter for the DisputeGameFactory through which new FaultDisputeGame instances are created. The creation of a FaultDisputeGame is the mechanism through which a proposal for the current state root of the chain is made.

Anyone* can make a state root proposal and the back and forth process through which games are disputed is what prevents an invalid (for example (opens in a new tab)) L2 state being finalized on L1.

Context

The context of the request is the game index associated with the latest appropriately resolved FaultDisputeGame.

The appropiate index is discerned using the OPFaultGameFinder.sol contract which iteratively loops through games until it finds an approppriate game subject to the passed in configuration.

Verification

The Unruggable gateway Typescript prover implementation used for OP Stack based chains is EthProver.ts.

Proof data is verified using the OPVerifier.sol and OPFaultVerifier.sol contracts deployed on Layer 1.

Notes

Chain state

It is not the L1 chain that dictates the state of an OP Stack based chain. Rather, it provides the inputs (transactions/ordering) from which the state of the L2 chain can be derived by an appriate client (op-node/op-geth for example).