Signature-based communication system across consensus reliable broadcast method and apparatus
By using a signature-based communication system and mechanisms such as cross-message, the problems of high complexity and low efficiency in cross-consensus communication are solved, achieving low-complexity, high-efficiency, and reliable cross-consensus broadcasting, thereby improving the communication reliability of blockchain and cloud service systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2025-01-06
- Publication Date
- 2026-07-07
Smart Images

Figure CN122348871A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of blockchain and cloud service technology, and in particular to a method and apparatus for reliable cross-consensus broadcasting in a signature-based communication 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] Cross-consensus communication specifically refers to communication between two groups of nodes. Each group of nodes needs to maintain a unified and specific communication system (such as blockchain or cloud services), and at least one group of nodes must be running a consensus protocol internally. Cross-group communication and ensuring consistency of communication results within the group are called reliable cross-consensus broadcasting.
[0004] Cross-consensus reliable broadcasting has wide applications in many fields, such as: 1) Consensus protocols are commonly used in distributed cloud or distributed database infrastructures to improve service reliability. When multiple infrastructures need to coordinate to complete certain instructions, the reliability of cross-consensus communication is very important; 2) In shard-based blockchain consensus, communication between shards is required to complete certain cross-shard transactions, and the reliability of this communication directly determines the security of the sharding system; 3) In the cross-chain problem of blockchain, reliable communication between different chains (with different consensus protocols) is required to complete cross-chain transactions.
[0005] Current consensus-based communication solutions for communication nodes generally suffer from high communication complexity and low consensus efficiency. Summary of the Invention
[0006] This invention provides a signature-based reliable broadcast method for cross-consensus communication systems, enabling low-community-common ...
[0007] If the node is the leader node in the first node group, it obtains the historical cross-consensus message set and sends a cross message to all nodes in the second node group, the cross message including the historical cross-consensus message set.
[0008] If the node belongs to the second node group, after receiving the cross message, it performs a historical cross-consensus message set check. After the check passes, it generates an introductory message and sends it to the leader node.
[0009] If the node is a leader node, after receiving the first number of incoming messages, it processes the incoming messages, generates a capture message, and sends it to all nodes in the second node group.
[0010] If the node belongs to the second node group, after the triggering condition is met, the historical cross-consensus message set is processed and a response message is sent to the leader node.
[0011] If the node is a leader node, after receiving the second number of response messages, it sends an acknowledgment message to all nodes in the second node group;
[0012] If the node belongs to the second node group, after receiving an acknowledgment message, it performs cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group.
[0013] This invention also provides a signature-based reliable broadcasting device for cross-consensus communication systems, capable of achieving low communication complexity and high efficiency in reliable broadcasting across consensus mechanisms. The communication system includes a first node group and a second node group, both deployed with a consensus protocol. The device is applied to any node in either the first or second node group and includes:
[0014] The cross-message sending module is used to, if the node is the leader node in the first node group, obtain the historical cross-consensus message set and send cross messages to all nodes in the second node group, wherein the cross messages include the historical cross-consensus message set.
[0015] An introduction message sending module is introduced, which is used to perform a historical cross-consensus message set check after receiving a cross message if the node belongs to the second node group. After the check passes, an introduction message is generated and sent to the leader node.
[0016] The message capture and sending module is used to process the incoming messages after receiving a first number of incoming messages, generate a capture message, and send it to all nodes in the second node group if the node is a leader node.
[0017] The response message sending module is used to process the historical cross-consensus message set and send a response message to the leader node after waiting for the triggering condition to be met if the node belongs to the second node group.
[0018] The confirmation message sending module is used to send confirmation messages to all nodes in the second node group after receiving the second number of response messages if the node is a leader node.
[0019] The cross-consensus module is used to broadcast and deliver cross-consensus messages within the second node group after receiving an acknowledgment message if the node belongs to the second node group.
[0020] 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 signature-based communication system cross-consensus reliable broadcast method.
[0021] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described signature-based communication system cross-consensus reliable broadcasting method.
[0022] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described signature-based communication system cross-consensus reliable broadcast method.
[0023] In this embodiment of the invention, if the node is a leader node in a first node group, it obtains a historical cross-consensus message set and sends a cross message to all nodes in a second node group, the cross message including the historical cross-consensus message set; if the node belongs to the second node group, after receiving the cross message, it checks the historical cross-consensus message set, and after passing the check, generates an introductory message and sends it to the leader node; if the node is a leader node, after receiving a first number of introductory messages, it processes the introductory messages, generates a capture message, and sends it to all nodes in the second node group; if the node belongs to the second node group, after waiting for the trigger condition to be met, it processes the historical cross-consensus message set and sends a response message to the leader node; if the node is a leader node, after receiving a second number of response messages, it sends an acknowledgment message to all nodes in the second node group; if the node belongs to the second node group, after receiving an acknowledgment message, it performs cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group. In the above steps, cross-consensus reliable broadcasting can be completed through cross-messages, introductory messages, capture messages, response messages, and acknowledgment messages, enabling cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group, thus achieving the security goal of cross-consensus reliable broadcasting. Attached Figure Description
[0024] 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:
[0025] Figure 1 This is a flowchart of a signature-based communication system cross-consensus reliable broadcasting method in an embodiment of the present invention;
[0026] Figure 2 This is a flowchart illustrating the processing of historical cross-consensus message sets in an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of the structure of a signature-based communication system cross-consensus reliable broadcast device in an embodiment of the present invention;
[0028] Figure 4 This is another structural schematic diagram of a signature-based communication system cross-consensus reliable broadcasting device in an embodiment of the present invention;
[0029] Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0030] 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.
[0031] First, the terminology involved in this invention will be explained.
[0032] Hash: Calculate a hash digest of a message, assuming a collision-free hash function is implemented.
[0033] Digital signature: A cryptographic mechanism that ensures that a signature cannot be forged.
[0034] Atomic broadcast: A blockchain consensus model that assumes there is no consensus in either the first or second node group. The security definition of atomic broadcast is as follows:
[0035] Security: If an honest node atomically delivers message v first and then atomically delivers v', then no honest node will atomically deliver v' first and then atomically deliver v.
[0036] Liveness: If an honest node atomically broadcasts a message v, then eventually the honest node will be able to atomically deliver the message v.
[0037] Figure 1 This is a flowchart of a signature-based cross-consensus reliable broadcast method for a communication system according to an embodiment of the present invention. The communication system includes a first node group and a second node group, both of which have deployed consensus protocols. The method is applied to any node in the first node group and the second node group, and includes:
[0038] Step 101: If the node is the leader node in the first node group, obtain the historical cross-consensus message set and send cross messages to all nodes in the second node group, wherein the cross messages include the historical cross-consensus message set.
[0039] Step 102: If the node belongs to the second node group, after receiving the cross message, it performs a historical cross-consensus message set check. After the check passes, it generates an introduction message and sends it to the leader node.
[0040] Step 103: If the node is a leader node, after receiving the first number of introductory messages, it processes the introductory messages, generates a capture message, and sends it to all nodes in the second node group.
[0041] Step 104: If the node belongs to the second node group, after waiting for the triggering condition to be met, process the historical cross-consensus message set and send a response message to the leader node.
[0042] Step 105: If the node is a leader node, after receiving the second number of response messages, it sends an acknowledgment message to all nodes in the second node group.
[0043] Step 106: If the node belongs to the second node group, after receiving a confirmation message, cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages are performed within the second node group.
[0044] In this embodiment of the invention, cross-consensus reliable broadcasting can be completed through cross messages, introductory messages, capture messages, response messages, and acknowledgment messages, enabling cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group, thereby achieving the security goal of cross-consensus reliable broadcasting.
[0045] Each step is described in detail below.
[0046] In this embodiment of the invention, the communication system can be a blockchain, cloud service, or other system involving multiple nodes that need to communicate. Cross-consensus reliable broadcast assumes two groups of nodes: a first node group A and a second node group B. The most basic model establishes a blockchain consensus mechanism running in the first node group A. In cross-consensus reliable broadcast, nodes in the first node group A agree on a series of cross-consensus messages and broadcast them across consensus, denoted by x-broadcast. All nodes in the second node group B deliver these cross-consensus messages across consensus, denoted by x-deliver. The security objectives of cross-consensus reliable broadcast are as follows:
[0047] Security: If any honest node in B first x-delivers message v and then x-delivers message v', then no honest node in B will first x-deliver v' and then x-deliver v.
[0048] Termination: If all honest nodes in A x-broadcast v, then any node in B will eventually x-deliver v.
[0049] Integrity: Each honest node in B will x-deliver only once. If an honest node x-delivers v, then the nodes in A must have x-broadcast v at some point.
[0050] In an embodiment of the present invention, in each round r, there is a leader node in the first node group A that is "responsible" for sending cross-consensus messages. Assume that in the first node group A, a delivery proof π can be formed for whether a cross-consensus message v should be sent. π can include a set of digital signatures or a threshold signature.
[0051] Local storage values of each node: round r, certificate Cer, latest completed round lr.
[0052] Steps 101 - 106 are executed in each round.
[0053] In step 101, if the node PiA is the leader node in the nodes of the first node group A, obtain the historical cross-consensus message set pp, and send a cross message (CROSS, r, vi, π, pp) to all nodes in the second node group B. The cross message includes the historical cross-consensus message set pp.
[0054] The cross message also includes the identifier CROSS of the cross message, the current round r, the cross-consensus message vi of the current round r, and the proof π that the cross-consensus message of the current round reaches consensus in the first node group.
[0055] In one embodiment, obtaining the historical cross-consensus message set pp includes:
[0056] For any previous round r' (i.e., r' < r) of the current round r, if there is a certificate for the previous round (i.e., Cer[r'] is not empty), add the cross-consensus message group (r', v_r', π_r') of the previous round to the historical cross-consensus message set pp. The cross-consensus message group of the previous round includes the round, the cross-consensus message, and the delivery proof of the cross-consensus message.
[0057] In step 102, if the node belongs to the second node group, after receiving the cross message (CROSS, r, vi, π, pp), perform a check on the historical cross-consensus message set. After the check passes, generate a fetch message (FETCH, lr, hr) and send it to the leader node.
[0058] The introduced message (FETCH, lr, hr) includes the identifier FETCH, the latest completed round lr, and the lowest round hr in the historical cross-consensus message set;
[0059] In one embodiment, performing a historical cross-consensus message set check includes:
[0060] If there are consecutive delivery certificates in the historical cross-consensus message set pp, and the lowest round in the historical cross-consensus message set is 1 greater than the latest completed round (i.e., hr>lr+1), the check is considered passed.
[0061] In step 103, if the node is a leader node, after receiving the first number f+1 of the introductory messages (Fetch, lr, hr), it processes the introductory messages (Fetch, lr, hr) to generate a catch message (Catchup, r, pp) and sends it to all nodes in the second node group.
[0062] The captured message includes the identifier Catchup, the current round r, and the historical cross-consensus message set pp;
[0063] In this embodiment of the invention, it is assumed that the first node group A has m nodes, of which t are erroneous, and the first node group B has n nodes, of which f are erroneous. The number of nodes generating Byzantine errors in both groups does not exceed one-third, i.e., m>=3t+1, n>=3f+1. This embodiment of the invention assumes a semi-synchronous network environment.
[0064] In one embodiment, processing the incoming message includes:
[0065] Add cross-consensus message groups that meet the round conditions to the historical cross-consensus message set. Rounds that meet the round conditions are between lr+1 and hr-1, where lr is the latest completed round and hr is the lowest round in the current historical cross-consensus message set.
[0066] A round that satisfies the round condition can be represented as r', and the cross-consensus message group of a round that satisfies the round condition is (r', v_r', π_r').
[0067] In step 104, if the node belongs to the second node group, after waiting for the trigger condition to be met, the historical cross-consensus message set is processed and a response message (REP,r,Hash(v), sigma_i) is sent to the leader node.
[0068] The response message includes the identifier REP, the current round r, the hash value Hash(v) of the cross-consensus message v in the current round, and the digital signature sigma_i. The digital signature is generated based on the current round and the hash value of the cross-consensus message in the current round; where sigma_i is a digital signature for (r, Hash(v)).
[0069] The triggering condition is that the leader node receives the fetch message (CATCHUP,r,pp), or the cross-consensus message of the lowest round r' in the historical cross-consensus message set is delivered across consensus (x-delivered).
[0070] See Figure 2 This is a flowchart of processing historical cross-consensus message sets in an embodiment of the present invention. It is necessary to process any (r', v', π') in pp, starting from the lowest round. In one embodiment, processing historical cross-consensus message sets includes:
[0071] Step 201: Take the lowest round in the historical cross-consensus message set as the current round, and the cross-consensus message group corresponding to the lowest round as the current cross-consensus message group;
[0072] Repeat the following steps until all cross-consensus message groups in the historical cross-consensus message set have been processed:
[0073] Step 202: Atomic broadcast the cross-consensus message group corresponding to this round; atomic broadcast can be represented as a-broadcast(r',v',π');
[0074] Step 203: Wait until a cross-consensus delivery message is delivered, the delivery message including the current round and the cross-consensus message of the current round; the cross-consensus delivery can be represented as x-deliver(r',v'), where (r',v') is the delivery message;
[0075] Step 204: Take the subsequent rounds in the historical cross-consensus message set as the new current round, and the cross-consensus message group corresponding to the new current round is the new current cross-consensus message group.
[0076] In step 105, if the node is a leader node, after receiving the response message (REP,r,Hash(v), sigma_i) of the second number nf, it sends a confirmation message (Confirm,r,Hash(v), sigma) to all nodes in the second node group.
[0077] In one embodiment, after receiving a response message of the second quantity nf, an acknowledgment message is sent to all nodes in the first node group and the second node group, including:
[0078] After receiving the response message (REP, r, Hash(v), sigma_i) of the second quantity n-f, determine whether the hash value Hash(v) of the cross-consensus message in each response message is consistent with the digital signature sigma_i. If so, set a certificate sigma; the certificate sigma is n-f digital signatures or a threshold signature.
[0079] Generate a confirmation message (Confirm, r, Hash(v), sigma) according to the certificate sigma and the hash value of the cross-consensus message in the current round, and send it to all nodes in the second node group.
[0080] The confirmation message includes the identifier of the confirmation message, the current round, the hash value of the cross-consensus message in the current round, and the certificate.
[0081] In step 106, if the node belongs to the second node group, after receiving a confirmation message, perform cross-consensus broadcast and cross-consensus delivery of the cross-consensus message within the second node group.
[0082] In one embodiment, the method further includes:
[0083] If the node is a leader node, while sending the confirmation message (Confirm, r, Hash(v), sigma) to all nodes in the second node group, send the confirmation message (Confirm, r, Hash(v), sigma) to all nodes in the first node group.
[0084] If the node belongs to the first node group, after receiving a confirmation message, determine whether the received confirmation message is legal.
[0085] If so, determine the certificate of the current round according to the current round, the hash value of the cross-consensus message in the current round, and the certificate, that is, set Cer[r] to (r, Hash(v), sigma).
[0086] For the previous rounds of the current round, set the certificates of the previous rounds to be empty. For any r' < r, set Cer[r'] to be empty.
[0087] In one embodiment, after receiving a confirmation message, perform broadcast and delivery of the cross-consensus message within the second node group, and update the latest completed round, including:
[0088] Determine whether the received confirmation message (Confirm, r, h, sigma) is legal.
[0089] If so, determine whether a cross message (Cross, r, v, π) has been received, and whether the hash value Hash(v) of the received cross message is consistent with the hash value h in the confirmation message. Atomically broadcast the cross-consensus message group of the current round a-broadcast(r, v, π) in the second node group, atomically deliver the cross-consensus message group of the current round a-deliver(r, v, *) within the second node group, and wait until all cross-consensus message groups of previous rounds (r’ < r) have been atomically broadcast. Then, cross-consensus broadcast the cross-consensus message of the current round x-deliver v, and set the latest completed round lr to the current round r.
[0090] An embodiment of the present invention also provides a cross-consensus reliable broadcast device for a signature-based communication system. The communication system includes a first node group and a second node group that are both deployed with a consensus protocol. The device is applied to any node in the first node group and the second node group. The principle is similar to the cross-consensus reliable broadcast method for a signature-based communication system, and will not be elaborated here.
[0091] Figure 3 FIG. is a schematic structural diagram of the cross-consensus reliable broadcast device for a signature-based communication system in an embodiment of the present invention. The cross-consensus reliable broadcast device for a signature-based communication system in an embodiment of the present invention includes:
[0092] A cross-message sending module 301, configured to, if the node is the leader node in the first node group, obtain the historical cross-consensus message set, and send a cross message including the historical cross-consensus message set to all nodes in the second node group;
[0093] An introduction-message sending module 302, configured to, if the node belongs to the second node group, check the historical cross-consensus message set after receiving the cross message, generate an introduction message after passing the check, and send it to the leader node;
[0094] A grab-message sending module 303, configured to, if the node is the leader node, process the introduction messages after receiving f + 1 introduction messages of the first quantity, generate a grab message, and send it to all nodes in the second node group;
[0095] A response-message sending module 304, configured to, if the node belongs to the second node group, wait until the trigger condition is met, process the historical cross-consensus message set, and send a response message to the leader node;
[0096] A confirmation-message sending module 305, configured to, if the node is the leader node, send a confirmation message to all nodes in the second node group after receiving n - f response messages of the second quantity;
[0097] The cross-consensus module 306 is used to broadcast and deliver cross-consensus messages within the second node group after receiving an acknowledgment message if the node belongs to the second node group.
[0098] In one embodiment, the cross message further includes a cross message identifier, the current round, the cross-consensus message of the current round, and proof that the cross-consensus message of the current round has reached consensus in the first node group;
[0099] The introduced message includes the identifier of the introduced message, the latest completed round, and the lowest round in the historical cross-consensus message set;
[0100] The captured messages include the identifier of the captured message, the current round, and a set of historical cross-consensus messages;
[0101] The response message includes an identifier, the current round, the hash value of the cross-consensus message of the current round, and a digital signature, wherein the digital signature is generated based on the current round and the hash value of the cross-consensus message of the current round.
[0102] The confirmation message includes the confirmation message identifier, the current round, the hash value of the cross-consensus message for the current round, and the certificate.
[0103] In one embodiment, the cross-message sending module is used to:
[0104] For any previous round of the current round, if a certificate of the previous round exists, add the cross-consensus message group of the previous round to the historical cross-consensus message set. The cross-consensus message group includes the round, the cross-consensus message, and the delivery proof of the cross-consensus message.
[0105] In one embodiment, a message sending module is introduced for:
[0106] If there are consecutive delivery certificates in the historical cross-consensus message set, and the lowest round in the historical cross-consensus message set is 1 greater than the latest completed round, the check is considered passed.
[0107] In one embodiment, the message capture and sending module is used to:
[0108] Add cross-consensus message groups that meet the round conditions to the historical cross-consensus message set. Rounds that meet the round conditions are between lr+1 and r'-1, where lr is the latest completed round and r' is the lowest round in the current historical cross-consensus message set.
[0109] In one embodiment, the triggering condition is that the leader node receives a fetch message, or the lowest round cross-consensus message in the historical cross-consensus message set is delivered across consensus.
[0110] In one embodiment, the response message sending module is used to:
[0111] The lowest round in the historical cross-consensus message set is taken as the current round, and the cross-consensus message group corresponding to the lowest round is taken as the current cross-consensus message group;
[0112] Repeat the following steps until all cross-consensus message groups in the historical cross-consensus message set have been processed:
[0113] The cross-consensus message group corresponding to this round of atomic broadcasting;
[0114] Wait until a cross-consensus delivery message is delivered, which includes the current round and the cross-consensus message for the current round;
[0115] The next round in the historical cross-consensus message set is taken as the new current round, and the cross-consensus message group corresponding to the new current round is the new current cross-consensus message group.
[0116] In one embodiment, the confirmation message sending module is used to:
[0117] After receiving the second number of nf response messages, determine whether the hash value of the cross-consensus message in each response message is consistent with the digital signature. If so, set a certificate.
[0118] Based on the certificate and the hash value of the cross-consensus message in the current round, a confirmation message is generated and sent to all nodes in the second node group.
[0119] Figure 4 This is another schematic diagram of a signature-based communication system cross-consensus reliable broadcast device according to an embodiment of the present invention. In one embodiment, the device further includes a certificate update module 401, used for:
[0120] If the node is a leader node, it sends an acknowledgment message to all nodes in the second node group while simultaneously sending an acknowledgment message to all nodes in the first node group.
[0121] If the node belongs to the first node group, after receiving a confirmation message, determine whether the received confirmation message is valid;
[0122] If so, determine the certificate for the current round based on the current round, the hash value of the cross-consensus message in the current round, and the certificate;
[0123] For the previous rounds of the current round, set the certificate of the previous round to empty.
[0124] In one embodiment, the cross-consensus module is used for:
[0125] Determine whether the received confirmation message is valid;
[0126] If so, determine whether a cross message has been received, and whether the hash value of the received cross message matches the hash value in the confirmation message. In the second node group, atomically broadcast the cross consensus message group of the current round. In the second node group, atomically deliver the cross consensus message group of the current round, and wait for all cross consensus message groups of previous rounds to be atomically broadcast before broadcasting the cross consensus message of the current round, and set the latest completed round to the current round.
[0127] In summary, in the method and apparatus proposed in this embodiment of the invention, if the node is a leader node in a first node group, it obtains a historical cross-consensus message set and sends a cross message to all nodes in a second node group, the cross message including the historical cross-consensus message set; if the node belongs to the second node group, after receiving the cross message, it checks the historical cross-consensus message set, and after passing the check, generates an introductory message and sends it to the leader node; if the node is a leader node, after receiving a first number of introductory messages, it processes the introductory messages, generates a capture message, and sends it to all nodes in the second node group; if the node belongs to the second node group, after waiting for the trigger condition to be met, it processes the historical cross-consensus message set and sends a response message to the leader node; if the node is a leader node, after receiving a second number of response messages, it sends an acknowledgment message to all nodes in the second node group; if the node belongs to the second node group, after receiving an acknowledgment message, it performs cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group. In the above steps, cross-consensus reliable broadcasting can be completed through cross-messages, introductory messages, capture messages, response messages, and acknowledgment messages, enabling cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group, thus achieving the security goal of cross-consensus reliable broadcasting.
[0128] This invention also provides a computer device. Figure 5 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 500 includes a memory 510, a processor 520, and a computer program 530 stored in the memory 510 and executable on the processor 520. When the processor 520 executes the computer program 530, it implements the above-described signature-based communication system cross-consensus reliable broadcast method.
[0129] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described signature-based communication system cross-consensus reliable broadcasting method.
[0130] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described signature-based communication system cross-consensus reliable broadcast method.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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 signature-based reliable broadcast method across consensus mechanisms in a communication system, characterized in that, The communication system includes a first node group and a second node group, both of which have deployed a consensus protocol. The method is applied to any node in the first node group and the second node group, including: If the node is the leader node in the first node group, it obtains the historical cross-consensus message set and sends a cross message to all nodes in the second node group, the cross message including the historical cross-consensus message set. If the node belongs to the second node group, after receiving the cross message, it performs a historical cross-consensus message set check. After the check passes, it generates an introductory message and sends it to the leader node. If the node is a leader node, after receiving the first number of incoming messages, it processes the incoming messages, generates a capture message, and sends it to all nodes in the second node group. If the node belongs to the second node group, after the triggering condition is met, the historical cross-consensus message set is processed and a response message is sent to the leader node. If the node is a leader node, after receiving the second number of response messages, it sends an acknowledgment message to all nodes in the second node group; If the node belongs to the second node group, after receiving an acknowledgment message, it performs cross-consensus broadcasting and cross-consensus delivery of cross-consensus messages within the second node group.
2. The method as described in claim 1, characterized in that, The cross message also includes the cross message identifier, the current round, the cross consensus message of the current round, and proof that the cross consensus message of the current round has reached consensus in the first node group; The introduced message includes the identifier of the introduced message, the latest completed round, and the lowest round in the historical cross-consensus message set; The captured messages include the identifier of the captured message, the current round, and a set of historical cross-consensus messages; The response message includes an identifier, the current round, the hash value of the cross-consensus message of the current round, and a digital signature, wherein the digital signature is generated based on the current round and the hash value of the cross-consensus message of the current round. The confirmation message includes the confirmation message identifier, the current round, the hash value of the cross-consensus message for the current round, and the certificate.
3. The method as described in claim 2, characterized in that, Obtain the historical cross-consensus message set, including: For any previous round of the current round, if a certificate of the previous round exists, add the cross-consensus message group of the previous round to the historical cross-consensus message set. The cross-consensus message group includes the round, the cross-consensus message, and the delivery proof of the cross-consensus message.
4. The method as described in claim 2, characterized in that, Perform historical cross-consensus message set checks, including: If there are consecutive delivery certificates in the historical cross-consensus message set, and the lowest round in the historical cross-consensus message set is 1 greater than the latest completed round, the check is considered passed.
5. The method as described in claim 2, characterized in that, The incoming message is processed, including: Add cross-consensus message groups that meet the round conditions to the historical cross-consensus message set. Rounds that meet the round conditions are between lr+1 and hr-1, where lr is the latest completed round and hr is the lowest round in the current historical cross-consensus message set.
6. The method as described in claim 2, characterized in that, The triggering condition is that the leader node receives a fetch message, or the lowest round cross-consensus message in the historical cross-consensus message set is delivered across consensus.
7. The method as described in claim 2, characterized in that, Processing historical cross-consensus message sets, including: The lowest round in the historical cross-consensus message set is taken as the current round, and the cross-consensus message group corresponding to the lowest round is taken as the current cross-consensus message group; Repeat the following steps until all cross-consensus message groups in the historical cross-consensus message set have been processed: The cross-consensus message group corresponding to this round of atomic broadcasting; Wait until a cross-consensus delivery message is delivered, which includes the current round and the cross-consensus message for the current round; The next round in the historical cross-consensus message set is taken as the new current round, and the cross-consensus message group corresponding to the new current round is the new current cross-consensus message group.
8. The method as described in claim 2, characterized in that, After receiving the second number of response messages, an acknowledgment message is sent to all nodes in the first and second node groups, including: After receiving the second number of response messages, determine whether the hash value of the cross-consensus message in each response message matches the digital signature. If so, set a certificate. Based on the certificate and the hash value of the cross-consensus message in the current round, a confirmation message is generated and sent to all nodes in the second node group.
9. The method as described in claim 2, characterized in that, Also includes: If the node is a leader node, it sends an acknowledgment message to all nodes in the second node group while simultaneously sending an acknowledgment message to all nodes in the first node group. If the node belongs to the first node group, after receiving a confirmation message, determine whether the received confirmation message is valid; If so, determine the certificate for the current round based on the current round, the hash value of the cross-consensus message in the current round, and the certificate; For the previous rounds of the current round, set the certificate of the previous round to empty.
10. The method as described in claim 2, characterized in that, Upon receiving an acknowledgment message, the second node group broadcasts and delivers cross-consensus messages, including: Determine whether the received confirmation message is valid; If so, determine whether a cross message has been received, and whether the hash value of the received cross message matches the hash value in the confirmation message. In the second node group, atomically broadcast the cross consensus message group of the current round. In the second node group, atomically deliver the cross consensus message group of the current round, and wait for all cross consensus message groups of previous rounds to be atomically broadcast before broadcasting the cross consensus message of the current round, and set the latest completed round to the current round.
11. A signature-based communication system cross-consensus reliable broadcasting device, characterized in that, The communication system includes a first node group and a second node group, both of which have deployed a consensus protocol. The device is applied to any node in the first node group and the second node group, and the device includes: The cross-message sending module is used to, if the node is the leader node in the first node group, obtain the historical cross-consensus message set and send cross messages to all nodes in the second node group, wherein the cross messages include the historical cross-consensus message set. An introduction message sending module is introduced, which is used to check the historical cross-consensus message set after receiving the cross message if the node belongs to the second node group. After the check passes, an introduction message is generated and sent to the leader node. The message capture and sending module is used to process the incoming messages after receiving a first number of incoming messages, generate a capture message, and send it to all nodes in the second node group if the node is a leader node. The response message sending module is used to process the historical cross-consensus message set and send a response message to the leader node after waiting for the triggering condition to be met if the node belongs to the second node group. The confirmation message sending module is used to send confirmation messages to all nodes in the second node group after receiving the second number of response messages if the node is a leader node. The cross-consensus module is used to broadcast and deliver cross-consensus messages within the second node group after receiving an acknowledgment message if the node belongs to the second node group.
12. 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 10.
13. 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 10.
14. 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 10.