A method and apparatus for tolerating byzantine faults based on tree topology network and a storage medium

By using a tree-like topology network to divide consensus nodes in the blockchain and introducing a feedback mechanism and a VRF random grouping strategy, the high communication complexity and insufficient security of the PBFT algorithm are solved, realizing an efficient and secure consensus method and improving the scalability and fault tolerance of the system.

CN115914250BActive Publication Date: 2026-03-27XINJIANG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing PBFT algorithms in blockchain suffer from high communication complexity, poor scalability, and poor fault tolerance. Furthermore, consensus algorithms with group or hierarchical structures fail to effectively prevent collusion and conspiracy among Byzantine nodes, resulting in insufficient system security.

Method used

A Byzantine fault-tolerant method based on tree topology networks is adopted. By dividing consensus nodes into independent groups, a feedback mechanism is introduced for supervision and feedback. A VRF random grouping strategy is used to prevent Byzantine node attacks. The ETBFT algorithm is designed by combining feedback domain failure probability analysis and communication complexity calculation.

Benefits of technology

It improves the scalability and fault tolerance of nodes, reduces the complexity of network communication, enhances the security and consensus success rate of the system, and ensures the stability of the system under Byzantine node attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914250B_ABST
    Figure CN115914250B_ABST
Patent Text Reader

Abstract

The application discloses a Byzantine fault-tolerant method and device based on a tree topology network and a storage medium. The Byzantine fault-tolerant method based on the tree topology network comprises the following steps: (1) dividing consensus nodes into independent groups based on a tree topology network structure; (2) introducing a feedback mechanism to supervise and feedback the behavior of the nodes; (3) performing probability analysis on a feedback domain failure probability in the feedback mechanism; and (4) calculating communication complexity. The Byzantine fault-tolerant method based on the tree topology network, the device and the storage medium can improve node scalability and fault-tolerant performance, and reduce network communication complexity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of blockchain consensus, and particularly relates to a Byzantine fault-tolerant method based on a tree topology network, a device and a storage medium. BACKGROUND

[0002] At present, the PBFT (practical Byzantine fault tolerance) algorithm has become the most widely used consensus algorithm in consortium chains. However, the PBFT algorithm has problems such as high communication complexity, poor scalability and poor fault tolerance, which makes it difficult for the performance of blockchain-related projects to meet the actual business requirements.

[0003] In recent years, many improved algorithms have appeared for PBFT. A series of consensus algorithms start from the system architecture, divide nodes into local consensus through grouping or hierarchical structure, greatly reduce the communication complexity and improve the system scalability, and fundamentally solve the problem that the PBFT consensus algorithm cannot be applied to large-scale network environments. However, the consensus algorithm with grouping or hierarchical structure has the following disadvantages, for example:

[0004] (1) The existing research on network division method is determined by the system, and has not been authenticated by the nodes in the whole network.

[0005] (2) The current node grouping rarely considers the collusion between Byzantine nodes, so the security of the system is greatly threatened.

[0006] (3) In the hierarchical system, scalability and fault tolerance performance are relatively large contradictions. For example, in the worst case, all high-level nodes in the hierarchical structure are faulty, and the bottom nodes will not receive any message, and the system cannot reach consensus.

[0007] Therefore, it is particularly important to design an efficient and decentralized consensus method to solve the bottleneck of the blockchain.

[0008] Therefore, the application provides a new Byzantine fault-tolerant method, which is an expandable Byzantine fault-tolerant method based on a tree topology network, and solves the problems of scalability, fault tolerance and communication complexity of the consensus algorithm in the consortium chain. SUMMARY

[0009] The application aims to provide a Byzantine fault-tolerant method based on a tree topology network, which can improve the scalability and fault tolerance performance of nodes while reducing the network communication complexity.

[0010] In order to achieve the above purpose, the technical scheme adopted is:

[0011] A Byzantine fault-tolerant method based on a tree topology network, comprising the following steps:

[0012] (1) based on tree topology network structure, the consensus nodes are divided into independent groups;

[0013] (2) a feedback mechanism is introduced to supervise and feedback the behavior of the nodes;

[0014] (3) the failure probability of the feedback domain in the feedback mechanism is analyzed;

[0015] (4) the communication complexity is calculated.

[0016] Further, in the division process of step (1), the VRF random grouping strategy is combined.

[0017] Further, the division process in step (1) is: based on a multi-center, grouping and hierarchical ETBFT algorithm of tree topology network, the network is layered.

[0018] Further, in step (2), the feedback mechanism allows the system to make progress when the nodes have Byzantine behavior.

[0019] Further, in step (3), the failure probability of the feedback domain in the feedback mechanism is analyzed, and when the number of Byzantine nodes is within the fault-tolerant range of the feedback domain, the probability that the feedback mechanism cannot trigger is almost 0.

[0020] Further, in step (4), the communication complexity is calculated as:

[0021] R c =n(2k 2 +1) / k(2n 2 -n+1);

[0022] Wherein, n represents the total number of consensus nodes, k represents the number of consensus nodes in each group, and R c represents the total communication complexity.

[0023] Another object of the application is to provide a Byzantine fault-tolerant device based on tree topology network.

[0024] In order to achieve the above object, the technical scheme adopted is:

[0025] A Byzantine fault-tolerant device based on tree topology network, comprising:

[0026] An introduction module is used to divide the consensus nodes into independent groups based on tree topology network structure;

[0027] A design module is used to prevent the Byzantine nodes from targeting attack and collusion with the system normal consensus based on VRF random grouping strategy;

[0028] The acquisition module is used to introduce a feedback mechanism to reduce the influence of the Byzantine failure on the hierarchical network system.

[0029] The analysis module is used to perform probability analysis on the failure probability of the feedback domain in the feedback mechanism.

[0030] The calculation module is used to calculate the communication complexity according to the scalable Byzantine fault tolerance based on the tree topology network.

[0031] Further, the introduction module further comprises a design submodule and a calculation submodule.

[0032] The design submodule is used to reduce the communication complexity of the PBFT consensus algorithm.

[0033] The calculation submodule forms a subnetwork with each parent node and its child nodes, and the network composed of the child nodes in the group domain is referred to as a group domain.

[0034] Further, the Byzantine fault tolerance device further comprises a processor and a memory.

[0035] The memory stores program instructions, and the processor invokes the program instructions stored in the memory to enable the device to perform the Byzantine fault tolerance method.

[0036] The present application also aims to provide a computer readable storage medium.

[0037] In order to achieve the above-mentioned purposes, the technical scheme adopted is:

[0038] A computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions are executed by a processor to enable the processor to perform the Byzantine fault tolerance method.

[0039] Compared with the prior art, the present application has the advantages of:

[0040] 1. The present application is based on a tree network topology structure, which is a hierarchical structure, and is applicable to the idea of a hierarchical network system of grouping. A scalable Byzantine fault tolerance algorithm (ETBFT) based on a tree topology network is proposed. The ETBFT algorithm divides network nodes into several subnetworks, and each subnetwork has a master node that sends a consensus result to a client.

[0041] 2. For a hierarchical network system, the higher the level of the Byzantine node, the greater the threat to the consensus network. In order to prevent the Byzantine node from predicting the grouping information, the present application proposes an algorithm based on VRF random grouping to prevent targeted attacks and collusion of the Byzantine node on the system normal consensus, thereby ensuring the security of the system.

[0042] 3、In a hierarchical network system, scalability and fault tolerance cannot be well balanced. Based on this, the present application proposes a feedback mechanism to reduce the influence of Byzantine failure on the hierarchical network system, and through experimental analysis, the feedback mechanism improves the fault tolerance performance of the algorithm, enhances the security and activity of the system. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 A flowchart of a scalable Byzantine fault-tolerant method based on a tree topology network;

[0044] Figure 2 A consensus flowchart of a scalable Byzantine fault-tolerant method based on a tree topology network;

[0045] Figure 3 A feedback domain schematic diagram;

[0046] Figure 4 A feedback mechanism failure probability P value analysis diagram;

[0047] Figure 5 A comparison analysis diagram of ETBFT and PBFT communication complexity;

[0048] Figure 6 A consensus success rate analysis diagram under the FPD model under different networks when k = 10;

[0049] Figure 7 A consensus success rate analysis diagram under the FND model under different networks when k = 10;

[0050] Figure 8 A structure schematic diagram of a scalable Byzantine fault-tolerant device based on a tree topology network;

[0051] Figure 9 Another structure schematic diagram of a scalable Byzantine fault-tolerant device based on a tree topology network. DETAILED DESCRIPTION

[0052] In order to further illustrate the present application based on the tree topology network Byzantine fault-tolerant method, device and storage medium, and achieve the intended purpose of the application, the following will be combined with the preferred embodiments, and the specific implementation, structure, features and functions of the present application based on the tree topology network Byzantine fault-tolerant method, device and storage medium will be described in detail. In the following description, different "an embodiment" or "embodiments" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.

[0053] The tree topology network-based Byzantine fault-tolerant method, device and storage medium will be further described in detail below with reference to specific embodiments.

[0054] The present application aims at the performance deficiencies of the existing PBFT and related improved algorithms in node scalability, communication complexity and fault tolerance, and proposes an expandable tree topology network-based Byzantine fault-tolerant method, device and storage medium, which improves the node scalability and fault tolerance performance and reduces the network communication complexity. The technical scheme adopted by the present application is as follows:

[0055] (1) A tree topology network-based Byzantine fault-tolerant method, which divides consensus nodes into independent groups based on a tree topology network structure;

[0056] Meanwhile, a VRF-based random grouping strategy is proposed to prevent targeted attacks and collusion of Byzantine nodes on the system normal consensus.

[0057] A feedback mechanism is introduced to reduce the impact of Byzantine failures on the hierarchical network system.

[0058] The failure probability of the feedback domain in the feedback mechanism is analyzed.

[0059] According to the expandable tree topology network-based Byzantine fault-tolerant method, the communication complexity is calculated.

[0060] Preferably, the specific steps of dividing the consensus nodes into independent groups based on the tree topology network structure are as follows:

[0061] The tree network topology structure is a hierarchical structure, which is suitable for hierarchical network systems. Therefore, based on the tree topology network, we propose a multi-center, grouping and hierarchical ETBFT algorithm. We divide the network into layers, each layer is composed of different regions, and the global consensus is divided into several local consensus subnets, which greatly reduces the communication complexity of the PBFT consensus algorithm. Each parent node (non-leaf node) and its child nodes form a subnet, which is called a consensus domain, and the network composed of child nodes in the group domain is called a group domain (group).

[0062] Preferably, the VRF-based random grouping strategy is used to prevent targeted attacks and collusion of Byzantine nodes on the system normal consensus.

[0063] For a hierarchical system, the higher the level of a node, the greater the impact on the system. If the Byzantine nodes collude maliciously and are allocated to the high level of the system, therefore, in order to randomly distribute each node and hide the node grouping information in the hierarchical system, and ensure the security of the system. Therefore, the present application proposes a random grouping strategy combined with VRF.

[0064] Preferably, the feedback mechanism is introduced to reduce the impact of Byzantine failure on the hierarchical network system.

[0065] The feedback mechanism is designed to supervise and feedback the behavior of the nodes, which improves the fault tolerance performance by allowing the system to make progress when the nodes exhibit Byzantine behavior.

[0066] The feedback mechanism is implemented in the feedback domain, and each node participating in consensus generates a corresponding certificate, while the system records the time when each node performs specific operations. And show how to reach consensus under different circumstances according to the feedback mechanism.

[0067] Preferably, the feedback mechanism is introduced to reduce the impact of Byzantine failure on the hierarchical network system.

[0068] Preferably, according to the scalable Byzantine fault tolerance based on tree topology network, the communication complexity is calculated as:

[0069] R c =n(2k 2 +1) / k(2n 2 -n+1)

[0070] Where n represents the total number of consensus nodes, k represents the number of consensus nodes in each group, and R c represents the total communication complexity.

[0071] (2) A Byzantine fault tolerance device based on tree topology network, comprising:

[0072] The introduction module is used to divide the consensus nodes into independent groups in the tree topology network structure.

[0073] The design module is used to prevent the Byzantine nodes from targeting attacks and collusion to affect the normal consensus of the system based on the VRF random grouping strategy.

[0074] The acquisition module is used to introduce a feedback mechanism to reduce the impact of Byzantine failure on the hierarchical network system.

[0075] The analysis module is used to analyze the failure probability of the feedback domain in the feedback mechanism.

[0076] The calculation module is used to calculate the communication complexity according to the scalable Byzantine fault tolerance based on tree topology network.

[0077] Preferably, the introduction module comprises:

[0078] The tree network topology is a hierarchical structure, and is suitable for a hierarchical network system.

[0079] The computing submodule, each parent node (non-leaf node) and its child node form a subnet, which is called a consensus domain.

[0080] Preferably, the device further comprises a processor and a memory, wherein the memory stores program instructions, and the processor invokes the program instructions stored in the memory to enable the device to perform the steps of the Byzantine fault tolerance method.

[0081] (3) A computer readable storage medium, the computer readable storage medium stores a computer program, the computer program comprises program instructions, and the program instructions are executed by a processor to enable the processor to perform the steps of the Byzantine fault tolerance method.

[0082] Embodiment 1.

[0083] The embodiment of the application provides an extensible Byzantine fault tolerance method based on a tree topology network, referring to Figure 1 and Figure 2 The method comprises the following steps:

[0084] Step 101: the tree topology network structure divides the consensus nodes into independent groups, specifically:

[0085] The tree network topology is a hierarchical structure, and is suitable for a hierarchical network system. Therefore, the network is divided into layers, each layer is composed of different areas, and the global consensus is divided into several local consensus subnets, which greatly reduces the communication complexity of the PBFT consensus algorithm. Each parent node (non-leaf node) and its child node form a subnet, which is called a consensus domain, and the network composed of child nodes in the group domain is called a group domain (group).

[0086] Step 102: the VRF random grouping strategy is proposed to prevent the targeted attack of the Byzantine node on the system normal consensus,

[0087] The embodiment of the application makes each node randomly distributed and hides the node grouping information in the hierarchical system, and guarantees the security of the system.

[0088] Step 103: the feedback mechanism is introduced to reduce the influence of the Byzantine failure on the hierarchical network system; a feedback mechanism is designed to supervise and feedback the behavior of the node, and the feedback mechanism improves the fault tolerance performance by allowing the system to make progress when the node has the Byzantine behavior.

[0089] Step 104: for the feedback mechanism in the feedback domain failure probability is analyzed;

[0090] When the number of Byzantine nodes is within the range of the feedback domain fault tolerance, the probability that the feedback mechanism cannot trigger is almost 0, even if the Byzantine node is greater than one-third, it will not directly cause the feedback mechanism to fail to work

[0091] Step 105: for calculating the communication complexity according to the scalable tree topology network Byzantine fault tolerance consensus flowchart;

[0092] The communication complexity is calculated as:

[0093] R c =n(2k 2 +1) / k(2n 2 -n+1);

[0094] Wherein, n represents the total number of consensus nodes, k represents the number of consensus nodes in each group, R c represents the total communication complexity.

[0095] In summary, the embodiment of the application realizes that the democracy of consensus can be guaranteed, the network expansibility can be improved, the network communication complexity can be reduced, and the fault tolerance performance can be improved by the steps 101-105.

[0096] Embodiment 2.

[0097] The scheme in embodiment 1 will be further introduced as follows: Figures 2-7

[0098] Step 201: the nodes in the tree topology network are arranged in a tree shape, and the whole looks like an inverted tree, so it is named. The tree network topology structure is easy to expand, and it is easy to add new branches or new nodes in the network. It is easy to isolate faults, and if a line or a branch node fails, it mainly affects the local area, so the fault part can be easily isolated from the whole system. The tree network topology structure is a hierarchical structure, which is suitable for hierarchical network system. Therefore, based on the tree topology network, we propose a multi-center, grouping and hierarchical ETBFT algorithm, which divides the network into layers, each layer is composed of different regions, and the whole network consensus is divided into several local consensus of subnetworks, which greatly reduces the communication complexity of PBFT consensus algorithm. Each parent node (non-leaf node) and its child node form a subnetwork, which is called consensus domain, and the network composed of child nodes in the group domain is called group domain (group).

[0099] ​Step 202: Based on the hierarchical structure of the tree topology network, the ETBFT algorithm improves the consensus protocol of the PBFT algorithm. First, the master node in the consensus domain no longer participates in the consensus of the slave nodes (child nodes). The master node of each layer is only responsible for sending the request message to the child node and collecting the voting results of the child nodes in the group domain.

[0100] like Figure 2 As shown, in the request phase, the root node (master node) of the entire hierarchy collects transaction requests sent by clients and sorts them by number, packaging them into blocks. The root node multicasts pre-prepare messages to its child nodes. These child nodes form a group. Once a node in the group receives a valid pre-prepare message, it multicasts prepare messages to other nodes in the group to enter the prepare phase. If a node receives at least 2f messages from other nodes in the group... g (f g If a node in the group receives at least 2f matching prepare messages (indicating the maximum number of Byzantine nodes that can be tolerated within the group domain), it enters the commit phase by multicasting commit messages to other nodes in the group domain. Similarly, if a node in the group domain receives at least 2f matching prepare messages from other nodes, it enters the commit phase. g When a matching commit message is received, the nodes in the group domain that have already committed send a reply message to the root node. The root node then receives the matching commit message from the consensus domain. g When +1 reply message arrives, the consensus result reached within the consensus domain is sent back to the client. Simultaneously, nodes that have committed within the first-level domain are considered master nodes and multicast pre-prepare messages carrying commit certificates to reach consensus with nodes in the next layer. After undergoing four phases similar to the previous pre-prepare, prepare, commit, and reply within the consensus domain, the master nodes in each consensus domain send a consensus result back to the client. The client only accepts the master node's reply when more than half of the master nodes in the consensus domains have the same response.

[0101] Step 203: A random grouping strategy combining VRF is proposed to randomly distribute each node and hide the node grouping information in the hierarchical system, thereby ensuring the security of the system.

[0102] During the grouping phase, nodes can be divided into provers and verifiers, and each prover's grouping information needs to be confirmed by the verifier. Therefore, the random grouping process is divided into two parts: the grouping formation phase and the verification phase.

[0103] Assuming that there are n nodes in the system, the random grouping based on VRF divides the n nodes into m groups, and each group should carry n / m nodes. Given a random seed, the VRF outputs a pseudo-random hash value, which is basically uniformly distributed between 0 and 2 256 -1. It can be obtained that (v / 2 256 -1) ∈ [0, 1], so the interval for dividing each group is 1 / m.

[0104] (1) First, number all the nodes participating in consensus in the blockchain network, represented as {1, 2, 3…i}, and randomly select a node from all nodes by the prover. The prover i obtains a random number v and proof according to VRF, and the generation process is

[0105] VRF((seed, num), sk)→v+proof (1)

[0106] Where (seed, num) is the seed provided by the GST Center as a verifiable random function, num is the counter, and the initial value is 0, and sk is the node's own private key.

[0107] (2) The prover i gives the random number v and proof information to the GST Center, and the GST Center accepts it and assigns the prover to the corresponding group according to the value of the random number v. When the threshold of a small group is reached, the timestamp of the threshold is recorded, and the position of each group in the tree network is determined according to the timestamp. This is to let each group be randomly allocated to the hierarchical system according to the timestamp.

[0108] When all nodes are randomly allocated to different groups in different levels, the grouping information of each node will be verified by all verifiers. After verification, all nodes will be confirmed by the system.

[0109] Step 204: A feedback mechanism is designed to supervise and feedback the behavior of the nodes, which improves the fault tolerance performance by allowing the system to make progress when the nodes exhibit Byzantine behavior;

[0110] First, we define the feedback domain, which is a special autonomous region, as shown in Figure 3 , the root node of the feedback domain is node L1 G1N2, and the feedback domain is composed of the root node and its two-layer branches extending downward. As can be seen from the figure, Figure 4 is Figure 1feedback domain, so the network structure of ETBFT algorithm is composed of many feedback domains. Second, the feedback mechanism is implemented in the feedback domain, and each node participating in consensus will produce the corresponding certificate, at the same time, the system will record the time when each node makes specific operation, which is the basis for the implementation of the feedback mechanism. For convenience, we will describe the feedback mechanism according to Figure 3 the above three layers. Finally, we show how ETBFT algorithm reaches consensus under different circumstances according to the feedback mechanism.

[0111] A, assuming that the root node L1G1N2 in the feedback domain is an honest node, and the number of Byzantine nodes in the group domain L2G2 is more than f g ;

[0112] Feedback: node L1G1N2 will send pre-prepare messages carrying commit-certificates to each node in group domain L2G2, when the node receives the pre-prepare message, since the Byzantine node will produce Byzantine behavior, at the end of the commit phase, the group domain L2G2 cannot reach a consensus, so the node L1G1N2 cannot receive at least f g +1 matching commit messages in the reply phase. At the same time, all nodes in the third layer will also not receive the pre-prepare message carrying commit-certificate in the group domain L2G2 in the pre-prepare phase, so in this case, once at the end of the reply phase, node L1G1N2 will send the pre-prepare message carrying commit-certificates to all nodes in the third layer in the feedback domain.

[0113] Supervision: even if the group domain L2G2 cannot reach a consensus result, the honest node will send the previous pre-prepare message to the child node, and the Byzantine node will produce Byzantine behavior (such as sending inconsistent messages, or not sending messages). The pre-prepare message sent by each node in the group domain L2G2 will be verified by the child node, so as to check whether the node is an honest node, if it is an honest node, it will be authenticated by its child node, if it is a Byzantine node, the view switching will be started to replace the master node.

[0114] B, assuming that the root node L1G1N2 in the feedback domain is an honest node, when the number of Byzantine nodes in the second layer consensus domain L2G2 is less than f g ;

[0115] The node L1G1N2 sends the previous pre-prepare message to each node in the consensus domain L2G2. When each node receives the pre-prepare message, each node receives more than 2f g consistent messages in the prepare phase and the confirmation phase, the group can reach a consensus result. In the reply phase, the honest nodes send the commit message to the master node L1G1N2 of the group. When the master node L1G1N2 receives more than f g +1 consistent commit messages, it considers that the group has reached a consensus. Meanwhile, the honest nodes in the second layer consensus domain L2G2 send the pre-prepare message carrying the commit-certificate to the child nodes in the third layer. The Byzantine nodes will produce Byzantine behaviors. Therefore, the third layer and the node L2G2N i corresponding to the consensus domain receive the pre-prepare message from the node L2G2N i . First, they verify the validity of the message. If the message is valid, they continue to perform the prepare phase, the confirmation phase, and the reply phase. If the message is invalid, the node sends the invalid message to other nodes in the consensus domain. If the node receives more than 2f g invalid messages and has not received the pre-prepare message sent by the master node L1G1N2 before time T2 (the end of the prepare phase), (T1 and T2 are used to distinguish whether to trigger active feedback or passive feedback) at the end of the prepare phase, the passive feedback mechanism is triggered. The nodes in the consensus domain send feedback messages to the node L1G1N2. When the node L1G1N2 receives more than 2f consistent feedback messages, it sends the pre-prepare message and the commit message (the commit message is sent to indicate that the consensus domain L2G2 has completed the consensus) to the consensus domain. After the consensus domain completes the consensus, the view switching is triggered to replace the master node in the group domain.

[0116] C. Assuming that the root node L1G1N2 in the feedback domain is a Byzantine node, and the node L2G2N i in the second layer consensus domain L2G2 is a Byzantine node;

[0117] Since there are two consecutive nodes that are Byzantine nodes in the same branch, in this case, the nodes in the consensus domain corresponding to the node L2G2N i cannot receive correct messages. Even if the passive feedback mechanism is triggered, since the root node in the feedback domain is also a Byzantine node, the feedback mechanism cannot function properly. Therefore, all the nodes in the branch with the node L2G2N i as the root node cannot reach a consensus.

[0118] D, assuming that the root node L1G1N2 in the feedback domain is a Byzantine node, and the number of Byzantine nodes in the second layer consensus domain L2G2 is more than f g ;

[0119] In this case, the feedback mechanism is invalid, and the root node is invalid information even if it triggers the active feedback mechanism, and the consensus domain L2G2 cannot normally trigger the passive feedback mechanism, so all branches with the root node L1G1N2 cannot reach consensus.

[0120] Step 205: When the D case in step 204 occurs, the feedback mechanism in the feedback domain is completely invalid, so we analyze the failure probability of the feedback domain.

[0121] We have P = P(A) x P(B|A), where P(A) is the probability that the root node in the feedback domain is a Byzantine node, where f is the number of Byzantine nodes in the feedback domain, and n is the total number of nodes in the feedback domain.

[0122] Through analysis, we get

[0123]

[0124] Since the value of P(B|A) depends on P(A), P(B|A) is expressed as the probability that the group with the root node as the main node is a Byzantine group when the root node in the feedback domain is a Byzantine node, where k is the number of group members. Then

[0125]

[0126] Therefore, by formula 4, we get the relationship between the ratio r of Byzantine nodes to total nodes and the value of P under different k and n, such as Figure 4 Through experiments, it is shown that when the ratio of Byzantine nodes to total nodes is small, the value of P is very small, for example, when k = 4 and n = 21, the number of Byzantine nodes in the feedback domain accounts for one-third of the total number, and the value of P is 0.0034. Thus, when the number of Byzantine nodes is within the fault-tolerant range of the feedback domain, the probability that the feedback mechanism cannot be triggered is almost 0, even if the number of Byzantine nodes is more than one-third, it will not directly cause the feedback mechanism to fail to work, and when the total number of nodes in the network is larger, under the same ratio, the probability that the feedback domain cannot work is lower and lower. Since the entire system is composed of countless feedback domains, when the probability that the feedback domain cannot work is very low, the success rate of the entire system to reach consensus will be improved.

[0127]

[0128] Step 206: Calculate the ratio of ETBFT to PBFT communication complexity to verify the effectiveness of the present application.

[0129] (1) Calculate the communication complexity of PBFT algorithm:

[0130] Assuming that the number of nodes participating in consensus in the system is n, the consensus process of PBFT algorithm mainly includes five stages: request stage, pre-preparation stage, preparation stage, confirmation stage and reply stage. The communication complexity of completing a consensus can be calculated as 1 + (n-1) + (n-1)(n-1) + n(n-1) + n, which is simplified to 2n 2 -n+1. Therefore, the communication complexity of a single consensus of pbft algorithm is

[0131] C1=2n 2 -n+1 (5)

[0132] (2) Calculate the communication complexity of ETBFT algorithm:

[0133] Assuming that the number of nodes participating in consensus in the system is also n, our algorithm divides the nodes into a tree-shaped topology structure, so assuming that the number of nodes in each group domain is k, it is divided into n / k group domains. Under normal circumstances, our algorithm sends messages to the nodes in the group domain by the master node of each consensus domain, the nodes complete consensus in the group domain after receiving the message and reply the consensus result to the master node, and the master node sends the consistent consensus result to the client after receiving it. Therefore, the communication complexity of each consensus domain is k+k(k-1)+k(k-1)+k+1, which is simplified to 2k 2 +1. Therefore, the communication complexity of ETBFT algorithm is

[0134] C2=n / k(2k 2 +1) (6)

[0135] Therefore, the ratio of the communication complexity of ETBFT algorithm to PBFT algorithm is R=C2 / C1. From the expressions of C2 and C1:

[0136] R=n / k(2k 2 +1) / 2n 2 -n-1 (7)

[0137] We take k=4, 10, 16 to simulate the experiment under the condition that the total number of network nodes is less than 1000 and compare the ratio of the communication complexity of ETBFT algorithm to PBFT algorithm under different network nodes. The experimental results are shown in Figure 5 Under the same network nodes, compared with PBFT algorithm, even under different k values, the communication complexity of ETBFT algorithm is extremely low, and under the same network nodes, the smaller the k value, the lower the communication complexity of ETBFT.

[0138] Step 207: Use the feedback mechanism to deal with the Byzantine node to produce malicious behavior, can maximize the success rate of our algorithm to complete the consensus.

[0139] In the case of random distribution of nodes, the probability of triggering the feedback mechanism within the acceptable fault tolerance range is extremely low. Therefore, in order to verify the effectiveness of the mechanism, the success rate under node malicious attack is analyzed, and the FPD and FND models are introduced and compared with the Multi-Layer PBFT algorithm to verify that our algorithm can improve the fault tolerance of the hierarchical system. Figure 6 And 7 It can be seen that the ETBFT algorithm has better fault tolerance performance than the Multi-layer PBFT algorithm, and our algorithm can always maintain a high 100% consensus success rate in both FPD and FND models.

[0140] Embodiment 3.

[0141] In combination Figure 8 A scalable Byzantine fault-tolerant device based on tree topology network comprises:

[0142] The introduction module 1 is used to divide the consensus nodes into independent groups in the tree topology network structure.

[0143] The design module 2 is used to prevent the targeted attack and collusion of the Byzantine node on the system normal consensus based on the VRF random grouping strategy.

[0144] The acquisition module 3 is used to introduce a feedback mechanism to reduce the influence of the Byzantine failure on the hierarchical network system.

[0145] The analysis module 4 is used to analyze the failure probability of the feedback domain in the feedback mechanism.

[0146] The calculation module 5 is used to calculate the communication complexity based on the scalable Byzantine fault-tolerant tree topology network.

[0147] The introduction module 1 comprises:

[0148] The construction submodule 11 (i.e. the design submodule) is a hierarchical structure, which is suitable for hierarchical network system. Therefore, the present application proposes a multi-center, grouping and hierarchical ETBFT algorithm, which divides the network into layers, each layer is composed of different regions, and the global consensus is divided into several local consensus of subnetworks, which greatly reduces the communication complexity of the PBFT consensus algorithm.

[0149] The selection sub-module 12 (i.e., the calculation sub-module) forms a sub-network with its child nodes, which is called a consensus domain, and the network formed by the child nodes in the group domain is called a group domain (group), and the PBFT algorithm is performed in each group domain.

[0150] The types of the devices in the embodiments of the present application are not limited, except for the devices specially described, and the devices capable of completing the above functions can be used.

[0151] The execution subject of each module described above can be a computer, a single-chip microcomputer, a microcontroller, or other devices with computing functions, and the execution subject is not limited in the embodiments of the present application, and can be selected according to the actual application needs.

[0152] In summary, the embodiments of the present application realize both the guarantee of democratic consensus and the improvement of network expansibility, the reduction of network communication complexity, and the improvement of fault tolerance performance through the above modules.

[0153] Embodiment 4.

[0154] The expandable Byzantine fault-tolerant device based on a tree topology network, as shown in Figure 9 includes a processor 6 and a memory 7, the memory 6 stores program instructions, and the processor 7 calls the program instructions stored in the memory 6 to make the device execute the following method steps in embodiment 1:

[0155] The present application proposes an expandable Byzantine fault-tolerant algorithm based on a tree topology network, which divides the consensus nodes into independent groups based on the tree topology network structure;

[0156] At the same time, a VRF random grouping strategy is proposed to prevent targeted attacks and collusion of Byzantine nodes on the system normal consensus;

[0157] A feedback mechanism is introduced to reduce the influence of Byzantine failures on the hierarchical network system;

[0158] The failure probability of the feedback domain in the feedback mechanism is analyzed;

[0159] According to the expandable Byzantine fault-tolerant based on a tree topology network, the communication complexity is calculated.

[0160] It should be pointed out that the device description in the above embodiments corresponds to the method description in the embodiments, and the embodiments of the present application will not be repeated here.

[0161] The execution subject of the processor 6 and the memory 7 described above can be a computer, a single-chip microcomputer, a microcontroller, or other devices with computing functions, and the execution subject is not limited in the embodiments of the present application, and can be selected according to the actual application needs.

[0162] Data signals are transmitted between the memory 7 and the processor 6 through a bus 8, which is not described in detail in the embodiments of the present application.

[0163] Embodiment 5.

[0164] Based on the same inventive concept, the embodiments of the present application also provide a computer readable storage medium, which includes a stored program. When the program is run, the device where the storage medium is located performs the method steps in the above embodiments.

[0165] The computer readable storage medium includes, but is not limited to, a flash memory, a hard disk, a solid state disk, etc.

[0166] It should be noted that the readable storage medium description in the above embodiments corresponds to the method description in the embodiments, and the embodiments of the present application will not be described here.

[0167] In the above embodiments, all or part of the embodiments can be realized by software, hardware, firmware or any combination thereof. When realized by software, all or part of the embodiments can be realized in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated.

[0168] The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in or transmitted by a computer readable storage medium. The computer readable storage medium can be any available medium accessible by the computer or a data storage device such as a server, data center, etc. containing one or more available media sets. The available medium can be a magnetic medium or a semiconductor medium, etc.

[0169] The model of each device is not limited unless otherwise specified in the embodiments of the present application, and any device that can complete the above functions can be used.

[0170] The above is only the preferred embodiment of the present application, and does not limit the present application in any form. Any simple modification, equivalent change and modification of the above embodiment according to the technical essence of the present application still belongs to the scope of the technical scheme of the present application.

Claims

1. A method for Byzantine fault tolerance based on tree topology network, characterized in that, It comprises the following steps: (1) dividing the consensus nodes into independent groups based on the tree topology network structure; Specifically: dividing the network into layers, each layer is composed of different areas, and the whole network consensus is divided into several local consensus subnets by the whole network consensus, each parent node and its child node form a subnet, which is a consensus domain; The main node in the consensus domain no longer participates in the consensus of the child nodes, and the main node of each layer is only responsible for sending request messages to the child nodes and collecting the voting results of the child nodes in the group domain; In the division process, the random grouping strategy of VRF is combined to make each node randomly distributed and hide the node grouping information in the hierarchical system; The random grouping process is divided into two parts: grouping formation stage and verification stage, the process is: Assuming that there are n nodes in the system, the random grouping based on VRF divides the n nodes into m groups, and each group should carry n / m nodes; given a random seed, the VRF outputs a pseudo-random hash value, which is basically uniformly distributed between 0 and , and can be obtained, so the interval of each group is 1 / m; All nodes participating in consensus in the blockchain network are numbered, and the IDs of the nodes are represented by {1, 2, 3…i}. The prover participating in the lottery is randomly selected from all nodes; the prover i obtains a random number v and proof according to VRF, and the generation process is: VRF((seed, num), sk) v + proof; wherein (seed, num) is a seed provided by the GST Center as a verifiable random function, num is a counter with an initial value of 0, and sk is the private key of the node itself; Prover i gives the random number v and proof information to the GST Center, and the GST Center will allocate the prover to the corresponding group according to the value of the random number v after accepting; When the threshold value of a group member is reached, record the timestamp of the threshold value, and the position of each group in the tree network is determined according to the timestamp; When all nodes are randomly allocated to different groups at different levels, the grouping information of each node will be verified by all verifiers; After verification, all nodes will be confirmed by the system; (2) introducing a feedback mechanism to supervise and feedback the behavior of the nodes; (3) probability analysis of the failure probability of the feedback domain in the feedback mechanism; The process of probability analysis of the failure probability of the feedback domain is: provided with where P(A) is the probability that the root node in the feedback field is a Byzantine node, where f is the number of Byzantine nodes in the feedback field, and n is the total number of nodes in the feedback field; through analysis, we obtain ; Since the value of P(A) depends on P(B), denotes the probability that the group with the root node as the primary node is a Byzantine group when the root node in the feedback domain is a Byzantine node, where k is the number of group members; then ; When the number of Byzantine nodes is within the fault-tolerant range of the feedback domain, the probability that the feedback mechanism cannot trigger is almost 0, even if the number of Byzantine nodes is more than one-third, it will not directly cause the feedback mechanism to fail to work, and when the total number of network nodes is larger, the probability that the feedback domain cannot work is lower and lower; When the probability that the feedback domain cannot work is very low, the success rate of the whole system to reach consensus will be improved; (4) calculating the communication complexity.

2. The Byzantine fault-tolerant method according to claim 1, wherein In step (2), the feedback mechanism allows the system to make progress when the nodes exhibit Byzantine behavior.

3. The Byzantine fault-tolerant method according to claim 1, wherein In step (4), the communication complexity is calculated as follows: ; wherein, n denotes the total number of consensus nodes, k denotes the number of consensus nodes of each group, R c denotes the total communication complexity.

4. A Byzantine fault-tolerant apparatus based on tree topology network, characterized in that, The Byzantine fault-tolerant device is used to implement the Byzantine fault-tolerant method of any one of claims 1-3, comprising: An introduction module is used to divide the consensus nodes into independent groups based on the tree topology network structure; A design module is used to prevent Byzantine nodes from targeting attacks and collusion to affect the normal consensus of the system based on the VRF random grouping strategy; An acquisition module is used to introduce a feedback mechanism to reduce the impact of Byzantine failures on the hierarchical network system; An analysis module is used to analyze the failure probability of the feedback domain in the feedback mechanism; A calculation module is used to calculate the communication complexity based on the scalable Byzantine fault-tolerant method based on the tree topology network.

5. The Byzantine fault-tolerant device according to claim 4, wherein The introduction module further comprises a design sub-module and a calculation sub-module; The design submodule is used for reducing the communication complexity of the PBFT consensus algorithm. The calculation submodule, each parent node and its child node form a subnet, and the network composed of child nodes in the group domain is referred to as a group domain. 6.The byzantine fault tolerance apparatus according to claim 4, characterized in that, The byzantine fault tolerance apparatus further comprises a processor and a memory. The memory stores program instructions, and the processor invokes the program instructions stored in the memory to enable the apparatus to execute the byzantine fault tolerance method of any one of claims 1-3. 7.A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program comprises program instructions, which are executed by a processor to enable the processor to execute the byzantine fault tolerance method of any one of claims 1-3.

Citation Information

Patent Citations

  • Practical Byzantine fault-tolerant consensus method and device and readable storage medium

    CN112395113A

  • Byzantine fault-tolerant method and device with high fault-tolerant expandability and storage medium

    CN114189325A