After The Merge, Ethereum’s consensus algorithm will be proof-of-stake (PoS). Proof-of-stake is replacing proof-of-work (PoW) in Ethereum because it is more secure, uses less energy, and is better for introducing new scaling methods. While switching to proof-of-stake has always been the goal, doing so has required extensive research and development because it is more complicated than proof-of-work. Implementing proof-of-stake on the Ethereum Mainnet is currently a difficulty. “The Merge” is the name of this procedure.
Proof-of-stake (pos): What is it
By investing effort, miners in proof-of-work demonstrate that they are putting money at risk. Validators expressly stake money in the form of ether into an Ethereum smart contract when using proof-of-stake. The validator is therefore in charge of ensuring that newly created blocks are validly propagated throughout the network as well as occasionally producing and propagating new blocks.
A number of enhancements to the proof-of-work mechanism come with proof-of-stake:
- higher energy efficiency because proof-of-work computations don’t use as much energy.
- Lower entry hurdles and fewer hardware requirements mean that elite hardware is not necessary to have a chance of producing new blocks.
- Proof-of-lower stake’s energy consumption should encourage more nodes to secure the network, reducing the risk of centralization.
- Economic penalties for bad behavior make 51 percent style attacks tenfold more expensive for an attacker compared to proof-of-work.
- If a 51 percent attack were to succeed despite the crypto-economic safeguards, the community may turn to social recovery of an honest chain.
In proof-of-stake, the pace is fixed, in contrast to proof-of-work, where the timing of blocks is dictated by the difficulty of the mining process. Proof-of-stake duration Ethereum is separated into epochs and slots, each lasting 12 seconds (32 slots). In each slot, one validator is chosen at random to propose a block. A fresh block must be created and distributed to other network nodes by this validator. A committee of validators is also drawn at random for each slot, and their votes are used to determine whether or not the block being presented is genuine.
Finality
When a transaction is a part of a block that can’t be changed without burning a sizable quantity of ether, it has “finality” in distributed networks. Using “checkpoint” blocks, this is controlled on Ethereum’s proof-of-stake network. Each epoch’s initial block is a checkpoint. Pairs of checkpoints that the validators deem to be valid receive votes. A pair of checkpoints is upgraded if it receives votes equal to at least two-thirds of the ether invested overall. The aim becomes “justifiable” as it is the more recent of the two. Because it served as the “goal” in the preceding epoch, the earlier of the two is already justified. The status is now “finalized.” An attacker would have to agree to losing at least one-third of the total amount of staked ether, which is presently estimated to be $10,000,000,000, in order to roll back a finished block. This is addressed in detail in this blog article from the Ethereum Foundation. An attacker might stop the network from reaching finality by voting with one-third of the total stake because finality requires a two-thirds majority. The inactivity leak is a defense mechanism against this. When the chain doesn’t finalize for more than four epochs, this turns on. The majority is able to restore a two-thirds majority and complete the chain thanks to the inactivity leak, which drains the staked ether from validators who voted against it.