Interpretation of Optimism's Operating Mechanism in Vernacular
ECN以太坊中国
2021-03-19 01:00
本文约2947字,阅读全文需要约12分钟
Layer2 Solution Optimism.

This article is integrated and translated from the Twitter thread posted by @0xRafi

1/ Since the Optimism team announced that its mainnet launch time will be advanced, I think it is very necessary for everyone to understand what the Ethereum Layer2 solution Optimism is, how it works, and what it will bring to Ethereum.

2/ The reason why everyone is looking forward to this is because L2 solutions such as Optimism help to: increase the throughput of Ethereum (transaction processing per second); shorten the transaction packaging waiting time (the time required to confirm a transaction ); and greatly reduce gas fees. And it expands without sacrificing the security of the Ethereum mainnet.

3/ This is the biggest difference between a real Layer2 solution and a "pure sidechain" solution (such as @0xPolygon or @xdaichain). The sidechain solution has its own consensus mechanism and security, and cannot benefit from the security of Ethereum's Layer 1, while Layer 2 solutions can maintain the security of the Ethereum Layer 1 network.

4/ For example, if we use Optimism: when a user submits a transaction on the Ethereum mainnet (or Layer1), the transaction data will be stored on L1, but the processing of the smart contract calculation will be in the sub-chain (ie Layer2) on, and the final calculation result is sent back to Layer1.

5/ Since the calculation process is the most time-consuming and costly part of a transaction, processing calculations at Layer 2 greatly reduces the calculation requirements of Layer 1, thereby increasing network throughput and reducing transaction fees. L1 only receives transaction data, sends it to L2, and then receives the calculation result of L2

6/ Optimism is a more "general" solution. Any Solidity smart contract on L1 (that is, any L1 app) can run on Optimism's Layer 2 without building additional functionality.

7/ The figure below shows how Optimistic Rollup works. The two big boxes are the Optimistic Rollup contract and the Optimistic Virtual Machine (OVM). Rollup is an L1 smart contract that is responsible for receiving transaction data, sending the data to L2 and receiving calculation results. But the interesting part happens in L2.

8/ On L2, the transaction is submitted to a"Sequencer"Sequencers (miners on L2, so to speak). It then responds immediately, generating a signed receipt to guarantee execution and ordering of the transaction. However, what if the sequencer is evil, does not execute the transaction correctly, or frontruns the transaction?

9/ When this happens, the user can submit the signed receipt to the referee contract on L1. If it is confirmed that the sequencer did not perform its obligations correctly, then ta will be fined (ie lose its pledged funds). So L2 can be said to be a small PoS system.

10/ But when there is a dispute, the referee contract on L1 should be able to perform calculations like on L2 and get exactly the same calculation results. This requires the application of OVM.

11/ OVM can be said to be an L2 adapter on L1, ensuring that the L1 Ethereum Virtual Machine (EVM) handles L2 calculations as if it were in L2. The purpose of this is to make any computation on L2 verifiable on L1 (if necessary). This is very important.

12/ "Optimistic"The reason for optimism is that we assume that all calculations performed on L2 are correct until someone disputes it. If there is a dispute, a referee on L1 re-runs the calculation on the Ethereum network and checks the results.

13/ In order to incentivize users to act as "watchtowers" and verify calculation results, Optimism is set up like this: Anyone who finds dishonesty and disputes it can get a part of the reward from the penalty of the evil sequencer (Sequencer). Even if a user does not verify all their own transactions, other users will help to verify.

14/ The best part is that once enough ethereum apps are running on Optimism's layer 2 network, most users will spend most of their time staying on L2 and not needing to go back to L1 (unless there is a dispute that needs to be resolved , or the user has withdrawal requirements).

15/ Seeing this, readers may feel that this will invalidate Ethereum L1. However, in fact, this will further expand the ecosystem of Ethereum, and Ethereum will be able to support new applications with higher throughput, which cannot be achieved according to the current network capacity.

16/ Another cool thing about Optimism is that it has "account abstraction". In other words, each account is a "contract" account that can be changed, so various transaction conditions can be realized, such as multi-signature or other gas payment methods.

17/ What is the current application of Optimism? First, Synthetix is ​​now running Optimism on a private mainnet. Once implemented, Synthetix plans to fully move its staking and mining functions to L2, while keeping trading functions on both L1 and L2

18/ @Uniswap ran a gamified proof of concept (Unipig) using Optimistic Rollups on Oct 19th, and Uniswap will be their first users once Optimism goes live on mainnet. @chainlink also announced its partnership with Optimism, @coinbase wallet added native support for Optimism testnet …

19/ @compoundfinance is expected to support Optimism (not yet confirmed), and @RariCapital will also integrate Optimism in their platform. Many more projects will join in the future, which will have a significant impact on Ethereum network speed and transaction fees.

20/ What this means to us: Synthetix tests show that after using Optimism, the gas fee can be reduced by up to 143 times, and the transaction confirmation time can be as low as 200 milliseconds; while the Unipig test shows that the gas fee can be reduced by up to 100 times, and the transaction confirmation time can be as low as 200 milliseconds. as low as 169 ms.

21/ Optimistic Rollups are also very suitable for the Ethereum 2.0 ecosystem. Because Ethereum 2.0 will first launch the data expansion plan, and then launch the calculation expansion plan. In the early days, Rollup will first guarantee scalability in computing and coexist with Ethereum 2.0.

22/ Optimistic Rollups are also very suitable for the Ethereum 2.0 ecosystem. Because Ethereum 2.0 will first launch the data expansion plan, and then launch the calculation expansion plan. In the early days, Rollup will first guarantee scalability in computing and coexist with Ethereum 2.0.

23/ One final cool idea from the Optimism team is to use MEVA (i.e. Miner Extractable Value Auction) to select sequencers. Karl posted an article on ethresear.ch"MEV Auction: Solving the MEV Problem by Auctioning Transaction Sequence Rights"to explain this

24/ Finally some other links:

• Introduction to Optimistic Rollup:

https://medium.com/plasma-group/ethereum-smart-contracts-in-l2-optimistic-rollup-2c1cef2ec537

• Video introduction to Optimism by @kelvinfichter:

https://www.youtube.com/watch?v=eYeOW4ePgZE

• Blockcrunch podcast with guest @kevinjho:

https://blockcrunch.libsyn.com/is-plasma-dead-the-rise-of-optimistic-rollups-on-ethereum-kevin-ho-optimism-ep-97

ECN's translation work aims to deliver high-quality information and learning resources for the Chinese Ethereum community. The copyright of the article belongs to the original author, and the source of the original text and the ETH Chinese website must be indicated when reprinting. For long-term reprinting, please contact eth@ecn.co for authorization.

https://t.co/5ImnwsRFPI?amp=1

Original link:https://twitter.com/0xRafi/status/1366864714664402947

ECN's translation work aims to deliver high-quality information and learning resources for the Chinese Ethereum community. The copyright of the article belongs to the original author, and the source of the original text and the ETH Chinese website must be indicated when reprinting. For long-term reprinting, please contact eth@ecn.co for authorization.

ECN以太坊中国
作者文库