PoS, Sharding, The Merge; Ethereum 2.0.

Salazar Slytherin
7 min readApr 17, 2022

--

Introduction

Ethereum is a perfect blockchain, the first to bring up the smart contract idea and actualize it. It’s been the most practical blockchain, used in gaming and arts (NFTs), finance (DeFi), metaverse, and a lot more real-world uses. But, there lies a problem; Ethereum isn’t scalable — the complaints about high gas fees and slow transactions have made a lot of other blockchains, ‘Eth killers,’ thrive. Retailers and even institutions might prefer to use other blockchains because of this issue. But, there’s a solution — Eth2.0.

Eth 2.0

Concerns about the scalability issue have led to the creation of an upgrade to Ethereum on several levels. This upgrade is called Eth2.0 or serenity. Eth2.0 aims to make Ethereum more scalable, secure, and sustainable.

Scalability

The current TPS (transaction per second) of Ethereum is 15 TPS; Eth2 aims to boost it to 100k TPS. But, this increase in TPS shouldn’t come at a cost of increasing the size of the nodes in the chain.

Security

The security of any system, whether it’s a blockchain or anything, is a top priority. Eth2 aims to increase the security of the chain against all forms of attack, including the 51% attack, where a person takes control of more than half of all the validators in the chain.

Sustainability

The PoW (Proof of Work) mechanism, currently used by Eth, consumes a lot of energy and this isn’t good for our environment. PoW is a mechanism where miners validate transactions and compete to add new blocks to the blockchain by solving complex mathematical puzzles. The more they solve, the harder and more complex it gets, leading them to use a huge amount of energy to scale through.

Eth2 aims to stop this by replacing POW with PoS (Proof of Stake). PoS is a consensus mechanism that allows validators to stake (lock their Eth in a smart contract) their Ethereum to verify transactions, which helps to maintain integrity in a blockchain.

Like I said at the start of the article, Ethereum is the perfect blockchain — to verify this, it’s key to note that all these upgrades were stated in the Ethereum roadmap and were discussed even before the chain launched.

Transitioning from PoW to PoS: PoW → PoS

PoW is an old blockchain consensus mechanism; we can trace its roots in blockchain to Bitcoin. Bitcoin was the first known cryptocurrency blockchain network to use the PoW mechanism. This proves that it’s a battle-tested mechanism. However, due to its massive consumption of energy, miners use mostly electricity to validate blocks and earn rewards (blocks rewards and transactions fees), this mechanism isn’t environmentally friendly.

PoS addresses this issue by removing miners and replacing them with validators. These validators use an economic incentive model in which they stake their Eth to receive similarly to miners — block rewards and transaction fees. This helps to remove any trace of energy consumption. Validators do everything miners do except for consuming energy. To become a validator you have to stake 32Eth, you can also stake less than 32Eth by using staking pools.

To discourage validators from maliciously gaining the system and validating fraudulent transactions, a mechanism called slashing where validators lose part of their staked Eth if they try to defraud the chain.

Also, note that for a 51% attack to occur in the PoS network, the attacker must acquire 51% of all the validators, which would require a lot of capital.

The PoS mechanism helps Eth2 to achieve its goals, which are sustainability, security, and scalability. Sustainable by removing energy-consuming miners, more secure by making 51% attack harder and more scalable by unlocking Sharding. Sharding is possible in PoS and not PoW because in PoS a built-in protocol algorithm (Beacon Chain) helps to randomly select validators for each shard so that malicious validators with a small stake cannot concentrate on a shard and attack it, thereby affecting the security of the chain. Whereas, in PoW it’s more difficult because of its direct schemes, as miners can’t be prevented from concentrating on a particular shard.

Sharding

Sharding is a concept in computer science in which a database is split into smaller partitions. This is also related to the Eth2.0 mechanism. In Ethereum, sharding will split the main chain into different new chains, specifically 64 new chains; each chain will be known as a shard. This will help in Eth’s scalability as the shards will reduce the load from the main chain. For example, a sharding scheme on Ethereum will look like this: all addresses starting with 0x01 will be put into one shard, addresses starting with 0x02 into another shard, etc. Each shard will store its data.

Shard Technology

When you submit a transaction on a shard, a validator (proof of stake nodes) is assigned to approve your transaction to a shard block. This is coordinated by the Beacon chain, which randomly selects a validator to propose new blocks. If a validator isn’t chosen, they’ll have to attest to another validator’s proposal and confirm that everything is legit — at least 128 validators (committee) are required to attest to each shard block and this is recorded in the beacon chain. The committee and the proposing validator have a time frame (slot) to propose each shard block. Only 32 slots per epoch and one block can be created per slot. After each epoch, the committee and the proposing validator are disbanded and replaced with a different set of participants, this is a cycle that helps to secure the network from malicious committees.

Note, Shard block proposals with enough attestations are rewarded with block rewards. This is done by a cross-link which confirms block inclusion and transaction in the Beacon chain.

Sharding helps to keep the network decentralized and secure. Nodes won’t handle too many tasks on a shard chain, thereby making nodes easy to create, leading to the creation of many nodes which will secure the network.

‘What of scalability?’

Well, a shard chain won’t be able to handle transactions or run smart contracts but only store extra data.

Scalability solution on sharding

Scalability will be possible due to Layer 2 scaling, in particular, Rollups. Rollups will bundle and perform transactions outside the Ethereum chain but post the transaction data back to the Ethereum chain. In detail, a rollup will create a cryptographic proof after performing transactions and submit it back to the chain, specifically a shard chain which stores the proof — this will result in Ethereum being able to process 100k transactions per second.

Layer2 chains like Polygon are already live and scaling Eth like never before; its Rollups will come live this year.

Beacon Chain

The Beacon Chain is the backbone of Eth2, the chain coordinating all players, the mitochondria of the Eth2 cell. Cheers, some poetic juice.

One Beacon Chain coordinates the 64 separate shard chains by randomly choosing the block proposer for each shard; organizing validators into committees to attest to proposed blocks; penalizing and rewarding validators.

It also manages the proof of stake protocol — its mechanism is built to coordinate the creation of new blocks, make sure blocks are valid, and reward Eth stakers; it’s simply the powerhouse of Eth2.0.

Merge or Docking

This will mark the end of PoW in Ethereum as the main Ethereum chain (Eth1) will merge with the beacon chain (proof of stake protocol). In simpler terms, Eth2 PoS (Beacon Chain) will become the real Ethereum blockchain, while Eth1 becomes another shard; Eth2 will replace Eth1 and Eth1 will become a shard. Therefore, no miners are needed at this point, Voom Ethereum becomes a fully-fledged scalable blockchain.

Beacon Chain, the PoS network, went live on Dec 1, 2020. The merge is expected to go live this year while sharding comes later on, maybe sometime this year too.

All these solutions will bring forth the perfect blockchain — Eth2.0.

If you enjoyed this write-up and would like to reach out to me. This is my twitter handle — twitter.com/0xSalazar

Please remember to do your research. None of this is financial advice.

--

--