Substitute node Byzantine fault tolerance method

Through the Byzantine fault tolerance method of replacement nodes, the Byzantine fault tolerance method in the existing technology is solved, and the performance degradation and inconsistent node status when facing continuous node failure or malicious node attacks are achieved, and the rapid recovery of the system and node status consistency is improved. performance.

CN119276689AActive Publication Date: 2025-01-07UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411349462.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-07
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

Existing Byzantine fault tolerance methods may experience performance degradation and inconsistent node status when facing continuous node failures or malicious node attacks.

Method used

Byzantine fault tolerance method of substitute nodes, by obtaining all nodes in the system, dividing the current compute state node set and candidate node set, determining the node situation of the primary node based on the message set received by the client, triggering the state change, and replacing the bad with the substitute node Nodes, until the main node is a good node.

Benefits of technology

Improves system performance, maintains node state consistency, ensures rapid recovery after errors occur, and prevents recurrence of similar errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276689A_ABST
    Figure CN119276689A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial networks, in particular to a Byzantine fault tolerance method for a substitute node. In the preparation stage, all nodes in the system are obtained, all the nodes comprise main nodes and alternate nodes, and a current calculation state node set and a candidate node set are divided; executing a command: acquiring a message set received by a client, and determining the node condition of the main node according to the message set; wherein the node condition comprises good nodes and bad nodes; state change: replacing the bad nodes in the main nodes with the substitute nodes until the nodes in the main nodes are all good nodes; a part of nodes are used as substitutions in advance, so that the industrial network system can be quickly recovered after errors occur, similar errors can be avoided after Byzantine errors of a main node occur for a certain number of times, and the effects of improving the performance and keeping the node state consistency are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial networks, and in particular to a substitute node Byzantine fault tolerance method. Background Art

[0002] With the widespread application of distributed industrial network systems and blockchain technology, how to ensure that the system can still operate normally in the presence of Byzantine nodes has become an important research topic. The existing Byzantine fault-tolerant algorithm is used to ensure that the system can reach a consistent decision through multiple information exchanges and verifications when most nodes are normal.

[0003] However, traditional Byzantine fault tolerance methods may suffer from performance degradation and node state inconsistency when facing continuous node failures or malicious node attacks. Therefore, it is necessary to propose a replacement node Byzantine fault tolerance method that improves performance and maintains node state consistency. Summary of the invention

[0004] The purpose of the present invention is to provide a substitute node Byzantine fault tolerance method, aiming to solve the technical problem that the Byzantine fault tolerance method in the prior art may experience performance degradation and inconsistent node status when facing continuous node failures or malicious node attacks.

[0005] To achieve the above object, the present invention adopts a substitute node Byzantine fault tolerance method, which includes the following steps:

[0006] Preparation phase: Get all nodes in the system, including master nodes and backup nodes, and divide them into the current computing state node set and the standby node set;

[0007] Execute command: obtain the message set received by the client, and determine the node status of the master node according to the message set; the node status includes whether all nodes are good nodes or there are bad nodes;

[0008] Status change: the substitute node is used to replace the bad node in the main node until all nodes in the main node are good nodes.

[0009] Among them, in the preparation stage: all nodes in the system are obtained, all nodes include main nodes and substitute nodes, and the current computing state node set and the candidate node set are divided into the steps:

[0010] The nodes in the current computing state node set are the main nodes that receive client commands, and the nodes in the candidate node set are the substitute nodes that do not participate in computing.

[0011] Among them, in the step of executing the command: obtaining a message set received by the client, and determining the node status of the master node according to the message set; wherein the node status includes all good nodes and the presence of bad nodes:

[0012] Suppose the current computing state node set is set A, there are 3f+1 nodes in set A, one of which is the primary node p; the candidate node set is set B, there are at most f nodes in set B; the message set is set E;

[0013] Determine the node status and trigger a status change when a bad node exists.

[0014] Among them, in the step of judging the node status and triggering the state change when there is a bad node:

[0015] When |E|=3f+1, it is determined that there are no error nodes in set A;

[0016] When |E|=2f+1, it is determined that there are f error nodes in the set E, and no error node is the master node;

[0017] When 2f+1<|E|<3f+1, it is determined that there are (0, f) error nodes in the set E, and no error node is a master node.

[0018] Among them, in the step of judging the node status and triggering the state change when there is a bad node:

[0019] When |E|<2f+1, the primary node p is judged to be a bad node, triggering a state change.

[0020] A substitute node Byzantine fault tolerance method of the present invention, through the preparation stage: obtain all nodes in the system, all nodes include main nodes and substitute nodes, and divide the current computing state node set and the candidate node set; execute command: obtain the message set received by the client, and determine the node status of the main node according to the message set; wherein the node status includes all good nodes and bad nodes; state change: use the substitute node to replace the bad node in the main node until the node status in the main node is all good nodes; make most of the nodes in the industrial network system participate in the calculation, and another small part of the nodes are used as substitutes; the node receiving the client command is called the main node, when the main node has a Byzantine error, consider using the substitute node that does not participate in the calculation to replace the main node, and exclude the main node that has the Byzantine behavior from the industrial network system, so that the main node will not participate in the subsequent calculation. This method enables the industrial network system to recover quickly after an error occurs by making a part of the nodes as substitutes in advance, and can meet the requirement that similar errors will not occur after a certain number of main node Byzantine errors occur, thereby obtaining the effect of improving performance and maintaining node state consistency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 It is a schematic diagram of the steps of the substitute node Byzantine fault tolerance method of the present invention.

[0023] Figure 2 It is a flow chart of the substitute node Byzantine fault tolerance method of the present invention.

[0024] Figure 3 It is a program diagram of Algorithm 1 of the present invention.

[0025] Figure 4 It is a program diagram of Algorithm 2 of the present invention.

[0026] Figure 5 It is a program diagram of Algorithm 3 of the present invention. DETAILED DESCRIPTION

[0027] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0029] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0030] See also Figure 1 to Figure 5 ,in Figure 1 This is a schematic diagram of the steps of the substitute node Byzantine fault tolerance method. Figure 2 This is a flowchart of the substitute node Byzantine fault tolerance method. Figure 3 is the program diagram of Algorithm 1. Figure 4 This is the program diagram of Algorithm 2. Figure 5 This is the program diagram of Algorithm 3.

[0031] The present invention has the following definitions:

[0032] The client requests the industrial network system to execute a command. There are at most f nodes in the system that may have errors. Suppose there are n=4f+1 nodes in the system. Consider f nodes as substitutes and do not participate in the calculation.

[0033] Signature: Node i sends a signed message msg(x)i with content x. Good nodes will not accept unsigned messages.

[0034] State: The current computing state S of the system, which has 3f+1 nodes, one of which is the master node p. When the master node is a Byzantine node, the state change is triggered.

[0035] Request: For example, the request Request(c, t) sent by client u to primary node p u , where c is the command that client u wants the system to execute and t is a timestamp.

[0036] Record: Record R is a sequence of commands c1, c2, .... If the last command is c k , then the record is recorded as R k The record of node r is represented by R r .

[0037] Candidate: Candidate B is a set of candidate nodes in the current state, and there are at most f nodes. When the state change is triggered, B[0] will be selected as the main node. At the same time, this node will no longer exist in the new candidate set B', and B'[0] = B[1].

[0038] The present invention provides a substitute node Byzantine fault tolerance method, comprising the following steps:

[0039] S100: Preparation phase: Acquire all nodes in the industrial network system, including master nodes and backup nodes, and divide them into a current computing state node set and a standby node set.

[0040] In this embodiment, all nodes in the industrial network system are obtained, all nodes include main nodes and substitute nodes, and are divided into a current computing state node set and a candidate node set; wherein the nodes in the current computing state node set are the main nodes that receive client commands, and the nodes in the candidate node set are the substitute nodes that do not participate in the calculation.

[0041] The specific procedure of step S100 is: Figure 3 The algorithm shown in 1:

[0042] Set A is the set of nodes participating in the current computing state. The first node in set A is considered to be the primary node p of the initial state, and set B is the candidate, with at most f nodes. Nodes that the client does not receive a reply will not participate in this visit on the client side.

[0043] S200: Execute command: obtain the message set received by the client, and determine the node status of the master node according to the message set; the node status includes all good nodes and the existence of bad nodes.

[0044] In this implementation, the current computing state node set is set A, there are 3f+1 nodes in set A, one of which is the primary node p; the candidate node set is set B, there are at most f nodes in set B; the message set is set E; the node status is judged, and when there is a bad node, the state change is triggered;

[0045] When |E|=3f+1, it is determined that there are no error nodes in set A;

[0046] When |E|=2f+1, it is determined that there are f error nodes in the set E, and no error node is the master node;

[0047] When 2f+1<|E|<3f+1, it is determined that there are (0, f) error nodes in the set E, and no error node is the primary node;

[0048] When |E|<2f+1, the primary node p is judged to be a bad node, triggering a state change.

[0049] The specific procedure of step S200 is: Figure 4 The algorithm shown in 2:

[0050] In this step, the Response (d, PR) received in E r If they come from the correct node, they must be consistent, that is, R u , R p , R rare consistent. When |E|=3f+1, it means there is no error node in A; when |E|=2f+1, there are f error nodes in E, and no error node is the main node; when 2f+1<|E|<3f+1, it means there are (0, f) error nodes in E, and no error node is the main node.

[0051] In the above three cases, both the client and the system can believe that the command is completed correctly, because the client will receive at least 2f+1 replies of correctly executed commands, which must be greater than That is, more than half of the nodes in the system run the command correctly.

[0052] When |E|<2f+1, it proves that the master node p has an error. The master node p may be down, resulting in the failure to forward the client's command to the node A. It may also be that Byzantine behavior occurs, such as broadcasting different tampered commands to different nodes. In this case, the client uses INeedBackup(p) u The message informs the system that there is a bad node p and it is hoped that this node will be replaced. At this time, the system state change is triggered.

[0053] S300: Status change: using the substitute node to replace the bad node in the main node until all nodes in the main node are good nodes.

[0054] In this implementation manner, after determining that there is a bad node, the substitute node is used to replace the bad node in the main node until the nodes in the main node are all good nodes.

[0055] The specific procedure of step S300 is: Figure 5 The algorithm shown in 3:

[0056] Since in Algorithm 1, each time the algorithm is successfully executed, the client will send the latest R u Inform the backup node. Therefore, the good nodes among the backup nodes must have the same R u So for the newly elected master node p', R p’ , it must be R u and R r The prefix of R u and R r The extra content may be the command that was not completed successfully and triggered the state change c k Therefore, after the state change is completed, the client re-initiates the execution of this command. If the command is successfully completed, the state change is considered successful; if it cannot be completed, the state change is considered to have failed, the master node is still an error node, and the state change will be triggered again.

[0057] For each if condition in Algorithm 3, a timeout mechanism can be set. If the timeout is not completed, it can be considered that the current state change has failed. For example, in line 3 of Algorithm 3, if |H|≤f after a certain period of time, this may be a Byzantine node trying to cause a state change.

[0058] In the present invention, three steps are adopted, namely, preparation phase, command execution and state change, wherein: Preparation phase: obtain all nodes in the system, including main nodes and backup nodes, and divide the nodes into a set of current computing state nodes and a set of standby nodes.

[0059] Execute command: obtain the message set received by the client, and determine the node status of the master node according to the message set; the node status includes whether all nodes are good nodes or there are bad nodes.

[0060] Status change: the substitute node is used to replace the bad node in the main node until all nodes in the main node are good nodes.

[0061] In the preparation state, the node that first replies to the client u participates in the calculation, which to a certain extent ensures that the nodes participating in the calculation are relatively fast in response and have faster network communication.

[0062] When the system is in an error-free state, only three communication rounds are needed to complete the command: u→p, p→r, r→u. When there is a non-master node Byzantine error, five communication rounds are needed to complete the command.

[0063] When there is a Byzantine node in the initial state of the calculation, and this node happens to be the primary node, there are f-1 Byzantine nodes in the substitute set. In this case, the system will produce at most f state changes, after which the system can exclude all Byzantine nodes so that they will never participate in the calculation again.

[0064] Since the good nodes among the substitute nodes will definitely receive the latest R broadcast by the client u , this can also be used to exclude possible Byzantine nodes from the substitute nodes.

[0065] Through the above process, most of the nodes in the industrial network system participate in the calculation, and a small number of nodes are used as substitutes; the node that receives the client command is called the master node. When the master node has a Byzantine error, consider using a substitute node that does not participate in the calculation to replace the master node, and exclude the master node that has Byzantine behavior from the industrial network system so that the master node will not participate in subsequent calculations. This method enables the industrial network system to recover quickly after an error occurs by making some nodes serve as substitutes in advance, and can meet the requirement that similar errors will not occur after a certain number of master node Byzantine errors occur, thereby improving performance and maintaining node status consistency.

[0066] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0067] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. A substitute node Byzantine fault tolerance method, characterized in that: The steps include: Preparation phase: Get all nodes in the system, including master nodes and backup nodes, and divide them into the current computing status node set and the backup node set; Execute command: obtain the message set received by the client, and determine the node status of the master node according to the message set; the node status includes whether all nodes are good nodes or there are bad nodes; Status change: the substitute node is used to replace the bad node in the main node until all nodes in the main node are good nodes.

2. The substitute node Byzantine fault tolerance method according to claim 1, characterized in that: In the preparation phase: obtain all nodes in the system, including the main nodes and the backup nodes, and divide the current computing state node set and the backup node set into the steps: The nodes in the current computing state node set are the main nodes that receive client commands, and the nodes in the candidate node set are the substitute nodes that do not participate in computing.

3. The substitute node Byzantine fault tolerance method according to claim 1, characterized in that: In the step of executing the command: obtaining a message set received by the client, and determining the node status of the master node according to the message set; wherein the node status includes all good nodes and the presence of bad nodes: Suppose the current computing state node set is set A, there are 3f+1 nodes in set A, one of which is the primary node p; the candidate node set is set B, there are at most f nodes in set B; the message set is set E; Determine the node status and trigger a status change when a bad node exists.

4. The substitute node Byzantine fault tolerance method according to claim 3, characterized in that: When judging the node status, when there is a bad node, the step of triggering the state change: When |E|=3f+1, it is determined that there is no error node in set A; When |E|=2f+1, it is determined that there are f error nodes in the set E, and no error node is the master node; When 2f+1<|E|<3f+1, it is determined that there are (0, f) error nodes in the set E, and no error node is a master node.

5. The substitute node Byzantine fault tolerance method according to claim 4, characterized in that: When judging the node status, when there is a bad node, the step of triggering the state change: When |E|<2f+1, the primary node p is judged to be a bad node, triggering a state change.

Citation Information

Patent Citations

  • A method to enhance the reliability of the cluster and a high reliability communication node

    CN101217402A

  • PBFT consensus algorithm based on block chain intellectual property protection

    CN111917826A

  • Collection of state information by nodes in a cluster to handle cluster management after master-node failover

    US12066907B1

  • Method And System For Clustering

    US20090113034A1

  • Mechanism for controlling a process on a computing node based on the participation status of the computing node

    US20150222506A1