The off-chain System is another key module of the Mantle Network. It is responsible for executing specific tasks and logic in an environment outside of the blockchain, which is key to Layer 2's ability to scale L1 and provide more efficient and faster response and execution.
Key L2 Smart Contracts
- Testnet (Sepolia)
Stores L2 gas price configuration values. Provide the tokenRatio parameter to keep the gas fees more stable.
Stores L1 block context information (e.g., latest known L1 block hash)
High-level interface for sending messages to and receiving messages from L1
Standardized system for transferring ERC20 tokens to/from L1
Low-level message-passing interface
Vault for L2 transaction fees
- Accept off-chain transactions from users
- Monitor user deposit transactions from L1
- Produce blocks on L2
- Synchronize Rollup data from Mantle DA
- Verify the state root submitted by
- Initiate fraud proofs when invalid state data is detected
- Provide verified block data and state to users
op-batcher is a crucial component that interacts with the DA provider in the network. It also handles transaction packing and uploading to L1, with specific functions:
- Fetch data from the sequencer and process it (encoding and compressing) into frames based on different configurations, storing the frames as a channel
- Interact with the DA provider through channels, providing batched transaction information
- Upload processed batched transactions to L1
op-batcher but providing state root information. When submitting a single or batch of transactions,
op-proposer needs to complete state changes through
op-geth and write down state commitments sent to
L2OutputOracle on L1.
Nodes in the Mantle DA, forming the DA Network, are responsible for storing copies of Mantle transaction data. They use BLS signature schemes to sign the block data they provide, making commitments to ensure their availability. These signatures are verified by the EigenDA contract on Ethereum.
Within the sequencer and the verifier, two different components are present:
As the execution client in the Mantle Network,
op-geth has the following functions:
- Responsible for executing blocks received from
op-nodeand storing states.
- Query blockchain data through the Engine API and submit transactions to the network.
As the consensus client in the Mantle Network,
op-node has the following functions:
- Derive L2 blocks from L1.
- Send blocks to
op-gethvia the Engine API.
- Retrieve block information from Mantle DA for subsequent validity verification.
- Synchronize with a P2P network to sequencer-constructed but unsubmitted blocks.