Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the difference between LibraBFT and original chain Bystack BBFT

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "what is the difference between LibraBFT and original chain Bystack BBFT". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what's the difference between LibraBFT and Biyuan chain Bystack BBFT"!

If anything is the soul of the blockchain, it must be the consensus mechanism.

It is the foundation of the blockchain. No matter the common chain or the alliance chain, the consensus mechanism limits the transaction processing capacity and expansibility of the block chain.

On June 18, 2019, Facebook released his own white paper on the Libra project, which attracted wide attention. As an important project of Facebook trying to create international digital currency, Libra block chain adopts LibraBFT consensus mechanism and is a robust and efficient state replication system designed for Libra. It is based on a new BFT consensus algorithm, HotStuff.

Shortly before the release of the white paper on the Facebook Libra project, the BaaS platform Bystack was released on May 17th. This is a commercial block chain system with a main multi-side chain architecture. The main chain adopts 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 itself also created a consensus algorithm of DPoS+BBFT for the side chain.

It is also a BFT class consensus mechanism, what is the difference between LibraBFT and BBFT?

The significance and present situation of Block chain consensus Mechanism

Consensus is the agreement reached by nodes on the data or the final state of the network in a distributed system. Due to the uncontrollable network environment and node state, the consensus mechanism needs to consider many aspects, such as performance, reliability, security and so on.

From a large aspect, the consensus mechanism can be divided into two categories: PoW and other Nakamoto consensus mechanisms and Byzantine fault tolerance (BFT) consensus mechanisms. BFT consensus mechanism is widely used in all kinds of alliance chains.

PoW consensus is widely used in unlicensed (Permissionless) chains, but its probability model not only provides high reliability, but also sacrifices efficiency and wastes a lot of computing resources. In the specific business application environment, the Permissioned mechanism has ensured a certain degree of node credibility (Semi-Trust). Under this premise, users are more concerned about execution efficiency (TPS) and final certainty (Finality). This is why the BFT consensus is popular in the alliance chain.

BFT consensus mechanism

BFT (Byzantine Fault Tolerance) is Byzantine fault tolerance. It is a distributed computing fault-tolerant technology.

Computers and networks may behave unpredictably due to hardware errors, network congestion or interruptions, and malicious attacks. Byzantine fault-tolerant technology is designed to deal with these exceptions and reach a consensus on the basis of fault tolerance.

Unlike the Satoshi Nakamoto consensus derived from Bitcoin, in BFT-like protocols, once a consensus is reached, it directly leads to a deterministic result, rather than the final agreement on the probability of the Nakamoto consensus.

BFT consensus is widely used in financial scenarios and alliance chain scenarios. At the same time, with the progress of technology, the BFT consensus for applications in the public chain scenario is also emerging.

PBFT consensus mechanism

Practical Byzantine fault tolerance algorithm (Practical Byzantine Fault Tolerance Algorithm,PBFT) is the first practical consensus algorithm to realize Byzantine fault tolerance in asynchronous distributed networks.

The PBFT algorithm can work in an asynchronous environment, and it optimizes the inefficiency of the original Byzantine fault-tolerant algorithm, and reduces the complexity of the algorithm from exponential to polynomial, which makes the Byzantine fault-tolerant algorithm feasible in practical system applications, which has been widely verified. PBFT algorithm can guarantee consistency (Safety) and delivery guarantee (Liveness) at the same time when the total number of failure nodes is not more than 1 prime 3.

Both the LibraBFT consensus protocol of Facebook Libra and the BBFT consensus mechanism of the original chain Bystack have fully absorbed the advantages of PBFT at the bottom, adopted the existing time-verified processing methods, and made innovations in different directions in some shortcomings and shortcomings of PBFT.

Facebook Libra's LibraBFT consensus Protocol

As mentioned earlier, Libra uses the HotStuff-based LibraBFT consensus.

HotStuff is a three-stage BFT algorithm. It combines the view switching process with the normal process, and there is no separate view switching process, which reduces the complexity of view switching.

When switching views in HotStuff, a node in the system does not need to confirm that "enough nodes want to switch views" before notifying the new master node, but can directly switch to the new view and notify the new master node. HotStuff puts the behavior of confirming the message that "enough nodes want to switch views" into the normal process. As a result, the two-stage confirmation of PBFT is extended to three-stage confirmation.

Another important change of HotStuff is to change the mesh communication network topology of PBFT into a star communication network topology. In HotStuff, each communication depends on the primary node. The node no longer broadcasts the message to other nodes through the P2P network, but sends the message to the master node, which is processed by the master node and sent to other nodes. Thanks to the star communication network topology, the communication complexity of the system is greatly reduced. Similar to PBFT, the master node will propose a state transition, and other nodes will check the validity of the state migration request when they receive it.

LibraBFT collects votes between 3f+1 authentication nodes, which may be honest or Byzantine nodes. Under 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 partially synchronous network with global unified time (GST) and network maximum delay (Δ T) controllable. Moreover, LibraBFT can also ensure network consistency when all authentication nodes are restarted.

BBFT consensus Mechanism of original chain Bystack

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. In the case of ensuring Byzantine fault tolerance, that is, allowing a small number of nodes (f ≤ Number3) to do evil, it has the following characteristics:

(1) configuration (Configurable)

The use of modular pluggable design, on-demand configuration, and to a certain extent ensure the compatibility of new technologies (Future-Proof).

This is a core competitive point of Bystack. The concept of cross-chain has been widely concerned in recent years, and it is also an important direction of the development of block chain. Support for modular plug-in, so that Bystack has a cross-chain direction of imagination, the ability to form a truly scalable, compatible with other mainstream consensus mechanisms of the block chain system.

This compatibility makes BBFT have the ability to make other alliance chains become their own side chains, making themselves not only a blockchain operating system, but also a blockchain operating system ecology. In this way, there is more room for imagination.

But of course, to reach this level, the technical implementation may have a long way to go. Compatibility is a direction that often consumes a lot of R & D costs, it is not difficult, but tedious. It's hard for BBFT to get to the top in one step and do its best at the beginning, so far it can only be done step by step.

(2) adaptability (Adaptive)

That is, to provide stable execution efficiency for different network environments.

BFT requires nodes to exchange verification results with each other to reach a majority consensus. Generally speaking, each node needs to get enough responses from other nodes (≥ (2Unix 3) * N) to make an effective judgment. Network delay directly affects the efficiency of information exchange, especially in cross-regional and cross-border applications, delay will become the bottleneck of network operation.

In BBFT, consensus nodes maintain the current network topology and give priority to nodes with similar shortest path principles. The aggregation of communications can further reduce the delay. At the same time, the role of the leader node (Leader) in the PBFT,BBFT is weakened, and the consensus node can make a decision when it gets more than 3 votes, so that when the communication of the leader node is blocked, it will not have a great impact on the whole network decision.

(3) scalability (Scalable)

It is guaranteed that the consensus complexity increases with the network capacity linear (Linear) or below linear (Sub-Linear).

On the one hand, the more common nodes, the higher the reliability of the network; on the other hand, the complexity of node communication in traditional PBFT increases exponentially with the network capacity, which greatly limits the number of nodes. The effective aggregation of messages in BBFT can effectively reduce the number of messages sent, thus ensuring the complexity of O (N). Combined with the network topology, the network can be divided into multi-layer structure, and the message data can be effectively shared in the same layer and propagated across layers in the form of multi-signature aggregation. Multi-signature information verification can use the existing mature

Schemes, such as MuSig algorithm based on Shnorr signature, can protect against Rogue Key Attack attacks while ensuring the efficiency of multi-signature verification.

(4) heterogeneity (Heterogeneous)

Separate consensus verification and communication.

Reaching a consensus requires authentication and communication, but there is no strong relationship between the two. Adopting a low-coupling consensus framework can further improve the reliability and efficiency of the network.

The verification module often depends on the specific user logic and has certain requirements for computing power and security. The communication module is relatively independent from the user logic and mainly deals with network connections and requests. The calculation and selection of network topology and shortest path can be done here. Because it has nothing to do with user logic, the communication module can be verified and docked in the form of abstract layer (AbstractionLayer) or middleware (Middleware).

The advantage of heterogeneity is also reflected in using the best tools to do the most appropriate thing. Authentication and communication allow you to run on different systems and in different operating environments, and maximize the performance according to the computing power advantages and security guarantees (TrustZone) of different hardware.

The two main features of BBFT are:

Multi-layer structure. Layer according to the network. Traditional BFT is a single-tier structure, with only one leader node and several consensus nodes in the same position. The innovation of BBFT lies in that there are also small leaders under the big leaders. If there is something wrong with the leaders, it will not have a greater impact on the network, which is equivalent to weakening the role of leaders. And because of the multi-layer structure, the network communication can be diverted and recombined to optimize the delay and number of network communication.

The communication complexity of traditional PBFT is exponential and difficult to expand. With the sharp increase in the number of nodes in the network, the delay of the whole network may be very serious. Through the aggregation of hierarchical and encrypted signatures, BBFT can effectively combine the whole network structure, which can ensure that the communication complexity increases linearly rather than exponentially.

Configurability. The side chain project on Bystack is actually divided into three modules, the first is the underlying consensus algorithm, the second 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. Different reasonable schemes can be flexibly selected according to specific user scenarios.

LibraBFT vs BBFT: similarities and differences

LibraBFT changes the mesh communication network topology of PBFT into a star communication network topology to reduce the communication complexity of the system, while BBFT uses a multi-layer structure to recombine network communications and optimize the delay and number of network communications.

LibraBFT merges the view switching process with the normal process and extends the two-stage confirmation of PBFT to three-stage confirmation, while BBFT modifies the three states generated in the classical BFT algorithm, pre-final state and final state to only one final confirmation state.

Both of them can be regarded as the upgrade of PBFT consensus, which absorbs the achievements and advantages of existing BFT consensus, and expands in different directions on this basis. LibraBFT consensus mechanism is more of an innovation based on PBFT, paying more attention to the algorithm itself, and there are many aspects of modification and optimization of PBFT; BBFT is more hierarchical control at the level, more is a kind of global thinking of the system. What BBFT hopes to achieve is not only an efficient consensus mechanism, but also a consensus mechanism that can integrate other consensus mechanisms. Dimensionally, BBFT can allow LibraBFT to access directly and take advantage of all the advantages of the other party on the side chain. LibraBFT is the first order change and BBFT is the second order change.

It is obvious that Bystack pays more attention to making good use of existing consensus mechanisms, integrating different consensus mechanisms and learning from each other, which is very prominent in the overall structure of Bystack. For example, the main and side chains adopt different consensus and combine organically, and the side chains use the hybrid consensus algorithm of DPoS+BBFT and are configurable. Bystack doesn't just want to be a blockchain operating system, it actually means to be an operating system.

The research on the mechanism of blockchain consensus has been carried out for a long time, but since the PoW consensus was proposed, it has not been said to be the progress of paradigm breakthrough.

Maybe make the blockchain compatible with the consensus mechanism of other chains, achieve smooth cross-chain, so that any chain can be accessed as a side chain, which can become a paradigm breakthrough in the direction of the blockchain and bring a new imagination space. Maybe this is the reason why the concept of cross-chain is so popular now.

At this point, I believe you have a deeper understanding of "what is the difference between LibraBFT and the original chain Bystack BBFT?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report