ETH 2.0 Serenity — What to Expect & Will It Affect aelf?

Ethereum is the second largest cryptocurrency or blockchain to date, surpassed only by bitcoin. Even then, it has still been plagued with scalability issues for years, managing only 15 transactions per second. This and other issues are now coming to a close, well over the next 3 years, if all goes to plan. Ethereum will be undergoing, arguably it’s largest facelift since inception. Serenity will impact all layers of the blockchain, revamping the network to deal with scalability, security and interoperability.

This article will breakdown the components of this major upgrade and explain the proposed roadmap. Following this, there will be a brief explanation of what this means for aelf. Ethereum is making waves in the blockchain space, but as you will see, they are, in reality, following aelf’s footsteps and are not in the forefront in terms of innovative development.

What does Ethereum 2.0 Consist of?

The concept of this upgrade was presented in 2018 by Vitalik Buterin, but was officially announced with a roadmap by ConsenSys in May 2019. It consists of a number of smaller upgrades to be actioned over a 3 year period, resulting in a completely new architecture.

Ethereum 2.0 overall architecture. Original diagram by Hsiao-Wei Wang.

The architecture will be broken up into 4 main components:

PoW Main Chain: This is the existing Ethereum blockchain as we know it. It will remain in use as it is.

Beacon Chain: This chain is currently under development and will be the first new component in Ethereum 2.0. This is the coordination layer and will employ the Casper Consensus (PoS). Currently the Consensus Protocol uses ‘miners’. Under Casper, these will be replaced with Validators. Any Validator must commit some ‘skin in the game’ by depositing a fixed amount of ETH into the Validator Main Contract (VMC). This contract will be stored on the main chain and is regularly checked by the Beacon chain to add any new validators. Validators will perform in random groups and will be assigned to specific shards. In addition, each group will be reshuffled regularly to ensure collusion risks are minimized, such as 51% attacks.

Shard Chains: This is the next component to be released after the Beacon Chain. This is the specific component which deals with the scalability issues. Each shard will execute Smart Contracts and store their data. Basically, each shard will perform similar to a side chain structure. Initially these shards will not execute transactions until the infrastructure and security have been tested and confirmed. All ethereum addresses, account balances and smart contract data will be divided among these shards. When a transaction is sent to the network it will be placed into the shard which holds the address that signed the transaction. It will then be executed and the validators assigned to that shard will then include it in the next block. As a result, not all validators will need to confirm the transaction resulting in a greatly increased confirmation speed.

VM(s): This layer is the final major component to be included in the Ethereum 2.0 upgrade. This will provide for the execution of Smart Contracts and Transactions.

Serenity Roadmap

Prior to the launch of Serenity, ethereum must first complete the last of a series of hard forks. Since 2015, we have seen a number of upgrades — Frontier (2015), Homestead (2016), Byzantium (2017), and Constantinople (2019). The final fork, Istanbul, is planned for October 2019

Istanbul

This hard fork is scheduled for October 2019 and currently consists of 30 proposed EIPS, including the controversial and well known EIP 1057 [ProgPoW]. This EIP has been a hot topic in Ethereum communities and has received much debate. It is essentially designed to remove the advantage that ASICs have over other mining hardware. ASICs are Application Specific Integrated Circuits, and are normally designed to work with only one hashing algorithm.

There are two main problems with these, firstly that they are inefficient long term since they cannot be used on any other algorithm and can easily become obsolete if a hash is changed, such as what is planned for Ethereum. The second issue is that they are fairly costly and sometimes difficult to obtain resulting in a more centralized network than desired.

ProgPoW will still allow ASICs to be used, but will remove the advantage they have in performance, resulting them to be less cost-effective than general purpose GPUs.

4 Phase Structure

Once the network is ready to initiate Serenity, the first of 4 phases will be implemented:

Phase 0: Beacon Chain | 2019

This phase will see the roll out of the Beacon Chain, which is the Proof of Stake blockchain that will oversee and organise the validator network. This will run alongside the existing PoW blockchain ensuring there is no disruption to the continuity of chains.

A visualisation of the Beacon Chain (blue) with 8 shard chains (aquamarine) and crosslinks (light blue lines). Finalised blocks on all chains are yellow. Time increases from left to right. Simulator by Casey Detrio.

The Beacon Chain will initially have 3 main responsibilities:

Managing the proof of stake mechanism

Proof of Stake is the consensus mechanism in which the network stakes ETH (as opposed to expending energy to mine) in order to continue finalizing blocks into existence.

Processing Crosslinks

Crosslinks are the main way that the Beachon Chain can determine and secure the state of shard chains. Shard chains will be released in Phase 1, so this update is in preparation for Phase 1.

Direct consensus and finality

The Beacon chain provides finality through PoS and (what was formerly known as) Casper FFG. PoS dictates that 2/3 of validators must stake ETH on the next block, meaning the financial incentive is much riskier for potential malicious actors.

According to ConsenSys, they explain that the idea for the beacon chain came from a consensus protocol adopted by another blockchain project Dfinity:

“The name Beacon Chain has its origins in the idea of a “random beacon” — such as NIST’s — that provides a source of randomness to the rest of the system, and the random beacon concept was adopted in a blockchain context by Dfinity.”

Phase 1: Shard Chains | 2020

The shard structure of Serenity will split the responsibility for data processing of a database across many nodes. This allows for parallel processing of multiple transactions, storing and processing of information by multiple shards. This is a clear improvement of the current Ethereum blockchain which requires every node to process and validate each transaction in a linear process.

During this phase, the focus will be on finality and consensus on the shards, rather than the full release of shard functionality, and as such could be treated as a “test run”.

Block Time: 16 Seconds

Validator Stake: 32 ETH

Validators per Shard: 128

No of Shards Supported: 1024

Min Exit Notice for Validators: 97 Days

Phase 2: eWASM | 2020/2021

This phase will consist of the introduction of a new Virtual Machine. The new Ethereum-flavoured Web Assembly (eWASM) will replace the current EVM. This phase will also see the evolution of the shard chains to be fully functional, allowing the scaling of the Ethereum network.

With the release of the eWASM, the ethereum blockchain will theoretically allow Smart Contracts written in any language to be executed on it. Currently only Smart Contracts written in Solidarity are supported.

Phase 3: Continued Improvement | 2022

Beyond Phase 2, the timeline for Ethereum begins getting less specific. One this is certain — developers will continue working on pressing matters and improving the protocol to meet the growing demands of blockchain technology. Among the continued improvements being discussed: light client state protocol, coupling with mainchain security, and super-quadratic or exponential sharding.

Original Ethereum Blockchain will not stop yet

It is important to note that during Phase 0–2, the current PoW Ethereum blockchain will still be fully functional. It will be running alongside the Beacon Chain. At the end of these phases, it will be reassessed if the original chain has become ‘computationally’ obsolete. During this process, the original chain will still receive improvements and upgrades.

Are things on Schedule?

According to a statement late last year, phase 0 was anticipated for as early as the end of 2018:

“the technical specification declares itself to be 60% complete at the time of writing this, and there remains a fairly chunky todo list. Nonetheless, a finger in the air suggests that the spec ought to be reasonably complete by the end of the year, and that perhaps by the end of Q1 2019 we’ll be running a multi-client Beacon Chain testnet.”

It is yet to be seen how far off this schedule they are running but the updated timeline now states, sometime in 2019.

What does this mean for aelf?

This will have very little impact on aelf as a business and the technology for a couple of reasons. First, the targeted clients or audience for the aelf blockchain are different to those of Ethereum. In fact, many of the enterprises that are looking to build on aelf will require private or hybrid blockchains with exceptional customizability, something which is technically impossible with Ethereum, both now and the foreseeable future. Although Ethereum will introduce sharding for the data processing performance improvement, it will still be one blockchain.

This means it will still have limited customizability and will not allow users to create private or hybrid chains. So although, Ethereum are improving their system to eradicate some of the existing issues plaguing them, they will not directly affect the market aelf is focused on.

In fact, if there is any impact, it will be a positive one as it will aid in the general adoption and public mindset on blockchain benefits.

The second reason that this will not affect aelf, is the timeline. According to the roadmap, Ethereum’s scalability will not achieve a serious improvement until 2021, if everything runs to schedule between now and then.

If we look at the past few years it is safe to say, that this will be an impressive feat as their track record is anything but running on schedule.

It is anticipated that they will manage to improve the performance to around 15,000 TPS. aelf achieved this in their testnet as a base result in 2018. This puts Ethereum about 3 years behind.

Another improvement in Serenity, is the ability to parallel process, not an easy task. I know it is not an easy task because it took a lot of effort for our developers to accomplish it. Yes, we also successfully developed a system that can parallel process transactions on blockchain in 2018.

Let’s look at the cluster of validators (nodes) assigned to shards. That sounds awfully similar to the cluster nodes assigned to the aelf sidechains, again, developed in the testnet in 2018.

One really interesting feature of Serenity is the upgraded VM. This eWASM will allow smart contracts from multiple languages to be built on Ethereum. Granted, this is not a feature that was introduced in last year’s testnet for aelf, but language agnostic functionality is scheduled for one of the early updates after mainnet launch. Not only that, but aelf will also allow any consensus protocol and the choice of a private, public or hybrid blockchain setup, among other customizable elements.

So at the end of the day, aelf and Ethereum are different products with different target audiences. Ethereum has been leveraging off the ‘first mover’ advantage for some time now, but this will be changing very soon. Even if we had exactly the same audience, by the time Serenity has been completed, aelf will already have launched a fully functioning testnet with all these features and more, and had it running and perfected for years. So their advantage will turn to a catch-up.

Am I excited about the Serenity upgrade to Ethereum — yes. Am I worried about how this will affect aelf — definitely not.

stat?event=post.clientViewed&referrerSou

ETH 2.0 Serenity — What to Expect & This Will Affect aelf was originally published in HackerNoon.com on Medium, where people are continuing the conversation by highlighting and responding to this story.