Ethereum part 4 – The Eth2 upgrade
The Blockchain Trilemma
There are three main aspects of blockchain technology.
Decentralization: Decentralization is at the core of blockchain technology. A decentralized system cannot be controlled by a central entity and does not rely on any central infrastructure to maintain it.
Security:?As the blockchain systems/platforms are decentralized and are permission-less (open to everyone), security becomes paramount concern to the blockchain.
Scalability: The ability to handle growing number of transactions throughput. Without scalability, the platform would not receive large scale adoption.
A widely agreed fact is that, it is difficult for a blockchain system to achieve all the three aspects. Blockchains often have to make a trade off with one and achieve the two. Private blockchains achieve the security and scalability well and make a tradeoff with decentralization (having limited number nodes as validators) while reaping other benefits of blockchain technology such as provenance, traceability, immutability, single source of truth, trust etc. Public blockchains like Bitcoin and Ethereum 1.0 address the decentralization and security very well, but fail to address scalability.
Need for upgrade
Since its launch in 2015, Ethereum has grown to more than a million transactions per day. As of this writing, the number of transactions on Ethereum are between 1.1 to 1.3 million per day. Majority of these transactions are coming from the DeFi space. The current market size of the DeFi market is close to US$ 80 billion which is expected to grow 10-fold in 2022 and so on. The DeFi market size is measured by the value of crypto assets locked in.
The current estimated throughput of Ethereum is around 15 transactions per second. The low throughput and high demand drive the transaction fees up. As per the current estimate, the average transaction fee on Ethereum is around $10. The increased scalability is expected to bring down the transaction fees drastically and result in wide spread adoption of the platform.
Another concerning issue is that thousands of miner nodes (as of now there are over 10,000 miner nodes on Ethereum) run proof-of-work (PoW) consensus mechanism that results in huge energy consumption, which is not environment friendly. To make Ethereum more sustainable, the energy consumption by the overall network needs to be brought down.
The Eth2 upgrade
The Ethereum upgrade vision states as “To bring Ethereum into the mainstream and serve all of humanity, we have to make Ethereum more scalable, secure, and sustainable.”
Ethereum 2.0 or Eth2 is an upgrade effort towards solving the blockchain trilemma by improving security and scalability while preserving the decentralization. The upgrade is making couple of structural changes to the network. With these changes, Ethereum would strengthen security, scale to new heights and achieve even higher decentralization with a greater number of validator nodes. More importantly, it would address the bigger concern of extensive energy usage.
These upgrades are being built by multiple teams from across the Ethereum community, and would be released in a phased manner, expected to be completed by 2023.
The two major structural changes in the Ethereum network are moving to proof-of-stake (PoS) consensus mechanism and sharding of the chain as below.
Proof-of-Stake
Nodes play role of validators and add the block to the chain. Eth1 and Bitcoin blockchains use PoW consensus mechanism, where the miner node spends huge amount of computational power to solve the cryptographic puzzle to get the right to add a block. Ethereum is replacing PoW with PoS in Eth2. In PoS, the protocol selects a validator for an upcoming block from within the pool of validators/stakers. To become a validator/staker in PoS, a node has to stake significant amount of Ether (as of now 32 ETH) to the protocol.
Sharding
A blockchain network can achieve higher scalability by more powerful node hardware. However, this would limit the number of nodes in the network as not many nodes would be able to deploy powerful and expensive hardware. As a result, lower number of nodes would make the network less decentralized and thereby wane the security. To truly achieve the higher throughput, Ethereum is planning to implement shard chains.
Sharding in computer science is referred as splitting the database horizontally into smaller partitions to distribute the load thereby increasing overall capacity, performance and handling. Similarly, shard chains are smaller blockchains running in parallel collectively forming a bigger network. Eth2 is going to have 64 shards running with PoS consensus. Having 64 chains in the Ethereum network would increase the capacity of the network. A good analogy to this is a congested highway with one lane expanded to 64 lanes thereby increasing the traffic throughput. A smaller chain means no need of expensive hardware to run a node, even a personal laptop can run a shard chain. This will increase the participation and result in more decentralization.
领英推荐
Upgrade meets the vision
Below are the expected benefits of Ethereum upgrade that are in line with the Eth2 vision.
Improved scalability
The current throughput of Eth1 is about 15 transactions per second, while Eth2 would scale to estimated 100,000 tps. The dramatic increase in throughput would mean less transaction fees. This would also give boost to the DeFi transactions and adoption of the platform at larger scale. According to VISA fact sheet, 206 billion payment transactions occurred during 12 months ended June 2021, that averages to about 6532 tps.
Stronger security
Eth2 would improve security against coordinated attacks like 51% attack where a malicious user controls 51% of the network to reverse the transactions or even execute double spending. This attack is avoided with introduction of PoS as it requires the validators to stake significant amount of Ether into the protocol. If they try to attack the network, the protocol can automatically destroy their Ether. Eth2 would also implement shuffling of validators between shards to avoid manipulation further strengthening the security.
Reduced carbon footprint
As per recent estimates the power consumption by crypto mining (with PoW) is over 100 terawatt-hours annually, which is more than a whole country like Finland would use. Eth2 is moving to PoS that does not require to solve crypto puzzles and spend computational work. Hence Eth2 would be dramatically less power intensive. As per the Ethereum foundation estimate, Eth2 would use 99.95% less energy than Eth1.
Implementation Roadmap
Eth2 upgrade is happening in phases. Phase 0 was completed on December 1st, 2020 with launch of Beacon chain. The next phase is merging the Ethereum Mainnet (the current Ethereum network – Eth1) to Beacon chain and that is expected to happen in Q1/Q2 2022. Following phase would roll out 63 shard chains making Eth2 a collection of fully functioning 64 shards including the Mainnet. The rollout of 63 shards is expected to happen sometime in 2023.
The Beacon chain
A functioning Beacon chain is the first step toward upgrade. The Beacon chain is running in parallel with the Mainnet. While Mainnet still uses PoW, Beacon chain is using PoS as consensus mechanism. A functioning Beacon chain is the key to moving from PoW to PoS. Beacon chain does not handle any transactions or smart contracts. Its main responsibility would be to coordinate the expanded network of shards by randomly assigning the stakers (validators) to the shard chains. This would make it difficult for malicious staker/s to collude the network as they are shifted from one shard to the other randomly.
The merge
Eventually the Mainnet will merge to the Beacon chain marking the end of PoW mechanism. After the merge, Mainnet would become one the shards and truly bring the power of transactions and smart contracts to the PoS system. Mainnet would also bring the full history and current state of Ethereum to Eth2.
At this point Ethereum would be one step closer to its vision of being more scalable, secure and eco-friendly. Until now the stakers were validating the Beacon chain but once the merge happens, stakers would be assigned to validate the Mainnet. Mining will no longer be required so miners would likely invest their earnings (Ethers) into staking in the new PoS system. Merging is the preceding step to roll out 63 shard chains.
The Shard chains
After the merge is completed in 2022, shard chains would be rolled out sometime in 2023. Eventually Beacon chain will assign the stakers to all the shards randomly.
When the first shard chains are rolled out, they would just provide the extra data storage to the network and would not handle any transactions and smart contracts. But they would help achieve the increase of throughput to 100,000 transactions per second from the current ~15 tps. This is achieved with the layer 2 scaling solution like Rollups. I am scoping the detailed explanation of layer 2 mechanisms in a future article. In short, Rollup allows the dApps to bundle transactions into a single transaction off-chain and submit the cryptographic proof to the chain (Mainnet in case of Eth2).
The original plan was to add extra functionality to the shards to make them like Mainnet. This would allow shards to handle transactions and contracts. The Ethereum community is still debating whether this is needed given the current developments in the layer 2 scaling solutions. There is also a possibility that some shards may be upgraded with transactions handling functionality, depending on the future throughput demands. The shards would always have a capability to upgrade though.
Conclusion:
Ethereum, referred as global supercomputer is the foundation of decentralized finance (DeFi). It enabled the cross-border transactions and smart contracts execution. This enablement has opened many disruptive use cases in the world of Finance and almost all other industries including identity, data privacy, governance and social platforms. The disruptors of yesteryears (last two decades) are at the risk of being disrupted by the blockchain platform start-ups and Ethereum as a platform is in the forefront of the enablers. Ethereum as of today, can handle only 15-20 transactions per second and uses proof-of-work mechanism which is not eco-friendly by its nature of extensive energy consumption. But the Eth2 upgrade is seen as the panacea for the biggest concerns of sustainability and scalability. The upgrade is delayed due to various reasons but is on track and coming up robust and even better than initial plan, now included layer 2 scaling options. The recent developments in the layer 2 scaling and launch of few other well-known blockchains like Cardano, Solana, Avalanche etc. is perceived as threat to the Ethereum’s position as market leader. But many and most still believe that with the slow but steady and robust upgrades, Ethereum would retain its leadership spot.