Ethereum is turning from PoW (Proof of Work) to PoS (Proof of Stake). However, PoS launch time is postponed again and again.
Ethereum uses
Source:
Every wave stands for the impact of the difficulty bomb. The block time increases a lot. The wave disappears because the difficulty bomb is postponed during network upgrades.
The launch of PoS is essential for Ethereum. In this article, we will explain the history of PoS and why it is so hard for Ethereum to switch to PoS.
PoW and PoS are two common consensus approaches. We can ask ourselves these two questions when learning a consensus:
With the framework in the last section, we can analyze PoW shortly. The node which first gets the answer to the computation puzzle right can propose the new block. If there is a fork, the longest fork will become the canonical chain. If anyone would like to manipulate the chain, the attacker needs at least 51% computation power. Compared to PoS, PoW is relatively simple. PoW does not tap into problems like random numbers.
PoW networks are protected by the cost of the work. In the long term, nodes will get rewards proportional to their computation power.
Let’s answer the question at the beginning, why it is so hard for Ethereum to switch to PoS. Part of the reason is that Ethereum is pushing decentralization and encourages more nodes to join the network. This requires a more complex protocol to support the P2P communication of thousands of nodes.
Most networks employ PoS because of
PoS comes through two-phase development. PoS 1.0 is blockchain-based PoS consensus. PoS 2.0 is based on BFT(Byzantine Fault Tolerance).
Examples of PoS 1.0 are PeerCoin, NextCoin, BlackCoin, and Ethereum Serenity.
PoS 2.0 is based on BFT and is widely adopted by projects like Ethereum 2.0, Tendermint, and Cosmos.
During phase 1.0, most PoS looks like this:
The biggest problem of this workflow is the generation of random numbers. If the random number generation is based on timestamp and block hash, the block proposer would generate the new block in a way that increases the probability of being elected as the block proposer again.
Common attack vectors are listed below:
You can find more attack vectors on
PoS 2.0 employs BFT. The goal of BFT is to reach a consensus between different nodes.
The leader will make a proposal. Among all nodes, there are Byzantine nodes. Byzantine nodes cheat in the following ways:
Except for Byzantine nodes, the rest of the nodes are all honest nodes. The most difficult scenario is that the leader node is Byzantine.
Besides these settings, there are some other limitations:
P2P communication causes different nodes to have different views. For example, node A finds 3 new blocks, but node B only sees 1 new block.
The main goal of BFT is that after the leader makes proposals, every node except Byzantine nodes can reach an agreement. The side goal is to find the Byzantine nodes.
The current algorithm can achieve the main goal in the following condition:
Network operation status can be categorized in the following conditions. f is the number of Byzantine nodes. There is a total of 3k+1 nodes in the network.
The popular BFT algorithms are
Modern BFT algorithms employ multi-round votes to ensure every node knows that more than 2/3 of nodes approve the proposal. After the block is finalized, the honest node will never revert it.
Every round of communication has four steps:
The below diagrams show 5 stages during execution. C is the client, 0 is the leader and 3 is the Byzantine node.
Prepare and commit stages are used to ensure the synchronization between different nodes.
For Tendermint, it has several limitations:
If you would like to learn more about PBFT, check out this
Compared to BFT algorithms, Ouroboros can support more and more nodes and it also supports nodes to come in and out at anytime. Ouroboros is more decentralized and flexible than BFT but has a longer finality time. Cardano and Mina uses Ouroboros.
Ouroboros divides time into epochs. Epochs can be divided into slots. Every slot uses VRF to generate random numbers and use this random number to decide the block proposer. Nodes staking more tokens are more possible to be a block proposer.
When there is a fork, Ouroboros will choose the correct chain with predefined selection rules. For example, it may choose the most “dense” chain.
Blockchains are balancing decentralization and performance. Switching from PoW to PoS shows that blockchains are chasing TPS, decentralization, tokenomics, and fast finality. We will see more innovations around these four characteristics.
Some blockchains use sampling techniques to lower the communication frequency between nodes. ZK can be applied to it. Byzantine nodes need to send proofs with their messages. This can prevent Byzantine nodes from cheating. Through verifying the proof, honest nodes can also find byzantine nodes.
The tokenomics innovations in GameFi and DeFi applications can be applied in consensus. For example, we can use Ve tokens to improve the staking ratio. Using dual token design may also be an interesting direction. Separating the rewards and sharing tokens to catch more value.
Application iterates much faster than low-level protocol, like consensus. It is hard to apply innovations on applications to low-level protocols. Modular blockchains may solve this problem. However, it is still risky for blockchains to hot-swap essential modules.
https://www.youtube.com/watch?v=J34dCMIMxd4
This article was first published here.