• Language & Exchange Rate Switch
  • Preference Settings
    Rise/fall colour
    Start-End Time of the Change
Web3 Exchange
Gate Blog

Your Gateway to crypto news and insights

Gate.io Blog Understand The Development Direction of Ethereum: How Does The Beacon Chain PoS Mechanism Work?

Understand The Development Direction of Ethereum: How Does The Beacon Chain PoS Mechanism Work?

09 February 12:06


【TL; DR】

1. The Ethereum foundation announced recently that it will ban the terms "Ethereum 1.0" (ETH1) and Ethereum 2.0 (ETH2) and use "executive layer" and "consensus layer" respectively.

2. Slot, epoch and validator are key terms in beacon chain PoS mechanism.

3. If the beacon chain is compared to the heart of the new generation of Ethereum, the slot and epoch are the beating cycles of the heart.

4. Due to the security design of the Ethereum algorithm, this PoS consensus mechanism is considered secure.


On January 25, 2021, Vitalik Buterin, the Ethereum founder, published an article,titled Paths toward single-slot finality on ethereum.org, which introduced his latest plans for the development of Ethereum.

Understanding its development path is very important for understanding Ethereum, but there are still some conceptual problems to be resolved before reading the article released by Vitalik Buterin. After Ethereum is upgraded to the PoS mechanism, how will it generate and confirm the blocks of the beacon chain and how will it ensure its security are the questions we have researched and provided answers to.

Introduction to Ethereum Upgrade Scheme

Since the rapid growth of Ethereum's application, scalability has been a perplexing issue for Ethereum and its users. As the most popular smart contract blockchain project at present, Ethereum has a huge transaction volume, which often leads to congestion, and the handling fee remains high, which greatly affects the use experience of traders and the promotion of various projects. In order to solve the performance problem of the Ethereum network, the concepts of layer 2 and Ethereum 2.0 were born to scale Ethereum.

Ethereum 2.0 is an upgraded version of Ethereum 1.0, with the phase code "Serenity". Ethereum 1.0 uses the PoW consensus mechanism, which is the same as Bitcoin, while Ethereum 2.0 uses the PoS consensus mechanism, which is more energy-saving and efficient than the PoW mechanism. After the upgrade, Ethereum will form a "beacon chain + shard chain + layer 2" structure. The beacon chain block will directly contain transaction information. Prior to the upgrade, the content on the PoW chain will be seamlessly transferred to the beacon chain. This process is called "the Merge". After the merger, Ethereum will completely turn to the PoS consensus mechanism.

However, Ethereum 1.0 and Ethereum 2.0 are not the simple relationship between the latter and the former, which is often misunderstood and even cheated by outlaws.

As the merger approaches, the Ethereum foundation has also announced recently that it will ban the use of the terms "Ethereum 1.0" (ETH1) and Ethereum 2.0 (ETH2) and use "executive layer" and "consensus layer" respectively.

Among them, the execution layer stores all smart contracts and network rules on Ethereum, and the consensus layer is responsible for handling PoS consensus. After the merger, the two chains will be combined into one and become a complete Ethereum in the future.


The upgrade process of Ethereum will be completed step by step. In December 2020, the beacon chain (previously known as Ethereum 2.0) based on PoS mechanism was launched, and users staked ETH on it to obtain income. The upgrading of Berlin and London in 2021 adjusted the beacon chain and introduced a fee destruction mechanism to temporarily control gas fees. In 2022, the current Ethereum main network will be merged with the beacon chain, that is, the "executive layer" and "consensus layer" mentioned above and the history, status and smart contract of the original main network will be completely inherited. Sharding may occur later than the merger, and is expected to occur in 2022 or 2023.

This is mainly due to the vigorous development of layer2, which alleviates the performance pressure of Ethereum. The main purpose of sharding is to further improve the performance of Ethereum and reduce network congestion. A total of 64 shard chains will be launched at that time.

For detailed explanation of Ethereum upgrade, please refer to our previous blog post:
Endgame: Uncovering the Optimal Solution of Blockchain Scaling with Vitalik Buterin
Will Layer 2 and the Future Sharding Update to be Activated in 2022 be Ethereum’s Ultimate Solution to Boost Scalability?

Introduction to Beacon Chain PoS Mechanism: Slot, Epoch and Validator

Slot, epoch and validator mentioned in Vitalik's article are key terms in beacon chain PoS mechanism.

Beacon chain will be the core of Ethereum in the future. In addition to providing proof of stake (PoS) for the whole Ethereum and forming a consensus layer, it will also play the role of synchronization with other shard chain crosslinks. Users can then stake ETH on the beacon chain, deposit 32eth in the deposit contract account on Ethereum 1.0, and become the validator of Ethereum. These validators are "virtual miners" on Ethereum, which is particularly important for the block out of Ethereum.

If we compare the beacon chain to the heart of the new generation of Ethereum, the slot and epoch are the beating cycles of the heart. Each slot lasts for 12 seconds, and each epoch is composed of 32 slots (another version of the previous technical specification said that a single slot lasts for 6 seconds and 64 slots constitute an epoch). All shard chains need to be synchronized with the slots and epochs of the beacon chain. Therefore, each epoch lasts for approximately 6.4 minutes.


On Ethereum (Ethereum 1.0), which currently uses the PoW mechanism, the system generates a block every 15 seconds. In the future upgraded Ethereum, the time interval between each block is uncertain; however, under the PoS mechanism, for each slot, the beacon chain will randomly select a node from the validator to become a block proposer. For the shard chain, each slot will also generate a block proposer.


Additionally, in each epoch, the beacon chain will evenly distribute the validators to each slot, and then randomly select the array nodes (at least 128 in each group) from the validators of each slot to become the Committees. The Committee nodes will be responsible for attestations to the blocks generated by the beacon chain and shard chain, weighed by its balance, the validity of beacon chain blocks and shard blocks is judged by voting. If the Committee reaches a consensus on the validity of the block, the block will be confirmed on the chain, a node will be successfully output in this slot, the voting data of the certifier will be recorded on the chain, and the validator will be rewarded.

On the contrary, if no consensus is reached, the slot will be empty. In addition, if the block proposer in the slot is offline, there will also be an empty slot. Because of the existence of empty slots, the slot generated by the block is not fixed. After a whole epoch (i.e. 32 slots or approximately 6.4 minutes), the system will reselect nodes from the validators, arrange and form a validation committee again. After the shardings are officially launched, each sharding will also have its own block proposer and validation committee in each slot and epoch. After completing the validation, the members on the shard chain also need to connect the shard chain head to the beacon chain. This process is called crosslinking or creating crosslinks.


In the current PoW consensus mechanism, each node needs to validate and execute each transaction in the network, which will bring huge overhead. Relatively speaking, the PoS consensus mechanism runs faster and consumes less energy. In addition, due to the security design of Ethereum PoS algorithm, this PoS consensus mechanism is very secure. Theoretically, as long as any validator holds less than 1 / 3 of the stakes of all validators, it can ensure that the number of potential hackers in each committee is less than 1 / 3, and the system can not be hacked.

In terms of the number of nodes, because each committee needs 128 nodes to ensure security, the number of total nodes needs to reach 128 * 32 = 4096 to ensure the best security. When the number of total nodes is greater than 4096 * 2 = 8192, each slot can be allocated to two or more committees for validation.


Conclusion

The Ethereum upgrade is going to be a historic event in the field of cryptocurrency. In the next article, we will continue to discuss the development direction of Ethereum released by Vitalik.
Stay tuned!


Author: Gate.io Observer: Edward.H
Disclaimer:
* This article represents only the views of the observers and does not constitute any investment suggestions.
*Gate.io reserves all rights to this article. Reposting of the article will be permitted provided Gate.io is referenced. In all other cases, legal action will be taken due to copyright infringement.
Unbox Your Luck and Get a $6666 Prize
Register Now
Claim 20 Points now
New User Exclusive: complete 2 steps to claim Points immediately!

🔑 Register an account with Gate.io

👨‍💼 Complete KYC within 24 hours

🎁 Claim Points Rewards

Claim now
Language and Region
Exchange Rate
Go to Gate.TR?
Gate.TR is online now.
You can click and go to Gate.TR or stay at Gate.io.