Ouyi Research Institute: Ethereum 2.0 program and progress research report
欧易OKX
2022-04-30 07:00
本文约6724字,阅读全文需要约27分钟
Ethereum 2.0's technical progress, proposals, prospects and risks.

Foreword:

Foreword:

merge"merge"merge"merge"It is a key milestone on the scalable blueprint of Ethereum 2.0, when the entire network of Ethereum will transition to the PoS consensus mechanism.

In addition, Dapplion, the core developer of Ethereum 2.0, stated on his social account that the shadow fork test of the Ethereum mainnet will be conducted again this Saturday.

merge"merge"As it approaches, the footsteps of Ethereum 2.0 have also gone a step further. It strives to make the application of blockchain faster and cheaper without sacrificing the principle of decentralization. The specific plan and process have once again become a topic of keen concern. So what exactly is Ethereum 2.0? What upgrades are included? How is it going? What impact will its arrival have on the development of the industry? Ouyi Research Institute will explain Ethereum 2.0 in detail from three parts: Ethereum 2.0 technical progress, Ethereum 2.0 plan, outlook and risks.

consensus layer"executive layer"and"consensus layer"to replace. However, the name change did not affect the established upgrade route of Ethereum, because the title of Ethereum 2.0 has been deeply rooted in the hearts of the people, and this article will still use it"Ethereum 2.0"first level title

secondary title

1.1 Route Planning

Since its establishment, Ethereum has firmly occupied the position of the first public chain, has the world's largest developer community, and the number of DAPPs is far behind other public chains. But even such a premier status does not mean that you can sit back and relax. Located at"world computer"The current Ethereum can only process about 20 transactions per second, and it is even difficult to support an ordinary-scale commercial application. The high gas fees caused by frequent congestion events and waiting for packaged transactions make the user experience even worse. This limits the development of Ethereum to a large extent.

Ethereum 2.0 is an established plan to solve the current network performance bottleneck of Ethereum. It is committed to greatly improving the scalability and performance of the Ethereum network without reducing decentralization, so as to better carry decentralized applications. Promote the explosion of industry applications.

The goal of Ethereum is to become a distributed financial and smart contract execution platform, becoming"a real world computer". In order to achieve the goal of the world's computer, at the beginning of its birth in 2014, it set four development stages: Frontier (frontier), Homestead (home), Metropolis (metropolis), Serenity (tranquility). The first three stages all adopt PoW mode, and the fourth stage"peaceful"It is the final form of Ethereum, which is what we often call Ethereum 2.0.

So far, the first three phases of Ethereum have been completed, and the development of the fourth phase is underway. During this period, the conversion from PoW to PoS, as well as important upgrades such as sharding and eWASM instead of EVM will be completed. After the upgrade is completed, the Ethereum The performance of the square will be greatly improved.

merge"merge"image description

(The latest roadmap for Ethereum upgrades)

As of April 12, the beacon chain is running smoothly. Data on the chain shows that the Beacon Chain already has 341,300 nodes, with a cumulative total of about 10.9046 million pledgedEthimage description

merge

1.2"merge"advent

merge"merge". The consensus layer (PoS beacon chain) will be merged with the execution layer (PoW original chain), and the PoW part of the original chain will be stopped. This upgrade represents the official switch of Ethereum to PoS consensus.

first level title

secondary title

2.1 Architecture Model of Ethereum 2.0

From top to bottom in the Ethereum 2.0 scheme model diagram are:

1. PoW Main Chain is the original Ethereum main network. In Ethereum 2.0, it will continue to operate as a shard of the beacon chain.

2. Beacon Chain is the beacon chain, which is the central part of the entire Ethereum 2.0 system. The Casper consensus coordinates and manages all independent and parallel shard chains, and is responsible for randomly assigning verifiers to the shard chains, which plays a vital role in the security of the entire system. Cross-linking is used as the anchor point of each shard to realize cross-shard communication, and track the current state of each shard, providing finality guarantee for Ethereum.

3. Shard Chains are shard chains, and Ethereum 2.0 is the source of scalability. The current plan is to establish 64 shard chains, and each shard has a group of validator committees responsible for packaging and verifying blocks. It can achieve a substantial increase in network performance and capacity without increasing node hardware requirements and without reducing the degree of decentralization.

image description

secondary title

2.2 Key Solutions

The blockchain has a famous impossible triangle problem, that is, the blockchain system cannot be optimal in terms of the three indicators of scalability, security, and decentralization at the same time. A trade-off for optimization trade-offs. Even if BCH expands the block size, the effect of improving efficiency is very limited. EOS sacrifices decentralization through the DPoS consensus to ensure performance, but it has caused people to worry about security issues. Various solutions cannot perfectly solve the impossible triangle problem. At present, the public chain cannot meet the needs of actual commercial applications in terms of scalability, transaction efficiency, and security performance.

Ethereum, positioned on the underlying platform of the next generation distributed society, proposes the following solutions to the impossible triangle problem:

Improve network performance and capacity through sharding, and solve performance problems;

Through the consensus mechanism PoW to PoS, lower the node threshold, support more user participation, and solve the problem of decentralization;

image description

(Ethereum 2.0's specific solution to the impossible triangle problem, the picture comes from Ouyi Research Institute)

2.2.1 Solve performance problems - Shards

Shards - Improve network performance and capacity

image description

(Sharding physical space diagram, the picture comes from TokenInsight "Sharding Technology Research Report")

2.2.2 Solve the problem of decentralization - consensus mechanism PoW to PoS

Consensus mechanism PoW to PoS——reduce the node threshold and support more user participation

Under the PoW mechanism, the threshold for becoming a verification node is high, requiring expensive professional mining machines to generate enough computing power to compete with peers. Using the PoS mechanism, Ethereum can effectively reduce the entry threshold for verification nodes. Any user who pledges 32 Eths will have the opportunity to join the validator committee, which selects block verifiers and block proposers by the random algorithm of the beacon chain, and does not need to compete for computing power. Among them, the block proposer packages the transaction to propose a new block, and the other block verifier checks the new block, and finally cooperates to complete the block production process, which greatly simplifies the work of the PoW consensus node.

image description

(Node block production process, the picture comes from Ouyi Research Institute)

2.2.3 Solving Security Issues - Beacon Chain, Casper Consensus Mechanism

The introduction of sharding and PoS consensus mechanism has added new security challenges to Ethereum. For example, the single-shard 51% attack problem caused by sharding, the double-spend attack problem between shards, and the harmless attack problem, long-range attack problem, and simple attack problem caused by the PoS consensus mechanism. Ethereum bridges these two types of risks and solves security issues through the beacon chain and the consensus mechanism Casper.

1) Beacon Chain - Solve the problem of 51% attack on shards and double-spending attacks between shards

Unlike ordinary blockchains, the beacon chain is based on Slot and Epoch instead of"block"as the basic unit of time.

Slot (time slot): In the future, each shard in Ethereum will have a validator committee that verifies the block. The time for the validator committee to complete a block confirmation (currently 12 seconds) is divided into block proposal and zone Block verification is two steps. If a consensus can be reached within the validator committee, the Slot can successfully generate a block, otherwise the Slot cannot generate a block, forming a"jump over"Slot, so the block generation speed on the chain is uncertain.

image description

(Illustration of Slot and Epoch, the picture comes from "Block Output and Confirmation")

Randomly assign verifiers to the system to solve the problem of fragmentation 51% attack

The randomness in the block generation process of the blockchain system is crucial. It must be distributed, verifiable, unpredictable, and inalienable. For the public chain, when the tasks of the entire network are divided into different shards, the computing power is also divided into the corresponding shards. For a single shard, only the original 1/n computing power guarantee can be obtained. At this time, the difficulty of launching a 51% attack on a single shard will also be reduced to the original 1/n, which will make the shard more vulnerable to malicious Miners take control. Therefore, for a sharding system, good randomness is needed to prevent specific shards from being attacked individually, and the beacon chain is responsible for providing this randomness to the system, and it will randomly select verification points for each shard. committee.

The validator committee is a group of verification nodes randomly selected by the beacon chain, responsible for witnessing the blocks generated by the beacon chain and each shard. The beacon chain has its own committee, and each shard has its own committee of validators. Committees are responsible for ensuring the security and integrity of the shards they reside in, and for attesting to the state of shards on the beacon chain.

In each Slot, the beacon chain will randomly select a validator for the chain in the validator committee to be responsible for producing a block, and a certain number of other validators will check the block and verify its correctness. When the next block is generated, a verification node is randomly selected from the committee to propose to generate a block, and another group of different verification nodes is used to verify the correctness.

After completing the block generation and verification tasks of an Epoch, the beacon chain will reshuffle all the verification nodes, and randomly select a new validator committee for the next Epoch for each shard. With the help of the random number generation algorithm, the election process of verification nodes fundamentally avoids collusion among verification nodes and improves the security of the protocol.

Cross-shard communication to solve the problem of double-spending attacks between shards

A double-spending attack refers to sending the same fund to two or more people. There is also a double-spend problem in shards. Attackers can try to send the same fund to accounts in different shards to implement double-spend attacks. This requires cross-shard communication to avoid double-spend attacks.

Cross-shard communication needs to be completed with the help of the beacon chain. Shards communicate directly with the beacon chain. The beacon chain will synchronously update the block headers of all shards as verification information, and different shards can communicate through the beacon chain. When a beacon chain block is finalized, the corresponding shard block is considered finalized, and the rest of the shards can rely on it for cross-shard transactions. As a hub, the beacon chain can record the status and information of all shards to avoid double spending problems.

image description

(The process of cross-shard communication, the picture comes from Ouyi Research Institute)

2) Consensus mechanism Casper - solve the problems of harmless attacks, long-range attacks, and simple attacks, and regulate node behavior with reward and punishment mechanism

Casper is the core consensus protocol of Ethereum 2.0, which is responsible for managing system nodes and rewarding and punishing verifiers.

Solve the problem of PoS harmless attack through node pledge, and regulate node behavior with reward and punishment mechanism

Since PoS exists"harmless attack"The problem is that under the PoS mechanism, malicious node verifiers can bet their coins on the forked chain to promote hard forks without any loss. Therefore, the holder needs to mortgage a certain amount of Eth (currently 32Eth) to the beacon chain to apply to become a node. When it is marked as"active"After that, the protocol can be run.

At the same time, the beacon chain will also track and manage the verification nodes. Every time nodes successfully package a block, they will receive an Ethereum system reward proportional to the Token they hold. Nodes are responsible for generating blocks, verifying blocks, and need to be online all the time to complete the tasks assigned to them by the system. If the majority of verifiers reject the block they created, the node will face the risk of losing the mortgage token; if the verifier fails to fulfill the responsibility of voting for the block, their pledged Eth will also be confiscated; if the balance of the verification node decreases If it falls below the verification threshold, it will be kicked out of the verification node pool and cannot continue to participate in the verification work. Therefore, Casper forces validators to act honestly and abide by consensus rules through a system of rewards and punishments.

Ensure the finality of the chain, avoid PoS long-range attacks, simple attacks

Long-range attack refers to starting from the genesis block, creating a chain longer than the original main chain, and tampering with the transaction history to replace the original main chain. Simple attack refers to the attack formed by the fork chain creating as many blocks as possible in unit time, so as to exceed the length of the original main chain. Compared with PoW, PoS does not have a mechanism for forcing a delay between two blocks. The attacker can make the chain that rewrites the history catch up with the original main chain in a short time. If it is determined according to the principle of the longest chain, it is very likely that a real The main chain is usurped.

image description

first level title

secondary title

3.1 Outlook

3.1.1 Establish industry status

If Ethereum 2.0 is successfully implemented, it will completely solve the performance bottleneck of Ethereum. With its current largest ecological scale, lower gas fees and faster transaction speed after the upgrade, coupled with eWASM's better developer experience and higher accessibility, Ethereum will become an undisrupted existence in the public chain field.

3.1.2 Promoting ecological prosperity

secondary title

3.2 Risk

3.2.1 Landing risk

The development of Ethereum 2.0 is more difficult. Although the framework of Ethereum has been determined, many details are still being discussed and revised, and there are risks of implementation. It can be seen from the architecture diagram that the completion of Ethereum 2.0 requires several major technological innovations. The realization of smart contract sharding and state sharding itself is extremely difficult to design and develop. In addition, it is necessary to consider the integration with the original chain. Transition and compatibility further increase the difficulty of implementation. As a platform that has been developed for several years, the code structure of Ethereum has become very complicated. The bottom layer is heavy and it is difficult to modify it. The modification of the original structure will affect the whole body. Many factors need to be considered.

3.2.2 Competition Risk

image description

(TVL diagram of the public chain, the picture comes from defillama)

Reference article:

Reference article:

TokenInsight "Sharding Technology Research Report"

Ethereum 2.0 is coming, don't you know Casper yet?

Ethereum 2.0 Series: Block Production and Confirmation

Understanding Ethereum Upgrade: Understand the latest roadmap and eliminate misunderstandings about mergers and transfers to PoS

欧易OKX
作者文库