Original title: "Ouyi Research Institute: Ethereum 2.0 Scheme and Progress Research Report"
Original author: Xiuxiu, Shirley, Ouyi Research Institute
Recently, Ethereum developer Marius van der Wijden stated on social platforms that he is currently testing the PoS mechanism on Ethereum and will conduct the first mainnet shadow fork. This means that the "merger" of Ethereum is coming, which 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, Ethereum 2.0 core developer dapplion said on his social account that this Saturday The Ethereum mainnet shadow fork test will be conducted again.
With the "merger" approaching, Ethereum 2.0 has also moved forward. 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.
Note: In order to welcome the merger, the Ethereum Foundation previously announced that Ethereum is upgrading At the same time, the protocol is also facing a change in positioning. At the end of 2021, core developers have stopped using the terms Eth1.0 and Eth2.0 and replaced them with "execution layer" and "consensus layer" respectively. However, the name change did not affect Ethereum’s established upgrade route. Because the title of Ethereum 2.0 has been deeply rooted in the hearts of the people, this article will still use the name "Ethereum 2.0".
p>
Ethereum has firmly occupied the position of the first public chain since its establishment, and has the world's largest developer community. 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. Ethereum, which is positioned as the "world computer", can only process about 20 transactions per second at present, and it is difficult to even support an ordinary-scale commercial application. Frequent congestion events cause high gas fees and waiting for packaged transactions. The experience has become very poor, which limits the development of Ethereum to a large extent.
Ethereum 2.0 is the established plan to solve the current network performance bottleneck of Ethereum, dedicated to On the premise of not reducing decentralization, the scalability and performance of the Ethereum network are greatly improved, so as to better carry decentralized applications and promote the explosion of industry applications.
The goal of Ethereum is to become a distributed financial and smart contract execution platform, to become "one The 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 the PoW model, and the fourth stage "Serenity" 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 fourth phase is in progress During this period, the conversion from PoW to PoS, as well as important upgrades such as sharding and replacing EVM with eWASM will be completed. After the upgrade is completed, the performance of Ethereum will be greatly improved.
Of course, the fourth stage cannot be accomplished overnight, and will be upgraded in stages. According to its latest roadmap, the main nodes of the fourth phase of Ethereum upgrade are the launch of the Q3 beacon chain in 2021, the "merger" in 2022, and the sharding that will be implemented later. At present, the beacon chain has been launched in December 2020. Since then, the beacon chain has started to operate in the form of PoS. The process of generating blocks at the execution layer is still carried out by the original chain in the form of PoW. Ethereum has entered a PoW+PoS hybrid mining mode. stage, paving the way for the transition of the entire network to PoS.

(Latest roadmap for Ethereum upgrade)
As of April 12, beacons The chain runs smoothly. Data on the chain shows that the Beacon Chain already has 341,300 nodes, with a cumulative total of about 10.9046 million pledged Eth, among which the effective voting participation rate reached 99.84%. Since October 15, 2021, the number of nodes and the total amount of pledges have grown steadily, and the daily income of validators is also slowly increasing.

(Beacon chain block data, picture from https://beaconscan.com/)
Next, Ethereum plans to launch its second in 2022 Quarters are "consolidated". 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.
It is worth noting that this merger will stop the PoW verification of the original chain and will not Unlock the ETH previously pledged to the beacon chain, and the unlock will be performed in the first hard fork after the merger. This means that before unlocking, there is no ETH issued by PoS to release the circulation, and it also stops the way of additional issuance through PoW, and Ethereum enters stronger deflation. In addition, this merger is only a change in the consensus of Ethereum, and cannot achieve performance improvement. Therefore, the gas fee will not change due to this upgrade. It is necessary to wait until the introduction of fragmentation in the upgrade to effectively improve the scalability of Ethereum.
p>
From top to bottom in the Ethereum 2.0 scheme model diagram are:
1. PoWMain Chain is the original Ethereum mainnet. 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. ShardChains is a shard chain, Ethereum 2.0 is the source of scalability, currently The plan is to establish 64 shard chains, and each shard has a set 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.
4. The VM layer is a virtual machine, which is the basic environment for smart contracts to run, driving The entire operation of Ethereum. Ethereum 2.0 will replace the current EVM with eWASM, which will improve the compatibility and execution efficiency of smart contracts. Because eWASM has better performance and better scalability than EVM, and can support programming languages such as Solidity, C++, Rust, AssemblyScript, etc., it will be easier to develop contracts. In addition, eWASM is also compatible with current web standards, making it easier to run in common browsers, allowing users to access dApps without extensions.

(Ethereum 2.0 Architecture Model)
The blockchain has a famous impossible triangle problem, that is, the blockchain system cannot be scalable and secure at the same time In terms of the three indicators of reliability and decentralization, it is necessary to make a trade-off between the three to optimize the 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, which is positioned as the underlying platform of the next generation distributed society, proposes an The following solutions are proposed:
Improve network performance and capacity through fragmentation and solve performance problems; < /p>
Through the consensus mechanism PoW to PoS, lower the node threshold, support more users to participate, and solve the problem of decentralization
Through the beacon chain and Casper consensus mechanism to solve the problems introduced by fragmentation and PoS Security issues.

(Ethereum 2.0's specific solution to the impossible triangle problem, the picture comes from Ouyi Research Institute)
Shards - Improve network performance and capacity
Sharding is the best solution for blockchain expansion. It can achieve a substantial increase in network performance and capacity without increasing node hardware requirements and without reducing the degree of decentralization. In physical space, sharding is to divide all nodes in the public chain network into different groups, and each group is called a shard. Originally, all nodes in the public chain have to perform the same calculation, and write the block data into the block data after the comparison results of all nodes are consistent. The entire network is severely restricted by the upper limit of the tasks that a single node in the network can handle. Now the tasks in the block are grouped and assigned to different shards for processing, and the nodes in a single shard only need to undertake part of the work of the entire network. Assuming that the number of fragments is n, the workload that each node needs to undertake is 1/n of the workload of the entire network. Therefore, each fragment can work in parallel, thereby improving the carrying capacity of the entire network. In the same way, the capacity of the entire network will also become n times the original.

(Sharding physical space diagram, picture from TokenInsight "Sharding Technology Research Report")
Consensus mechanism PoW to PoS——reduce the node threshold and support more user participation
p>
Under the PoW mechanism, the threshold for becoming a verification node is high, and expensive professional mining machines are required 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 enter the validator committee, which selects block validators 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 verifiers verify the new block, and finally cooperate to complete the block production process, which greatly simplifies the work of the PoW consensus node.
In this way, the requirements of the Ethereum network nodes for hardware devices are greatly reduced, and more User participation. The more nodes that participate in the verification, the more decentralized and decentralized the Ethereum network will be, and it will be more secure in the face of attacks, and it also solves the problem that PoW requires a lot of computing power to cause waste of resources.

(Node block production process, the picture comes from Ouyi Research Institute)
Sharding and PoS Consensus Mechanism The introduction of , adds 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 consensus mechanism Casper.
1) Beacon chain - to solve the problem of fragmentation 51% attack, fragmentation Inter-chip double spend attack problem
Different from ordinary blockchain , the beacon chain uses Slot and Epoch instead of "block" as the basic time unit.
Slot (time slot): In the future, each shard in Ethereum will have a verification The validator committee of the block, the time for the validator committee to complete a block confirmation (currently 12 seconds), is divided into two steps: block proposal and block verification. If the validator committee can reach a consensus, the Slot can successfully generate a block, otherwise the Slot cannot generate a block, forming a "skip" Slot, so the block generation speed on the chain is uncertain.
Epoch (period): the time combined by multiple Slots (currently 32) segment, 6.4 minutes. The nodes of the validator committee will be shuffled and redistributed after each Epoch, and their rewards and punishments will also be determined after each Epoch ends. The last Slot in Epoch is called Checkpoint.

(Slot and Epoch icon, the picture comes from "Block Production and Confirmation")
Randomly assign verifiers to the system to solve the problem of fragmentation 51% attack
The randomness in the process of block chain system is very important, it must be distributed, verifiable, unpredictable, and inalienable. For the public chain, while dividing the entire network tasks 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 letter The standard chain and the blocks generated by 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 be randomly assigned to the chain in the Validator Committee A verifier is selected to be responsible for producing a block, and a certain number of other verifiers 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 send all The validator reshuffles the board and randomly selects 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
Double spending attack refers to sending the same fund to two people or multiple 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, and the 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.
Specifically, when fragment 1 sends a message to fragment 2, fragment 1 will Pack relevant information into its block header. Wait for the beacon chain to package the block header of shard 1 into a new block. After the beacon chain completes the block consensus, shard 2 will receive the information broadcast by the beacon chain that contains the block header of shard 1. After that, shard 2 will verify the information about shard 1 and start to execute related operations, and send the completed block information to the beacon chain.

(Cross-shard communication process, the picture comes from Ouyi Research Institute)
2) Consensus mechanism Casper - to solve the problems of harmless attacks, long-range attacks, and simple attacks, and regulate the behavior of nodes with a 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 the behavior of nodes with reward and punishment mechanism
Because PoS has the problem of "no stake attack", that is, in Under the PoS mechanism, malicious node verifiers can stake their coins on the forked chain to promote hard forks without any loss. Therefore, the token holder needs to mortgage a certain amount of Eth (currently 32Eth) to the beacon chain to apply to become a node, and the protocol can only be run after it is marked as "active".
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
b>
Long-range attack refers to creating a A chain that is longer than the original main chain, and tampers 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.
Ethereum will achieve the finality of the chain through a checkpoint per Epoch cycle, avoiding such risks. Specifically, Ethereum sets the first Slot block in each Epoch as a checkpoint. Validators participating in consensus vote on checkpoints. When the checkpoint has received more than 2/3 of the votes, and the previous checkpoint is also a deterministic checkpoint, then this checkpoint is a deterministic checkpoint, and this block becomes deterministic and unchangeable. Therefore, a major improvement of the Casper consensus is the introduction of explicit finality. As long as the blocks before the finality checkpoint are confirmed, the block information can no longer be tampered with, there is no possibility of being subverted, and there is no need to Subsequent miners add security to already confirmed blocks.

(Checkpoint, the picture comes from Ouyi Research Institute)
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 after upgrade, faster transaction speed, better developer experience and higher accessibility of eWASM, Ethereum will become an undisrupted existence in the public chain field.
Limited by the performance bottleneck of the underlying public chain, the current blockchain cannot serve physical applications, and Dapps with more than ten million monthly active users have not yet appeared. If Ethereum 2.0 is successfully implemented, it will be able to support large-scale commercial applications. At that time, the public chain will be empowered to entities, boosting the take-off of Web3, and Dapps with tens of millions of users will also emerge.
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.
According to the public chain TVL comparison data, although the Ethereum public chain still ranks first with 55.4% in the pie chart on the left, the area on the right The graph clearly shows that the proportion of TVL on Ethereum is declining and being eroded by other public chains.

(TVL diagram of the public chain, the picture comes from defillama)
Many public chains are dedicated to solving Ethereum is currently facing expansion and performance problems. Most of them are compatible with Ethereum code at the smart contract layer, which can allow developers to transfer to their own public chain in the fastest and most convenient way. Therefore, the competitive pressure facing Ethereum is very high. Big one, if Ethereum cannot complete the upgrade in time, it will give other public chains a chance to surpass. In the high-performance public chain track, public chains such as Solana, Avalanche, and Terra compete fiercely, and the number of addresses increases rapidly. The time left for Ethereum 2.0 is urgent.
Reference article:
TokenInsight "Sharding Technology Research Report"
Ethereum 2.0 is coming, don't you know about Casper?
Ethereum 2.0 Series: Block Production and Confirmation
Understand Ethereum Upgrade : Learn about the latest roadmap and eliminate misunderstandings about the merger to PoS
This article is from a contribution and does not represent the views of Rhythm BlockBeats.
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia