Asynchronous constant time multi-verifiable consensus method and device
By using an asynchronous constant-time multivariate verifiable consensus method and device, the problem of the lack of information-theoretic security in existing constant-time consensus protocols is solved, and efficient consensus between nodes is achieved in the presence of Byzantine nodes, ensuring the security and efficiency of the consensus.
Patent Information
- Application Number
- CN202310086323.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-01-19
AI Technical Summary
Existing technologies lack information-theoretic-secure, constant-time asynchronous Byzantine multivariate verifiable consensus protocols, making it difficult to achieve efficient consensus among nodes in the presence of Byzantine faulty nodes.
An asynchronous constant-time multivariate verifiable consensus method and device are adopted. Each node proposes a value, executes a reliable broadcast instance, and after waiting for nf reliable broadcast instances to finish, a re-voting binary consensus instance is performed. The consensus value is determined by using a random number k and the voting value of the reliable broadcast instance. Finally, consensus among nodes is achieved when there are 1/3 Byzantine nodes.
It achieves information-theoretic secure, constant-time multivariate verifiable consensus, ensuring that correct nodes can reach a consensus on the values proposed by nf nodes in the presence of Byzantine nodes, thus improving the security and efficiency of the consensus protocol.
Smart Images

Figure CN116318842B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of blockchain, in particular to an asynchronous constant-time multi-verifiable consensus method and device. BACKGROUND
[0002] This section is intended to provide background or context to the embodiments of the application recited in the claims. The description herein does not constitute admission that the prior publication, square, or subject matter described herein and / or the material contained therein are prior art to the claimed application.
[0003] The Byzantine consensus protocol is the basis of privacy computing such as blockchain and multi-party secure computation. Based on different network assumptions, the Byzantine protocol can be divided into synchronous protocol, asynchronous protocol and semi-synchronous protocol.
[0004] The asynchronous protocol is the most secure model of privacy computing blockchain. Asynchronous Byzantine multi-verifiable consensus (MVBA) is a kind of asynchronous protocol, and there is currently a lack of an information-theoretically secure constant-time MVBA protocol. SUMMARY
[0005] Embodiments of the present application provide an asynchronous constant-time multi-verifiable consensus method to describe asynchronous Byzantine multi-verifiable consensus (MVBA), and provide an information-theoretically secure constant-time MVBA protocol. The method comprises:
[0006] Each node in the asynchronous constant-time multi-verifiable consensus protocol proposes a value;
[0007] The node executes a corresponding reliable broadcast instance, wherein the reliable broadcast instance is used by the node to send the proposed value using reliable broadcast;
[0008] The node waits for n-f reliable broadcast instances to end, and then executes the following first loop, wherein the round number in the first loop is initialized to 0:
[0009] A public random number k is determined;
[0010] According to the reliable broadcast instance corresponding to the node k, a re-vote binary consensus instance is run, and if the reliable broadcast instance has been completed, the vote value is 1, otherwise the vote value is 0. According to the vote values of all re-vote binary consensus instances, the value reached consensus in the re-vote binary consensus instance is determined;
[0011] If the value reached consensus by the node in the re-vote binary consensus instance is 0, the next round of the current first loop is entered, and the round number is incremented by 1;
[0012] If the value reached consensus by the node in the re-vote binary consensus instance is 1, the node waits for the output of the kth reliable broadcast instance, and the asynchronous constant-time multi-verifiable consensus protocol reaches consensus on the output.
[0013] In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of faulty nodes is f, and n≥3f+1.
[0014] This invention also provides an asynchronous constant-time multivariate verifiable consensus device for describing asynchronous Byzantine Multivariate Verifiable Consensus (MVBA), and provides an information-theory-safe, constant-time MVBA protocol. The device includes:
[0015] The proposal module is used in asynchronous constant-time multivariate verifiable consensus protocols to have each node propose a value v_i.
[0016] The reliable broadcast instance execution module is used by the node to execute the corresponding reliable broadcast instance, where the reliable broadcast instance is the value proposed by the node using reliable broadcast;
[0017] The loop module is used by the node to execute the following first loop after waiting for nf reliable broadcast instances to complete, where the number of rounds in the first loop is initialized to 0:
[0018] Determine a common random number k;
[0019] Based on the reliable broadcast instance corresponding to the node k being executed, run the revoked binary consensus instance. If the reliable broadcast instance has been completed, the vote value is 1; otherwise, the vote value is 0. Based on the vote values of all revoked binary consensus instances, determine the value that reaches consensus in the revoked binary consensus instance.
[0020] If the consensus value reached by the node in the re-voting binary consensus instance is 0, then proceed to the next round of the current first cycle, incrementing the round number by 1;
[0021] If the node reaches a consensus value of 1 in the re-voting binary consensus instance, then the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multivariate verifiable consensus protocol reaches a consensus on the output.
[0022] In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of faulty nodes is f, and n≥3f+1.
[0023] 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 asynchronous constant-time multivariate verifiable consensus method.
[0024] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described asynchronous constant-time multivariate verifiable consensus method.
[0025] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described asynchronous constant-time multivariate verifiable consensus method.
[0026] In this embodiment of the invention, in the asynchronous constant-time multivariate verifiable consensus protocol, each node p_i proposes a value v_i; the node p_i executes the corresponding reliable broadcast instance RBC_i, where the reliable broadcast instance is the node p_i sending the proposed value v_i using reliable broadcast; the node p_i waits for nf reliable broadcast instances to complete, and then executes the following first loop, where the number of rounds in the first loop is initialized to 0: determine a common random number k; based on the reliable broadcast instance corresponding to the executed node k, run a re-voting binary consensus instance; if the reliable broadcast instance has been completed, the voting value is 1. Otherwise, the vote value is 0. Based on the vote values of all re-voting binary consensus instances, the consensus value in the re-voting binary consensus instance is determined. If the consensus value of this node is 0, then the next round of the current first cycle is entered, and the round number is incremented by 1. If the consensus value of this node in the re-voting binary consensus instance is 1, then this node waits for the output of the k-th reliable broadcast instance in the re-voting binary consensus instance, and the asynchronous constant-time multi-factor verifiable consensus protocol reaches consensus on the output. In the asynchronous constant-time multi-factor verifiable consensus protocol, the total number of nodes is n, the number of erroneous nodes is f, and n≥3f+1. Through the above process, an information-theory-secure, constant-time MVBA protocol is provided. In the MVBA protocol, each node proposes an array, and in the case of 1 / 3 Byzantine nodes, the correct nodes can eventually reach consensus on the values proposed by nf nodes. Attached Figure Description
[0027] 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:
[0028] Figure 1 This is a flowchart of the asynchronous constant-time multivariate verifiable consensus method in an embodiment of the present invention;
[0029] Figure 2 This is a flowchart illustrating how the consensus value of the node is obtained in an embodiment of the present invention;
[0030] Figure 3 This is the pseudocode for MVBA-1 in this embodiment of the invention;
[0031] Figure 4 These are the distinguishing steps between MVBA-2 and MVBA-1 in this embodiment of the invention;
[0032] Figure 5 This describes the process for generating response messages for nodes in this embodiment of the invention.
[0033] Figure 6 This is the pseudocode for MVBA-2 in this embodiment of the invention;
[0034] Figure 7 This is a schematic diagram of an asynchronous constant-time multivariate verifiable consensus device in an embodiment of the present invention;
[0035] Figure 8 This is another schematic diagram of an asynchronous constant-time multivariate verifiable consensus device in an embodiment of the present invention;
[0036] Figure 9 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0037] 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.
[0038] First, the concepts involved in the embodiments of the present invention will be explained.
[0039] (1) Multi-valued Validated Byzantine agreement (MVBA)
[0040] In multi-node verifiable consensus identification, each node proposes a value v∈{0,1}*. Each node's input needs to be appended with a global predicate Q that can be verified by all nodes. The value v proposed by each node must satisfy Q(v) to be accepted by the other nodes. MVBA allows all correct nodes to reach a consensus on the same value. MVBA has the following properties:
[0041] External verifiability: If the correct nodes reach a consensus on a certain value v, then the predicate Q(v) can be verified.
[0042] Consensus: If a correct node reaches a consensus on v, then any correct node will eventually reach a consensus on v.
[0043] Finality: All correct nodes eventually reach a consensus.
[0044] Completeness: All nodes reach a consensus on only one value v, and v is proposed by a certain node.
[0045] In addition, there is a stronger definition of validity.
[0046] Quality: The probability that a correct node reaches a consensus on a value v proposed by a correct node is 1 / 2.
[0047] This invention describes an MVBA that implements external verifiability, consensus, finality, and integrity. Based on this, the protocol is extended to implement quality. To distinguish between the two, the protocol that does not implement quality is named MVBA-1, and the protocol that does implement quality is named MVBA-2.
[0048] (2) Reliable broadcast (RBC)
[0049] In reliable broadcasting, a node sends a message m∈{0,1}*. Eventually, the correct node will deliver a certain value. If the sending node is correct, the correct node will deliver m; otherwise, it may not deliver.
[0050] The specific definition of reliable broadcasting is as follows:
[0051] Validity: If the correct node sends message m, then all correct nodes will eventually deliver m.
[0052] Consensus: If a correct node delivers message m, then any correct node will eventually deliver m.
[0053] Integrity: Each node delivers a message only once. If a correct node delivers message m, then the sender has sent m.
[0054] (3) Repsoposable asynchronous binary agreement (RABA) consensus
[0055] In binary asynchronous re-voting consensus, each node proposes a binary value v∈{0,1}, and all correct nodes reach a consensus on the same value. RABA has a bias towards a certain value, which defaults to 1. If a correct node votes for 0, it is allowed to vote for 1 again. If a correct node has already voted for 1, it will not vote for 0 again.
[0056] The specific definition of binary asynchronous re-voting consensus is as follows:
[0057] Validity: If all correct nodes propose the same value v, and there is no further voting on 1-v, then all correct nodes reach a consensus on v.
[0058] Consensus: If all correct nodes propose the same value v and there is no further voting on 1-v, then all correct nodes can reach a consensus.
[0059] Consensus: If a correct node reaches a consensus on v, then any correct node will eventually reach a consensus on v.
[0060] Biased Termination: Define Q as the set of all correct nodes, Q1 as the set of correct nodes that have voted for 1, and Q2 as the set of correct nodes that have voted for 0 but subsequently voted for 1 again. If the union of Q1 and Q2 equals Q, then all correct nodes will eventually reach a consensus.
[0061] Completeness: All nodes reach a consensus on only one value.
[0062] Figure 1 The flowchart of the asynchronous constant-time multivariate verifiable consensus method in this embodiment of the invention includes:
[0063] Step 101: In the asynchronous constant-time multivariate verifiable consensus protocol, each node p_i proposes a value v_i;
[0064] Step 102: The node p_i executes the corresponding reliable broadcast instance RBC_i, where the reliable broadcast instance is the value v_i proposed by the node p_i using reliable broadcast;
[0065] Step 103: After node p_i waits for nf reliable broadcast instances to complete, it executes the following first loop, where the number of rounds in the first loop is initialized to 0:
[0066] Step 1031: Determine a common random number k;
[0067] Step 1032: Based on the reliable broadcast instance corresponding to the executed node k, run the revoked binary consensus instance. If the reliable broadcast instance has been completed, the voting value is 1; otherwise, the voting value is 0. Based on the voting values of all revoked binary consensus instances, determine the value that has reached consensus in the revoked binary consensus instance.
[0068] Step 1033: If the consensus value reached by the node in the re-voting binary consensus instance is 0, then proceed to the next round of the current first cycle and increment the round number by 1.
[0069] Step 1034: If the value of consensus reached by the node in the re-voting binary consensus instance is 1, then the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multivariate verifiable consensus protocol reaches consensus on the output.
[0070] In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of faulty nodes is f, and n≥3f+1.
[0071] This invention provides an information-theoretically secure, constant-time MVBA protocol. In the MVBA protocol, each node proposes an array, and in the case of 1 / 3 Byzantine nodes, the final correct node can reach a consensus on the values proposed by nf nodes.
[0072] In one embodiment, the method further includes:
[0073] In each reliable broadcast instance, when each node p_i receives a value v_j proposed by another node p_i, it checks whether the predicate Q(v_j) corresponding to the value v_j proposed by the other node p_i is valid. If it is invalid, it caches the value v_j proposed by the other node p_i until the predicate Q(v_j) is valid before continuing to participate in reliable broadcast.
[0074] In one embodiment, determining a common random number k includes:
[0075] In the asynchronous constant-time multi-dimensional verifiable consensus protocol, after f+1 nodes make a function call to randomly select the leader node, the function returns a common random number k.
[0076] Figure 2 This is a flowchart illustrating the process of obtaining the consensus value reached by the node in one embodiment of the present invention. In one embodiment, based on the reliable broadcast instance corresponding to the executed node k, a re-voting binary consensus instance is run. If the reliable broadcast instance has been completed, the voting value is 1; otherwise, the voting value is 0. Based on the voting values of all re-voting binary consensus instances, the consensus value reached in the re-voting binary consensus instance is determined, including:
[0077] Step 201: If the reliable broadcast instance corresponding to node k has ended, run the re-voting binary consensus instance and determine the voting value as 1; otherwise, determine the voting value as 0.
[0078] Step 202: If the reliable broadcast instance corresponding to node k has not ended, wait for the reliable broadcast instance corresponding to node k to end, and after the reliable broadcast instance corresponding to node k ends, run the re-voting binary consensus instance to determine the voting value as 1; otherwise, determine the voting value as 0.
[0079] Step 203: When the voting value of a preset number of re-voting binary consensus instances is 1, determine that the node has reached a consensus value of 1; otherwise, determine it as 0.
[0080] The above process presents the first constant-time MVBA protocol constructed using reliable broadcasting, Election(), and binary asynchronous re-voting consensus. This protocol, which does not implement quality assurance, can be called MVBA-1. The pseudocode for MVBA-1 is as follows: Figure 3As shown.
[0081] This invention also proposes a protocol for achieving quality, namely MVBA-2. MVBA-2 is similar to MVBA-1 in most steps, but differs in that, after determining whether the predicate Q(v_j) is valid, it performs different judgment steps before executing the first loop. Specifically, Figure 4 The steps for distinguishing MVBA-2 from MVBA-1 in this embodiment of the invention include:
[0082] Step 401: After determining whether the predicate Q(v_j) is valid, the node p_i records the end of a reliable broadcast instance;
[0083] Step 402: If the reliable broadcast instance RBC_j of other nodes p_j ends, set the value corresponding to other nodes p_j in the array W_i[j] of node p_i to 1; where the array of node p_i includes the set of values corresponding to other nodes.
[0084] Step 403: After nf reliable broadcast instances have ended, node p_i sends the array W_i of node p_i to other nodes;
[0085] Step 404: After the node p_i waits for reply messages from nf other nodes, it executes the first loop, where the reply messages are generated based on the array of nodes.
[0086] Figure 5 The process for generating a node's response message in this embodiment of the invention includes:
[0087] Step 501: After the node receives the array W_j from other nodes p_j, it checks the values of W_j that are 1 in the arrays of other nodes p_j.
[0088] Step 502: For each reliable broadcast instance corresponding to a value of 1 in the array W_j of other nodes p_j (e.g., W_j[l] = 1), after the node completes the reliable broadcast instance (e.g., RBC_l), the node p_i sends a reply message to the other nodes p_j.
[0089] Based on all the aforementioned steps, a flowchart of MVBA-2 is provided. Figure 6 This is the pseudocode for MVBA-2 in this embodiment of the invention, which realizes asynchronous constant-time multivariate verifiable consensus with constant-time realizable quality under the first information-theoretic security assumption.
[0090] In summary, in the method proposed in this embodiment of the invention, each node p_i in the asynchronous constant-time multivariate verifiable consensus protocol proposes a value v_i; the node p_i executes the corresponding reliable broadcast instance RBC_i, where the reliable broadcast instance is the value v_i proposed by the node p_i using reliable broadcast; the node p_i waits for nf reliable broadcast instances to finish, and then executes the following first loop, where the number of rounds in the first loop is initialized to 0: determine a common random number k; according to the reliable broadcast instance corresponding to the executed node k, run a re-voting binary consensus instance; if the reliable broadcast instance has been completed, vote... If the vote value is 1, otherwise the vote value is 0. Based on the vote values of all re-voting binary consensus instances, the consensus value reached in the re-voting binary consensus instance is determined. If the consensus value reached by the node in the re-voting binary consensus instance is 0, then the next round of the current first cycle is entered, and the round number is incremented by 1. If the consensus value reached by the node in the re-voting binary consensus instance is 1, then the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multivariate verifiable consensus protocol reaches a consensus on the output. In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of erroneous nodes is f, and n≥3f+1. Through the above process, an information-theory-safe, constant-time MVBA protocol is provided. In the MVBA protocol, each node proposes an array, and in the case of 1 / 3 Byzantine nodes, the final correct node can reach a consensus on the values proposed by nf nodes.
[0091] Furthermore, based on MVBA-1, this invention proposes MVBA-2, thereby realizing asynchronous constant-time multivariate verifiable consensus with constant-time realizable quality under the first information-theoretic security assumption.
[0092] This invention also proposes an asynchronous constant-time multivariate verifiable consensus device, the principle of which is similar to that of the asynchronous constant-time multivariate verifiable consensus method, and will not be described in detail here.
[0093] Figure 7 This is a schematic diagram of an asynchronous constant-time multivariate verifiable consensus device in an embodiment of the present invention, comprising:
[0094] Proposal module 701 is used in an asynchronous constant-time multivariate verifiable consensus protocol to propose a value v_i for each node p_i;
[0095] The reliable broadcast instance execution module 702 is used for the node p_i to execute the corresponding reliable broadcast instance RBC_i, wherein the reliable broadcast instance is the value v_i proposed by the node p_i using reliable broadcast;
[0096] Loop module 703 is used by node p_i to execute the following first loop after waiting for nf reliable broadcast instances to complete, where the number of rounds in the first loop is initialized to 0:
[0097] Determine a common random number k;
[0098] Based on the reliable broadcast instance corresponding to the node k being executed, run the revoked binary consensus instance. If the reliable broadcast instance has been completed, the vote value is 1; otherwise, the vote value is 0. Based on the vote values of all revoked binary consensus instances, determine the value that reaches consensus in the revoked binary consensus instance.
[0099] If the consensus value reached by the node in the re-voting binary consensus instance is 0, then proceed to the next round of the current first cycle, incrementing the round number by 1;
[0100] If the node reaches a consensus value of 1 in the re-voting binary consensus instance, then the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multivariate verifiable consensus protocol reaches a consensus on the output.
[0101] In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of faulty nodes is f, and n≥3f+1.
[0102] In one embodiment, the reliable broadcast instance execution module is further configured to:
[0103] In each reliable broadcast instance, when each node p_i receives a value v_j proposed by another node p_i, it checks whether the predicate Q(v_j) corresponding to the value v_j proposed by the other node p_i is valid. If it is invalid, it caches the value v_j proposed by the other node p_i until the predicate Q(v_j) is valid before continuing to participate in reliable broadcast.
[0104] In one embodiment, the loop module is specifically used for:
[0105] In the asynchronous constant-time multi-dimensional verifiable consensus protocol, after f+1 nodes make a function call to randomly select the leader node, the function returns a common random number k.
[0106] In one embodiment, the loop module is specifically used for:
[0107] If the reliable broadcast instance corresponding to node k has ended, run the re-voting binary consensus instance and determine the voting value as 1; otherwise, determine the voting value as 0.
[0108] If the reliable broadcast instance corresponding to node k has not ended, wait for the reliable broadcast instance corresponding to node k to end, and after the reliable broadcast instance corresponding to node k ends, run the re-voting binary consensus instance to determine the voting value as 1; otherwise, determine the voting value as 0.
[0109] If the voting value of a preset number of re-voting binary consensus instances is 1, the node is determined to have reached a consensus value of 1; otherwise, it is 0.
[0110] Figure 8 This is another schematic diagram of an asynchronous constant-time multivariate verifiable consensus device according to an embodiment of the present invention. In one embodiment, the device further includes a reply message processing module 704, used for:
[0111] After determining whether the predicate Q(v_j) is valid, the node p_i records the end of a reliable broadcast instance;
[0112] If the reliable broadcast instance RBC_j of other nodes p_j ends, the value corresponding to other nodes p_j in the array W_i[j] of node p_i is set to 1; where the array of node p_i includes the set of values corresponding to other nodes;
[0113] After nf reliable broadcast instances have ended, node p_i sends the array W_i of node p_i to other nodes;
[0114] After waiting for replies from nf other nodes, node p_i executes the first loop, where the replies are generated based on an array of nodes.
[0115] In one embodiment, the reply message processing module is further configured to:
[0116] The node's response message is generated using the following steps:
[0117] After receiving the array W_j from other nodes p_j, the node checks if the array W_j of other nodes p_j is 1.
[0118] For each reliable broadcast instance corresponding to a value of 1 in the array W_j of other nodes p_j, after that node completes the reliable broadcast instance RBC_i, that node p_i sends a reply message to the other nodes p_j.
[0119] In summary, in the apparatus proposed in this embodiment of the invention, each node p_i in the asynchronous constant-time multivariate verifiable consensus protocol proposes a value v_i; the node p_i executes the corresponding reliable broadcast instance RBC_i, where the reliable broadcast instance is the proposed value v_i sent by the node p_i using reliable broadcast; the node p_i waits for nf reliable broadcast instances to finish, and then executes the following first loop, where the number of rounds in the first loop is initialized to 0: determine a common random number k; according to the reliable broadcast instance corresponding to the executed node k, run a re-voting binary consensus instance; if the reliable broadcast instance has been completed, vote... The vote value is 1 if the value is 1 otherwise, the vote value is 0. Based on the vote values of all re-voting binary consensus instances, the consensus value among these instances is determined. If the consensus value for that node in a re-voting binary consensus instance is 0, the next round of the current first cycle begins, incrementing the round number by 1. If the consensus value for that node in a re-voting binary consensus instance is 1, the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multi-factor verifiable consensus protocol reaches consensus on that output. In the asynchronous constant-time multi-factor verifiable consensus protocol, the total number of nodes is n, and the number of erroneous nodes is f, where n ≥ 3f + 1. Through the above process, an information-theory-secure, constant-time MVBA protocol is provided. In the MVBA protocol, each node proposes an array, and with 1 / 3 Byzantine nodes, the final correct node can reach consensus on the values proposed by nf nodes.
[0120] Furthermore, based on MVBA-1, this invention proposes MVBA-2, thereby realizing asynchronous constant-time multivariate verifiable consensus with constant-time realizable quality under the first information-theoretic security assumption.
[0121] This invention also provides a computer device. Figure 9 This is a schematic diagram of a computer device in an embodiment of the present invention. The computer device 900 includes a memory 910, a processor 920, and a computer program 930 stored in the memory 910 and executable on the processor 920. When the processor 920 executes the computer program 930, it implements the above-mentioned asynchronous constant-time multivariate verifiable consensus method.
[0122] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described asynchronous constant-time multivariate verifiable consensus method.
[0123] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described asynchronous constant-time multivariate verifiable consensus method.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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. An asynchronous constant-time multivariate verifiable consensus method, characterized in that, include: In an asynchronous constant-time multivariate verifiable consensus protocol, each node proposes a value. The node executes the corresponding reliable broadcast instance, where the reliable broadcast instance is the value proposed by the node using reliable broadcast; After waiting for nf reliable broadcast instances to complete, the node executes the following first loop, where the number of rounds in the first loop is initialized to 0: Determine a common random number k; If the reliable broadcast instance corresponding to node k has ended, run the re-voting binary consensus instance and determine the vote value as 1; otherwise, determine the vote value as 0. If the reliable broadcast instance corresponding to node k has not ended, wait for the reliable broadcast instance corresponding to node k to end, and after the reliable broadcast instance corresponding to node k ends, run the re-voting binary consensus instance and determine the vote value as 1; otherwise, determine the vote value as 0. When the vote value of the preset number of re-voting binary consensus instances is 1, determine that the consensus value reached by the node is 1; otherwise, it is 0. If the node reaches a consensus value of 0 in the re-voting binary consensus instance, then proceed to the next round of the current first cycle, incrementing the round number by 1; If the node reaches a consensus value of 1 in the re-voting binary consensus instance, then the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multivariate verifiable consensus protocol reaches a consensus on the output. In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of faulty nodes is f, and n≥3f+1.
2. The method as described in claim 1, characterized in that, Also includes: In each reliable broadcast instance, when each node receives a value proposed by another node, it checks whether the predicate corresponding to the proposed value is valid. If it is invalid, it caches the proposed value until the predicate is valid before continuing to participate in reliable broadcast.
3. The method as described in claim 1, characterized in that, Determine a common random number k, including: In the asynchronous constant-time multi-dimensional verifiable consensus protocol, after f+1 nodes make a function call to randomly select the leader node, the function returns a common random number k.
4. The method as described in claim 2, characterized in that, Also includes: After determining whether the predicate is valid, the node records the end of a reliable broadcast instance; If a reliable broadcast instance of another node ends, the value corresponding to the other node in the array of that node is set to 1; where the array of that node includes the set of values corresponding to the other nodes. After nf reliable broadcast instances have finished, the node sends its array to other nodes; After waiting for replies from nf other nodes, the node executes the first loop, where the reply messages are generated based on an array of nodes.
5. The method as described in claim 4, characterized in that, The node's response message is generated through the following steps: After receiving an array from other nodes, the node checks the arrays of those other nodes for values that are 1. For each reliable broadcast instance corresponding to a value of 1 in the array of other nodes, after that node completes the reliable broadcast instance, it sends a reply message to the other nodes.
6. An asynchronous constant-time multi-factor verifiable consensus device, characterized in that, include: The proposal module is used in asynchronous constant-time multivariate verifiable consensus protocols to have each node propose a value. The reliable broadcast instance execution module is used by the node to execute the corresponding reliable broadcast instance, where the reliable broadcast instance is the value proposed by the node using reliable broadcast; The loop module is used by the node to execute the following first loop after waiting for nf reliable broadcast instances to complete, where the number of rounds in the first loop is initialized to 0: Determine a common random number k; If the reliable broadcast instance corresponding to node k has ended, run the re-voting binary consensus instance and determine the vote value as 1; otherwise, determine the vote value as 0. If the reliable broadcast instance corresponding to node k has not ended, wait for the reliable broadcast instance corresponding to node k to end, and after the reliable broadcast instance corresponding to node k ends, run the re-voting binary consensus instance and determine the vote value as 1; otherwise, determine the vote value as 0. When the vote value of the preset number of re-voting binary consensus instances is 1, determine that the consensus value reached by the node is 1; otherwise, it is 0. If the node reaches a consensus value of 0 in the re-voting binary consensus instance, then proceed to the next round of the current first cycle, incrementing the round number by 1; If the node reaches a consensus value of 1 in the re-voting binary consensus instance, then the node waits for the output of the k-th reliable broadcast instance, and the asynchronous constant-time multivariate verifiable consensus protocol reaches a consensus on the output. In the asynchronous constant-time multivariate verifiable consensus protocol, the total number of nodes is n, the number of faulty nodes is f, and n≥3f+1.
7. 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 5.
8. 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 5.
9. 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 5.
Citation Information
Patent Citations
Binary consensus method and device based on reliable broadcast
CN113794694A
Grouping multi-chain three-time consensus method for block chain nodes
CN114338040A