Brief Introduction of Ethereum 2.0

1 Comment 1534 Views0


Brief Introduction of Ethereum 2.0 IMG 04

In early March 2019, after the “Istanbul” upgrade, Ethereum officially entered the “Serenity” stage. “Serenity” is also recognized as the 2.0 version of Ethereum, as the Ethereum in the “Serenity” phase will switch to Proof-of-Stake (POS) to reach a consensus. In addition, sharding will be fully launched. At the virtual machine level, the original EVM will be discarded and replaced by EWASM.

Brief Introduction of Ethereum 2.0 IMG 03

 

Ethereum 2.0

If you are a developer planning the deployment of ETH 2.0 Smart Contract Solidity, then you many encounter many changes: ETH2.0 will completely replace ETH1.0. The smart contract written with ETH1.0 may need to be rewritten with ETH2.0 due to the complete reconstruction of the new contract. Fortunately, we have two years for preparation and establishment of the ecosystem.

According to Vitalik, Serenity will be divided into 4 different phases within 2 years.

  • Phase 1, known as the beacon chain, will focus on the certification, verification, startup and operation of the beacon chain.
  • Phase 2, the shard chain will be added as the data transfer layer.
  • Phase 3, the cross-shard communication (smart contract) will be allowed, which means the existing smart contracts will be invalid on the new Ethereum.
  • Phase 4, the new computer of Ethereum will be adjusted and optimized in the world.

 

Beacon Chain

As a vital part of Ethereum 2.0 framework, the beacon chain is, in fact, a brand-new blockchain which plays two important roles: the gateway of pledge system so that the verifier can safely participate in pledge system as new mining worker; the index for storing sharding status.

Brief Introduction of Ethereum 2.0 IMG 01

The beacon chain will not store any information on existing Ethereum blockchain, including the balance of account, token-related contracts or the DApp status, except for the following two: the registry of validators and the Attestation.

For smooth transition to POS, the engineers will deploy a registration contract based on the existing Ethereum, therefore, in the future we will see the Ethereum with coexistence of POW and POS. (In the second phase, the PoW chain will become a shard of beacon chain or a master archive contract).

To become an Ethereum 2.0 mining worker, you need to pledge 32 ETHs in the registrar contract and get a receipt (an event readable on blockchain client), which is a “passport” indicating that the committer is eligible to validate node. It should be noted that this process is one-way and it’s impossible to withdraw from the system back to the existing PoW chain. Once the 32ETHs are submitted to the pledge system, the deposit can only be returned to a specific shard (after shards have been deployed) instead of the EVM.

After registration on beacon chain, the validator will be randomly assigned to validate one or two shards. The validators will combine the data on their shards with that on beacon chain to form new blocks.

Unlike bitcoin or existing Ethereum, it’s easy to become the validation node under the POS rules. The client may be very lightweight with just pledging 32 ETHs, signing their attestation and sending back to Ethereum network if needed.

Brief Introduction of Ethereum 2.0 IMG 02

The validator client will use the data provided by beacon chain node to construct blocks. If the client of validators commits evils or offline, they will bear the consequences —- the 32 ETHs pledged will be confiscated (entitlement cutting).

Theoretically speaking, the devices such as smart phones can also be used for validation, but it’s not so practical in reality — smooth network communication demands good network bandwidth and frequent hard disk reading and writing, which will soon use up the phone battery (once being offline, the 32 ETHs pledged will also be confiscated).

 

Sharding

The simplest way of sharding is called Beanstalk, which will run many chains and each is called a “shard”. Every shard will have an independent group of validators, who will validate the transaction and the network participants generating the blocks through voting mechanism.

The sharding scheme can theoretically increase the nodes of participating network to provide the solution for infinite network expansion, but the solution of Beacon Chain concept is not so realistic. Why? Because the beacon chain needs accounting calculations to distribute the validators to every shard chain and take a snapshot. The calculations are proportional to the shard quantity in the system (i.e., the more shards, the more calculations). Since the beacon chain itself is also a blockchain, its processing power is limited by the computing capability of the nodes running the beacon chain, so the shard quantity naturally has its upper limit.

However, the structure of sharding network does improve the node with a multiplication effect because any increase in node efficiency will enable nodes with higher transaction capability. If all nodes running the network (including nodes in the beacon chain) process transactions at a speed of 4 times faster, the amount of transactions each shard can handle will also be four times the previous one and the shard quantity the beacon chain can maintain will be quadrupled. Therefore, the throughput capability of the entire system will become 4×4 = 16 times —- that’s why this scheme is known as “quadratic sharding”.

Now it’s difficult to accurately decide how many shards to be divided, but in the foreseeable future, the throughput requirements of blockchain users are unlikely to exceed those which can be offered by quadratic sharding. To safely handle such a large volume of transactions, the nodes quantity required for the shards will be magnitude larger than the total nodes in all blockchains.

 

Summary

The beacon chain is a new chain with Ethereum 2.0 as the core which connects and communicates with all the shards.

On the one hand, the beacon chain is the channel through which the validators participate in the pledge system and obtain revenues; on the other hand, it’s the channel to realize the sharding communication because every shard stores its own current hashrate on the blocks of beacon chain. The structure of sharding network will improve the nodes with a multiplication effect.

Beacon nodes are the builders of beacon chains which process large amounts of data and send them to validators for verification; the validators will construct the blocks and send them back to beacon nodes. The validators pledge ETH for the chance of proposing blocks, if the blocks they propose are consented by other validators, they can get corresponding rewards.