The Ethereum Merge

By Sumi Maria Abraham, Research & Development Engineer, Kerala Blockchain Academy

The much-awaited Ethereum Merge has finally happened. Ethereum successfully transitioned from Proof of Work to Proof of Stake on September 15, 2022. Ethereum is now an environment-friendly blockchain, cutting energy consumption by 99.95%. Changing the consensus mechanism of a live blockchain without suspending its services is challenging. Let us see how the Ethereum community successfully planned and executed a merge in a live system.

Read here the detailed overview of Ethereum 2.0.

Beacon chain

The Proof of Stake consensus mechanism was tested by launching a separate blockchain called Beacon chain in December 2020. The consensus algorithm selects validators and validator committees for proposing and attesting (voting) each beacon block. The Beacon chain has minimal information stored on the block and no support for smart contracts or DApps.

Ethereum Node: Consensus Client + Execution Client

To face the consensus switch, the Ethereum nodes also require some restructuring. The software needed to run a blockchain node is termed a client. Ethereum Nodes are now a combination of the consensus client and execution clients. The execution client handles the transaction execution, while the consensus client handles the consensus and block finalization.

Previously nodes were composed of execution layer clients alone, which was an implementation of Ethereum Virtual Machine (EVM) along with Proof of Work consensus. The transition required a separate piece of software to manage the proof of stake consensus and remove the consensus responsibility from the execution client.

Testnet Merge

All the major Ethereum testnets like Ropsten, Sepolia, Goerli etc., successfully tested the merge with their corresponding beacon chain equivalent.

Bellatrix Upgrade

This upgrade aimed to prepare the beacon chain validators for the merge by adding a transaction execution facility to the beacon chain. Validators can verify the transactions and create blocks in the updated format. The beacon chain blocks will have a facility for embedding the PoW block information also in a field called execution payload.

Now the beacon chain is set to accept blocks from the Ethereum mainnet. This is considered the last major upgrade before the merge.

Paris Upgrade

The Paris upgrade triggers the execution layer’s transition from proof-of-work to proof-of-stake. The changes came into effect once the total difficulty hit a preset TERMINAL_TOTAL_DIFFICULTY (TTD) of 58750000000000000000000 on September 15, 2022.

How did it happen ?

Consensus updates in Ethereum is planned using a technique called difficulty bombing. Difficulty is proportional to the effort required to verify a transaction in a blockchain. The “difficulty bomb” refers to a sudden increase in mining difficulty that will make mining difficult and discourage miners from attempting block creation. The client softwares are also updated so that once they receive a block exceeding the difficulty limit on the proof of work chain, they will enter a transition mode and start listening to the proof of stake layer for consensus. As soon as the consensus layer has finalized a block whose difficulty exceeds the TERMINAL TOTAL DIFFICULTY, the execution layer will start ignoring the PoW blocks completely. Thus signaling complete switch to proof of stake.

The Beacon chain validators produce the blocks after the TTD, officially confirming the successful transition from Proof of Work to Proof of Stake.

How will the merge “change” Ethereum?

Since the merge happened, many fields related to proof of work consensus have retired. Some of the changes were:

> Difficulty, nonce, mixHash, ommersHash and ommers fields are no longer valid.

> Block and ommer rewards are deprecated. Rewards will be given to validators based on their stake.

> The heaviest chain rule for fork resolution is replaced with the LMD-GHOST rule, followed by Proof of Stake.

What remains unchanged post Merge?

> The Ethereum accounts, balances or applications running on Ethereum will remain the same. All the data in the mainnet will still be accessible and valid.

> The merge will not introduce changes to Ethereum’s native token, ETH.

> Zero changes to the transaction fees. The transactions will follow the same rule; where some fees are burned, and the rest goes to validators (instead of miners in PoW).

To know more about validators and proof of stake in Ethereum, check out our blog on the Beacon chain.

References

[1] https://github.com/ethereum/pm/blob/master/Merge/mainnet-readiness.md

[2] Combining GHOST and Casper

Image Courtesy

https://www.flaticon.com/

--

--

One-stop solution for quality blockchain education and research. Offers best in class blockchain certification programs in multiple blockchain domains.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kerala Blockchain Academy

One-stop solution for quality blockchain education and research. Offers best in class blockchain certification programs in multiple blockchain domains.