OPinit Stack

The OPinit Stack is a CosmosSDK based vm-agnostic Optimistic Rollup framework. The OPinit Stack follows a similar interface to Optimism's OP Stack, specifically Bedrock, to ensure ease of understanding. The current version of OPinit Stack uses the Initia L1 Governance set for fraud-proof disputes.

OPinit consis of two Cosmos modules, ophost and opchild as well as 4 bot programs which are L2 specific.

OPHost

OPHost module has 4 major features:

  1. Interface for creating OP Bridge and managing permissioned bridge executor and challenger.

    • Operator and Challenger addresses can be changed via Governance proposals

  2. Batch Inbox which records L2's transaction batch.

    • Transaction batch does not become a state, but only remains as tx index like Ethereum's calldata

  3. L2 Output Oracle where L2's output root can be registered to.

    • Only permissioned bridge executors can register new output oracle root.

  4. Interface for deleting L2 outputs registered by challenges, and modifying operators and challenger addresses through gov message.

    • In the current version, only permissioned challenger can delete output proposals just like OP Stack's bedrock version.

OPChild

OPChild module consists of 3 major features:

  1. Replacing staking, gov, and distribution modules required to use CometBFT .

  2. Generating L2 Sequencer.

  3. Bridge interfaces that can be run by permissioned bridge executor.

Bridge Executor

OPinit's bridge executor is in charge of monitoring initiate_token_deposit message from L1 and relaying it to L2, and monitoring initiate_token_withdrawal message from L2 and creating withdrawal storage each epoch.

Output Submitter

OPinit's output submitter utilizes withdrawal storage and final L2 block in the epoch generated by the Bridge Executor every epoch to generate L2 output root which is submitted to L1.

Batcher

Batcher is a bot which collects all L2's block data to record as L1's calldata. Batcher is supported for both Initia L1 and Celestia L1.

Challenger

Challenger monitors L2 operator and submits a challenge whenever the operator misbehaves outside of chosen set of rules, mainly for submitting invalid blocks or censorship problems. To prevent spamming attacks, the current version only allows permissioned challengers to challenge. In the later versions any annonymous challengers can participate by having stake in the network.

Implementation

Please visit here to see implementation.

Last updated