Block chain fragmentation system error fragmentation security guarantee method and system

By exchanging messages and handling leader node switching processes within the blockchain sharding system, the security and activity issues caused by erroneous nodes exceeding the threshold within a shard are resolved, achieving transaction security and system stability even in erroneous node environments.

CN121864276APending Publication Date: 2026-04-14TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing blockchain sharding technology cannot effectively guarantee the security and activity of transactions within a shard when the number of faulty nodes exceeds a threshold.

Method used

By exchanging messages between nodes in the ingress shard and the random shard, including request messages, forwarding messages, status messages, and new cycle messages, the leader node switching and conflict handling are achieved, ensuring security and liveness within the shard.

Benefits of technology

When the number of faulty nodes within a shard exceeds a threshold, transaction security and system activity are ensured, thus improving the stability and reliability of the blockchain sharding system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864276A_ABST
    Figure CN121864276A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain fragmentation system error fragmentation security guarantee method and system, and the method comprises the steps: transmitting a request message to other nodes in an entrance fragment if a node is a node in the entrance fragment after a security guarantee trigger condition and a round trigger condition are satisfied, and determining a random fragment; after the leader node receives the request message with the preset proportion, a forwarding message is generated and sent to all nodes in the random fragment; after receiving the forwarding message of the leader node, the node in the random fragment generates a state message and feeds back the state message to the leader node; the leader node generates a new cycle message after receiving a preset proportion of consistent state message in the random fragment, and sends the new cycle message to all nodes in the entry fragment; and after receiving the new cycle message, the node in the entry fragment executes a conflict processing operation. According to the method, the situation that the security or activity of transactions in the fragments is threatened due to the fact that error nodes possibly exceed a threshold value in part of the fragments can be handled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a method and system for ensuring security against erroneous sharding in a blockchain sharding system. Background Technology

[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.

[0003] Current blockchains, especially consortium blockchains, typically use the classic Byzantine Fault Tolerance (BFT) consensus protocol, which can scale to hundreds of nodes. However, in larger-scale deployments, this often leads to significant performance issues and unavailability. Public blockchains use consensus protocols such as Proof-of-Stake, which can scale to hundreds of thousands of nodes, but various attacks have been discovered, and their security remains to be verified.

[0004] Sharding is a method to effectively improve blockchain performance by splitting nodes into different shards, each containing a small number of nodes. Each shard executes consensus processing for different transactions in parallel, improving the overall scalability of the system and enabling it to scale to thousands or even tens of thousands of nodes. However, most existing sharding technologies assume that each shard has no more than one-third of faulty nodes in asynchronous and semi-synchronous environments, or no more than half of faulty nodes in synchronous environments. These assumptions are too strong, making it impossible to achieve a consistent probability of consensus for all transactions. Summary of the Invention

[0005] This invention provides a method for ensuring the security of faulty shards in a blockchain sharding system. This method addresses situations where some shards may have more than a threshold of faulty nodes, threatening the security or activity of transactions within the shard. The method is applied to any node in the blockchain sharding system, which includes an entry shard and at least one random shard. Both the entry shard and the random shard include at least one node. The method includes:

[0006] After the security guarantee trigger condition and the round trigger condition are met, if the node is a node in the entry shard, a request message is sent to other nodes in the entry shard to determine the random shard.

[0007] If the node is a leader node and receives a preset proportion of request messages, it generates a forwarding message based on the preset proportion of request messages and sends the forwarding message to all nodes in the random shard.

[0008] If the node is a node in a random shard and after receiving a forwarded message from the leader node, it generates a status message based on the forwarded message and sends the status message back to the leader node.

[0009] If the node is a leader node and receives a set proportion of consistent status messages in a random shard, it generates a new periodic message based on the set proportion of consistent status messages and sends it to all nodes in the entry shard.

[0010] If the node is a node in the ingress shard and receives a new periodic message, perform a conflict resolution operation.

[0011] This invention also provides a blockchain sharding system for ensuring security against faulty sharding, used to handle situations where some shards may have more than a threshold of faulty nodes, thus threatening the security or activity of transactions within the shard. It is applied to any node in the blockchain sharding system, which includes an entry shard and at least one random shard, each of which includes at least one node. The system includes:

[0012] The request message sending module is used to send a request message to other nodes in the entry shard after the security guarantee triggering condition and the round triggering condition are met, if the node is a node in the entry shard, to determine the random shard.

[0013] The forwarding message sending module is used to generate a forwarding message according to the preset proportion of request messages after receiving a preset proportion of request messages if the node is a leader node and the node is a leader node. The forwarding message is then sent to all nodes in the random shard.

[0014] The status message sending module is used to generate a status message based on the forwarding message and send the status message back to the leader node if the node is a node in a random shard and after receiving the forwarding message from the leader node.

[0015] The new cycle message sending module is used to generate a new cycle message based on the preset proportion of consistent status messages after receiving a preset proportion of consistent status messages in a random shard, and send it to all nodes in the entry shard.

[0016] The conflict handling module is used to perform conflict handling operations if the node is a node in the ingress shard and receives a new periodic message.

[0017] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method for ensuring security against erroneous sharding in a blockchain sharding system.

[0018] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for ensuring security against erroneous sharding in a blockchain sharding system.

[0019] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for ensuring security against erroneous sharding in a blockchain sharding system.

[0020] In this embodiment of the invention, after the security assurance triggering condition and the round triggering condition are met, the security assurance process is triggered. Through message processing of nodes in the entry shard and the random shard, the leader switching process is realized, including the forwarding of request messages, forwarded messages, status messages and new cycle messages. This can ensure the security within a shard even if the number of faulty nodes in a certain shard exceeds the threshold. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0022] Figure 1 This is a flowchart of a method for ensuring security against erroneous sharding in a blockchain sharding system, as described in an embodiment of the present invention.

[0023] Figure 2 In the embodiments of the present invention, corresponding to Figure 1 Schematic diagram;

[0024] Figure 3 This is a flowchart illustrating the generation of forwarding messages based on a preset ratio of request messages in an embodiment of the present invention.

[0025] Figure 4 This is a flowchart illustrating the generation of status messages based on forwarded messages in an embodiment of the present invention;

[0026] Figure 5 This is a flowchart illustrating the generation of a new periodic message based on a preset ratio of consistent state messages in an embodiment of the present invention.

[0027] Figure 6 This is a schematic diagram of the structure of the faulty sharding security protection system in the blockchain sharding system according to an embodiment of the present invention;

[0028] Figure 7 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0030] First, the terminology involved in this invention will be explained.

[0031] Digital signature: A signature on a message that is unforgeable.

[0032] Quorum Certificates (QC).

[0033] Hash: Calculate a hash digest of a message. This paper assumes that a collision-free hash function is implemented.

[0034] In order to address the situation in a blockchain sharding system where some shards may have erroneous nodes exceeding a threshold, thereby threatening the security or activity of transactions within the shard, this invention proposes a solution: a blockchain sharding system erroneous sharding security assurance scheme. This scheme can ensure the security of the shard even when a certain shard has more than a threshold of erroneous nodes.

[0035] Figure 1 This is a flowchart of a method for ensuring security of faulty sharding in a blockchain sharding system according to an embodiment of the present invention. The method is applied to any node in the blockchain sharding system, which includes an entry shard and at least one random shard. Both the entry shard and the random shard include at least one node. The method includes:

[0036] Step 101: After the security guarantee triggering condition and the round triggering condition are met, if the node is a node in the entry shard, send a request message to other nodes in the entry shard to determine the random shard.

[0037] Step 102: If the node is a leader node and after receiving a preset proportion of request messages, it generates a forwarding message according to the preset proportion of request messages and sends the forwarding message to all nodes in the random shard.

[0038] Step 103: If the node is a node in a random shard and after receiving a forwarded message from the leader node, it generates a status message based on the forwarded message and sends the status message back to the leader node.

[0039] Step 104: If the node is a leader node and after receiving a set proportion of consistent status messages in the random shard, it generates a new periodic message based on the set proportion of consistent status messages and sends it to all nodes in the entry shard.

[0040] Step 105: If the node is a node in the ingress shard and receives a new periodic message, perform a conflict resolution operation.

[0041] Figure 2 In the embodiments of the present invention, corresponding to Figure 1 The schematic diagram illustrates a semi-synchronous network. A blockchain sharding system can use either an account model or a UTXO model. For a specific shard S in a given blockchain sharding system... e This method is triggered when the system-defined threshold time is reached or when node erroneous behavior is detected.

[0042] In this embodiment of the invention, blockchain nodes are divided into different shards, denoted by S1, S2,... Each node belongs to only one shard, and each shard has a unique identifier. After the blockchain sharding system is started and running, nodes are randomly assigned to shards. In the static adversary model, this means that the probability that each shard has more than two-thirds of the correct nodes can be modeled as a binomial distribution, and the identities of the nodes in each shard are public.

[0043] This invention does not involve studying how to allocate transactions to different shards, and assumes that transactions have already been allocated to their respective shards. For each blockchain transaction tx, the shard to which it belongs is called the entry shard of that tx, denoted as Entry(tx) or S. e Here, m can also be used to represent multiple transactions assigned to a certain shard, and the entry shard can also be represented as Entry(m). At the beginning of each epoch or round of the blockchain sharding system, the entry shard selects its unique leader node to lead the completion of consensus.

[0044] For each transaction tx, this embodiment of the invention will randomly select a shard to participate in the blockchain consensus, where the selected shard is called a random shard. Given a shard S... e =Entry(m) and a round r, in this embodiment of the invention, S 0,r ,S 1,r ... represents the random partition to which node r belongs in round r.

[0045] In partition S e In this process, each node needs to maintain three variables locally: two sets of certificates, liveQC and lockedQC, and the current round number (lr). These two sets of certificate variables ensure that if a shard exceeds a threshold number of faulty nodes, the blockchain sharding system can use this method to maintain the security and liveness within the shard.

[0046] LiveQC (Active Certificate for QC): Used for processing S 1,r or S 2,rIn the event of a failure, the blockchain sharding system may fail to reach consensus on any transactions during cycle r. This embodiment of the invention exchanges the local liveness certificates of nodes during leader node changes, ensuring that the leader node in each cycle stores the liveness certificate of the highest block b. Thus, a correct S e The proposed transactions will not be lost;

[0047] LockedQC certificate: Its purpose is similar to the QC certificate design in traditional BFT protocols (such as HotStuff). It ensures that if S... e and S 1,r That's correct, then S e The correct node in the process will always reach a consensus and deliver the same transaction;

[0048] The current round (lr) represents the latest round that has reached consensus. It can be understood as the height of the current block and is initialized to 1.

[0049] Specifically, if no more than 1 / 3 of the nodes within a shard are faulty, the live certificate (liveQC) and the locked certificate (lockedQC) should meet the following relationship:

[0050] If at least one honest node locks block b, then no less than one-third of the honest nodes have their local live certificate (liveQC) set to b or have extended the certificate for block b.

[0051] If at least one honest node has previously delivered block b, then at least one-third of the honest nodes have their local locked certificate (lockedQC) set to b or have extended the certificate for block b.

[0052] The following is a detailed description of steps 101-105.

[0053] In one embodiment, the security guarantee trigger condition is reaching a preset threshold time of the blockchain sharding system, or detecting node erroneous behavior;

[0054] The trigger condition for the round is that the blockchain sharding system enters the current round r = lr + 1, or the previous round lr times out.

[0055] In step 101, after the security guarantee trigger condition and the round trigger condition are met, if the node P i For the entry segment S e The node in the entry shard sends a request message (Query, e, r, liveQC) to other nodes in the entry shard to determine the random shard; where Query is the message identifier, e is the current period, r is the current round, and liveQC is the live certificate;

[0056] In one embodiment, determining a random partition includes:

[0057] Call the public coin toss function to determine the random shard S 0,r and proof σ, which is used to represent the random partition S in the current round r. 0,r The randomness of the selection.

[0058] Step 102, if the node P i As the leader node, after receiving a preset proportion (e.g., 2 / 3) of request messages, it generates a forwarding message based on the preset proportion of request messages and sends the forwarding message to all nodes in the random shard.

[0059] In one embodiment, if the node P i If it is not a leader node, it will ignore request messages after receiving a preset proportion of request messages.

[0060] See Figure 3 This is a flowchart illustrating the generation of forwarding messages based on a preset ratio of request messages in an embodiment of the present invention. The generation of forwarding messages based on a preset ratio of request messages includes:

[0061] Step 301: Determine the quorum certificate M of the request message according to the preset proportion of request messages. The request message includes message identifier, current period, current round and active certificate.

[0062] Step 302: Calculate the first hash value of the quorum certificate for the request message;

[0063] Step 303: Generate a forwarding message based on the current period, current round, first hash value of the quorum certificate of the request message, and proof in the request message according to the preset ratio. The forwarding message includes the message identifier Forward, the current period, the current round, the first hash value, and proof.

[0064] The forwarded message can be represented as (Forward, e, r, h, σ), where Forward is the message identifier, e is the current period, r is the current round, h is the first hash value h, and σ is the proof.

[0065] Step 103, if the node is a random shard S 0,r The node in the process generates a status message based on the forwarded message after receiving the forwarded message from the leader node, and sends the status message back to the leader node.

[0066] See Figure 4 This is a flowchart illustrating the generation of a status message based on a forwarded message in an embodiment of the present invention. In one embodiment, generating a status message based on a forwarded message includes:

[0067] Step 401: Generate a digital signature for the first hash value in the forwarded message;

[0068] Step 402: Generate a status message based on the current round, the first hash value, and the digital signature in the forwarded message. The status message includes a message identifier, the current round, the first hash value, and the digital signature.

[0069] The state message can be represented as (State, r, h, π), where State is the message identifier, r is the current round, h is the first hash value, and π is the digital signature.

[0070] Step 104, if the node is a leader node and receives a random shard S 0,r After receiving consistent status messages at a preset ratio, a new periodic message is generated based on the consistent status messages at the preset ratio and sent to all nodes in the entry shard.

[0071] See Figure 5 This is a flowchart illustrating the generation of a new periodic message based on a preset ratio of consistent state messages in an embodiment of the present invention. In one embodiment, generating a new periodic message based on a preset ratio of consistent state messages includes:

[0072] Step 501: Determine the legal quorum certificate π of the status message based on the consistent status messages of the preset ratio;

[0073] Step 502: Generate a new cycle message based on the current round, the quorum certificate of the local request message, and the quorum certificate of the status message. The new cycle message includes a message identifier, the current round, the quorum certificate of the status message, and the quorum certificate of the local request message.

[0074] The quorum certificate is a set of digital signatures with a length equal to the threshold number. Essentially, it is a set of digital signatures. Therefore, the digital signature in the status message is consistent with the quorum certificate of the status message, represented by π. The new cycle message can be represented as (New-epoch, r, M, u), where New-epoch is the message identifier, r is the current round, u is the quorum certificate of the status message, and M is the quorum certificate of the local request message.

[0075] In step 105, if the node is a node in the ingress shard and a new cycle message is received, a conflict resolution operation is performed.

[0076] In one embodiment, if the node is an ingress fragment S e The node in the process, upon receiving a new cycle message, performs conflict resolution operations, including:

[0077] If the node is an ingress segment S eThe node in the process, upon receiving a new cycle message, includes a quorum certificate u from a pre-defined proportion of random shards S in the status message of the new cycle message. 0,r For the digital signature π with the first hash value h, the node in the process performs the following operations:

[0078] The current quorum certificate qc is determined to be the quorum certificate with the highest liveQC field in the request message;

[0079] If the process exit condition is met, the process exits. The process exit condition is that the round r of the current quorum certificate qc is lower than the round r' of the locked certificate lockedQC, or there is at least one request message where the live certificate liveQC conflicts with the locked certificate lockedQC.

[0080] If the process exit condition is not met, increment r by 1 for the current round, and the process can continue to the next round.

[0081] This invention also proposes a security protection system for faulty sharding in a blockchain sharding system, which is applied to any node in the blockchain sharding system. The blockchain sharding system includes an entry shard and at least one random shard, and both the entry shard and the random shard include at least one node. Its principle is similar to the security protection method for faulty sharding in a blockchain sharding system, and will not be described in detail here.

[0082] Figure 6 This is a schematic diagram of the structure of the faulty sharding security protection system for the blockchain sharding system in this embodiment of the invention. The faulty sharding security protection system for the blockchain sharding system in this embodiment of the invention includes:

[0083] The request message sending module 601 is used to send a request message to other nodes in the entry shard after the security guarantee triggering condition and the round triggering condition are met, if the node is a node in the entry shard, to determine the random shard.

[0084] The forwarding message sending module 602 is used to generate a forwarding message according to the preset proportion of request messages after receiving a preset proportion of request messages if the node is a leader node and the node is a leader node. The forwarding message is then sent to all nodes in the random shard.

[0085] The status message sending module 603 is used to generate a status message based on the forwarding message and send the status message back to the leader node if the node is a node in a random shard and after receiving the forwarding message from the leader node.

[0086] The new cycle message sending module 604 is used to generate a new cycle message based on the preset proportion of consistent status messages after receiving a preset proportion of consistent status messages in a random shard, and send it to all nodes in the entry shard.

[0087] The conflict handling module 605 is used to perform conflict handling operations if the node is a node in the ingress shard and receives a new periodic message.

[0088] In one embodiment, the security guarantee trigger condition is reaching a preset threshold time of the blockchain sharding system, or detecting node erroneous behavior;

[0089] The trigger condition for the round is that the blockchain sharding system enters the current round, or the previous round times out.

[0090] In one embodiment, the request message sending module is configured to include:

[0091] A public coin toss function is invoked to determine a random shard and a proof, the proof being used to demonstrate the randomness of the random shard selection in the current round.

[0092] In one embodiment, the message forwarding module is used to:

[0093] If the node is not the leader node, ignore the request message after receiving a preset proportion of request messages.

[0094] In one embodiment, the message forwarding module is used to:

[0095] Based on a preset ratio of request messages, determine the quorum certificate for the request message, wherein the request message includes a message identifier, current period, current round, and active certificate;

[0096] Calculate the first hash value of the quorum certificate for the request message;

[0097] Based on the current period, current round, first hash value of the legal quorum certificate of the request message and proof in the request message of the preset proportion, a forwarding message is generated. The forwarding message includes message identifier, current period, current round, first hash value and proof.

[0098] In one embodiment, the status message sending module is used to:

[0099] Generate a digital signature for the first hash value in the forwarded message;

[0100] A status message is generated based on the current round, the first hash value, and the digital signature in the forwarded message. The status message includes a message identifier, the current round, the first hash value, and the digital signature.

[0101] In one embodiment, the new periodic message sending module is used to:

[0102] Based on the consistent status messages according to the preset ratio, determine the quorum certificate for the status messages;

[0103] A new cycle message is generated based on the current round, the quorum certificate of the local request message, and the quorum certificate of the status message. The new cycle message includes a message identifier, the current round, the quorum certificate of the status message, and the quorum certificate of the local request message.

[0104] In one embodiment, the conflict resolution module is used to:

[0105] If the node is a node in the ingress shard and receives a new cycle message, and the quorum certificate in the status message of the new cycle message contains a preset proportion of digital signatures from nodes in random shards for the first hash value, perform the following operations:

[0106] The current quorum certificate is determined to be the quorum certificate with the highest active certificate field in the request message;

[0107] If the process exit conditions are met, the process exits. The process exit conditions are that the current round of the quorum certificate is lower than the round of the locked certificate, or there is at least one active certificate in the request message that conflicts with the locked certificate.

[0108] If the exit conditions for the process are not met, increment the current round by 1.

[0109] In summary, the method and system proposed in this invention trigger a security assurance process after the security assurance triggering conditions and the round triggering conditions are met. Through message processing of nodes in the entry shard and the random shard, the leader switching process is realized, including the forwarding of request messages, forwarded messages, status messages and new cycle messages. This can ensure the security within a shard even if the number of faulty nodes in a certain shard exceeds the threshold.

[0110] This invention also provides a computer device. Figure 7 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 700 includes a memory 710, a processor 720, and a computer program 730 stored in the memory 710 and executable on the processor 720. When the processor 720 executes the computer program 730, it implements the above-mentioned method for ensuring security against erroneous sharding in a blockchain sharding system.

[0111] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for ensuring security against erroneous sharding in a blockchain sharding system.

[0112] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for ensuring security against erroneous sharding in a blockchain sharding system.

[0113] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0114] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0115] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0116] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0117] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for ensuring security against erroneous sharding in a blockchain sharding system, characterized in that, The method is applied to any node in a blockchain sharding system, wherein the blockchain sharding system includes an entry shard and at least one random shard, and both the entry shard and the random shard include at least one node. After the security guarantee trigger condition and the round trigger condition are met, if the node is a node in the entry shard, a request message is sent to other nodes in the entry shard to determine the random shard. If the node is a leader node and receives a preset proportion of request messages, it generates a forwarding message based on the preset proportion of request messages and sends the forwarding message to all nodes in the random shard. If the node is a node in a random shard and after receiving a forwarded message from the leader node, it generates a status message based on the forwarded message and sends the status message back to the leader node. If the node is a leader node and receives a set proportion of consistent status messages in a random shard, it generates a new periodic message based on the set proportion of consistent status messages and sends it to all nodes in the entry shard. If the node is a node in the ingress shard and receives a new periodic message, perform a conflict resolution operation.

2. The method as described in claim 1, characterized in that, The security guarantee is triggered when the preset threshold time of the blockchain sharding system is reached, or when node erroneous behavior is detected. The trigger condition for the round is that the blockchain sharding system enters the current round, or the previous round times out.

3. The method as described in claim 1, characterized in that, Determine the random sharding, including: A public coin toss function is invoked to determine a random shard and a proof, the proof being used to demonstrate the randomness of the random shard selection in the current round.

4. The method as described in claim 1, characterized in that, If the node is not a leader node, it will ignore the request message after receiving a preset proportion of request messages.

5. The method as described in claim 1, characterized in that, Generate forwarding messages based on a preset ratio of request messages, including: Based on a preset ratio of request messages, determine the quorum certificate for the request message, wherein the request message includes a message identifier, current period, current round, and active certificate; Calculate the first hash value of the quorum certificate for the request message; Based on the current period, current round, first hash value of the legal quorum certificate of the request message and proof in the request message of the preset proportion, a forwarding message is generated. The forwarding message includes message identifier, current period, current round, first hash value and proof.

6. The method as described in claim 5, characterized in that, A status message is generated based on the forwarded message, including: Generate a digital signature for the first hash value in the forwarded message; A status message is generated based on the current round, the first hash value, and the digital signature in the forwarded message. The status message includes a message identifier, the current round, the first hash value, and the digital signature.

7. The method as described in claim 6, characterized in that, A new cycle message is generated based on a preset ratio of consistent status messages, including: Based on the consistent status messages according to the preset ratio, determine the quorum certificate for the status messages; A new cycle message is generated based on the current round, the quorum certificate of the local request message, and the quorum certificate of the status message. The new cycle message includes a message identifier, the current round, the quorum certificate of the status message, and the quorum certificate of the local request message.

8. The method as described in claim 7, characterized in that, If the node is a node in the ingress shard and receives a new periodic message, perform conflict resolution operations, including: If the node is a node in the ingress shard and receives a new cycle message, and the quorum certificate in the status message of the new cycle message contains a preset proportion of digital signatures from nodes in random shards for the first hash value, perform the following operations: The current quorum certificate is determined to be the quorum certificate with the highest active certificate field in the request message; If the process exit conditions are met, the process exits. The process exit conditions are that the current round of the quorum certificate is lower than the round of the locked certificate, or there is at least one active certificate in the request message that conflicts with the locked certificate. If the exit conditions for the process are not met, increment the current round by 1.

9. A security assurance system for faulty sharding in a blockchain sharding system, characterized in that, Applied to any node in a blockchain sharding system, the blockchain sharding system includes an entry shard and at least one random shard, each of the entry shard and the random shard includes at least one node, the system comprising: The request message sending module is used to send a request message to other nodes in the entry shard after the security guarantee trigger condition and the round trigger condition are met, if the node is a node in the entry shard, to determine the random shard. The forwarding message sending module is used to generate a forwarding message according to the preset proportion of request messages after receiving a preset proportion of request messages if the node is a leader node and the node receives a preset proportion of request messages, and send the forwarding message to all nodes in the random shard. The status message sending module is used to generate a status message based on the forwarding message and send the status message back to the leader node if the node is a node in a random shard and after receiving the forwarding message from the leader node. The new cycle message sending module is used to generate a new cycle message based on the preset proportion of consistent status messages after receiving a preset proportion of consistent status messages in a random shard, and send it to all nodes in the entry shard. The conflict handling module is used to perform conflict handling operations if the node is a node in the ingress shard and receives a new periodic message.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.