image.png
Reading Fengyun is a master of Huawei cloud information. He is good at diversifying the presentation of complex information. There is always a picture (Yuntushuo), a simple blog post (cloud small lesson) or short video (cloud video hall) that it produces. You quickly get started with HUAWEI CLOUD. For more exciting content, please click here

Abstract: The is a decentralized distributed ledger database. Based on the characteristics of decentralization and distribution, the blockchain system will face consistency and trust issues. How to make untrustworthy participants reach a consensus? At this time, we need to rely on a reliable consensus algorithm.

This article is shared from Huawei Cloud Community " [Cloud Small Lesson] One of the Key Technologies of Lesson 18 of Application Platform: Consensus Algorithm 1612f24fa69229", author: Reading Fengyun.
image.png

What exactly is a consensus algorithm?

The so-called consensus literally means that everyone has reached an agreement. For example, in a basketball game, in order to carry out the game normally, all participants must reach a consensus on the rules of the game. In simple terms, consensus algorithm refers to a set of rules that allows all participants to agree on a certain result through algorithmic means in the blockchain network.

Why does the blockchain need a consensus algorithm

If there is no consensus algorithm, in a decentralized blockchain network, each participant has a ledger, and anyone can tamper with the content of the ledger at will, and then say that their own ledger is legal, then the system is not a mess. There is no rule and no radius. As the core and foundation of blockchain technology, the consensus algorithm is like a country’s law, enabling the blockchain to realize the decentralization of transactions while ensuring the consistency of each transaction on all accounting nodes. And correctness, and are recognized by all parties involved.

So how did Bitcoin, as the first application of blockchain technology, solve this problem? Satoshi Nakamoto mentioned in Bitcoin’s white paper that Proof of Work (PoW: Proof of Work) is used as a consensus algorithm for Bitcoin. PoW is simply understood to seize decision-making power through workload. The more workload you pay, The greater the chance of obtaining the right to bookkeeping (such as Bitcoin).

In addition to proof of work, what are the common consensus algorithms in blockchain systems?

Consensus algorithm example

Due to the decentralization, openness, scalability and other characteristics of the blockchain system, different consensus algorithms are needed to implement different application scenarios. Therefore, many types of consensus algorithms have been produced, such as PoW (Proof of Work). ), PoS (Proof of Stake), DPoS (Delegated Proof of Stake), Practical Byzantine fault tolerance (PBFT), PoA (Proof of Authority), PoET (Proof of Authority) Elapsed Time), PoC (Proof of Capacity), PoSpace (Proof of Space), etc.

Next, briefly introduce these three common consensus algorithms in applications: 1612f24fa69322 Proof of Work (PoW), Proof of Stake (Proof of Stake), and DPoS (Delegated Proof of Stake). is shown in the figure:
image.png

For the comparison of the three consensus algorithms, please refer to the following table 1-1:
image.png

In general, each consensus algorithm has its own advantages, so it is necessary to choose a suitable algorithm based on actual application scenarios.

Proof-of-work PoW mainly relies on computer performance to determine bookkeeping. The higher the performance, the more opportunities to obtain the right to bookkeeping; but this will result in a waste of a lot of resources. At this time, the proof-of-stake PoS appeared, which mainly solved the situation that a large amount of resources were wasted in the PoW mechanism, that is, the longer the participants hold the currency, the simpler the problem, and the greater the probability of mining the currency; but it is easy to generate monopoly. On the basis of PoS, a delegated proof of stake DPoS is designed, which is similar to a consensus algorithm for voting. Compared with PoW and PoS, one of the biggest advantages of the DPOS mechanism is that the cycle of consensus is much shorter.

Application of consensus algorithm in HUAWEI CLOUD

HUAWEI CLOUD Blockchain Service (Blockchain Service for short BCS) supports Hyperledger Fabric enhanced version and HUAWEI Chain services. The main applications are the Fast Byzantine Fault Tolerant Consensus Algorithm (FBFT) and Raft (CFT) consensus algorithms. Please see the introduction of the two consensus algorithms. picture:
image.png

1. Hyperledger Fabric enhanced version: supports fast Byzantine fault-tolerant consensus algorithm (FBFT) and Raft (CFT) consensus algorithm.

With Hyperledger Fabric as the core, based on the full-stack trustworthiness of Huawei Cloud, including elastic servers, enterprise-level containers, security, and artificial intelligence services, it is committed to reliability, performance, and privacy protection under the premise of maintaining a seamless community connection. It has been enhanced and upgraded to meet the requirements of enterprise-level and financial-level business.

2. Huawei Chain Service: supports Raft (CFT) consensus algorithm.

Based on BCS's independent research and development of the blockchain kernel, combined with trusted hardware, it has the characteristics of high security, high performance, high scalability, and strong privacy protection, meeting the credibility and collaboration requirements of enterprise and financial levels.

Next preview

After listening to the introduction of the blockchain consensus algorithm, do you think it is amazing? In the next issue, the editor will continue to take everyone to study and discuss blockchain technology: smart contracts, so stay tuned, remember to pay attention~~
image.png

[Follow-up] More knowledge waiting for you to unlock~~

Click to follow, and learn about Huawei Cloud's fresh technology for the first time~


华为云开发者联盟
1.4k 声望1.8k 粉丝

生于云,长于云,让开发者成为决定性力量