Consensus determines success or failure? An article to understand the blockchain consensus mechanism

Blockchain has become a modern buzzword, and blockchain technology is currently the hottest. Both companies and individuals have joined the block chain industry.

Blockchain is a further development on the basis of the Internet and a further upgrade of the Internet society. However, the emergence of a new thing is always accompanied by a lot of questions, research and discussion.

So, how did the blockchain develop? What is it like now? The editor will take everyone to sort out.

1. Popular blockchain

Those who know the blockchain should be familiar with the name Satoshi Nakamoto. Although it is still unknown who he or they are, this name can be said to have become a symbol of the blockchain. Because “blockchain” comes from an article entitled ” Bitcoin : A Peer-to-Peer Electronic Cash System” published by Satoshi Nakamoto in 2008 .

In this article, Satoshi Nakamoto elaborated on encryption technology, timestamp technology, blockchain network architecture, etc., and two months after the article was published, Bitcoin’s first founding block with a sequence of 0 was born. , 6 days later, the block with sequence 1 appeared and connected with the founding block with sequence number 0 to form a chain. Since then, the blockchain has been born.

Second, the emergence of Bitcoin

Bitcoin is a distributed global accounting network based on blockchain technology. All nodes participating in the network are accounting nodes. The units of these bookkeeping nodes are called blocks. In each block, relevant information about each transaction is recorded, such as buyers and sellers, time and date, total value, etc. All transaction entries are connected in chronological order to form a digital chain of blocks.

For now, Bitcoin is a kind of underlying infrastructure, simply as a digital asset in the encryption field. However, from the perspective of its development path, Bitcoin has evolved from its point-to-point payment function to a value storage function comparable to gold.

Third, the birth of smart contracts

2013, has been called ” V God ” of Vitalik Buterin, created the Ethernet Square , also released a white paper. In this white paper, V God introduced smart contracts in detail-supporting distributed application development.

In the Ethereum network, everyone can create DAPPs in the blockchain network on the basis of smart contracts, and follow the same rules on all DAPPs. The rules are coded into the network, and developers can use DAPPs in the DAPP. Enforce your own rules.

Now, there are many large and small projects in the entire blockchain field, from the public chain of the underlying facilities to the development of various DAPPs, from the popular DeFi track to the distributed storage track, from the explosive NFT to the meta universe , Blockchain is gradually forming a huge ecosystem.

Fourth, the blockchain consensus mechanism

Whether it is Bitcoin or Ethereum, or the development of other blockchain networks, they all have their own consensus algorithms. In a distributed network like the blockchain, all nodes are independent and equal, and there is no central point to control other nodes.

So how to ensure fair and automatic operation in this network? From a practical point of view, the most important point is because of the consensus mechanism. In a fair and transparent network, all participants in the network have reached a consensus, recognize the operating mechanism of the network, and can actively contribute to it.

Of course, there will be a certain reward for making contributions, which is what we often call block rewards. Generally speaking, it is the economic incentive mechanism of this network that develops along with the consensus mechanism.

Combining consensus with economic incentives will allow more people to participate. The community of users and developers will gradually develop, and finally a huge ecology will be formed on this network.

So what is consensus and how does the consensus mechanism work?

To give a simple example, in Mr. Jin Yong’s novels, the major martial arts masters gather. Generally speaking, the martial arts masters are all powerful, and no one accepts anyone.

Who will manage the rivers and lakes? Who has the final say? After all, everyone has the foundation, so it’s simple and rude, round after round, whoever wins is the recognized martial arts leader, everyone obeys this most powerful person. Who can accept the challenge of everyone in the arena and overcome to the end, whoever has the final say, everyone agrees to this form, which forms a consensus, and this method of fighting is a consensus mechanism for generating consensus.


The picture comes from the Internet

Similarly, in the blockchain of a distributed network, how can each node agree on transaction data, contributions, and rewards? This requires the use of the consensus mechanism mentioned in the blockchain.

Different networks will choose their own set of consensus mechanisms to make universal recognition among all nodes in the network. In general, in the blockchain, consensus is a rule that everyone recognizes and is willing to consciously abide by.

Next, the editor will introduce several widely used consensus mechanisms: POW (Proof of Work), POS (Proof of Rights and Interests), POC (Proof of Capacity), POA (Proof of Authority), CPOC (Conditional Capacity certification mechanism)

1. POW (Proof of Work Mechanism)

POW is the first blockchain consensus algorithm. Since 2009, it has appeared with the emergence of Bitcoin. Simply put, the POW consensus algorithm is to confirm the workload of network participants and give certain rewards.

In the POW consensus algorithm, the initiator is required to perform a certain amount of calculation, which means that a certain amount of calculation time needs to be consumed. In the operation of this algorithm, when network participants add a transaction to the blockchain, they must first solve a certain complex calculation problem.

This method can ensure that network participants spend a certain amount of time and money to complete the work, which shows that they will not damage the blockchain system, because damage to the system will lose their own interests.

For example, Bitcoin and Ethereum both use POW consensus algorithms, and are currently the two largest blockchain networks with the strongest consensus. The advantage of POW is the most secure consensus algorithm, which can effectively prevent 51 attacks. Since its launch in 2009, it has been widely recognized. The disadvantage is that it consumes more energy and the throughput is slower.


Image source:

2. POS (Proof of Rights and Interests Mechanism)

POS is also known as proof of equity, similar to bank deposits. Under this consensus algorithm, corresponding rewards will be distributed according to the digital assets held by the network participants and the holding time, which is similar to the interest paid by the bank to deposits.

The emergence of POS is actually to solve the problem of high energy consumption in POW, so it does not use computing functions. Network participants do not need to consume huge energy, but must have digital assets that represent the network.

The more the digital assets owned by the network participants and the longer they hold them, it proves that the more the participants contribute to the network, the more trustworthy they are. The probability that the participants will get the next block reward in the network Bigger.

For example, Ethereum is shifting from POW to POS consensus algorithm. In the POS consensus algorithm of the Ethereum network, users need to pledge 32 ETH (Ethereum’s digital assets) to become a validator. Verifiers are randomly selected to create blocks and are responsible for checking and confirming blocks that they have not created. The ETH pledged by users can also receive a certain pledge reward.

The advantages of POS are high attack cost, energy saving, and large scalability, and as long as the digital assets of the network can participate in the network, it is not susceptible to the impact of economies of scale. The disadvantage is that once a complete attack is encountered, the entire network will lose value.


Image source:

3. POA (Proof of Authority Mechanism)

POA is not an independent consensus algorithm, but a consensus algorithm that combines POW and POS. In the POA consensus algorithm, each active node first needs to perform hash calculations according to the POW mechanism. After the node has calculated the correct hash value and successfully verified, it will use the block as the data source and derive N A random equity owner. These selected equity owners are the first approved accounts and are called validator nodes.

The verifier node must first authenticate its own identity, where it needs to use a widely recognized identity that exists in a public notarized database, which is a mandatory process.

At the same time, the POA algorithm requires all validator nodes to be online. If any validator node is not online, the generated new block cannot be verified, and the new block is discarded.

The POA consensus algorithm periodically counts the number of discarded blocks, and adjusts the number of validator nodes according to the number. If the number of discarded blocks is large, the number of validator nodes will be reduced, otherwise, the number of validators will be increased. node.

For example, VeChain in the public chain track is designated by the project foundation as an “authoritative master node” to maintain the operation of the VeChain network. Each node operator must hold at least 25,000,000 VET at any given time.

At present, the corresponding authority is composed of 101 VeChain “source of thunder” super nodes. The authoritative master node is the only node authorized to package blocks on the VeChain Thor blockchain. They will receive 30% of the transaction fee for each block. % Reward.

The advantage of the POA consensus algorithm is that it can prevent attackers with strong computing power but only holding a small amount of equity. The POS part makes the possibility of these attackers getting blocks is very small, so effective attacks cannot be carried out. The validator node relies on assets to make profits, which will allow the validator to hold the asset for a long time, which is conducive to the preservation of the value of the digital asset and the reduction of volatility. The disadvantage of POA is that it is slightly centralized and usually does not guarantee censorship resistance.


Image source:

4. POC (capacity proof mechanism)

POC is also known as proof of space. The algorithm is similar to POW, except that it uses space instead of CPU for calculations.

In the POC consensus algorithm, network participants use the hard disk space of the computer to store the hash value calculated in advance. The larger the capacity of the hard disk, the more hash values ​​stored in the hard disk, and the easier it is to match the required hash values ​​in the block network, thereby obtaining more block rewards.

The POC consensus algorithm requires that the hash value is calculated in advance and stored in the hard disk, so network participants do not need to perform real-time calculations, only need to scan the hard disk to find the hash value that matches the block. It can generate new blocks, that is to say, compared with POW, the POC consensus algorithm can save a lot of calculation time and energy.

For example, Chia of the distributed storage track attracted a large number of people in the blockchain field when Chia first came out with its “green BTC” and low threshold.

Obtain block rewards by continuously scanning the hash value matching the block in the hard disk. At present, the capacity of Chia’s entire network has reached 32.16 EiB (data as of November 1), which is currently the largest distributed storage project in the entire network.

The advantages of the POC consensus algorithm are energy saving, environmental protection, and low participation threshold. As long as there is a hard disk, it can participate in the network. The disadvantage is that the widespread adoption of POC may trigger a race to produce higher-capacity hard drives, increasing the threshold for personal participation and the risk of being attacked.


Image source:

5. CPOC (conditional capacity certification mechanism)

CPOC is a consensus algorithm upgraded on the POC consensus algorithm, adding a POS consensus mechanism. In the CPOC consensus algorithm, network participants also use hard disk space to store hash values, thereby participating in the competition for block rewards. At the same time, network participants can also pledge their digital assets to obtain more block rewards.

In the CPOC consensus algorithm, a true low-threshold participation is achieved. First, CPOC uses hard disks to participate in the network. The cost of nodes in the network is low, and idle hard disks can also be used to participate. Second, holding digital assets in the network can also participate and get rewards. In other words, network participants who pledge more digital assets will receive more block rewards.

For example, based on Bitcoin’s underlying code, further adding smart contracts, developing applications and developing its ecosystem “BTC3.0”-the distributed search engine QitChain, the ultimate goal is to become an effective information aggregator, which is adopted in its internal economic mechanism Consensus algorithm of CPOC. Individuals or institutions with hard disks or digital assets can participate in the network. Network participants can use the hash value filled in the hard disk to obtain certain block rewards, and can also increase the area by staking their digital assets. The number of block rewards, the top ten nodes with the most pledges can get more rewards.


Image source:

The advantages of the CPOC consensus algorithm are low energy consumption and environmental protection; under the POS mechanism, the digital assets in the network can obtain effective demand and support the internal circulation of the network. The disadvantage is that the CPOC consensus algorithm is an innovative consensus mechanism that requires continuous development of its application to obtain a stronger consensus.

5. Success or failure lies in consensus

In addition to the five consensus mechanisms mentioned above, there are DPOW (Delayed Workload Proof Mechanism), DPOS (Authorized Stake Proof Mechanism), PBFT (Practical Byzantine Fault Tolerant Mechanism), DBFT (Authorized Byzantine Fault Tolerant Algorithm), POB ( Consensus algorithms such as burn proof mechanism) are basically for the purpose of forming a stronger consensus in the blockchain network that is recognized by more people.

Innovations time and time again are to enrich the entire blockchain field, and each consensus algorithm has its own merits. In general, as long as it can be recognized by everyone, participate in it, and use contributions in exchange for rewards, and truly realize the development of the ecological cycle, it is the consensus of success.

Posted by:CoinYuppie,Reprinted with attribution to:
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply