Ouyi Research Institute: Research Report on Ethereum 2.0 Scheme and Progress

Recently, Ethereum developer Marius van der Wijden said on social platforms that he is currently testing the PoS mechanism on Ethereum and will conduct the first shadow fork of the main network. This means that the Ethereum “merger” is coming, a key milestone on the Ethereum 2.0 scalability blueprint, when the entire Ethereum network will transition to a PoS consensus mechanism.

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

With the “merger” approaching, the pace of Ethereum 2.0 has also progressed. It strives to make the application of blockchain faster and cheaper without sacrificing the principle of decentralization. The specific scheme and process have once again become a topic of keen attention. So what exactly is Ethereum 2.0? What upgrades are included? How is the progress so far? What impact will its arrival have on the development of the industry? Ouyi Research Institute will give a detailed explanation of Ethereum 2.0 from three parts: Ethereum 2.0 technical progress, Ethereum 2.0 plan, outlook and risks.

Note: In order to welcome the arrival of the merger, the Ethereum Foundation previously announced that Ethereum is also facing a change in positioning while upgrading the protocol. At the end of 2021, core developers have stopped using the terms Eth1.0 and Eth2.0, respectively using the terms Eth1.0 and Eth2.0. “Execution layer” and “Consensus layer” instead. However, the name change has not affected the established upgrade route of Ethereum. Because the name of Ethereum 2.0 has been deeply rooted in the hearts of the people, this article will continue to use the name “Ethereum 2.0”.

1. Technical progress of Ethereum 2.0

1.1 Route planning

Since its establishment, Ethereum has firmly occupied the position of the first public chain and has the largest developer community in the world. The number of DAPPs is far behind other public chains. But even this premier status doesn’t mean you can sit back and relax. Ethereum, which is positioned as a “world computer”, can currently only process about 20 transactions per second, and it is difficult to support even an ordinary-scale commercial application. The high gas fees and waiting for packaged transactions caused by frequent congestion events make it even more difficult for users. The experience has become poor, which has largely limited the development of Ethereum.

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.

Ethereum’s goal is to become a distributed finance and smart contract execution platform, “a real world computer”. In order to achieve the goal of the world computer, at the beginning of its birth in 2014, 4 development stages were set: Frontier (frontier), Homestead (home), Metropolis (metropolis), Serenity (quiet). The first three stages all adopt the PoW model, and the fourth stage “Quiet” is the final form of Ethereum, which is what we often call Ethereum 2.0.

So far, the first three stages of Ethereum have been completed, and the fourth stage of development work is underway. During this period, the transformation from PoW to PoS, as well as important upgrades such as sharding and replacing EVM by eWASM, will be completed. The performance of the workshop will be greatly improved.

Of course, the fourth stage cannot be achieved overnight and will be upgraded in stages. According to its latest roadmap, the main nodes of the fourth phase of Ethereum’s upgrade are the launch of the beacon chain in Q3 in 2021, the “merger” in 2022, and the sharding that will be implemented after that. 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 enters a PoW+PoS mixed mining system. stage, to pave the way for the entire network to transition to PoS.

0zNvAb8VHLPlkj99zWf377TmdnB1NUTj6gssp3hE.png

(The latest roadmap for the Ethereum upgrade)

As of April 12, the beacon chain is running smoothly. On-chain data shows that the beacon chain already has 341,300 nodes, with a cumulative total pledge of about 10,904,600 Eth, of which the effective voting participation rate is 99.84%. Since October 15, 2021, the number of nodes and the total amount of staking have grown steadily, and the daily validator income has also been slowly increasing.

gqa3yQ6nIqccuYO0cq2kRtbebHVCWubU6cNMG9ur.png

(Beacon chain block data, the picture comes from https://beaconscan.com/)

1.2 The “merger” is coming

Next, Ethereum is scheduled for a “merger” in the second quarter of 2022. 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. The unlocking will take place in the first hard fork after the merger. This means that before unlocking, neither the additional ETH issued by PoS can release the circulation, and the way of additional issuance through PoW has stopped, and Ethereum has entered a 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 sharding in the subsequent upgrade to effectively improve the scalability of Ethereum.

2. Ethereum 2.0 solution

2.1 Ethereum 2.0 Architecture Model

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 function 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. Through Casper consensus coordination and management of all independent parallel shard chains, it is responsible for randomly assigning validators to shard chains, which plays a crucial role in the security of the entire system. Cross-shard communication is achieved through cross-linking as the anchor point of each shard, and the current state of each shard is tracked to provide finality guarantee for Ethereum.

3. Shard Chains is a shard chain, and Ethereum 2.0 is the source of scalability. The current plan is to establish 64 shard chains, and each shard has a set of verifier committees responsible for packaging and verifying blocks. It can achieve a significant 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 the operation of smart contracts and drives the operation of the entire 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 normal browsers, allowing users to access dApps without extensions.

jEyIlrua2uIsLHtSull23ZOnvThBJm0iv6GU6jbZ.png

(Ethereum 2.0 Architecture Model)

2.2 Key Solutions

The blockchain has a famous impossible triangle problem, that is, the blockchain system cannot be optimal in terms of scalability, security, and decentralization at the same time. A trade-off makes optimization tradeoffs. Even if BCH expands the block size, the effect of efficiency improvement is very limited. EOS sacrifices decentralization through DPoS consensus to ensure performance, but it leads 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 practical commercial applications in terms of scalability, transaction efficiency, and security performance.

Ethereum, which is positioned as the bottom 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, the node threshold is lowered, more users are supported to participate, and the problem of decentralization is solved;

The security problems introduced by sharding and PoS are solved through the beacon chain and Casper consensus mechanism.

rQUPOxvaNEUkIpDq6WIgEMYoiKyhWZRv5Iqu1dET.png

(The specific solution of Ethereum 2.0 to solve the impossible triangle problem, the picture comes from Ouyi Research Institute)

2.2.1 Solving Performance Problems – Shards

Shards – Improve network performance and capacity

Sharding is the best solution for blockchain expansion. It can greatly improve 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 after the comparison results of all nodes are consistent. The entire network is severely limited 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 shards is n, the workload that each node needs to undertake is 1/n of the workload of the entire network. Therefore, each shard 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.

A6E6VWv6e66vSKPfj1TU3pZxdlO1fjTk3XmMnPVu.png

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

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

Consensus mechanism PoW to PoS – lowering the node threshold and supporting more users to participate

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. By adopting the PoS mechanism, Ethereum can effectively reduce the entry threshold for validating nodes. Any user who pledges 32 Eth will have the opportunity to enter the verifier committee. The block verifier and block proposer are selected by the random algorithm of the beacon chain, and there is no 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 generation process, which greatly simplifies the work of the PoW consensus node.

In this way, the requirements for hardware devices of Ethereum network nodes are greatly reduced, allowing more users to participate. The more nodes participating in the verification, the more decentralized and decentralized the Ethereum network will be, and it will be more secure in the face of attacks. At the same time, it also solves the problem of resource waste caused by PoW requiring a lot of computing power.

MhjqAJTqLwT8EVhH1YfkbrWh8e7FDXiqhtwEX3vj.png

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

2.2.3 Solving security problems – beacon chain, Casper consensus mechanism

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

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

Unlike ordinary blockchains, beacon chains use Slots and Epochs instead of “blocks” as the basic time unit.

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

Epoch (period): The time period composed of multiple Slots (currently 32) is 6.4 minutes. The nodes of the validator committee will be shuffled and redistributed after each epoch, and their reward and punishment amounts are also determined after each epoch. The last Slot in the Epoch is called Checkpoint.

G7CGPTIzKV2SS88ELJGlrQ9hcWu0upQIoIhLtWPn.png

(Slot and Epoch diagram, the picture comes from “Block Output and Confirmation”)

Randomly assign validators to the system to solve the problem of sharding 51% attack

The randomness in the block production 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 easily malicious. Miners control. Therefore, for a sharding system, good randomness is required to prevent specific shards from being attacked individually, and the beacon chain is responsible for providing this randomness to the system. It randomly selects verification for each shard. committee.

The Validator Committee is a group of validators randomly selected by the Beacon Chain and is responsible for witnessing the blocks generated by the Beacon Chain and each shard. The beacon chain has its corresponding committee, and each shard also has a set of validator committees. The committees are responsible for ensuring the security and integrity of the shards they are on, and are responsible for proving the state of the shards on the beacon chain.

In each slot, the beacon chain randomly selects a validator for the chain in the validator committee to be responsible for producing a block, and a certain number of other validators check the block and verify the correctness. When the next block is generated, a verification node is randomly selected from the committee to propose a block generation, and another set of verification nodes is replaced 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 verifier committee for the next Epoch for each shard. With the help of the random number generation algorithm, the verification node election process fundamentally avoids the collusion between the verification nodes and improves the security of the protocol.

Cross-shard communication to solve the problem of double-spend attack between shards

A double-spending attack refers to sending the same funds to two or more people respectively. There is also a double-spending problem in sharding. An attacker can completely try to send the same funds to accounts in different shards to implement a double-spending attack, which requires good cross-shard communication to avoid double-spending attacks.

Cross-shard communication needs to be completed with the help of the beacon chain. The shard communicates directly with the beacon chain. The beacon chain will update the block headers of all shards synchronously as verification information, and different shards can communicate through the beacon chain. When a beacon chain block is complete, the corresponding shard block is considered final, and the remaining 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 the double-spending problem.

Specifically: when shard 1 sends a message to shard 2, shard 1 will pack the relevant information into its block header. Wait for the beacon chain to pack 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 includes the block header of shard 1. After this, shard 2 will verify the information about shard 1 and then start to perform related operations, and send the completed block information to the beacon chain.

y9KXLWhM9RFHBrX7yE6OP1QkoAf2kYILGHD05GdP.png

(Cross-shard communication process, the picture comes from Ouyi Research Institute)

2) Consensus mechanism Casper – solves the problems of harmless attack, long-range attack and simple attack, and regulates node behavior with reward and punishment mechanism

Casper is the core consensus protocol of Ethereum 2.0, responsible for managing system nodes and imposing rewards and penalties on validators.

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

Because PoS has the problem of “no benefit attack”, that is, under the PoS mechanism, malicious node validators can stake their coins on the forked chain to promote a hard fork without any loss. Therefore, the token holder needs to pledge a certain amount of Eth (currently 32Eth) to the beacon chain to apply for becoming a node, and only after being marked as “active” can the protocol run.

At the same time, the beacon chain also tracks and manages validating nodes. Nodes will receive an Ethereum system reward proportional to the Token they hold for each block they successfully pack. Nodes are responsible for producing blocks, validating blocks, and needing to be online all the time to complete the tasks assigned to them by the system. If a majority of validators reject the blocks they build, nodes will risk losing their staked tokens; if validators fail to fulfill their responsibility to vote for the block, their staked Eth will also be slashed; if validator balances decrease If it reaches the verification threshold, it will be kicked out of the verification node pool and cannot continue to participate in verification work. Thus, Casper forces validators to act honestly and adhere to consensus rules through a system of rewards and punishments.

Ensure the finality of the chain and avoid PoS long-range attacks and 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. A simple attack refers to an attack in which the forked chain creates as many blocks as possible in a 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 history catch up with the original main chain in a short time. The main chain is usurped.

Ethereum will achieve chain finality through a checkpoint every epoch cycle to avoid such risks. Specifically, Ethereum sets the first Slot block in each Epoch as a checkpoint. Validators participating in the consensus vote on checkpoints. When the checkpoint receives 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 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 subversion, and there is no need to Subsequent miners add security to confirmed blocks.

NnD9BYf42D2dxrLojmIwITkHz0oAIuyuT4bHoRdh.png

(Checkpoint, the picture comes from Ouyi Research Institute)

3. Outlook and Risks

3.1 Outlook

3.1.1 Lay a position in the industry

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 the upgrade, faster transaction speed, and better developer experience and higher accessibility of eWASM, Ethereum will become an irreversible existence in the public chain field.

3.1.2 Promote ecological prosperity

Limited by the performance bottleneck of the underlying public chain, the current blockchain cannot serve physical applications, and Dapps with more than 10 million monthly active users have not yet appeared. If Ethereum 2.0 is successfully implemented, it can support large-scale commercial applications. At that time, the public chain will definitely be empowered to entities, boosting the take-off of Web3, and the emergence of tens of millions of user-level Dapps.

3.2 Risk

3.2.1 Landing risk

The development of Ethereum 2.0 is relatively difficult. Although the framework of Ethereum has been determined, many details are still being discussed and revised, and there is a risk of landing. It can be seen from the architecture diagram that several major technological innovations are required to complete Ethereum 2.0, and the realization of smart contract sharding and state sharding itself is extremely difficult to design and develop. Transition and compatibility further increase the difficulty of implementation. As a platform that has been developing for several years, the code structure of Ethereum has become very complex, and it is difficult to modify the bottom layer. The modification of the original structure will affect the whole body, and many factors need to be considered.

3.2.2 Competitive risk

According to the public chain TVL comparison data, although the Ethereum public chain still ranks first with 55.4% of the pie chart on the left, the area chart on the right can clearly reflect that the TVL ratio on Ethereum is declining and is being used by other Public chain cannibalization.

B8Flc8dLDK4kGT1krtoE9Dduel36IpMxlHJePKa8.png

(Public chain TVL picture, the picture comes from defillama)

Many public chains are committed to solving the expansion and performance problems currently faced by Ethereum. Most of them are compatible with Ethereum code at the smart contract layer, which can allow developers to transfer to their own public chains in the fastest and most convenient way. Therefore, Ethereum The competitive pressure faced is very great. 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 has grown rapidly. The time left for Ethereum 2.0 is urgent.

Author: Ou Yi researcher Xiuxiu Shirley

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 the Ethereum Upgrade: Understanding the Latest Roadmap and Dispelling Misconceptions about Merge-to-PoS

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/ouyi-research-institute-research-report-on-ethereum-2-0-scheme-and-progress/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2022-04-29 21:35
Next 2022-04-29 21:40

Related articles