Ethereum 2.0 will set sail, are you willing to take the 32ETH boarding ship to PoS New World?

The article explains the Ethereum 2.0 upgrade process and participation methods.

For Ethereum, the 2019 meeting will be an important year, as Ethereum 2.0 is scheduled to set sail this year, starting from PoW's Old World to PoS's New World.

At the same time, Ethereum 1.0 will continue to exist and remain evolutionary. Ethereum 1.0 runs on the original main chain and Ethereum 2.0 runs on the Beacon chain.

The planned voyage is estimated to be two years. Until 2021, after the shard chain can achieve complete functions, 1.0 will pass the actual operation right of Ethereum to 2.0, and then it will withdraw from the main stage of history, as 2.0. A fragment or a primary storage contract exists.

How does the Beacon chain of Ethereum 2.0 work? How do ETH (Ether) holders “cross” from the PoW chain to the Beacon chain? And, cross or not? We will try to explore in this article.

Read the Beacon chain

Let's start with a simple science: Beacon chain is a brand new PoS blockchain, which is the core component of Ethereum 2.0, but not the Ethereum 2.0. The following points may be the key to understanding the Beacon chain:

1. The Beacon chain is a PoS chain that runs Ethereum's PoS protocol Casper. 2. Ethereum 1.0 refers to the main chain of PoW, but Ethereum 2.0 includes three parts: Beacon chain, slice chain and virtual machine layer. The structure is as follows:

3. The Beacon chain is the hub of Ethereum 2.0 and the first and most important component of 2.0. As shown in the figure below, all shards will connect to it and communicate with it, and the Beacon chain provides security and final confirmation for the shard chain.

The Beacon chain mainly performs two functions: one is to implement the PoS consensus, including maintaining a set of verifiers, selecting a verifier to form a committee, assigning a verifier to propose or prove a fragment, and rewarding and penalizing the verifier. It is the channel through which the verifier participates in the pledge system and obtains income according to the rights held, and it is also the guarantee of the security of the entire system.

The second function is to achieve fragmented communication. Each shard will store its latest state hash on the block of the Beacon chain. When the Beacon chain block is completed, the corresponding tiling block is considered final, and other shards can be sure that they are Cross-sliced ​​transactions. The slice chain and the Beacon chain enable cross-chip communication through "cross-linking" to connect the entire system together.

4. There is no virtual machine on the Beacon chain. There is no smart contract and the transaction cannot be processed. The Beacon chain does not store the information stored in the current Ethereum blockchain. It only stores the certifier list and Attestation. The so-called "Attestation" refers to a hash value that is confirmed and signed by the verifier, which records the state of a particular slice in real time.

5. The Beacon chain and the EW Square 1.0 PoW chain will operate independently of each other for approximately two years. Before Ethereum 2.0 was able to achieve complete functionality (currently expected in 2021), Ethereum was running at 1.0, and the blocks on the Beacon chain had no practical significance.

The above is the basic situation of the Beacon chain. Why is it that the Beacon chain will not officially run Ethereum until 2021? Because from the development roadmap of Ethereum, Ethereum 2.0 can support smart contracts and asset transfers and achieve availability by this year.

What did Ethereum 2.0 look like 2021 years ago?

After learning about the Beacon chain, let's take a brief look at the three phases that Ethereum 2.0 will take from now to 2021: Phase 0, Phase, and Phase 2.

Stage 0 (2019): Start the Beacon chain

Phase 0 focuses on getting the verifier on the Beacon chain up and running. Users can deposit 32 BETH (Beacon ETH) on the chain to become a verifier, but at this stage the verifier only manages the Beacon chain, and there is no fragmentation chain.

The Beacon chain will, as early as possible, maintain a simple iterative design that does not support accounts, asset transfers, and smart contracts. BETH can only be used by a verifier, cannot be transferred on the chain, and cannot be transferred to an exchange.

Phase 1 (2020): Launching the segmentation chain

Phase 1 will join the slice chain component to implement the Beacon chain + slice chain. However, this stage is only a trial run fragment structure. It is not really a fragmentation extension. The Beacon chain treats the slice chain block as a simple set of bits without structure or meaning. The segmentation chain still has no accounts, assets and smart contracts at this time.

The Beacon chain will support 1024 sharded chains, each with a set of 128 certifiers to validate. The Beacon chain randomly selects the fragment verifier for each segment in each cycle, and the segmentation verifier proves the content and status of the segment by "cross-linking".

It should be noted that in Phase 0 and Phase 1, there is no data flow between Ethereum 1.0 and Ethereum 2.0, and Ethereum still operates in the PoW chain.

Phase 2 (2021): Start the virtual machine layer

Phase 2 will join the virtual machine layer, which is the last important component of Ethereum 2.0. Ethereum, which realizes Beacon chain + slice chain + virtual machine layer, is a complete public chain system that we are familiar with. The availability of Ethereum 2.0 will be officially realized at this stage.

At this point, smart contracts are introduced into the system, assets can also be freely transferred in the chain; the fragmentation chain changes from a simple data marker to a fully functional blockchain, and the cross-linking operation supports cross-sliced ​​communication; some of the most commonly used Development tools may also be ported to Ethereum 2.0 to support EVM2. EVM2 Ethereum's new virtual machine eWASM, based on Web Assembly, supports multiple programming languages ​​to implement smart contracts.

Although Ethereum's segmentation technology roadmap includes a total of seven phases, after entering Phase 2, Ethereum will migrate from the PoW chain to the PoS chain, from the 1.0 era to the 2.0 era.

32 ETH tickets are not expensive

The new asset in Ethereum 2.0 is called BETH. It has two ways to generate it. One is converted from ETH in Ethereum 1.0, 1ETH generates 1 BETH. The other is to pledge BETH in Ethereum 2.0 to participate in Staking as a verification reward. generate.

Since in stage 0, the user can deposit 32 BETHs into the Beacon chain to become a verifier. It can be understood as buying a ticket for the 32ETH and following the Ethereum to the Ethereum 2.0 New World. The question is, are you willing to board the ship?

Since BETH cannot be transferred and traded between accounts before Phase 2, Ethereum and its various applications are still running on the PoW chain, so when the Beacon chain goes online, the only reason users convert ETH to BETH is to use BETH participates in Staking to get more BETH.

According to the previous data, the conversion between ETH and BETH is one-way, that is, BETH can only be generated by ETH through contract, and BETH cannot be replaced by ETH.

One problem with this is that the price limit for 1 BETH is 1 ETH, BETH will never be more valuable than ETH, because 1ETH also includes a right to switch from ETH to BETH; at the same time, switching to BETH also means two The lock period of the year.

However, Eitafang founder Vitalik Buterin recently mentioned the possibility of two-way exchange between ETH and BETH in a discussion. Ethereum co-founder Joe Lubin said in an interview recently that there may be a two-way mechanism. But the two-way mechanism may bring a new problem: BETH is issued by Staking, but ETH cannot participate in this issuance. The two-way exchange is not good for the assets in the Ethereum 1.0 chain.

These two different scenarios will affect the user's motivation to transfer assets from ETH to BETH, which may affect the stability of Ethereum from 1.0 to 2.0. Whether the user is willing to transfer assets to the Beacon chain will become severe after the arrival of Phase 2, and the solution adopted by Ethereum may be constantly adjusted and changed according to the situation within the two years.

Now that the conversion plan is undecided, let's look at another decisive impetus for users to migrate assets: mortgage BETH's participation in Staking's revenue.

At least at this stage, users can't participate in Ethereum 2.0's Staking by joining the equity pool with any number of BETHs. Users can only get 32 ​​ETH (2^5) on the Beacon chain to get the verifier's qualification: the user is at the current Sending 32ETH to the Ethereum PoW main chain to a registration contract, the contract will generate a "Certifier Committee Member Card" to make the user a certifier of Ethereum 2.0.

BETH's pledge return is shown in the table below. This is a proposal that Vitalik Buterin posted on Github in April this year and has been added to the Ethereum 2.0 specification:

If a total of 1 million BETH (2^20) is pledged, the system can issue up to 180,000 BETHs per year, with a maximum annual return of 18.1%. If 10 million BETHs are pledged, a maximum of 570,000 BETHs can be issued each year. The maximum annual return rate is 5.72%; the pledge ceiling is 134 million BETH (2^27). At this time, a maximum of 2.09 million BETHs can be issued each year, and the inflation rate is maintained below 2%, with a return rate of 1.56%.

Ethereum Foundation researcher Justin Drake believes that 30 million BETH (2^25) pledges are most beneficial to system health, when the inflation rate is maintained at 1% and the return rate is 3.3%, assuming an average annual consumption per piece. With 1000 BETH's Gas, the inflation rate will drop to 0.5%, and the pledgee's return rate will reach about 5% (chain smell: Drake's estimated best-selling rate when Ethereum is officially running at 2.0).

Here are two indicators that can be used for comparison: one is the return on the Ethereum through the financial products deposited into the ether, and the other is the return rate of the Staking project such as Tezos and Cosmos.

Another cost that the verifier needs to invest in is operating costs, but it seems to be within acceptable limits.

Ethhub founder Eric Conner estimates the annual cost of the verifier's annual operating costs after digging into the Ethereum 2.0 related specifications and talking to the relevant researchers: each Beacon node requires $120, and each additional validator, ie, multiple pledges per 32 An additional $60 is required for BETH.

Therefore, from the perspective of rate of return, the user's motivation to convert ETH to BETH before phase 2 may depend on three factors: the number of BETHs participating in Staking, the way of converting between ETH and BETH, and the threshold of 32ETH. (chain smell note: this article does not address the influencing factors of currency price fluctuations)

However, regardless of the "boat ticket" of 32ETH, it is not expensive. There are two types of users who may participate in Ethereum 2.0 in the first time. They provide support for the operation of Ethereum 2.0, even if 2.0 has not yet officially run Ethereum:

One type of user is a participant in the blockchain ecology, especially the participants of the Ethereum Ecology. It is valuable to invest in 32ETH; one type of user is the supporter of Ethereum, and the "cost price" of 32ETH in their hands may be Not so high, and as a long-term holder of money in the future, using BETH to participate in Staking allows them to get more BETH.

How to ensure the security of the PoS chain?

The Beacon chain is a PoS consensus. If users lack the motivation to convert ETH to BETH for Staking, will it affect the security of Ethereum 2.0?

In fact, Ethereum 2.0 guarantees its own high security threshold through mechanism design.

The first is the punishment mechanism . If the verifier has malicious behavior, such as voting for two blocks at the same time, the collateralized token will be fined.

If the Ethereum 2.0 consensus fails, it will mean that one-third of the active verifiers violate the mitigation conditions, that is, a successful attack is accompanied by 1/3 of the total pledge tokens being destroyed. The cost of the attacker – unlike PoW, "doing a crime" under PoS is to confiscate the "tool".

The other is the block verification method of the "certifier set-committee-certifier" of the Beacon chain : the active verifier constitutes the verifier set, a random sample subset of the set forms the committee, and the prover in the committee Block signature verification.

Even if more than one-third of the verifiers in the verifier are dishonest, the probability of the committee being controlled by dishonest verifiers (ie, dishonest verifiers exceed 2/3) is low, and as the number of board verifiers increases The probability that the committee is being controlled is rapidly decreasing.

Suppose we have 1000 verifiers, 333 of which are dishonest. When a committee consists of 1 member, the probability that the committee is controlled by the dishonest verifier is 33.3%; when the committee consists of 13 members, The probability of control is only 10%.

The lower limit of the number of committee verifiers in the initial stage of Ethereum 2.0 is 128. Even if the dishonest person controls 1/3 of the set of verifiers, the probability of successful attack is less than one part per trillion.

How does Ethereum 2.0 achieve randomness?

Under the effective mechanism design, the most important factor affecting the safe operation of Ethereum 2.0 is randomness. The implementation of many protocols in Beacon chain is based on "random number". Therefore, we briefly introduce the source of randomness in Ethereum 2.0.

Ethereum 2.0 solves the randomness problem by RANDAO + VDF (Verifiable Delay Function).

RANDAO is a way to generate random numbers. It is built into the logic of the Beacon chain. The participants (here the verifiers) each provide a random number. RANDAO adds these random numbers to get a new number. And the number is output as a random number.

But RANDAO has one drawback: the last person who exposes a random number can predict/manipulate random number results. Because he knows all the previous values, he can pass the random number by himself or not to influence the final output. Therefore, we need to add VDF on top of RANDAO.

VDF simplification means that after inputting a value, it takes a long time to calculate the result, but the result can be easily verified. VDF uses the random number generated by RANDAO as a seed to generate a new random number, and the system uses the new random number provided by VDF.

Because the calculation time of the VDF random number is long enough (in the Ethereum 2.0, the VDF is 102 minutes), the last person who discloses the random number cannot calculate the result within the time that he provides the random number, and cannot pass his own behavior. To influence the final random number (in Ethereum 2.0, RANDAO completes the output of a random number every 6.4 minutes, this time/process is also called an epoch).

The cycle of RANDAO is 6.4 minutes, and the cycle of VDF is 102.4 minutes. Therefore, there will be 16 VDFs running in Ethereum 2.0 at the same time. For the system to generate a random number every 6.4 minutes, Beacon chain will complete its work based on this.

It should be noted that the random number problem on the blockchain is a problem, and RANDAO + VDF also needs to be further verified.

Be a brave explorer

The Ethereum 2.0 client Nimbus test network is online. It is called testnet0, runs a Beacon chain that synchronizes information between nodes, and nodes can be distributed across remote devices.

This release sets up 400 certifier nodes to maintain network operation, of which 50 verification nodes are reserved for "brave explorers" and anyone can join. Here we provide a tip: If you encounter problems, you can ask on the Status #status-nimbus channel.

The Ethereum 2.0 client Prysm developed with Go and the Lighthouse developed with Rust are about to release test networks. If all goes well, the Beacon chain, Phase 0 Ethereum 2.0, will go live at the end of the year, as planned in the roadmap.

Almost everyone respects and loves Ethereum, but people also talk about its "historical burden." If Ethereum is a ship, it seems to be a cumbersome ship that is difficult to coordinate and slow to move.

But the bulky ship also has its own advantages. It has a more complete and safer infrastructure, and it has a more persistent and thorough distributed route. If you look at the long-term, the ship may be able to carry more ecology. Take on a longer journey and finally reach the ship of the unknown continent.

Now that the ship is about to set sail, seafarers’ recruitment is about to start. You, are you coming together?

Special Note:

Ethereum 2.0 specific implementation plan may be adjusted at any time, this article is only for reference, please keep an eye on the latest news. Most of the following English articles are from Medium, and most of them are from "Everything fans".

Reference articles: 1. "Ethereum 2.0: Beacon Chain", Bruno Škvorc 2. "ETH2.0 Project Guide", James Prestwich 3. "Ethernet 2.0 Protocol Core Beacon Chain Detailed", Ben Edgington 4. "V God proposed The Ethereum POS pledge proposal is unreasonable? ", Qin Xiaofeng 5. How to understand the economic incentives of Ethereum 2.0? Eric Conner 6. The Design Goals of Ethereum 2.0, Ben Edgington 7. Ethereum 2.0: Randomness, Bruno Skvorc

Written by: Li Painting