From "non-mainstream" to mainstream: the evolution of PoS consensus

InfPool
本文约3713字,阅读全文需要约15分钟
How the PoS mechanism was born and evolved and what the future holds.

image description

Let’s first review how PoW works

secondary title

The Birth of the PoS Mechanism

Under the PoW mechanism, the probability of block generation is related to the size of the computing power. The latecomers try to use the currency holdings instead of the computing power as the basis for proof. Their research all point to a problem: without consuming material resources, we can achieve PoW security level? In 2011, the concept of Proof of Stake was first proposed by a netizen named Quantum Mechanic in the famous Bitcoin community Bitcointalk forum. The article predictably proposes many solutions that are still in use today, such as replacing computing power weights with currency holdings, entrusting rights and interests, reward distribution, and so on.

The first to apply the idea of ​​the PoS mechanism to the actual blockchain project is the Peercoin (Peercoin) led by SunnyKing (net name, its real body is also mysterious). Since Quantum Mechanic proposed PoS in 2011, SunnyKing in 2012 It took more than a year to realize it in August 2010, and the market value of Peercoin once reached the third place in the market value of all cryptocurrencies, second only to Bitcoin and Litecoin, but because there is no investment support, there is also a lack of resources for further development After that, the market value of Peercoin plummeted. In the ensuing 2013-2015 years, Nxt, Blackcoin, Shadowcoin and other cryptocurrencies that applied the PoS mechanism appeared one after another, but they all gradually disappeared from view.

secondary title

Delegate: solve random problems and increase staking ratio

As mentioned at the beginning of the article, the goal of the consensus mechanism is to randomly select the next block producer, but the early PoS mechanism could not solve this problem very well. They often use a parameter that changes with people's behavior in the blockchain (such as the hash value of the previous block) as a random seed, and then generate a pseudo-random number based on this random seed, which makes it possible for the random number to be predicted or even manipulated. In December 2013, BM (Daniel Larimer) talked for the first time in the forum that the random problem can be solved by the token holders voting to select the block producer according to their rights and interests, because the result of voting with a large number of participants is indeed an unpredictable human behavior event . This mechanism that allows token holders to delegate the right to verify blocks to professional nodes by token pledge and voting is called DPoS (Delegate Proof of Stake). BM then applied it in the Bitshares project and built a graphene platform suitable for the DPoS architecture. This graphene technology later became the general bottom layer of the DPoS mechanism. BM's subsequent two projects Steemit, EOS, and LOOM and other projects are based on the graphene platform to build a DPoS public chain.

DPoS public chains such as EOS and Tron are equipped with a fixed number of supernodes. Only those supernodes ranked among the best in the number of votes can have the right to produce blocks. Although voting by token holders is a random process in theory, it also breeds canvassing. At the same time, after the voting status is confirmed, the supernodes of this type of DPoS public chain will take turns to produce blocks in a fixed order, rather than randomly producing blocks. The degree of decentralization of this type of public chain is therefore controversial.

Another development direction of the DPoS mechanism is to retain the core of the mechanism that the token holder pledges and entrusts to the node, but does not limit the number of nodes, and at the same time randomly selects the node according to the equity ratio every time a block is produced. New projects like Tezos, Wanchain, and popular projects like Cosmos need to meet certain requirements set by the public chain to become their nodes, but there is no limit to the number of nodes. Generally, it is required to pledge a specified number of tokens and meet the requirements of the node operation. computer configuration. Due to the existence of the entrustment/authorization mechanism, holders who do not have a sufficient number of tokens or lack conditions for stable operation of nodes can also participate in mining and obtain dividends through staking. Therefore, the DPoS mechanism has greatly improved the staking ratio of the entire network. The public chain has reached 80% or even more than 90%, which is undoubtedly a great improvement compared to the PoS public chain of the previous era, which greatly improves the security of the public chain.

secondary title

Application of Academic "Wonders": BFT+PoS

The Byzantine Fault Tolerant Algorithm (BFT) comes from the Byzantine Generals Problem in 1982. Its essence is a problem of implementing a distributed protocol in a compromised communication network. In the Internet era, only fault tolerance needs to be solved, so the BFT algorithm has no effect, and has been It was not known outside of academia until Satoshi Nakamoto designed it into the blockchain scheme. The first application in the PoS public chain environment is the Tendermint algorithm proposed by Jae Kwon. What is surprising is that the BFT algorithm and the PoS mechanism seem to reflect an excellent compatibility. BFT fault tolerance can bring considerable benefits to the distributed network. Anti-risk ability, and great emphasis on network consistency, makes block confirmation final, brings faster block confirmation speed and solves the fork problem. If pure PoS only solves energy consumption compared with PoW, then compared with pure PoS, BFT+PoS will further solve the problems of PoW's transaction confirmation, transaction fork, and low performance. The leap brought by it cannot be ignored. After all, compared with the development time of the blockchain in just ten years, the security research of the BFT algorithm has passed for 30 years.

secondary title

The way of the future: safer and more efficient

The performance of the public chain is mainly measured by three aspects: security, efficiency, and decentralization. Before the consensus mechanism was upgraded, EOS was considered to sacrifice the degree of decentralization to improve high efficiency. Therefore, it is impossible to achieve high performance in the three aspects at the same time. However, after the consensus mechanism was upgraded to BFT+DPoS, and other BFT+PoS projects went online, the degree of decentralization of the DPoS public chain gradually improved, and the mechanism gradually improved. The focus of future PoS mechanism development will be to continue to improve security and efficiency on the basis of ensuring decentralization.

The degree of security mainly includes two aspects, one is the degree of randomness selected by block producers, and the other is the degree of participation in block verification. Although the DPoS mechanism and the random number algorithm partially solve the random problem, the generation of true random numbers is still an almost impossible challenge. Therefore, the existing randomly selected nodes are still often questioned as pseudo-random and have security risks. Cardano, the PoS public chain project with the second largest market value, is committed to solving the random number problem. The Ouroboros consensus algorithm created by it is considered to be the first proof-of-stake protocol with scientific evidence for its security. The Algorand protocol proposed by Professor Silvio Micali of the Department of Mechanical Engineering and Computer Science at MIT and his collaborators applies a new Byzantine consensus protocol, which can prove that the verifiers participating in each round of voting are randomly selected, which is more random than the previous PoS consensus. Unpredictable and harder to manipulate. This is the development of PoS consensus on randomness.

image description

image description

Chart source: stakingrewards.com

In terms of performance, EOS can currently produce a block every 500ms, and because it will not fork, the block will be confirmed immediately, instead of waiting for 6 blocks or an hour to confirm the transaction like Bitcoin, the performance is extremely high. Earth lifts. For the future cross-chain ecology, the current popular cross-chain projects Cosmos and Polkadot also apply the BFT+PoS consensus as the cross-chain infrastructure. PoS projects undoubtedly have better performance than PoW projects, and with the continuous development of BFT algorithm and network communication technology, the performance will be further improved.

Some pictures are from the Internet