What is the Ethereum Beacon Chain?
If you have been following the blockchain space, you might have recently heard about the term “Ethereum 2.0”, or “Eth2.” Deprecated by the Ethereum Foundation team and corrected as the “consensus layer”, the term refers to a major upgrade to the current Ethereum chain to improve its sustainability, scalability, and security.
As the first part of this upgrade, Ethereum has actually already launched something called the Beacon Chain on December 1st, 2020. The Beacon Chain is currently live but exists as a separate chain from the original Ethereum Mainnet, running side-by-side with the latter and not affecting anything on it.
In the future, the Beacon Chain will connect to and bring its improvements onto the Mainnet in an event known as “The Merge.”
Unlike the Ethereum Mainnet, the Beacon Chain does not handle transactions or smart contracts. Instead, it coordinates the entire Ethereum network by managing its stakers (who validate the proof of stake blocks) and shard chains (split-up chains of the main network).
Indeed, these are the two features of the Beacon Chain that make it important for the new upgrade. In fact, the Beacon Chain has always been a part of Ethereum founder Vitalik Buterin’s vision since 2015 for what eventually Ethereum should become.
Introducing proof of stake (PoS)
First, the Beacon Chain introduces the proof of stake consensus mechanism for computers in the blockchain network to validate transactions.
Ethereum currently uses proof of work (PoW), but PoS improves many of the shortcomings of PoW to keep Ethereum secure. This includes less computational power and electricity generation, as well as increased decentralization and security,
Introducing shard chains
Once the PoS consensus mechanism is integrated into the Ethereum Mainnet, the Beacon Chain will next introduce shard chains. The purpose of shard chains is to distribute the load of the network by splitting the main Ethereum network into smaller blockchains - specifically, 64 of them.
As such, instead of processing the transaction of the entire blockchain, nodes are now only responsible for their shard. Correspondingly, this increases the transaction speed of Ethereum and results in lower transaction fees.
Understanding proof of stake (vs. proof of work)
Now, let’s delve into the specifics of what makes PoS the preferred choice for a consensus mechanism. In short, a consensus mechanism allows computers in a blockchain network to agree upon what transactions are valid.
Currently, Ethereum uses PoW, in which all participating “miners” race to solve a complicated mathematical problem to verify new transactions, update the blockchain, and receive a reward. Although PoW is proven and secure, it has become increasingly impractical due to its energy-intensive process.
In comparison, PoS solves this by semi-randomly (see more below) selecting only a few “validators” at a time to validate the transactions in the next block and propose that block to the blockchain. This is called “minting” blocks, as compared to “mining” in PoW.
This significantly reduces the computational power and energy needed to mint a new block because not everyone is competing, thereby making PoS a more eco-friendly way to secure the network.
How do you become a validator?
To become a validator, a node needs to deposit a certain amount of coins into the Ethereum network. This is called “staking,” similar to a collateral or security deposit. For the upgrade, one has to stake a minimum of 32 ETH on the main Ethereum chain to run a validator node.
The size of the stake determines the chance that a validator will be selected for minting in a linear fashion. For example, if Alice stakes 320 ETH (wowza!) and Bob stakes 32 ETH, Alice’s node will have a 10 times higher chance of being chosen to mint the next block. Hence, the selection process is not completely random.
When a validator is chosen to validate the next block, they will first verify if all the transactions in the block are valid or not. Once everything looks good, the validator will change the state of the blockchain by writing that block onto the blockchain.
This information is then confirmed by a “committee” of at least 128 other validators in a process called attestation. If the block checks out, the initially chosen validator will receive a staking reward, which is made up of all the fees that are associated with the validated transactions.
How are validators kept honest?
Trusting that stakers will behave as honest validators is crucial for PoS to function successfully, and there are several ways this is accomplished.
First, if validators approve fraudulent transactions, then they will lose a part of their stake, or get “slashed.”
This is partly why the stake is so high (32 ETH ≈ $100,000). If the stake is always higher than the staking reward, a staker will have no financial incentive to become a dishonest node because they will lose more money than they can potentially gain.
In addition, if a node wishes to exit its role as a validator, there is a delay of around 25 minutes before its stake and staking rewards can be withdrawn. Within this lock-up period, the validator may still be slashed, should the network find that they approved fraudulent blocks.
The Ethereum Foundation team has really thought this through by holding the validators accountable on all fronts!
PoS: A more secure and decentralized blockchain?
Another downside of PoW is that it encourages the use of mining pools. This is where miners team up and combine their computational power to increase their chance of solving the hash, after which the reward is distributed evenly across everyone in the pool.
This also creates the potential for bad actors to aggregate their mining pools and control more than 51% of the network’s total hashing power. Known as the 51% attack, this centralization of the blockchain could allow these mining pools to approve fraudulent transactions for their own gain.
Centralization goes against the most fundamental principle of blockchain, and PoS solves this issue. How?
Instead of relying on the aggregation of computational power from mining equipment, PoS chooses its validators depending on how much they stake. So, one would need to acquire over 51% of all the staked coins to initiate a 51% attack in PoS, making it highly expensive and impractical as this may cost up to hundreds of billions of dollars, depending on the coin’s value.
Furthermore, mining pools also enjoy the power of economies at scale. Under PoW, the revenue that an additional miner would potentially generate is greater than the cost of adding that miner to a big mining pool. Thus, this essentially makes the rich even richer.
In contrast, staking and becoming a validator is easier than mining, as people don’t need to start off by purchasing expensive mining equipment. As such, the Ethereum Foundation team hopes that this will encourage more people to participate in the network, thereby making it more decentralized and safe from 51% attacks overtime.
What is sharding?
Sharding is originally a concept in database management, where a large piece of data is split up and stored into many different pieces of hardware. In terms of Ethereum, this refers to splitting the blockchain network into 64 chains known as “shards.”
Each shard includes shard blocks and runs independently as its own blockchain. Moreover, instead of running the entire Ethereum network, each node will only need to store one shard and validate (if the node stakes) the transactions associated with that shard.
In other words, this allows machines that have limited local disk space to participate as nodes in Ethereum, which further encourages decentralization.
One way to understand the improvements shards bring is through this simple analogy: if a running track only has one lane, then it will get really crowded and runners won’t be able to run as fast; but if the track adds 63 more lanes, then a lot more runners can use the track and they can also run much faster, and even the slow runners can now join!
In the above analogy, lanes represent shard chains and runners represent transactions (or people trying to make transactions). So in essence, sharding is a scaling solution for Ethereum to improve its transaction capacity from the current 15 to tens of thousands of transactions per second (TPS).
How will shard chains be implemented?
After the Beacon Chain merges with the Ethereum Mainnet, the next step of the upgrade will be introducing shard chains into the PoS network. This upgrade will have two versions.
Version 1: Data Availability
In the first version, 63 new chains (for a total of 64) will be added as data deposits to the Ethereum network. Initially, they won’t support handling transactions and running smart contracts.
However, by giving Ethereum more capacity to store and access data, this will still dramatically improve the entire network by increasing the overall TPS when combined with rollups.
In short, rollups are a layer 2 solution that takes, or “rolls up,” a bunch of transactions into a single piece of data and executes them outside the main Ethereum blockchain (layer 1). The completed transaction data is then posted back onto layer 1.
Since you are essentially processing a piece of data that contains many transactions with the same speed as you would process a single transaction, this reduces the data needed for a transaction. With the extra data added by the shard chains, this will significantly improve the scalability of the overall network. Transaction throughput will be increased up to 100,000 TPS, which also means lower gas fees.
Version 2: Code Execution
In the second and final version, the current Ethereum Mainnet will become one of the 64 shard chains. In other words, each shard will be able to process transactions and execute smart contracts on its own. Shards will also be able to communicate with one another to handle cross-shard transactions.
However, it is widely debated among the Ethereum community whether version 2 should be implemented. Many argue that version 1 is sufficient because the initial purpose was to improve scalability by increasing TPS, but Ethereum’s founder Vitalik Buterin has proposed the possibility of having only a portion of the shards be code execution shards and revisiting the debate when the development of Zero-Knowledge (ZK) snarks firm up.
As mentioned earlier, the Beacon Chain coordinates the network of stakers and shards. Having discussed how staking and sharding work, we can finally see how all of this will come together in the upgrade.
With shard chains, validators are no longer responsible for the entire Ethereum network where new transactions are broadcasted to every node. Instead, they will only need to validate blocks on their own shard. So, each time a block needs to be verified in a particular shard, the Beacon Chain generates random numbers to assign stakers to validate the shard block.
The PoS consensus mechanism stays the same, where after a staker validates a shard block, a committee of validators then comes in to confirm on the main Ethereum chain. Once this attestation process is complete, the transactions in the shard block are confirmed for the entire network by creating a cross-link with the Beacon Chain.
In essence, this cross-link allows the state of the shard blocks to be periodically recorded onto the Beacon Chain, which enables information to be relayed to and from different shards.
The overall roadmap
Note that this was the initial roadmap planned by the Ethereum Foundation team. However, to facilitate the transition away from PoW, Phase 1.5 is now prioritized over Phase 1.
Releasing the Beacon Chain with its PoS consensus mechanism, which went live on December 1, 2020.
Launching and testing the version 1 shard chains. This is expected to be shipped sometime in 2023 after “The Merge,” which is now set to precede the roll-out of shard chains in order to expedite the transition to PoS.
What people call “The Merge” but formerly referred to as “The Docking” by the Ethereum Foundation team. Phase 1.5 will connect the Ethereum Mainnet as the first shard to the Beacon Chain, which will mark the end of PoW and start a fully PoS-based blockchain network. This shift was initially scheduled for June of 2022, but it is now postponed to Q3/Q4 of 2022.
This is basically the former launch of the new upgrade, which may include the version 2 shard chains and an update to the Ethereum Virtual Machine (EVM). However, this is still a bit down the road and has no set date.
Where are we, and what is next?
Ethereum shipped Phase 0 in 2020 and we are currently waiting for Phase 1.5, or “The Merge”, to launch in late 2022. As Ethereum eliminates its current energy-intensive mining process, more people will join the network by easily setting up nodes and validators will secure the network with staked ETH.
This is a huge and exciting step in realizing the Ethereum vision of scalability, security, and sustainability, benefiting not only the users of the network but also creating a greener future for the blockchain space.