BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

A Comprehensive Exploration of Ethereum 2.0

拔丝地瓜
特邀专栏作者
This article is about 8523 words, reading the full article takes about 13 minutes
Given Ethereum’s current decision to scale through sharding, we believe Ethereum will go through a complex and long transition.
AI Summary
Expand
Given Ethereum’s current decision to scale through sharding, we believe Ethereum will go through a complex and long transition.

Editor's Note: This article comes fromCrypto Valley Live (ID: cryptovalley)Editor's Note: This article comes from

, Author: BitMEX Research, translation: Ziming, reprinted by Odaily with authorization.

summary

Abstract: In this article we focus on Ethereum 2.0, which will be launched as early as July 2020 (if there is no other reason to postpone it). However, the launch of Ethereum 2.0 may not be an extremely significant event. Initially, Ethereum 2.0 will primarily operate as a test network for the new proof-of-stake consensus mechanism (PoS). Most of the economic activities and smart contracts will remain on the original Ethereum network, and the original Ethereum network will continue to exist as a parallel chain of Ethereum 2.0. There will be a one-way channel between the previous version, that is, Ethereum 1.0 can be transferred to Ethereum 2.0, but not vice versa. Given Ethereum’s current decision to scale through sharding, we believe Ethereum will go through a complex and long transition.

secondary title

summary

Ethereum is trying to move its entire digital economy onto a new network - Ethereum 2.0. This transition is actually high-risk and complex, and it will take a long time. In our opinion, the main motivation for Ethereum 2.0 is scalability. As it turns out, the Ethereum network has proven popular since its launch, with transactions on the network growing significantly. For this momentum to continue, full node operators and consensus proxies (whether PoW or PoS) will need to run ever more powerful computers (which again means more expensive associated costs). This will eventually lead to more and more centralization, which may reduce the anti-censorship characteristics of the system, and if it continues, it will eventually make the network meaningless.

The core problem with sharding is that it means a change in the economic model of Ethereum. For example, if Ethereum is an unstoppable single world computer, breaking it up into multiple shards (multiple computers) may not be able to meet the expectations of all users. If the smart contract on shard 1 wants to interact with the smart contract on shard 2, since the shards need to reach a consensus on a series of events and share information, the process will Creates a lot of friction, at least compared to when interacting with two contracts on the same shard, the experience will be different, so, to some extent, the launch of Ethereum 2.0 will gradually unravel the previous vision of the so-called "single world computer" . Some people see Ethereum and sharding as opposing concepts. But others think that the Ethereum network may be intervening in certain niche areas (niche cases), that is, if different segments of users are interested in different types of applications, then there is little need for interaction between them. On the Ethereum network, sharding may be of some significance. It can ensure that users of different segments share the same underlying Ethereum tokens while improving the flexibility of the entire network.

In fact, sharding represents a fundamental change in the way Ethereum works, which explains why the transition to sharding is actually a more disruptive change than one might think. Existing smart contracts cannot simply be transferred to a sharded network. The new Ethereum network means that the smart contracts of the original network also need to be rebuilt to adapt to the new environment. This transition will be a long and painful process. In the initial stages of Ethereum 2.0, it will exist as a parachain alongside Ethereum 1.0, and at some point in the future the two chains will re-merge into one.

secondary title

Three Phases of Transition

As shown in the diagram below, the transition to Ethereum 2.0 will take place in three phases:

After the launch of Ethereum 2.0, there will be two Ethereum networks running in parallel (Ethereum 1.0 and Ethereum 2.0). At first, we could exchange tokens on Ethereum 1.0 (hereinafter referred to as Eth1) to tokens on Ethereum 2.0 (Eth2), but the reverse operation is not feasible. Therefore, in theory, the transaction price of Eth2 should be less than or equal to the price of Eth1. However, in the early stages of the transition, it is unlikely that Eth2 will even have a price, or be supported by exchanges, as the coin may not be used for anything other than staking, or even basic trading activity will be possible .

token issuance

To convert Eth1 to Eth2, users must use the deposit contract on Eth1. This contract will essentially destroy Eth1, and this destruction will be used as the basis for issuing new Eth2. So Eth1 is basically destroyed forever (although it is possible to restore the tokens on the Eth1 chain through a hard fork protocol change). Tokens converted to Eth2 will automatically enter the PoS validator pool. As explained in our 2018 article on PoS, the idea behind PoS is that the weight of votes and rewards attributed to consensus agents is determined by the amount of tokens deposited by users. In the Eth2 specification, each staking agent requires 32 ETH. If more than 32 ETH are sent to the contract, the staker will not get any income from these extra coins. If the ETH sent is less than 32 ETH, the staker will not activate the Eth2 in his hand. Therefore, if you want to convert Eth1 to Eth2, you should send it in batches of 32 ETH, and each batch of ETH can be considered as an independent staking agent.

secondary title

As mentioned above, the Ethereum network will have two parallel systems existing simultaneously. The original Ethereum will continue to operate as a PoW chain, while Ethereum 2.0 will operate under the new PoS system. During this time, both parties of the consensus agent, miners and stakers, need incentives. Therefore Ethereum's inflation rate will increase until the two systems are finally merged. This might be considered a flaw at this point, but it is a price worth paying to ensure a successful transition to Ethereum 2.0.

Eth2 in the above formula is the amount of tokens transferred to PoS. The idea behind the formula is that the more Eth1 is transferred to Eth2, the more new coins will be issued, however, the available ROI will decrease because the more coins that are staked, the more available ROI will drop. We can see the change in the inflation rate from the graph below.

(Source: BitMEX Research)

image description

(Note: At least 16000Eth2 is required to start the beacon chain)

image description"(Source: BitMEX Research)"The above release schedule is based on incentives, and incentives should ensure that initially there is a strong incentive to move tokens into Eth2 and stake. The incentive for this transfer will be lower and lower, because if Eth2 is already very successful, then there will be less demand for Eth1. This ensures that enough tokens are transferred to Eth2, so that the new network will be large, and if Eth2 is indeed very popular, the issuance of such tokens will not be too high.

Of course, with all these new coins being issued, some may ask how this mechanism will match Ethereum's original

permanent linear inflation

plan?

  • "The permanent linear supply growth model (permanent linear supply growth model) reduces the risk of some people's wealth concentration (wealth concentration) in BTC, so that individuals living in the present and the future have a fair opportunity to obtain digital currency, while also preventing ETH. Depreciation because the 'supply growth rate' is still trending towards zero over time."

  • (Source: Ethereum Whitepaper)

  • There are also a number of underlying factors that could pull potentially rising inflation down:

In Phase 1, the fee system is expected to cover two elements, a base fee (in which tokens are burned) and a premium fee (as a reward for stakers). These burned tokens will reduce the inflation rate.

Validators will be penalized for misbehaving and those tokens will be destroyed.

The above mechanism will lead to the destruction of Eth2 and thus suppress the impact of rising inflation. However, it is difficult for us to predict the degree of suppression of each factor, so there is great uncertainty in the issuance rate of Eth2.

It’s worth mentioning that we’re not sure about the effectiveness of any portion of transaction fees being burned. From an economic point of view, the interests of the consensus agent and the user are consistent, and the user needs to pay a certain service fee to the consensus agent. If the consensus agent is fully funded by fees paid by users rather than block rewards, conflicts between the two parties may be less likely to arise. At the same time, trying to arbitrarily decide the correct reward schedule can lead to inefficiencies compared to leaving it to the fee market. Of course, BTC has not succeeded at this point either, and block rewards are still substantial. As far as Ethereum is concerned, it may be more sustainable in the long run for all transaction fees to go to the validators, as a way to reduce the inflation plan to offset its impact. After all, validators are only there to keep user activity secure (they don't need security if users don't do anything), which could make the difficult trade-off between security and inflation easier.

double strand merge

In our opinion, the implementation of the final plan - the merger of the original Ethereum and Ethereum 2.0 may still take several years. It may be achieved by making the original Ethereum a shard inside Ethereum 2.0. This allows two-way transfers of tokens between shards until the two tokens are eventually merged. According to the plan, most of the activities currently happening on the original Ethereum can now continue within the Ethereum shard.

secondary title

The table below is what we consider to be some of the most important and meaningful constants in the Ethereum 2.0 specification

PoS

image description

(Source: BitMEX Research, Ethereum 2.0 Specs)

secondary title

PoS is the general idea of ​​choosing a fork rule based on the most accumulated stake (that is, the chain that voted for the most coins). Of course we also face the problem of how to structure the voting process. The core principles behind the Ethereum 2.0 voting system have not changed from what was stated in the 2018 Ethereum proposal, it is still based on the idea of ​​the Casper Friendly Finalty Gadget. However, based on the combination of Casper Friendly Finalty Gadget and the Latest Message Driven Greedy Heaviest Observed Subtree Fork selection rules (ie CasperFFG & LMD GHOST Fork selection rules), this system has been updated.

We will explain the basic mechanics of the voting system by breaking it down into its components. The first thing to consider is that we have a large pool of stakers, each staker represents up to 32 ETH (it takes 32 ETH to activate a staker, this number can be as low as 16 ETH until deactivated). This pool does not directly vote on blocks, but is arranged into various voting committees, whose members are randomly drawn from a larger pool.

In reality the situation is a bit more complicated than what is shown in the figure above. In Phase 0, there can be up to 64 validator committees per slot (instead of just one as shown above). Therefore, if each committee has 128 members, each epoch can contain up to 262,144 stakers (about 8.4 million ETH).

Each staking agent is assigned to a committee, and the more stakers there are, the larger the committee size will be. The maximum size of the committee is 2048, roughly equivalent to the total supply of Ethereum used per epoch (64 committees * 32 ETH * 32 slotts * 2048 stakers per committee = 134.2 million ETH), so no matter how many People choose to stake, there will always be enough room in the committee. The graph below illustrates how the number of committees and the number of members per committee change with the amount of ETH in the staking pool. It shows that as the staking pool increases, the number of committees first increases to 64, and then (when the staking pool is around 8.4 million ETH), the committee size starts to increase.

To determine which block has the most votes, we need to add up all committee votes. If voters perform well, then they can be rewarded from a pool of newly issued Ethereum. On the other hand, if voters engage in certain types of malicious behavior, they are punished and lose some of their stake. These penalties for malicious behavior are to prevent things like a voter voting for two conflicting blocks from happening. However, in some cases, it may be legal to vote for conflicting blocks, so the penalty rules are not intuitive, and we will discuss these rules later in the report.

secondary title"Finalization"If there is a checkpoint module built on top of all committees at a certain stage, and more than two-thirds of the committee members voted to mention the checkpoint, then the module is

definite

. It can be achieved as early as two-thirds of an epoch. The next stage is finalization. When the blockchain contains two confirmed blocks after a block, the block is finalized. Therefore, in most cases (due to strong communication channels, the two-thirds voting threshold can be achieved quickly), users need to wait about one epoch (6.4 minutes) for block validation and finalization. Two epochs (12.8 minutes) time. As shown below.

secondary title

  • penalty condition

  • As mentioned above, the slashing conditions are not clearly stated, and voters cannot be punished simply because they voted for two contradictory blocks. Therefore, there are three situations in which voters can be punished.

  • A block producer makes two conflicting block proposals within its allocated slot.

Generate two votes containing conflicting references to checkpoint block transition references of the same height.

Produces two votes with overlapping checkpoint block transition references. For example, a vote referencing the transition from checkpoint block 1 to checkpoint block 4, and a vote referencing the transition from checkpoint block 2 to checkpoint block 3. One might argue that this rule should be replaced by a more obvious rule that all block transition references should be in-order, however an honest node could miss a checkpoint block with out-of-order votes Probably legal. This behavior is shown in the figure below.

secondary title

After the finalization, it is certain that users' transactions must not be double spent. However, the evaluation of these systems is very difficult, and it is very difficult to evaluate the degree of convergence and finalization.

This entire process of voting committees, voting committee indexes, referencing checkpoint block transitions, and waiting two epochs for finalization is probably an unnecessary abstraction. It just adds complexity by breaking down the PoS system into different parts, obfuscating a fundamental flaw in the security model - the issue of stake. On the other hand, perhaps breaking down the PoS process into these subparts would really add to the security properties of the network. On a balance of probabilities, we believe that these voting processes may improve security and security to some extent. The complexity of the voting process (say staking across voting rounds) ensures that changing staking clients to any profit-maximizing non-transactional behavior is likely to be technically very challenging, to some extent Increased security. But whether this will make the system robust enough to survive and thrive in the long run is really an open question in our opinion. However, we would like to state in our review and analysis that our understanding of this system is incomplete.

Please note that our description above is only a basic outline of this process, and there are many things we haven't mentioned, as well as many omissions in the system. For example, we did not address issues such as entering or exiting a staking pool, how rewards and penalties for each staker are calculated, how whistleblowers flag bad behavior, how much block space is occupied by all voting data, and how staking votes are aggregated and counted.

Sharding

In this way, there are two reference methods, the shard chain block refers to the beacon block (using the hash value of the beacon block), and the beacon block can refer to the beacon chain block (this is called cross-linking). It is possible to miss some shard references in some beacon blocks, but every shard chain block must link to the beacon chain.

image description

(Source: BitMEX Research)

image description

(Note: The blue arrow represents the hash of a block, which must be included in each block. The gray arrow represents a cross-shard reference, which may or may not be included in the beacon block Beacon block. If a fragment is missed, a reference can be included in the next beacon block, as shown on the right in the figure)

It is important to note that in Phase 1, the sharding system and sharding process become interrelated. Starting with phase 0, multiple validator committees per slot are now mapped to shards. As a result, each shard has its own hierarchical voting committee that changes during each proposer committee. In the same way as the beacon chain, one member of the committee is then given the task of producing a block in a certain slot, while the remaining committee members then vote on each proposal. A key point to consider is that when the beacon chain references shard blocks through cross-links, all of these voting information are included in the beacon chain.

The diagram below illustrates a possible allocation of stakers to a shard chain. In phase 1, staking agents are randomly assigned, either to the beacon chain or to a specific blockchain. If it is less than 8.4 million ETH, there are not enough staking agents to fully serve all the shards, so the shards may shrink to a certain extent.

Therefore, there is only one committee of validators left per slot on the beacon chain. Each shard block contains a hash of the most recent beacon block, and . Beacon blocks may contain all voting data from shards (cross-linked).

  • Therefore, voting and staking on all blockchains can also be used in the process of calculating and finalizing the fork selection rules of the main beacon chain. PoS works the same as before, except that instead of voting information contained in a committee index, the voting information on the beacon chain includes voting information for each shard.

  • There are no checkpoint blocks within the individual shard chains, and there is no attestation or finalization process. Instead, to get the guarantee of transaction finality inside a block, one has to wait for the beacon chain. Once the relevant blocks in the Beacon Chain are finalized, users in the shard chain can gain certainty for transactions within the shard.

  • Therefore, the cross join has three functions:

Regarding all other forms of cross-shard communication, such as transferring ETH or other assets across shards, the mechanisms for this are not fully resolved to the best of our knowledge. While this topic may not come up until Phase 2, this is likely to be another area that creates an imperfect compromise between scalability and availability. One could even say that the challenges here are so great that the entire sharding model is called into question.

in conclusion

The sharded structure provides flexibility for those who wish to run nodes. One can run a node that handles everything, the beacon chain and each shard. One can also just run the beacon chain, which includes headers for some shard blocks. There is also a third option of running a node to validate the beacon chain and a selected subset of shards. If one chooses not to run a node that processes every shard, then one is relying on others to check the authenticity of processes in those shards, however the idea is that some users will choose to validate those shards, so they The degree of assurance is probabilistically high.

secondary title

in conclusion

Ethereum holders like to try new complex systems, whether it is The DAO, ICO, Maker, or now DeFi. However, some members of the Ethereum community have expressed to us the concern that the Ethereum technology is 5 years old and may have fallen behind. So Ethereum 2.0 fulfills the needs of a community that is keen to try out new ideas. So we predict that there will be a considerable amount of funds pouring into Ethereum 2.0 to earn staking rewards, which may be worth billions of dollars in ETH.

ETH
Welcome to Join Odaily Official Community