![]() # L2CrossDomainMessenger (opens new window) In the event that a message sent from L1 to L2 is rejected for exceeding the L2 epoch gas limit, it can be resubmitted via this contract's replay function. The L1 Cross Domain Messenger (L1xDM) contract sends messages from L1 to L2, and relays messages from L2 onto L1. The Bridge is composed of the following concrete contracts: # L1CrossDomainMessenger (opens new window) The Bridge contracts implement the functionality required to pass messages between layer 1 and layer 2. In the event of a successful challenge, the faulty Proposer's bond is slashed, and the Verifier's gas costs are refunded. It also handles the accounting of gas costs spent by a Verifier during the course of a challenge. The Bond Manager contract handles deposits in the form of an ERC20 token from bonded Proposers. This system is still being written, so these details are likely to If the transaction result is successfully proven to be incorrect, the Verifier will receive a reward taken from funds which a Sequencer must put up as a bond. ![]() In brief: If a proposed state root is not the correct result of executing a transaction, then a Verifier (which is anyone running an Optimism 'full node') can initiate a transaction result challenge. Here we explain a bit more about how these proposals happen, and how In the previous section, we mentioned that the Chain includes a list of the proposed state roots There are three Chain Storage Containers deployed, two are controlled by the CTC, one by the SCC. Provides reusable storage in the form of a "Ring Buffer" data structure, which will overwrite storage slots that are no longer needed. # ChainStorageContainer (opens new window) Elements here have a 1:1 correspondence with transactions in the CTC, and should be the unique state root calculated off-chain by applying the canonical transactions one by one. The State Commitment Chain (SCC) contract contains a list of proposed state roots which Proposers assert to be a result of each transaction in the Canonical Transaction Chain (CTC). # StateCommitmentChain (opens new window) (SCC) The CTC also allows any account to enqueue() an L2 transaction, which the Sequencer must eventually append to the rollup state. It defines the ordering of transactions by writing them to the CTC:batches instance of the Chain Storage Container. The Canonical Transaction Chain (CTC) contract is an append-only log of transactions which must be applied to the OVM state. # CanonicalTransactionChain (opens new window) (CTC) The chain is composed of the following concrete contracts: Transactions sent from L1 to L2, which are pending inclusion in the ordered list.The proposed state root which would result from the application of each transaction.An ordered list of all transactions applied to the L2 state.The Chain is composed of a set of contracts running on the Ethereum mainnet. These contracts are similar to Ethereum's precompiles, however they are written in Solidity, and can be found at addresses prefixed with 0x42. Predeploys: A set of essential contracts which are deployed and available in the genesis state of the system.Bridge: Contracts which facilitate message passing between layer-1 and layer-2.Verification: Contracts on layer-1 which implement the process for challenging a transaction result.Chain: Contracts on layer-1, which hold the ordering of layer-2 transactions, and commitments to the associated layer-2 state roots.We will discuss each component in more detail below. The smart contracts in the Optimism protocol can be separated into a few key components. UIs and wallets), should be able to interact with L2 contract with little more than an updated RPC endpoint. Optimism is meant to look, feel and behave like Ethereum but cheaper and faster.įor developers building on our Optimism, we aim to make the transition as seamless as possible.Įxisting Solidity smart contracts can run on L2 exactly how they run on L1. This document is intended for anyone looking for a deeper understanding of how the protocol works We aim to make transacting on Ethereum affordable and Optimism is a Layer 2 scaling protocol for Ethereum applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |