Who is the leader of global blockchain consensus mechanism?


There is no centralized organization like the bank in the blockchain system, so when transferring information and value, the consensus mechanism solves and ensures the consistency and correctness of each transaction on all accounting nodes. This new consensus mechanism of blockchain makes it operate in large-scale and efficient collaboration without relying on centralized organization.

In addition to cryptography technology, consensus mechanism is also an essential element and core part of blockchain, which is the key to ensure the continuous operation of blockchain system. Therefore, consensus mechanism is also called the soul of blockchain.

No matter the public chain or the alliance chain, the consensus mechanism has limited the transaction processing ability and expansibility of the blockchain. At the same time, the fairness of each participant is guaranteed, so that all participants of the whole system must have a unified agreement.

As a well-known domestic public chain project, Biyuan chain released its baas platform bystack on May 17. This is a commercial blockchain system based on an open federal management framework (ofmf), DAPP open framework, decentralized personal credit (DPC), and privacy trading solutions. The main chain uses POW consensus to ensure the security and decentralization of various assets, and the side chain provides pluggable consensus to meet different business needs. At the same time, bystack also creates a dpos + bbft consensus algorithm for the side chain.

Blockchain consensus mechanism

In the blockchain network, different consensus algorithms are used due to different application scenarios. At present, there are four consensus mechanisms of blockchain: 1. Pow, 2. POS, 3. Dpos, 4. Byzantine fault tolerance (BFT). However, Byzantine fault tolerant (BFT) consensus mechanism is widely used in various alliance chains.

In the current business application environment, the blockchain consensus mechanism ensures the credibility of the nodes to a certain extent. In this case, users generally care about the execution rate (TPS) and credibility, which is also the reason why BFT consensus mechanism is often used in the alliance chain.

What is BFT consensus mechanism

BFT (Byzantine fault tolerance) is called Byzantine fault tolerance. Byzantine fault tolerance technology is a kind of fault tolerance technology in the field of distributed computing.

Byzantine hypothesis is a model of the real world. Due to hardware errors, network congestion or interruption, and malicious attacks, computers and networks may behave unpredictably. Byzantine fault tolerance technology is designed to deal with these abnormal behaviors and meet the specification requirements of the problems to be solved.

The fault tolerance of pow is 50%, that is to say, as long as more than half of the nodes are honest, the validity of blockchain data can be guaranteed. However, POW has the limitations of slow block, small throughput and large power consumption. Therefore, the consensus mechanism of POS and BFT has been widely used. At present, with the development of technology, the BFT consensus mechanism is not only widely used in the alliance chain, but also loved in the financial and other scenarios.

What is pbft consensus mechanism

Pbft is a practical Byzantine fault-tolerant algorithm. In order to solve the problem of low efficiency of the original Byzantine fault-tolerant algorithm, the complexity of the algorithm is reduced from exponential level to polynomial level, which makes the Byzantine fault-tolerant algorithm feasible in practical system application.

The Byzantine fault-tolerant algorithm is mainly applied to the digital currency of the central bank and the Bameng blockchain. Pbft is a state mechanism replication algorithm, in which services are modeled as state machines. State and replica replication in different nodes of distributed system.

The advantages and disadvantages of using this consensus mechanism are obvious. The advantages are: even if there are invalid replica nodes, pbft algorithm can reach an agreement on the total order of request execution of all non invalid replica nodes to ensure security; the disadvantages are: more than 1 / 3 of bookkeepers stop working, and the system will not be able to provide services. When more than one third of bookkeepers do evil jointly, and all other bookkeepers are just divided into two network islands, malicious others can make the system bifurcate.

From the perspective of real scenarios, both librabft consensus protocol and bystack consensus mechanism of Libra actively absorb the advantages of pbft, and adopt the existing practical and proven processing methods. Based on the shortcomings of pbft, great adjustments have been made in technical innovation.

Facebook: librabft consensus agreement

Libra blockchain uses a variant of hotstuff consensus protocol, the latest Byzantine fault tolerant (BFT) consensus protocol, called librabft. In librabft, validators receive transactions from clients and share them with each other through the shared MemPool protocol. Then the librabft protocol takes a series of rounds.

Hotstuff is a three-stage BFT algorithm, which allows a new leader to simply select the latest QC (quorum certification). It introduces a second stage that allows the replica to change its decision after voting without requiring a leader request. This improvement greatly reduces the complexity, but also reduces the complexity of leader replacement. Finally, due to the long-term delegation of all States, hotstuff is very easy to be implemented through the event mechanism, which is suitable for the scenarios where leaders often switch. Hotstuff has the following features:

• linear view switching: after GST, for an honest leader, once specified, n verifiers will be sent to collect signatures to promote consensus decisions;

• optimistic response: after GST, for an honest leader, once designated, only waiting for the earliest n-f verifier to return a message can an effective proposal be initiated, including leader replacement;

• support frequent switching: hotstuff also has the feature that the cost of promoting agreement to reach consensus for new leaders is not higher than that of current leaders, so it is applicable to the agreement of leader switching;

• simple decision-making: there are only two message types and a simple rule for the replica in hotstuff to decide whether to accept a proposal. It can reach an agreement through voting and submission rules, and it can guarantee the availability through pacemaker, and the algorithm complexity of each stage is low;

Threshold signature: hotstuff uses threshold signature to collect signatures, which makes signature verification easier;

On the basis of hotstuff, librabft introduces active mechanism of display and provides specific delay analysis. Librabft collects votes among 3F + 1 verification nodes. These verifiers may be honest nodes or Byzantine nodes. On the premise that there are 2F + 1 honest nodes in the network, Libra can resist the double flower attack and bifurcation attack of F authentication nodes. Librabft is effective in a partial synchronous network with global unified time (GST) and controllable maximum network delay (Δ T). In addition, librabft can ensure the consistency of the network when all verification nodes are restarted.

Libra’s white paper points out that it will start as a licensed blockchain. In the future, in order to ensure that Libra is truly open and always operates in a way that is in the best interests of users, Facebook’s ultimate goal is to make Libra a “non licensed network”, but its current challenge is that they currently do not have a mature solution to provide the scale, stability and security needed to support billions of people and transactions around the world through the non licensed network 。 In the transition from “licensed” network to “non licensed” network, the consensus level needs to be improved greatly.

Biyuan chain: bystack’s bbft consensus mechanism

According to the bystack white paper, bbft is a derived consensus based on practical Byzantine fault-tolerant pbft and a hierarchical Byzantine fault-tolerant consensus algorithm. Under the condition of ensuring Byzantine fault tolerance, that is, allowing a small number of nodes (f ≤ n / 3) to do evil, it has the following characteristics:

(1) Configurability

Compared with the bbft consensus mechanism of the original bystack chain, it adopts modular pluggable design, can configure responsive consensus algorithm as required, and to a certain extent, ensures the compatibility with new technologies (future proof).

In the development stage of blockchain, cross chain technology has also attracted market attention in recent years. However, supporting modular pluggable technology makes bystack have the imagination space of cross chain direction, and have the ability to form a blockchain system with strong expansion and compatibility with other mainstream consensus mechanisms. At the same time, it is also a highlight of bystack.

However, such compatibility also has its own advantages and disadvantages: the advantage is that bbft has the ability to compete with other alliance chains to make them belong to its own ecology; the disadvantage is that technology is not a simple one, especially the blockchain technology. To achieve such a degree, there is still a long way to go in terms of technology implementation, because compatibility leads to the whole body, Research and development costs are relatively expensive.

(2) Adaptability

Compared with BFT, the consensus nodes in bbft can maintain the current network topology, and the nodes with the shortest path are preferred to communicate. The aggregation of communication can further reduce the delay. At the same time, similar to pbft, the role of leader in bbft is weakened, consensus nodes can make decisions when they get more than 2 / 3 of the votes, so that when the communication of leader nodes is blocked, it will not have a huge impact on the whole network decision-making.

(3) Scalability

The consensus complexity increases with or below linear network capacity.

On the one hand, the more consensus nodes, the stronger network reliability; on the other hand, compared with the traditional pbft consensus mechanism, the effective aggregation of messages in bbft can effectively reduce the number of messages sent, so as to ensure the complexity of O (n). Then, combined with the network topology, the network structure is divided into multiple layers, so that messages can be shared in the same layer and spread across layers in the form of multi signature aggregation.

(4) Isomerism

Separate consensus verification and communication.

If we want to reach a consensus, we need to carry out consensus verification and communication first. Adopting low coupling consensus framework can further improve network reliability and executable efficiency.

The verification module often depends on the specific user logic, and has certain requirements for computing power and security. Communication module and user logic are relatively independent, mainly dealing with network connection and request. The calculation and selection of network topology and shortest path can be completed here. Since it is not related to user logic, communication modules can be connected with authentication in the form of abstraction layer or middleware.

The advantage of isomerism is also reflected in using the best tools to do the most suitable things. Verification and communication allow to run on different systems and in different operating environments, to maximize the performance of different hardware based computing power advantages and security assurance (TrustZone).

Characteristics of bbft consensus mechanism

1. Compared with the traditional BFT, bystack adopts multi-layer structure according to the network hierarchy, once a node has problems, it will not have a greater impact on the network. At the same time, multi-layer structure can not only separate and recombine network communication, but also optimize the delay of network communication.

2. Bbft consensus mechanism can effectively combine the whole network structure through the aggregation of layered and encrypted signatures, so as to ensure the linear growth of communication complexity, rather than exponential growth.

3. The side chain on bystack is divided into three modules: one is the underlying consensus algorithm; the other is network partition; and the third is signature aggregation. Among them, network partition and signature aggregation are relatively independent modules, which can be matched with different network layering algorithms, signature aggregation algorithms and consensus layer algorithms.

Similarities and differences between librabft and bystack bbft

Although both of them can be regarded as the upgrade of pbft consensus and draw on the achievements and advantages of existing BFT consensus, at the same time, they have made greater progress in scalability. But librabft is to change pbft mesh communication topology into star communication network topology, so as to reduce the complex and changeable communication system; bbft is to divide and recombine network communication through multi-layer structure, so as to greatly optimize the delay and quantity of network communication.

However, from the technical point of view, both librabft and bbft pay more attention to its algorithm. The consensus mechanism of librabft modifies and optimizes the core algorithm on the basis of pbft; bbft is more hierarchical control at the level of hierarchy to achieve global thinking. It can be said that bbft has higher technical requirements for consensus mechanism than pbft. It strives to break through itself and achieve the situation of integrating more consensus mechanisms.

Obviously, bystack is most concerned about making good use of the existing consensus mechanism and integrating other different consensus mechanisms, so as to make up for their own shortcomings with their strengths, which is very obvious in its architecture. In fact, bystack doesn’t just want to be the operating system of blockchain, it actually means to be the operating system of the operating system.

Although the blockchain consensus mechanism has been studied for a long time, and the use scenarios in different fields are also different, from POW to now, this blockchain core mechanism has never made a breakthrough. Bystack bbft can truly break through itself in the consensus mechanism of blockchain, represent Chinese blockchain enterprises to emerge on the world science and technology stage, and finally become the leader of global blockchain technology.