eview and Prospect of Crypto Economy-Development and Evolution of Consensus Mechanism (2)

Foreword

The consensus mechanism is one of the important elements of the blockchain and the core rule of the normal operation of the distributed ledger. It is mainly used to solve the trust problem between people and determine who is responsible for generating new blocks and maintaining the effective unification of the system in the blockchain system. Thus, it has become an everlasting research hot topic in blockchain.

This article starts with the concept and role of the consensus mechanism. First, it enables the reader to have a preliminary understanding of the consensus mechanism as a whole; then starting with the two armies and the Byzantine general problem, the evolution of the consensus mechanism is introduced in the order of the time when the consensus mechanism is proposed; Then, it briefly introduces the current mainstream consensus mechanism from three aspects of concept, working principle and representative project, and compares the advantages and disadvantages of the mainstream consensus mechanism; finally, it gives suggestions on how to choose a consensus mechanism for blockchain projects and pointed out the possibility of the future development of the consensus mechanism.

Contents

First, concept and function of the consensus mechanism

1.1 Concept: The core rules for the normal operation of distributed ledgers

1.2 Role: Solve the trust problem and decide the generation and maintenance of new blocks

1.2.1 Used to solve the trust problem between people

1.2.2 Used to decide who is responsible for generating new blocks and maintaining effective unity in the blockchain system

1.3 Mainstream model of consensus algorithm

Second, the origin of the consensus mechanism

2.1 The two armies and the Byzantine generals

2.1.1 The two armies problem

2.1.2 The Byzantine generals problem

2.2 Development history of consensus mechanism

2.2.1 Classification of consensus mechanism

2.2.2 Development frontier of consensus mechanism

Third, Common Consensus System

Fourth, Selection of consensus mechanism and summary of current situation

4.1 How to choose a consensus mechanism that suits you

4.1.1 Determine whether the final result is important

4.1.2 Determine how fast the application process needs to be

4.1.2 Determining the degree to which the application requires for decentralization

4.1.3 Determine whether the system can be terminated

4.1.4 Select a suitable consensus algorithm after weighing the advantages and disadvantages

4.2 Future development of consensus mechanism

Last lecture review: Chapter 1 Concept and Function of Consensus Mechanism plus Chapter 2 Origin of Consensus Mechanism

Chapter 3 Common Consensus Mechanisms (Part 1)

Figure 6 Summary of relatively mainstream consensus mechanisms

📷

Source: Hasib Anwar, “Consensus Algorithms: The Root Of The Blockchain Technology”

The picture above shows 14 relatively mainstream consensus mechanisms summarized by a geek Hasib Anwar, including PoW (Proof of Work), PoS (Proof of Stake), DPoS (Delegated Proof of Stake), LPoS (Lease Proof of Stake), PoET ( Proof of Elapsed Time), PBFT (Practical Byzantine Fault Tolerance), SBFT (Simple Byzantine Fault Tolerance), DBFT (Delegated Byzantine Fault Tolerance), DAG (Directed Acyclic Graph), Proof-of-Activity (Proof of Activity), Proof-of- Importance (Proof of Importance), Proof-of-Capacity (Proof of Capacity), Proof-of-Burn ( Proof of Burn), Proof-of-Weight (Proof of Weight).

Next, we will mainly introduce and analyze the top ten consensus mechanisms of the current blockchain.

》POW

-Concept:

Work proof mechanism. That is, the proof of work means that it takes a certain amount of computer time to confirm the work.

-Principle:

Figure 7 PoW work proof principle

📷

The PoW represented by Bitcoin uses the SHA-256 algorithm function, which is a 256-bit hash algorithm in the password hash function family:

Proof of work output = SHA256 (SHA256 (block header));

if (output of proof of work <target value), prove that the work is completed;

if (output of proof of work >= target value), change the random number, recursive i logic, continue to compare with the target value.

New difficulty value = old difficulty value* (time spent by last 2016 blocks /20160 minutes)

Target value = maximum target value / difficulty value

The maximum target value is a fixed number. If the last 2016 blocks took less than 20160 minutes, then this coefficient will be small, and the target value will be adjusted bigger, if not, the target value will be adjusted smaller. Bitcoin mining difficulty and block generation speed will be inversely proportional to the appropriate adjustment of block generation speed.

-Representative applications: BTC, etc.

》POS

-Concept:

Proof of stake. That is, a mechanism for reaching consensus based on the holding currency. The longer the currency is held, the greater the probability of getting a reward.

-Principle:

PoS implementation algorithm formula: hash(block_header) =<target * coinage

Coin age calculation formula: coinage = number of coins * remaining usage time of coins

Among them, coinage means coin age, which means that the older the coin age, the easier it is to get answers. The calculation of the coin age is obtained by multiplying the coins owned by the miner by the remaining usage time of each coin, which also means that the more coins you have, the easier it is to get answers. In this way, pos solves the problem of wasting resources in pow, and miners cannot own 51% coins from the entire network, so it also solves the problem of 51% attacks.

-Representative applications: ETH, etc.

》DPoS

-Concept:

Delegated proof of stake. That is, currency holding investors select super nodes by voting to operate the entire network , similar to the people’s congress system.

-Principle:

The DPOS algorithm is divided into two parts. Elect a group of block producers and schedule production.

Election: Only permanent nodes with the right to be elected can be elected, and ultimately only the top N witnesses can be elected. These N individuals must obtain more than 50% of the votes to be successfully elected. In addition, this list will be re-elected at regular intervals.

Scheduled production: Under normal circumstances, block producers take turns to generate a block every 3 seconds. Assuming that no producer misses his order, then the chain they produce is bound to be the longest chain. When a witness produces a block, a block needs to be generated every 2s. If the specified time is exceeded, the current witness will lose the right to produce and the right will be transferred to the next witness. Then the witness is not only unpaid, but also may lose his identity.

-Representative applications: EOS, etc.

》DPoW

-Concept:

Delayed proof of work. A new-generation consensus mechanism based on PoB and DPoS. Miners use their own computing power, through the hash algorithm, and finally prove their work, get the corresponding wood, wood is not tradable. After the wood has accumulated to a certain amount, you can go to the burning site to burn the wood. This can achieve a balance between computing power and mining rights.

-Principle:

In the DPoW-based blockchain, miners are no longer rewarded tokens, but “wood” that can be burned, burning wood. Miners use their own computing power, through the hash algorithm, and finally prove their work, get the corresponding wood, wood is not tradable. After the wood has accumulated to a certain amount, you can go to the burning site to burn the wood. Through a set of algorithms, people who burn more wood or BP or a group of BP can obtain the right to generate blocks in the next event segment, and get rewards (tokens) after successful block generation. Since more than one person may burn wood in a time period, the probability of producing blocks in the next time period is determined by the amount of wood burned by oneself. The more it is burned, the higher the probability of obtaining block rights in the next period.

Two node types: notary node and normal node.

The 64 notary nodes are elected by the stakeholders of the dPoW blockchain, and the notarized confirmed blocks can be added from the dPoW blockchain to the attached PoW blockchain. Once a block is added, the hash value of the block will be added to the Bitcoin transaction signed by 33 notary nodes, and a hash will be created to the dPow block record of the Bitcoin blockchain. This record has been notarized by most notary nodes in the network. In order to avoid wars on mining between notary nodes, and thereby reduce the efficiency of the network, Komodo designed a mining method that uses a polling mechanism. This method has two operating modes. In the “No Notary” (No Notary) mode, all network nodes can participate in mining, which is similar to the traditional PoW consensus mechanism. In the “Notaries Active” mode, network notaries use a significantly reduced network difficulty rate to mine. In the “Notary Public Activation” mode, each notary public is allowed to mine a block with its current difficulty, while other notary public nodes must use 10 times the difficulty of mining, and all normal nodes use 100 times the difficulty of the notary public node.

Figure 8 DPoW operation process without a notary node

📷

-Representative applications: CelesOS, Komodo, etc.

CelesOS Research Institute丨DPoW consensus mechanism-combustible mining and voting

》PBFT

-Concept:

Practical Byzantine fault tolerance algorithm. That is, the complexity of the algorithm is reduced from exponential to polynomial level, making the Byzantine fault-tolerant algorithm feasible in practical system applications.

-Principle:

Figure 9 PBFT algorithm principle

📷

First, the client sends a request to the master node to call the service operation, and then the master node broadcasts other copies of the request. All copies execute the request and send the result back to the client. The client needs to wait for f+1 different replica nodes to return the same result as the final result of the entire operation.

Two qualifications: 1. All nodes must be deterministic. That is to say, the results of the operation must be the same under the same conditions and parameters. 2. All nodes must start from the same status. Under these two limited qualifications, even if there are failed replica nodes, the PBFT algorithm agrees on the total order of execution of all non-failed replica nodes, thereby ensuring security.

-Representative applications: Tendermint Consensus, etc.

Next Lecture: Chapter 3 Common Consensus Mechanisms (Part 2) + Chapter 4 Consensus Mechanism Selection and Status Summary

CelesOS

As the first DPOW financial blockchain operating system, CelesOS adopts consensus mechanism 3.0 to break through the “impossible triangle”, which can provide high TPS while also allowing for decentralization. Committed to creating a financial blockchain operating system that embraces supervision, providing services for financial institutions and the development of applications on the supervision chain, and formulating a role and consensus ecological supervision layer agreement for supervision.

The CelesOS team is dedicated to building a bridge between blockchain and regulatory agencies/financial industry. We believe that only blockchain technology that cooperates with regulators will have a real future. We believe in and contribute to achieving this goal.

📷Website

https://www.celesos.com/

📷 Telegram

https://t.me/celeschain

📷 Twitter

https://twitter.com/CelesChain

📷 Reddit

https://www.reddit.com/user/CelesOS

📷 Medium

https://medium.com/@celesos

📷 Facebook

https://www.facebook.com/CelesOS1

📷 Youtube

https://www.youtube.com/channel/UC1Xsd8wU957D-R8RQVZPfGA

CelesOS is an innovative public chain driven by financial services/applications and providing access for regulators and policy makers.