A cross-fault tolerance method for alliance chains
By adopting the XRaft sorting backend and dynamic load adjustment method in the alliance chain, the load and fault handling problems in the alliance chain scalability and Byzantine fault-tolerance environment are solved, and the fault recovery speed and load balancing capability are improved.
Patent Information
- Application Number
- CN202110741103.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-06-30
AI Technical Summary
There are scalability issues in the consortium chain. Traditional algorithms such as Paxos and Raft are not suitable for Byzantine fault-tolerant environments and are difficult to effectively handle loads and failures.
Adopting a cross-fault tolerance method for the alliance chain, by implementing the XRaft sorting backend in Fabric, Leader nodes are elected, and the XRaft algorithm is run among the councilors to dynamically adjust the load and fault handling, using tuples
It improves the speed of fault recovery, reduces changes to global configuration information, reduces the complexity of algorithm view changes, and achieves rapid isolation and load balancing of specific faulty nodes.
Smart Images

Figure CN113518126B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain application technology, and in particular to a cross-fault tolerance method for alliance chains. Background Art
[0002] As the application scope of blockchain (also known as distributed shared ledger) gradually expands, it has received widespread attention from the industry and academia. As a distributed system, blockchain can be divided into public chain, alliance chain and private chain from the perspective of access control. The consensus algorithm plays a decisive role in maintaining data consistency, ensuring system security and reliability in distributed systems. At present, non-deterministic algorithms such as PoW are basically used in public chains, and PBFT series deterministic algorithms are mainly used in alliance chains and private chains. However, they all have scalability problems, and traditional algorithms such as Paxos and Raft are not suitable for Byzantine fault-tolerant environments. Therefore, we propose a cross-fault-tolerant method for alliance chains to solve the above problems. Summary of the invention
[0003] The present invention proposes a cross fault tolerance method for alliance chains, which solves the problems in the background technology.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A cross fault tolerance method for alliance chain, comprising the following steps:
[0006] S1. Implement the XRaft sorting backend in Fabric;
[0007] S2. Each XRaft Orderer group elects its own Leader node, and then the Leader in each group sends the Leader identification message of the group to the next group in a clockwise manner.
[0008] S3. Members of the parliament run the XRaft algorithm to generate their own Leader nodes;
[0009] S4, Shard master cluster internal fault processing, will notify the leader of the group where the faulty node is located to re-elect a new member node;
[0010] S5, handle load and failure;
[0011] The S5 specifically includes:
[0012] Step 1: For each group, maintain a tuple like this<CAPACITY(k),ACTIVE DEGREE(k),DEPENDENCY(k)> , where CAPACITY(k) represents the total number of requests received by the k-th group within a period of time, ACTIVEDEGREE(k) represents the average number of transactions processed by the k-th group per unit time, and DEPENDENCY(k) represents the dependence of the k-th group's requests on the shard master;
[0013] Step 2: The system adjusts the councillors in the overloaded group based on the formula.
[0014] Preferably, S1 includes the following steps:
[0015] S11: Implement the Chain interface and the ConsenterSupport interface;
[0016] S12: Read XRaft configuration parameters and initialize the XRaft cluster;
[0017] S13: In the Order method of the Chain interface, call the XRaft algorithm, receive messages, and synchronize data on each node;
[0018] S14: In the BlockCutter method of ConsenterSupport, obtain the CommitLog of XRaft and package the blocks;
[0019] S15: Adapt methods in Consenter, Chain, and ConsenterSupport.
[0020] Preferably, step S2 comprises the following steps:
[0021] S21: If the leader node has not yet been generated in the next group, ignore the message;
[0022] S22: After the Leader node is generated, any non-Leader node in the group forwards the message to the Leader node of the group after receiving it. gl After receiving the message, the legitimacy of the message is verified based on the known group configuration information and signature;
[0023] S23: After verification, the leader of group x is recorded as j, and the voting information of t+1 members is sent to the next group;
[0024] S24: Before sending to the next group, the leader node can remove the voting information of the previous group, retain only the vote of its own group, and attach the leader information of its own group to it and pass it down;
[0025] S25: The legitimacy verification process of the message also only verifies the voting information and original signature of the previous group until the Leader node that sent the message receives the m gl message, the leader node can determine that the leader nodes have been generated in other groups and they all know that the leader of group x is j;
[0026] S26: The Leader node receives the m gl After the message is sent, check whether there is Leader information of other groups attached. If there is other Leader information attached, record the information and continue to send the attached information.
[0027] Preferably, step S3 comprises the following steps:
[0028] S31: The Leader randomly generates a node s as a member of the group based on the configuration information of the group it belongs to, and collects t+1 signature information in the group for the member of the group to form
[0029] S32: The message is sent by the leader node to the leader of the next group. The leader node that receives the message checks the legitimacy of the message and if a representative node has been generated in the group, the message is announced to the representative node of the group.
[0030] S33: Until the Leader receives the m sent by itself s Message, then notify the member node of this group. When the member node collects the information of |group| members, it forms a logical shard master cluster together with the members of other groups.
[0031] Preferably, in step S4, the councillor selection algorithm includes the following steps:
[0032] S41: When the leader node in an XRaft group fails, the member nodes in the group will report the failure and wait for a new leader to be generated;
[0033] S42: The councillor node will monitor the load situation within the group and the response speed of other councillor nodes;
[0034] S43: When it is found that a certain representative node has a slow response speed due to the load of the group, it can apply for a temporary representative node from the group with a lighter load, and the representative node becomes a passive node in the master group;
[0035] S44: When the load is restored, the councillor node resumes the active state and the temporary councillor node is deactivated.
[0036] Preferably, S5 includes the following formula:
[0037]
[0038] score(k)=WL(k)·e -DEPENDENCY(k) (2)
[0039] The load of each group is calculated according to formula (1). When the WL(k) of a group in the system is greater than a preset parameter α, it means that the load of the group is too high. The situation of each group is evaluated according to formula (2), and then a delegated leader node with a higher score is selected from the k groups and a temporary member is appointed to join the shard master group to replace the member of the group with excessive load.
[0040] Preferably, at least one node in each group serves as a councillor node; at least two nodes in each group are in normal working state at the same time.
[0041] Preferably, the algorithm in step S3 is the following algorithm:
[0042]
[0043]
[0044] The beneficial effects of the present invention are:
[0045] The present invention is based on PeerReview, so that the situation in which only the faulty node in the current view can be found in the FD of the XPaxos algorithm can be changed to the situation in which the specific faulty node can be located, thereby simply isolating the faulty node as a Passive node, thereby improving the speed of fault recovery.
[0046] The algorithm of the present invention does not need to change the master node and view in each fault recovery link. As long as the original leader node is proven to be running well from the peer perspective, there is no need to replace the master node, thereby reducing the change of global configuration information. Since the state of the node can be detected, when a new node is replaced, it is only necessary to copy the state of the leader node completely to the newly added node. The present invention performs consistency checks in a small range, reducing the complexity of algorithm view changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a schematic diagram of the overall architecture of HLF of the present invention.
[0048] Figure 2 This is the HLF workflow of the present invention.
[0049] Figure 3 Schematic diagram of Orderer service in HLF network.
[0050] Figure 4 This is a schematic diagram of the main structure of Orderer.
[0051] Figure 5 This is a schematic diagram of the main structure of multiLedger.
[0052] Figure 6 This is a schematic diagram of the Consenter interface and its implementation structure.
[0053] Figure 7 Class diagram for chainImpl in the XRaft sorting backend.
[0054] Figure 8 This is a diagram of the Sharding Orderer topology structure.
[0055] Fig. 9 This is the adaptive shards topology structure of the present invention. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0057] Reference Figure 1-9 , a cross fault tolerance method for alliance chain, comprising the following steps:
[0058] S1. Implement the XRaft sorting backend in Fabric;
[0059] S2. Each XRaft Orderer group elects its own Leader node, and then the Leader in each group sends the Leader identification message of the group to the next group in a clockwise manner.
[0060] S3. Members of the parliament run the XRaft algorithm to generate their own Leader nodes;
[0061] S4, Shard master cluster internal fault processing, will notify the leader of the group where the faulty node is located to re-elect a new member node;
[0062] S5, handle load and failure;
[0063] The S5 specifically includes:
[0064] Step 1: For each group, maintain a tuple like this<CAPACITY(k),ACTIVE DEGREE(k),DEPENDENCY(k)> , where CAPACITY(k) represents the total number of requests received by the k-th group within a period of time, ACTIVEDEGREE(k) represents the average number of transactions processed by the k-th group per unit time, and DEPENDENCY(k) represents the dependence of the k-th group's requests on the shard master;
[0065] Step 2: The system adjusts the councillors in the overloaded group based on the formula.
[0066] like Figure 1 As shown in the figure, the design of HLF v1.0 embodies the idea of high modularity. In this version, the Orderer sorting node (consensus mechanism) is separated to achieve pluggable characteristics. Certificate management is separated from the HLF project as a separate service module to form Fabric CA, which is used to handle the issuance and revocation of certificates. Blockchain applications can access the internal logical structure of the system, including ledgers, transactions, and chain codes, through the API provided by HLF. The ledger is the core concept of the blockchain system and is the entity of data records. The application transfers assets by modifying the state of the ledger. The chain code (also called smart contract in other blockchain systems) defines the rules of state transfer and constitutes the basis of blockchain applications. In Hyperledger Fabric, the concept of channel is proposed to associate different applications and business logic with channels, thereby achieving isolation of different businesses. In this way, the security of data is further guaranteed.
[0067] like Figure 2As shown in the figure, HLF completes the entire transaction process through the cooperation between various modules. In the transaction process, the cooperation relationship between various modules. The client program calls the underlying interface of the system through the SDK provided by the Fabric platform, and uses the digital certificate issued by the CA as the credential to join the network channel. In the initial stage of the transaction, the client must first initiate a proposal. The proposal is sent to a valid endorsement node for endorsement. Only when the endorsement response collected by the client meets the endorsement policy can a legal transaction request be constructed. The transaction request will be submitted to the sorting node for further processing. The sorting node will perform global sorting based on the received transaction requests and package qualified transactions into blocks. At the same time, the client can use the event monitoring mechanism to confirm whether the transaction has been successfully received.
[0068] The endorsement node in HLF provides the ProcessProposal method for the client to access and complete the endorsement of the transaction proposal. The process is mainly for the trusted endorsement node to sign the transaction proposal. The transaction can only be accepted by the Fabric network when it collects enough signatures. After receiving the transaction proposal from the client, the endorsement node first checks whether the certificate information of the client sending the proposal transaction is legal, then simulates the execution of the transaction, and records the changes in the ledger status after the transaction. The work of the endorsement node is completed by some peer nodes in the network.
[0069] The orderer is only responsible for sorting. In order to ensure the order of all legal transactions in the network, the orderer performs global sorting on the submitted transactions, and a backend program packages the transactions into a block structure. XRaft discussed in this article mainly plays the role of sorting backend in HLF. The orderer generally does not care about the specific content of the transaction and treats it transparently. This module mainly provides two remote procedure calls, Broadcast and Deliver, for other modules to call.
[0070] The main task of the Committer node is to maintain the blockchain and ledger status, including status, history, index data, etc. The Committer node periodically obtains the latest block information from the Orderer node in batches and makes final confirmations on these blocks. After the check is passed, the transaction is executed and the relevant information is updated. The Peer node can be responsible for only one role, endorsement or submission, or it can perform these two different tasks at the same time in the same Peer node.
[0071] like Figure 3As shown in the figure, in Hyperledger Fabric, consensus means that the nodes in the network always maintain the same state, so that things that arrive in the same order can be processed in the same way. The operations to maintain consensus in the Fabric network include endorsement, sorting, and verification, among which the most important is sorting. All transactions must obtain global orderliness through the sorting service before being verified and submitted by the Committer node. That is, the sorting service provides the function of atomic broadcast. In the Fabric v1.0 version, the sorting service is implemented by an independent Orderer module. Orderer itself consists of three parts: one is to provide an external interface through gRPC, the second is the blockchain structure maintained by the ledger component for different channels, and the third is the specific sorting backend. The position of the entire sorting service in the HLF network.
[0072] Orderer provides two external interfaces:
[0073] 1)Broadcast(srv ab.AtomicBroadcast_BroadcastServer)
[0074] 2)Deliver(srv ab.AtomicBroadcast_BroadcastServer)
[0075] like Figure 4 As shown in the figure, Broadcast sends the client's request to the Orderer node for sorting, and the Peer node pulls the sorted blocks in batches through Deliver. The key structure of the Orderer service. The Orderer node encapsulates these two interfaces through the server, where the Processor structure updates the channel configuration, and multiLedger maintains the chain and ledger structure in the Fabric network.
[0076] like Figure 5As shown in the figure, the Orderer node itself needs to maintain the recently generated blocks. Hyperledger Fabric supports three types of storage formats: 1) ram: store data in memory; 2) file: save to local in the form of a file; 3) json: save in the form of a file, the storage format is json. The data maintained by the Orderer node only contains the blockchain structure, and there is no need to save state information. The blockchain is maintained through the multiLedger structure, the most important of which are chains, systemChannel, the calling interface of the backend consensus algorithm (plug-in) Consenter, the ledger file and the signer for signing. The main methods provided by multiLedger include getChain for accessing chainSupport, NewChannelConfig for generating new configuration management, and systemChannelID for obtaining the system channel ID. All types of ledger structures implement the Append, Height and Iterator methods to realize the appending of ledgers, obtaining the total number of blocks and iterative query of ledger information.
[0077] In this embodiment, Fabric v1.0 itself provides solo mode and Kafka consensus module. Figure 6 The present invention shown here expands the consenter implementation based on xraft on this basis.
[0078] like Figure 7 As shown, the Chain interface needs to provide different versions of implementations accordingly. This is because Chain is closely related to the sorting backend algorithm. The start method of Chain will be called when the Orderer is started to initialize the relevant information.
[0079] The XRaft sorting backend implements the Chain interface, in which the simpleConsenter structure encapsulates the XRaft algorithm. msg is the message transmitted between the sorting backends, and the message is signed by the signer using the local private key. The message itself is accompanied by the summary information of the data part to ensure that the message will not be tampered with during the transmission between the nodes.
[0080] In general, implementing the XRaft sorting backend in Fabric requires the following steps: (1) Implement the Chain interface and the ConsenterSupport interface. (2) Read the XRaft configuration parameters and initialize the XRaft cluster (corresponding to the orderer node by default). (3) In the Order method of the Chain interface, call the XRaft algorithm, receive messages, and synchronize data on each node. (4) In the BlockCutter method of ConsenterSupport, obtain the CommitLog of XRaft and package the blocks. (5) Adapt other methods in Consenter, Chain, and ConsenterSupport.
[0081] The main idea of the sharding algorithm is to evenly distribute the computing power to different committees (committees), and each committee handles independent transactions (shards). The specific process includes the following five steps:
[0082] 1) Identity establishment and committee formation: Each processor generates an identity locally, which includes the public key, IP, and PoW conclusion.
[0083] 2) Overlay Setup for Committees: In this step, processors communicate with each other to discover other processors in the same committee.
[0084] 3) Consensus within the committee.
[0085] 4) Final consensus broadcast.
[0086] 5) Random sequence generation. The final committee generates a limited set of random numbers in a large range, which are broadcast to the entire network and used as PoW in the next stage.
[0087] The difficulty of sharding in an open network environment is that each node has no definite identity, while it is relatively simple to implement sharding in scenarios with clear identity such as consortium chains. The rest of this section will discuss how to shard XRaft in the Hyperledger Fabric environment and the corresponding sharding strategy.
[0088] Hyperledger Fabric configures the blockchain network into different channels, isolating them from each other according to different business objects. Based on this, a shard ledger can be constructed. Things in the same channel are mapped to the same orderer group. In this way, the throughput of the system can be further improved through an effective sharding strategy.
[0089] The shard master cluster is composed of several Orderer nodes based on the XRaft algorithm, which is used to reach a consensus on the metadata of the partition. The Master cluster regularly packages the metadata into blocks to form a metadata blockchain. The application transaction blocks on each channel are constructed by each Orderer group.
[0090] like Figure 8 As shown in the figure, although the given network topology can achieve the purpose of message isolation and improve system throughput, the shard master cluster can easily become the bottleneck of the entire system. In addition, the cluster is responsible for metadata consensus, and its security is self-evident for the entire system. How to dynamically adjust the composition of the shard master cluster to make it highly adaptable and reliable has become another issue worthy of study. It also emphasizes the advantages of dynamic topology over traditional static master-slave topology. This section proposes a new structure for this problem, such as Fig. 9 As shown in the figure, Gi represents different Orderer groups, which are composed of actual physical nodes and communicate with each other; M represents the shard master cluster, which is a logical structure, and the actual service is completed by different groups.
[0091] When the system is initialized, each XRaft Orderer group elects its own leader node. Then the leader in each group sends the leader identification message of the group to the next group in clockwise order. If the next group has not yet generated a leader node, the message will be ignored. After the leader node is generated, any non-leader node in the group will forward the message to the leader node of the group. glAfter receiving the message, the legitimacy of the message is verified based on the known group configuration information and signature. After the verification is passed, the leader of group x is recorded as j, and the voting information of t+1 members is sent to the next group. In order to further save bandwidth, the leader node can remove the voting information of the previous group before continuing to send to the next group, retaining only the votes of its own group, and attaching the leader information of this group to pass it down. The legitimacy verification process of the message also only verifies the voting information and original signature of the previous group. Until the leader node that sent the message receives the m gl message, the leader node can determine that the leader nodes in other groups have been generated and they all know that the leader of group x is j. gl After the message is sent, check whether there is any Leader information of other groups. If there is any Leader information of other groups, record it and send the attached information onwards.
[0092] The Leader randomly generates a node s as a member of the group based on the configuration information of the group it belongs to, and collects t+1 signature information in the group for the member to form The message is sent by the leader node to the leader of the next group. The leader node that receives the message checks the legitimacy of the message and if a representative node has been generated in the group, it will announce the message to the representative node of the group. s Message, then notify the member node of this group. When the member node collects the information of |group| members (including itself), it forms a logical shard master cluster with members of other groups. Members run the XRaft algorithm to generate their own Leader node.
[0093]
[0094] When a fault occurs within the Shard master cluster, the leader of the group where the faulty node is located will be notified to re-elect a new representative node. When the leader node in the XRaft group fails, the representative nodes in the group will report this information and wait for a new leader to be generated. The representative nodes will monitor the load conditions in the group and the response speed of other representative nodes. When it is found that a representative node has a slow response speed due to the load of the group, it can apply for a temporary representative node from a group with a lighter load, and the representative node will become a passive node in the master group. When the load is restored, the representative node will resume the active state and the temporary representative node will be disabled.
[0095] In the councillor election algorithm, lines 2 to 3 are the generation of leader nodes and councillor nodes within each group. Lines 4 to 11 of the algorithm are the leader node receiving m s The response scheme of the message, line 5 receives the message and verifies the legitimacy of the message; from line 6 to line 7, if there is a member node in the group, the leader node notifies the member node m s The representative node information contained in the message; Line 8, if the representative node has not yet been generated in the group, the Leader only records the information; Lines 9 to 11, if the Leader node receives the message it has sent, it notifies the representative node in the group, otherwise it continues to pass on to the next group; Lines 12 to 14, if the representative node confirms that all groups have generated representative nodes or have received notifications, it is added to the shard master group.
[0096] For load and failure conditions, maintain a tuple for each group.<CAPACITY(k),ACTIVEDEGREE(k),DEPENDENCY(k)> , where CAPACITY(k) represents the total number of requests received by the kth group within a period of time, ACTIVE DEGREE(k) represents the average number of transactions processed by the kth group per unit time, and DEPENDENCY(k) represents the dependence of the kth group's requests on the shard master (i.e., the number of times the leader is re-elected or the number of times the member node fails). The system adjusts the members in the overloaded group according to the following formula:
[0097]
[0098] score(k)=WL(k)·e -DEPENDENCY(k) (2)
[0099] The load of each group is calculated according to Formula 1. When the WL(k) of a group in the system is greater than a preset parameter α, it means that the load of the group is too high. At this time, the situation of each group is evaluated according to Formula 2, and then a delegated leader node with a higher score is selected from the k groups and a temporary member is appointed to join the shard master group to replace the member of the group with too high load.
[0100] This process must ensure the following two points:
[0101] 1) Each group has at least one node as a councillor node;
[0102] 2) There are at least two nodes in each group that are in normal working state at the same time.
[0103] The present invention is based on PeerReview, so that the situation in which only the faulty node in the current view can be found in the FD of the XPaxos algorithm can be located to the specific faulty node, thereby simply isolating the faulty node as a Passive node, thereby improving the speed of fault recovery. The algorithm of the present invention does not need to change the main node and change the view in each fault recovery link. As long as the original Leader node is proven to be running well through the peer perspective, there is no need to replace the main node, thereby reducing the change of global configuration information. Since the status of the node can be detected, when replacing a new node, it is only necessary to copy the status of the Leader node completely to the newly added node. The present invention performs consistency checks in a small range, reducing the complexity of the XPaxos algorithm view change.
Claims
1. A cross-fault tolerance method for alliance chains, characterized in that: The following steps are involved: S1. Implement the XRaft sorting backend in Fabric; S2. Each XRaft Orderer group elects its own Leader node, and then the Leader in each group sends the Leader identification message of the group to the next group in a clockwise direction. where g x Indicates that the current group id is x, j indicates the leader node number, σ j Represents node j’s signature for the message; S3. Members run the XRaft algorithm to generate their own Leader nodes. S4, Shard master cluster internal fault processing, will notify the leader of the group where the failed node is located to re-elect a new member node; S5, handle load and failure; The S5 specifically includes: Step 1: For each group, maintain a tuple like this<CAPACITY(k),ACTIVE DEGREE(k),DEPENDENCY(k)> , where CAPACITY(k) represents the total number of requests received by the k-th group within a period of time, ACTIVEDEGREE(k) represents the average number of transactions processed by the k-th group per unit time, and DEPENDENCY(k) represents the dependence of the k-th group's requests on the shard master; Step 2: The system adjusts the councillors in the overloaded group based on the formula.
2. A cross-fault tolerance method for alliance chains according to claim 1, characterized in that: The S1 includes the following steps: S11: Implement the Chain interface and the ConsenterSupport interface; S12: Read XRaft configuration parameters and initialize the XRaft cluster; S13: In the Order method of the Chain interface, call the XRaft algorithm, receive messages, and synchronize data on each node; S14: In the BlockCutter method of ConsenterSupport, obtain XRaft's CommitLog and package the blocks. S15: Adapt methods in Consenter, Chain, and ConsenterSupport.
3. A cross fault tolerance method for alliance chain according to claim 1, characterized in that: Step S2 includes the following steps: S21: If the leader node has not yet been generated in the next group, ignore the message; S22: After the Leader node is generated, any non-Leader node in the group forwards the message to the Leader node of the group after receiving it. The Leader node receives m gl After receiving the message, the legitimacy of the message is verified based on the known group configuration information and signature; S23: After verification, the leader of group x is recorded as j, and the voting information of t+1 members is sent to the next group; S24: Before sending to the next group, the leader node can remove the voting information of the previous group, retaining only the votes of its own group, and append the leader information of its own group to the next group. S25: The legitimacy verification process of the message also only verifies the voting information and original signature of the previous group until the Leader node that sent the message receives the m gl The leader node can determine that the leader nodes have been generated in other groups and all of them know that the leader of group x is j; S26: The Leader node receives the m gl After the message is sent, check whether there is Leader information of other groups. If there is other Leader information, record the information and continue to send the attached information.
4. A cross fault tolerance method for alliance chain according to claim 1, characterized in that: Step S3 includes the following steps: S31: The Leader randomly generates a node s as a member based on the configuration information in its group, and collects t+1 signature information in the group to form m for the member. s =<SENATOR,s,j> σj ; S32: The message is sent by the leader node to the leader of the next group. The leader node that receives the message checks the legitimacy of the message and if a representative node has been generated in the group, it announces the message to the representative node of the group. S33: Until the Leader receives the m sent by itself s Message, the member node of this group is notified. When the member node collects information of |group| members, it forms a logical shard master cluster with members of other groups.
5. A cross fault tolerance method for alliance chain according to claim 1, characterized in that: In step S4, the councilor selection algorithm includes the following steps: S41: When the leader node in an XRaft group fails, the member nodes in the group will report the failure and wait for a new leader to be generated. S42: The councilor node will monitor the load situation within the group and the response speed of other councilor nodes; S43: When a representative node is found to be responding slowly due to the load of the group, it can apply for a temporary representative node from the group with lighter load, and the representative node becomes a passive node in the master group; S44: When the load is restored, the councilor node resumes the active state and the temporary councilor node is deactivated.
6. A cross fault tolerance method for alliance chain according to claim 1, characterized in that: S5 includes the following formula: The load of each group is calculated according to formula (1). When the WL(k) of a group in the system is greater than a preset parameter α, assuming that the group number is k, WL(k) is calculated according to formula 1, which refers to the load of group k, indicating that the load of the group is too high. The situation of each group is evaluated according to formula (2), and then the delegated leader node with the higher score is selected from the k groups and a temporary member is appointed to join the shard master group to replace the member of the group with the excessive load.
7. A cross fault tolerance method for alliance chain according to claim 6, characterized in that: Each group has at least one node serving as a councillor node; each group has at least two nodes in normal working order at the same time.
