November 2019

Ethereum 2.0

arrow pointi
Ethereum is the world’s leading smart contract protocol, with a market cap of over USD16bn. It has the largest community of users and applications, and attracts the majority of developer mindshare in the blockchain space. However, the platform is facing a scalability issue.

Ethereum is the world’s leading smart contract protocol, with a market cap of over USD16bn. It has the largest community of users and applications, and attracts the majority of developer mindshare in the blockchain space. However, the platform is facing a scalability issue. Its existing architecture cannot handle millions of transactions per second, but merely 14. For Ethereum to remain the leading smart contract platform it needs to be able to handle greater throughput. As a result, the core developers at the Ethereum Foundation have been designing a radical upgrade to the network that will make it more scalable while maintaining security. The first trials of Ethereum 2.0 are soon to be rolled out. This month we will dive into the technical architecture behind Ethereum 2.0, why it is needed and how the roll out will impact the Ethereum community.

The Ethereum network launched in 2015 and was the first blockchain platform to offer a turing complete scripting language built into the application layer. This innovation means that any developer can write whatever code they choose and run it as a contract on the Ethereum blockchain. Due to this flexibility, Ethereum is similar to the Apple App Store; it is a platform on top of which anyone can build and deploy applications. The applications running on Ethereum can interact with each other and can benefit from other contracts that are deployed on the network. Today there are around 3,000 applications running on Ethereum with around 700,000 transactions occurring on the network every 24 hours.

In January 2018, Ethereum first experienced network capacity issues when it hit 1,349,890 transactions in a single day. The impact of this was that applications ran extremely slowly. With throughput limits reached, the cost per transaction also started spiralling upwards as users were willing to offer increasing amounts of gas (transaction fees) to miners in order for their transactions to be prioritized and included in blocks. During the height of the CryptoKitties craze, Ethereum transaction fees rose to 0.02 ETH, or USD20, at the time. This episode made it clear that Ethereum has a scalability issue that needs to be solved.

The solution is Ethereum 2.0 which has two major goals. Firstly, the upgrade is looking to improve the speed and throughput of transactions through a process known as “sharding”. This is where the network is segmented into smaller parts, known as shards, that run in parallel. The main bottleneck with Ethereum today is that that every transaction is recorded and approved by every node in the network. There are thousands of operational nodes, meaning that a single transaction must be relayed to thousands of servers which need to come to consensus. This takes time. By partitioning the network into n shards, the number of transactions that can concurrently be validated increases to nT, where T is the number of transactions that a single shard can process. So by simply splitting the network in half and having two shards, the network will be able to process twice as many transactions.

The second goal of Ethereum 2.0 is to migrate away from the expensive and energy inefficient proof-of-work consensus algorithm and instead to use proof-of stake. In proof-of-work, miners are rewarded based on the number of hashes per second they calculate. These hashes are proportional to the number of servers running and the processing power provided. More processing power requires more electricity, meaning that a lot of energy is used in proof-of-work. In fact, each transaction on the Ethereum network uses about 29 kwh (Kilowatt hours), which is enough electricity to power an average American household for 24 hours! Proof-of-stake is far more energy efficient. Validators are not rewarded for producing hashes, but for receiving stake delegations and remaining online. A validator will have a set amount of electricity consumption regardless of their delegation. What matters for validators is that they can convince others to trust in their security setup and trust that they will not suffer from down time.

With these two goals in mind, the Ethereum Foundation has spent two years researching and designing Ethereum 2.0. Instead of trying to bolt upgrades onto the existing Ethereum network, version 2.0 is being built from scratch and will be an entirely new blockchain. Once this platform is running smoothly, the Ethereum main chain will migrate onto Ethereum 2.0. As an analogy, rather than upgrade the engine of a moving car, the Ethereum developers are building a brand new car and will move the passengers into this vehicle once it is ready.

The Ethereum Foundation has mapped out 7 phases in the roll out of Ethereum 2.0:

The first three phases introduce the core components of the system. Phase 0 is the creation of the “Beacon Chain”. This is a proof-of-stake blockchain that will be used to synchronize all shards of the network. To start with, this will be a very simple chain that will run in parallel to the existing Ethereum chain. It will onboard and maintain a set of validators and initially the Beacon Chain will not support smart contracts or accounts. There are currently 9 developer teams working on different versions of the Beacon Chain that will interoperate with each other. A Beacon Chain testnet should be released in Q1 2020 with a production release estimated for later in the year.

In Phase 1, the first shards will be created. Each shard will have its own chain of transactions. Shards will be verified by a set of validators that are randomly assigned by the Beacon Chain and a shard’s validators will only have to verify transactions on the shards that they are assigned. Ethereum accounts will be assigned to a single shard and can transact with other accounts in that shard. In Phase 1, accounts in different shards will not be able to transact with each other.

Phase 2 is where the new Ethereum Virtual Machine is deployed, also known as eWASM. Wasm stands for WebAssembly, which is an open standard instruction-set developed by a W3C community group. Wasm is built for the web and is being actively developed by engineers from Mozilla, Google, Microsoft and Apple. eWASM is a “restricted subset of Wasm” that has been modified specifically for the Ethereum network. This component will allow Ethereum 2.0 to support smart contracts, accounts and states. At this point, Ethereum 2.0 will have the full functionality of the current Ethereum, but should be running much faster and with a greater transaction throughput.

The later phases in the Ethereum 2.0 roadmap allow for performance enhancements and for transactions to take place between different shards. These phases will take time, but will make the platform faster and more secure. Completing Ethereum 2.0 is desperately needed to allow Ethereum to fulfil its promise and potential. As Vitalik Buterin (the founder of Ethereum) said back in 2018:

Ethereum 1.0 is a couple of peoples’ scrappy attempt to build the world computer; Ethereum 2.0 will actually be the world computer.

At CMCC we are monitoring the development of Ethereum 2.0 closely. It is an ambitious and significant overhaul of the existing system, and one that is not without risk. However, Ethereum today has the strongest community of users and applications. It has the vast majority of developer mindshare and the greatest volume of new application releases of any blockchain platform. A greater risk for Ethereum lies in not upgrading the base protocol and being overtaken by an alternative smart contract platform.

blocks