Base

Base L2

Summary

Base (opens in a new tab) is an Optimistic L2 rollup built by Coinbase (opens in a new tab) on top of the OP Stack. Base does not implement the OP Stack fault proof system (opens in a new tab) at this time and as such verification of data is handled in a different manner to that of Optimism.

High level overview

Base (OP Stack) is EVM compatible and implements its account and storage tries using your standard Patricia Merkle Trie. We verify the returned proofs using the SecureMerkleTrie.sol library.

Context

The context of the request is the latestOutputIndex queried from the L2OutputOracle contract.

State roots can only be proposed to the L2OutputOracle by an access controlled proposer.

Commit

The commit data for Base is discerned by calling getL2Output on the L2OutputOracle.

The OutputRootProof is defined by Optimism (opens in a new tab) as:

    struct OutputRootProof {
        bytes32 version;
        bytes32 stateRoot;
        bytes32 messagePasserStorageRoot;
        bytes32 latestBlockhash;
    }

The gateway returns this data alongside individual account/storage proofs for the requested data. We discern that the OutputRootProof for the latestOutputIndex matches data stored on L1 and then we verify the proofs returned against the associated state root.

Verification

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

Base (OP Stack) utilises the same Patricia Merkle Trie structure as Layer 1 Ethereum for its storage and account tries. As such proof verification utilises SecureMerkleTrie.sol by proxy of our EthTrieHooks.sol library.