This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9335|Reply: 1

Introduction and experience of [blockchain] consensus algorithm (POW, POS, DPOS, PBFT).

[Copy link]
Posted on 2/22/2018 3:54:09 PM | | |
POW: Proof of Work.

Bitcoin uses the POW mechanism in the process of generating blocks, and a block hash that meets the requirements is composed of N leading zeros, and the number of zeros depends on the difficulty value of the network. Getting a reasonable block hash requires a lot of attempted calculations, and the calculation time depends on the machine's hashing speed. When a node provides a reasonable block hash value, it means that the node has indeed undergone a lot of attempts to calculate, of course, it cannot obtain an absolute value of the number of calculations, because finding a reasonable hash is a probabilistic event. When a node has n% of the computing power of the entire network, the node has an n/100 probability of finding the Block Hash.

POS: Proof of Stake.

POS: Also known as proof of stake, similar to property stored in a bank, this model distributes you the corresponding interest based on the amount and time you hold digital currency.
In the proof-of-stake POS mode, there is a term called coin age, each coin produces 1 coin age every day, for example, you hold 100 coins, a total of 30 days, then, at this time, your coin age is 3000, at this time, if you find a POS block, your coin age will be emptied to 0. For every 365 coins you empty, you will earn 0.05 coins of interest from the block (assuming that the interest can be understood as 5% per annum), so in this case, the interest = 3000 * 5% / 365 = 0.41 coins, which is interesting.

DPOS: Delegated Proof of Stake

The DPoS mechanism of Bitshares, the Chinese name is the Proof of Share Authorization Mechanism (also known as the Trustee Mechanism), its principle is to let everyone who holds Bit shares vote, resulting in 101 representatives, which we can understand as 101 supernodes or mining pools, and these 101 supernodes have completely equal rights to each other. From a certain point of view, DPOS is a bit like a parliamentary system or a people's congress system. If the delegates fail to perform their duties (failing to generate a block when it's their turn), they are delisted and the network elects a new supernode to replace them. The emergence of DPOS is mainly due to the generation of mining machines, and a large amount of computing power is on people who do not understand or care about Bitcoin, similar to concert scalpers, hoarding a large number of tickets and not caring about the content of the concert at all.

PBFT: Practical Byzantine Fault Tolerance, Practical Byzantine Fault Tolerance Algorithm. See the introduction of the Byzantine fault tolerance algorithm above.
PBFT is a state machine replication algorithm, that is, the service is modeled as a state machine, and the state machine replicates at different nodes of the distributed system. Each copy of the state machine saves the state of the service and also implements the operation of the service. The set of all copies is represented by a capital letter R, using 0 to | The integer of R|-1 represents each copy. For the sake of description, assume | R|=3f+1, where f is the maximum number of copies that may fail. Although more than 3f+1 replicas can exist, additional replicas do not improve reliability other than reduce performance.

The above are mainly the current mainstream consensus algorithms.
From a chronological point of view, this order is also determined according to the order in which the consensus algorithm was born to become popular.
For POW, Bitcoin is directly made a reality and put into use. The existence of POS is mainly from economic considerations and innovation. In the end, due to the existence of professional miners and mining machines, the community has substantial centralization concerns about this algorithm that claims to be decentralized, that is, it is rumored that 60%~70% of the computing power is concentrated in China. Therefore, DPOS appeared later, which does not require much additional computing power to distribute equity to the output of the mining pool. However, it is impossible to say that it can play a substitution role, DPOS to replace POW alone, POS or POW+POS, after all, existence is reasonable. Each algorithm has its own considerations and meanings in a specific period of time, whether technical or business.

If you jump out of the perspective of a technician, there may be more consensus algorithms that combine politics and economics in it, and maybe there will be more consensus algorithms, such as combining consensus methods similar to the concept of PPP, which can not only achieve the nature of punishment for malicious actors, but also achieve the most efficient and saving computing power.

As for the choice of algorithm, here is a quote from Wanda Jizong's words as an end:

In a word, the best design of consensus is modular, such as Notary, the choice of consensus algorithm is highly related to the application scenario, the trusted environment uses paxos or raft, the permissioned alliance can use PBFT, and the permissionless chain can be POW, POS, Ripple consensus, etc., according to the trust level of the counterparty, freely choose the consensus mechanism, this is really optimal.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com