What will happen after Eth2 is finalized?

One of the basic attributes of the blockchain is “finality”, which roughly means that after a certain period of time, the transaction that is packaged into the authority chain is extremely difficult, and it is almost impossible to roll back. Eth2 there is agreement on a “clear” mechanism is the ultimate certainty about the chain, it is different now PoW mechanisms Bitcoin and Ethernet Square “probabilistic” final certainty.

In the proof of work, consensus is fundamentally a global competition, in which the lucky miners who are the first to dig a valid block win—the competition method is to find a mathematical solution for calculating the difficulty of the problem. Therefore, the block time is probabilistic. The more blocks are packaged on the blockchain, the harder it is to roll back, because each block represents the cumulative sum of power and computing power required to build a block. Since there is a real physical guarantee to prevent attackers from being able to roll back today’s Bitcoin and Ethereum blockchains, we can regard transactions over a certain period of time as “finalized.”

However, the Ethereum of the proof-of-stake mechanism does not operate based on probabilistic finalization. On the contrary, it clearly stipulates the final determination in the agreement-“If more than two-thirds of the validators voted for the blockchain head correctly, after a long period of time, we think that this particular checkpoint is before All of the transactions have been finalized.” The final certainty is clear, and nodes following the protocol will not be able to roll back the final checkpoint (checkpoint), because regardless of the consensus weight, this is fundamentally impossible.

What is the mechanism of finality in Eth2?

Eth2 is a synchronization protocol that uses a “checkpoint” mechanism for accounting. Essentially, a set of validators is assigned to a window with 32 slots to perform the responsibility of generating blocks or voting on blocks. Among them, each slot is 12 seconds, and 32 slots constitute an epoch. In an epoch, 32 verifiers are assigned to act as block proposers, and other verifiers act as attesters. They must vote for the proposed block in each epoch.

Only one block proposer will be assigned to each slot, but there will be multiple “provers”

For example, Alice was selected as the block proposer in slot 4, and Bob, James, Charlie, and Susan were all selected as the provers, which means that they all vote for the authoritative block proposed by Alice.

Eth2 uses Casper’s proof-of-stake consensus, especially the “finality gadget” in it. The finalized process of Eth2 is defined as follows:

1. If in an epoch, more than 2/3 of the validators vote for the blockchain head correctly, we say that the latest epoch is justified.

2. If two consecutive epochs are certified, then current_epoch - 2(current epoch-2) is considered to be finalized.

In normal operation, the purpose of the chain is to always be finalized. If there are more than 4 epochs after the finalized epoch, then all verifiers will start to be punished to incentivize quick recovery of the finalized work.

What will happen at the end of the epoch?

At the end of the epoch of eth2, the state transition function performs an important accounting function to figure out what exactly happened at the consensus layer during this time period and prepare for the next epoch. The validators will be shuffled every epoch and new tasks will be assigned. Unless there is a chain reorganization, we can know the tasks we have assigned two epochs in advance.

In the epoch transition, we will count all the votes at the head of the chain. The validator uses the “effective balance” to vote, denominated in gwei. When talking about eth2, we usually mention the validator participation rate, which is defined as the ratio of the total gwei pledged by the blockchain head for correct voting to the total gwei pledged by all active validators in an epoch.

What does it mean to determine a newly finalized checkpoint?

In Eth2, it is very important to determine a final checkpoint, because many clearly defined things in the agreement are bounded by it. That is, before the checkpoint is finalized, all messages received through p2p gossipsub will be ignored and discarded. In addition, the following is what happens at a newly finalized checkpoint of eth2:

  • All information passed into gossipsub before the newly finalized checkpoint will be ignored
  • The update of the fork selection rule only recognizes votes from the final checkpoint. This means that it is impossible for nodes following the protocol to roll back the final checkpoint.
  • The data stored before the final checkpoint can be pruned without security issues

Incentive and reorganization

Protocol rewards have a strong incentive mechanism for maintaining what we call “chain activity”. Since the mainnet of Eth2 was activated on December 1, 2020, the chain has been perfectly active, especially since each epoch was finally finalized as expected. The participation rate of the chain, that is , the percentage of ETH pledged by the correct voting of the blockchain head to the pledge amount of all active validators, has been maintained at a high level of over 90%.

What will happen after Eth2 is finalized?

Data source: https://beaconcha.in

Unless most of the pledgers are offline, or there are serious loopholes in the client implementation used by multiple people, the incentive mechanism will always support the finalization current_epoch - 2. Given that in eth2, the epoch duration is 6.4 minutes, that is, the epoch 12.8 minutes ago should always be finalized.

Regarding MEV, we certainly haven’t seen a reorganization of more than 12.8 minutes in the blockchain. So, is it possible for us to obtain a probability estimate of the final certainty of the transaction through the data of the beacon chain itself?

MEV

Each block in Eth2 contains metadata about consensus, that is, each block contains the following information:

  • New validator joining the beacon chain (validator deposit of eth1)
  • Attenstation, which is the vote of other verifiers on the previous block on the chain
  • Proof that the verifier wants to withdraw from their duties
  • Proof of the verifier’s confiscated and forced expulsion

For our purposes, the most important thing is proof. Since each slot will produce a block, the time is exactly 12 seconds. For each block we receive, we can calculate the percentage of ETH pledged by validators who have voted correctly on the head of the blockchain so far as the percentage of ETH pledged by all active validators. For example, if we have received more than 2/3 of the votes before the end of an epoch, and more than 2/3 of the validators have voted correctly in the previous epoch, we can be fairly certain that the final certainty of the chain will soon be able to Reached. In other words, we can have confidence in this result 6.4 minutes before the final certainty is reached.

Although this kind of “confidence” is very useful, if there are enough voting rights on the fork of the authority chain, reorganization within 1 or even 2 epochs is still possible. As far as we have observed, small forks with a large amount of voting power on Eth2 are very rare, and have never happened on the current chain.

Questions about MEV: How long will it take us to know the finality and make it work for MEV-geth?

A philosophical discussion of finality

Can a node violate the agreement?

Final certainty, in the final analysis, is an abstract concept implemented by social consensus on the rules of the agreement. An honest assumption is that the node is indeed following the protocol. This means that even if some misbehaving nodes try to modify their client software to ignore the rules about finality, it will not affect the entire network because all other nodes will follow the protocol.

The decision to reorganize the fork selection starts from the latest finalized epoch, unless the vast majority of nodes violate the agreement, otherwise the reorganization is impossible.

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/what-will-happen-after-eth2-is-finalized/
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 2021-09-18 15:14
Next 2021-09-18 15:15

Related articles