Today, we come together to understand the common consensus algorithms and what are the advantages and disadvantages of these algorithms.
1. PoW (Proof of Work)
Proof-of-Work (PoW) is an economic countermeasure against service and resource abuse. It usually requires the user to perform some time-consuming and appropriate complex calculations, and the answer can be quickly checked by the service provider, so as to use the time, equipment and energy as guarantee cost to ensure that the service and resources are used by the real demand.
The advantages of POW are:
(1) As the most secure public-chain consensus mechanism, Bitcoin uses this consensus algorithm
(2) The mechanism is simpler and easier to implement
(3) Relatively fair mining mechanism
The disadvantages of POW are:
(1) Consumption of large amounts of energy (mining of mines consumes huge amounts of electricity).
(2) The time for confirming the block is harder to shorten (the bitcoin network congestion problem is getting worse)
(3)mainchain possibly fork(BCH was born with a hard fork)
The digital currency using the POW consensus algorithm represents BTC, LTC, ETH, TRF, and so on.
2. PoS (Proof of Stake)
A POS is a person who has more cryptocurrency (equity), the easier it is to get the current block write right (dig mine). It is different from the POW and does not need to consume a lot of power, because there is no need for competition. The POS has generated all the currencies at the beginning, that is, the new block will not create new currency, but they can still get the transaction fee as a reward. Later versions of the POS also have designs for block mining incentives, especially if the POS is to be applied on the public chain.
How does the POS specifically select the writer of the current block? If you always choose the one with the highest equity, the member with the most money will always have exclusive write access, so the following two methods are usually implemented:
(1) Selection method for randomization:
Random numbers are generated, and writers are selected by random numbers with a specific formula, but those with higher equity still have a greater chance of being selected.
(2) Selection method based on currency age:
For example, if you hold a currency that is more than 30 days old, you can add a write-in competition. By multiplying the quantity of each currency by the number of days you hold, you can get a number. The higher the number, the higher the chance of being selected as a writer. Once the writing rights are obtained, the currency age of this batch of currency will be zeroed and it will take another 30 days to rejoin the calculation. With a currency age of more than 90 days, there is no way to further increase the odds. Holding a large amount of currency may also reach a maximum probability. This method can effectively improve the situation of centralization and greatly increase the difficulty of the attack.
The advantages of POS are:
(1) No need to compete for power, so low energy consumption
(2) Members who compete for writing rights must have money, so they prefer to guard the system in order to avoid evaporation
The disadvantages of POS are:
(1) A member who has an interest may not wish to participate in the accounting
(2) If the bad guys who get the write-in rights want to rewrite another fake chain, it only takes a small amount of calculation, which may lead to double spending
(3) The cost of doing bad things is very low and there is no penalty mechanism
(4) Based on (2) and (3) above, implementation of POS needs to be combined with other mechanisms to improve this situation and is therefore more complex than POW.
Digital currency using the POS consensus algorithm represents BLK, QTUM, and so on.
3. DPoS (Delegated Proof of Stake)
One of the downsides of POS is that the member who has the equity does not necessarily want to participate in the billing, and the DPOS can solve the problem. Similar to the democratic representative system, it first selects the billing participant (validation node) through the equity certificate, and then The operating mechanism allows these verification nodes to compete for block write rights. At the same time, due to the significant reduction in the number of verification nodes, consensus can be reached quickly.
In addition to the advantages of POS, DPOS includes:
(1) Reducing the number of participating nodes and significantly increasing consensus speed. This is one of the key reasons why EOS can support high-concurrency applications.
The disadvantages of DPOS are:
(1) Must rely on cryptocurrencies, but in many cases in today's alliance chain there is no cryptocurrency
Digital currency using the DPOS consensus algorithm represents BTS, EOS, TRON, etc.
There are other consensuses
PBFT: Practical Byzantine Fault Tolerance
PoSpace/PoC: Proof-of-space/Proof-of-Capacity
PoA:Proof of activity
PoB:Proof of burn
PoET: Proof of episodes
Interested people can understand these consensuses