Original author: Alex Koma
Original translation: Crypto Valley
Ethereum 2.0 is an upgrade of the Ethereum network and is expected to To be carried out at the end of 2020.
Once launched, Ethereum 2.0 will be a testnet for testing the Proof-of-Stake (PoS) consensus algorithm system. Most economic activities and smart contracts will continue to run on the original Ethereum network, which will continue to be a parallel system of Ethereum 2.0. The developer has realized the connection bridge for the transition from Eth1 to Eth2, but the token cannot be transferred back in the reverse direction.
What are the three phases of Ethereum 2.0 deployment?
Testnet July 2020 start. It only includes testing the new PoS consensus mechanism, so the network will be mostly test-driven, although it will use real Ethereum tokens. During this phase, the following PoS functions will be launched.
Staker Management
Staker Fund Management.
A random number generator to help select block producers and stakers.
Stakers vote on block size proposals.
Distribution of Rewards and Penalties, Rewards and Penalties for Stakers.
Initially a 64-shard Experimental network. In the absence of significant economic activity, Phase 0 aims to test the basic PoS infrastructure, while Phase 1 aims to test the basic sharding model. At this stage, 65 blockchains will be running in parallel - the beacon chain that existed at stage 0 and 64 new shards. There will also be a two-way communication and linking mechanism between the beacon chain and all 64 shards.
Assuming that at this stage, the smart contract Work will start on the network and economic activity will begin. Shards will no longer be the storage of raw data, but will start to resemble virtual machines and Ethereum 1.0 smart contracts. The specifications for the second phase are under development.
After the launch of Ethereum 2.0, there will be Two networks run in parallel - Eth1 and Eth2. Initially, Eth1 Token can be exchanged for Eth2 Token, but not vice versa, so in theory, the transaction price of Eth2 Token should be less than or equal to the value of Eth1 Token. However, in the early stages of the transition, Eth2 tokens are unlikely to be priced or supported by exchanges, as their only use will be staking. Even basic transfers will not be possible.
To transfer Eth1 to Eth2, you need to use the Eth1 Escrow Protocol. This protocol will destroy the Token on Eth1, and then the destroyed Token can be used as confirmation for the issuance of new Eth2 Token. Tokens will be permanently destroyed, but due to protocol changes caused by hard forks, Tokens can be recycled.
Token transferred to Eth2 will automatically enter the validator pool.
According to the concept of PoS, voting The "weight" and the reward amount of the verifier are determined by the pledged Token value. The Eth2 specification states that each validator must have 32 ETH. If the number of tokens received in the contract exceeds 32ETH, the verifier will not be rewarded from these additional tokens. If there are less than 32 ETH Tokens, the node will not be activated. Therefore, you need to transfer ETH to Eth2 in proportion of 32 Tokens. Each part of 32 ETH can be a separate Staker.
Eth1 will continue to operate on a PoW basis and Eth2 will continue to operate on a PoS basis.
Both sets of validators, miners, and candidate nodes will be rewarded during this period, so Ethereum's inflation rate will rise -- at least in two This was the case before the merger of the two systems.
The issuance level of Eth2 will depend on the number of tokens participating in the staking process. The annual issuance level will be based on an algorithm where Eth2 is the number of Ethereum tokens participating in the PoS validation pool (source for these numbers is an article published by Vitalik Buterin in April 2019).

p>
Source: BitMEX Research
This formula is based on the idea that the more ETH is transferred to Eth2, the more new tokens will be issued The more, but the investment income will decrease as the pledge increases. Graphical Ethereum 2.0 inflation rate.

p>
Data source: BitMEX Research
The following figure shows the inflation rate of Ethereum 2.0:

Graph source:  ;BitMEX Research
The issuance rate determines the amount of remuneration. This reward is intended to incentivize users to switch Token to Eth2. Since the success of Eth2 will reduce the demand for tokens, the rewards will be reduced proportionally. Such a model can ensure that the number of mobile tokens is sufficient to significantly increase the size of the network; however, if Eth2 is popular, then the issuance will not become too high.
Such a model seems to contradict Ethereum's original "perpetual linear expansion" plan.
A number of factors can mitigate the impact of a possible rise in inflation.
In the first stage, the incentive system is expected to include two elements: one is the basic commission for burning Token, and the other is the reward commission for Staker. Burning tokens will reduce inflation.
If a validator is unable to participate in the validation process -- for example, if a node stops working or loses connection to the network -- then the staking reward will be cancelled.
If validators violate the rules, they will be fined and the confiscated tokens will be destroyed.
These mechanisms may cause a large number of Ethereum Token to be destroyed, which may suppress the impact of high inflation.
In the future, Eth1 and Eth2 may merge back into one system in a few years. In fact, Eth1 will become a shard inside Eth2, allowing Ethereum to move bidirectionally between shards, and the two Tokens will be merged into one. Presumably, most of the economic activity currently happening on Eth1 will continue to take place inside the Eth2 shards.
The next step may be the merger of consensus systems. Eth1 shards can gradually shift to PoS.
Proof-of-Work can continue to work, but after a given number of blocks -- for example, after every 100 blocks -- the block The consensus of the blocks will determine the Proof-of-Stake. Finally, it will be possible to abandon PoW altogether: PoW block rewards will become unnecessary. This will give ethereum users and investors more certainty about the inflation schedule.

p>
PoS is the general concept of fork choice rules.
The chain with the majority of Token votes is preferred. Eth2's core voting system principles are the same as those in Ethereum's 2018 proposal, based on the idea of Casper Friendly Finalty Gadget. However, the system has been updated based on a combination of Casper Friendly Finalty Gadget and the latest Message Driven Greedy Heaviest Observed Subree Fork selection rules (Casper FFG & LMD GHOST Fork selection rules).
The voting system engine consists of the following parts. First, a large fork pool, each representing a maximum of 32 ETH (32 ETH are required to activate a fork pool, this amount can be reduced to 16 ETH, which requires deactivation). This pool does not directly vote on blocks - it is divided into committees whose members are randomly selected from among the larger pool members.
The reason for dividing into committees is that not every staker can vote for every block -- otherwise, the blockchain would contain too much voting data, which would make scaling impossible.
Additionally, committees allow you to gather voting data into controllable registers. Therefore, in these committees, a group of Stakers is randomly selected to vote.
According to the Eth2 specification, the target number of Stakers per committee is 128 (desired minimum number). The developers believe that this is a sufficiently large number of stakers to provide a possible block selection guarantee. Signatures can be combined to reduce the required block size and scale the network.
The committee is randomly selected by systems such as RanDAO. The random choice defines a passphrase that is appended whenever a block is proposed. To combat block sharding attacks, proposing a block has only two options that can affect this phase: propose a block or not. Therefore, the possibilities for manipulation are limited.
In addition to the committee allocating stake, there is another subcategory of blocks and checkpoint blocks.
There is a block checkpoint (checkpoint) in every 32 blocks, and the time interval between checkpoints is called an epoch (epoch). Within the boundaries of each epoch, there are 32 12-second time periods (intervals) in which blocks can be proposed.
Therefore, each era has 32 groups of slots for 32 committees. At the end of each epoch, members of the committee change positions. There is one committee per epoch (the "ideal minimum" is 128 members). A committee member has the exclusive right to propose during a 12-second time interval, and other committee members can vote for a block. This voting is also known as a proof.
Assign Stakers to committees in the beacon chain (assuming one committee per slot):
< /p>

Data source: BitMex Research
In reality, things may be more complicated than these diagrams. So, at phase 0, a slot can have up to 64 committees instead of one. Therefore, if each committee has 128 members, each slot can accommodate up to 262,144 stakers, which equates to approximately 8.4 million ETH.
Each Staker is assigned to a committee. The more staked, the more committees. The maximum committee size is 2048, roughly equivalent to the entire Ethereum supply used per epoch (64 committees * 32 ETH * 32 slots * 2048 stakers per committee = 134.2 million ETH).
The graph below illustrates how the number of committees and the number of committee members vary with the amount of ETH in the staking pool. It shows that as the staking pool grows, the number of committees first increases to 64, and then the size of the committee starts to grow when there are about 8.4 million ETH in the staking pool.
Number of committees and number of committee members.

p>
Data source: BitMex Research
In order to determine which blocks have the most votes, it is necessary to add up all votes from all committees. If voters perform well, they can be rewarded from the newly issued Ethereum Token pool. If voters break the rules, they are fined and lose some of their stake. The purpose of the penalty is to prevent queuing behavior such as voting for two conflicting blocks, although this may be allowed in some cases. Stakers will be deprived of rewards for being offline.
How is finalization done in Ethereum 2.0?
When committee members vote on a block, they must vote not only on a specific block proposal, but also on a specific historical block Checkpoints for reference and voting. It is this mechanism that ensures the stability of the voting process. Therefore, in fact, on the PoS model, there are two voting procedures, one inside and one outside. The diagram below illustrates how these two types of voting occur, and in which blocks these votes can be stored.
Voting and citations, assuming effective communication (assuming a committee per slot).

p>
Source: BitMex Research
If a checkpoint block is established on a block, more than two-thirds Committee members refer to this checkpoint when they vote, then the block can be "confirmed".
The earliest a block can become "confirmed" is after two-thirds of the block is confirmed.
The next stage is finalization. A block is finalized when it contains two confirmed blocks in the blockchain. Therefore, in most cases, when the two-thirds voter threshold is reached quickly enough, users need to wait for confirmations of one epoch (6.4 minutes) and two epochs (12.8 minutes) due to efficient communication channels. Final confirmation. This process is shown in the figure below.
Normally, the process of confirming and finalizing a block in the beacon chain.

p>
Data source: BitMex Research
What are the penalties for violators?
There are three situations in which voters are punished.
A block packer made two conflicting proposals during the same time period.
Concurrently committing two checkpoint blocks with conflicting links.
Cast two votes with overlapping links to checkpoint block transitions. For example, one marks the transition from checkpoint block 1 to checkpoint block 4, and from checkpoint block 1 to checkpoint block 4, and another one refers to the transition from checkpoint block 2 to checkpoint block 3.
It can be assumed that this rule will be superseded by a more reasonable rule according to which all references to block transitions must be in order, however, It is possible for an honest node to skip a checkpoint block, and the result of successive votes may become valid. A graph illustrates the situation.

p>
Source: BitMex Research
How efficient is PoS in Ethereum 2.0?
Developers claim that after the block is finalized, users will be guaranteed that their transactions will not be tampered with. However, these systems are extremely difficult to evaluate on parameters such as degree of convergence and finality.
Perhaps the whole process, including voting committees, indices of such committees, links to checkpoint block transitions, and the need to wait two epochs for blocks to be finalized, is an unnecessary Abstraction is an attempt to complicate the PoS model by dividing the voting system into components. But the security model contains a fundamental flaw, namely the problem of stake having no assets.
On the other hand, it is possible that such a process actually enhances the security of the network.
Multi-component process -- e.g., the period of staking -- which makes it difficult for users who decide to change their staking to change the rules.
How does sharding work in Ethereum 2.0?
In the first phase, shards are added to the system. The original plan was to start with 1024 shards, but this number has now been reduced to 64. The beacon chain is still considered the main chain, but now also contains shard references. Since there are 64 shards and each beacon block can be associated with 64 shards, it is assumed that in normal operation each beacon block can be associated with each shard.
There is a two-way link mechanism -- shard blocks refer to beacon blocks (with hashes of these blocks), and beacon blocks can refer to Slice block (cross-reference). Some shards may not be referenced by beacon blocks, but every shard block must reference a beacon chain.
Block structure in the Ethereum sharding system (two shards shown).

p>
Image source: BitMex Research
The blue arrow represents the hash value of the block, which must be included in every block Greek value. Gray arrows represent cross-referenced shards that are not necessarily included in the beacon block, as shown on the right side of the figure.
In the first phase, the sharding system and the staking process become intertwined. The validator committee for slots starting from phase 0 is shown in shards. Each shard has its own voting selection committee, which changes every "committee period" for a proposed block.
Similarly, in the beacon chain, one committee member is assigned the task of producing a block within a specified time period, while other committee members Vote on each proposal. The key factor is that when the beacon chain references the shard blockchain through a cross-reference system, all voting data is included in the beacon chain.
In the first phase, stakes are distributed randomly - either in the beacon chain or in specific shards. If the stake contains less than 8.4 million ETH, there is not enough collateral to fully service all shards, so the work of the shards may be slowed down somewhat.
The diagram below shows one possibility: Staker committees are allocated by shards.

p>
Image: BitMex Research
This allows the Beacon Chain to have only one committee of validators per slot. However, each shard blockchain contains the hash of the last beacon block, and each beacon block can contain voting data (cross-referenced) for all shards.
Therefore, all votes and stakes on the shard blockchains can also be used to calculate the rules for choosing forks and the finalization process of the main beacon chain. The PoS system works the same as before, except that instead of voting data in the committee directory (index), the beacon chain includes voting data for each shard.
There are no checkpoint blocks within the individual sharded blockchains, nor is there a process of confirmation or finalization. To make sure the transaction is done inside the shard, you need to wait for the beacon chain. Once the actual blocks in the Beacon Chain are finalized, users can verify that the transaction was made in the shard.
Therefore, cross-linking such that:
Sharding the vote of the blockchain committee The right is included in the voting right of the main beacon chain.
Finalize and validate shard blockchain blocks.
All other types of shard interactions -- for example, moving ETH from shard to shard or other types of assets.
The mechanisms required for this are not yet fully developed. They may become in demand as the second phase begins.
The sharding framework allows a node to be managed with a flexible quality - capable of handling everything, including the beacon chain and each shard. Only the beacon chain can be managed, which includes the heads of the individual shard chains.
There is a third possibility - the node that controls the validation of the beacon chain and selected segments. If a user chooses not to manage the nodes that process each shard, he must rely on other users to verify the authenticity of the processes in those shards. However, it is very likely that some users will choose to validate these shards, thereby providing assurance.
What is the prospect of Ethereum 2.0?
Ethereum holders tend to try new complex systems - DAO, Maker, DeFi.
Some members of the Ethereum community worry that Ethereum technology has been around for 5 years, but it is still lagging behind, so they think that new technology is needed.
Ethereum 2.0 fills the community's need for new ideas and can be expected to generate significant funding and stake rewards (possibly billions of dollars in ETH) .
How will the launch of Ethereum 2.0 affect the price?
In the short term, a large amount of ETH Token may be locked in the beacon chain, because users will be attracted by the opportunity to make money by packaging new blocks. Therefore, the stock of ETH in the market may shrink and the price may increase. On the other hand, ETH may simply be sucked in from other contracts where they are considered blocked. For Ethereum 2.0 to be a catalyst for long-term token price growth, not only should the stock not be constrained, but the resulting demand is necessary.
For the Ethereum 2.0 network to be successful, the PoS and sharding system must function and be attractive enough to attract economically component of meaning.
Smart contracts and DeFi systems will have to choose the shard that suits them and invest in upgrading their technology to be compatible with the constraints of the sharding system.
What are the main disadvantages of Ethereum 2.0?
Ethereum 2.0 is very complicated. In a system with many committees, shards, and different types of voting, there is a high potential for failures and delayed updates.
Original link
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