CN116170153B - Asynchronous public subset consensus method and device - Google Patents
Asynchronous public subset consensus method and device Download PDFInfo
- Publication number
- CN116170153B CN116170153B CN202310097713.3A CN202310097713A CN116170153B CN 116170153 B CN116170153 B CN 116170153B CN 202310097713 A CN202310097713 A CN 202310097713A CN 116170153 B CN116170153 B CN 116170153B
- Authority
- CN
- China
- Prior art keywords
- node
- consensus
- nodes
- value
- array
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000004590 computer program Methods 0.000 claims description 23
- 230000006870 function Effects 0.000 claims description 15
- 238000003491 array Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 10
- 238000010276 construction Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 241000116710 Ferula foetidissima Species 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/002—Countermeasures against attacks on cryptographic mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Power Engineering (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses an asynchronous public subset consensus method and device, wherein the method comprises the following steps: setting a practical multi-element global predicate capable of verifying a consensus protocol; each node in the asynchronous common subset proposes a value and performs a reliable broadcast instance corresponding to the node; recording after the corresponding reliable broadcast instance of the node is finished; after n-f reliable broadcast examples are finished, forming an array by the reliable broadcast examples completed by the node, and assigning the array to a practical multi-element verifiable consensus protocol as input of the node; utilizing the practical multi-element verifiable consensus protocol to propose an assigned array, and for the practical multi-element verifiable consensus protocol to be assigned nodes and other nodes, the global predicates of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs; a consensus set of the node is obtained, the consensus set being agreed upon in the asynchronous common subset. The invention can implement consensus for the blockchain asynchronous common subset.
Description
Technical Field
The invention relates to the technical field of blockchains, in particular to an asynchronous public subset consensus method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The Bayesian consensus protocol is the basis for privacy calculations such as blockchain, multiparty security calculations, etc. Based on network assumptions, the bayer protocol can be classified into synchronous, asynchronous, and semi-synchronous protocols.
Asynchronous protocols are a model of the blockchain of privacy calculations that are the most secure. And currently lacks a constant time asynchronous common subset consensus scheme.
Disclosure of Invention
The embodiment of the invention provides an asynchronous public subset consensus method, which is used for realizing consensus of an asynchronous public subset aiming at a block chain, and comprises the following steps:
Setting a global predicate of a practical multi-element verifiable consensus protocol, wherein for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by values proposed by the node and an array formed by values proposed by other nodes;
Each node in the asynchronous common subset proposes a value and performs a reliable broadcast instance corresponding to the node, wherein the reliable broadcast instance is a process in which the node transmits the value proposed by the node using a reliable broadcast;
recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1;
After n-f reliable broadcast instances are finished, forming an array by the reliable broadcast instances completed by the node, and assigning a practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in an asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1;
proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified;
obtaining a practical array of multi-element verifiable consensus protocol outputs;
and obtaining a consensus set of the node based on the output array, and consensus is achieved on the consensus set in an asynchronous common subset.
The embodiment of the invention also provides an asynchronous public subset consensus device, which is used for realizing consensus of the asynchronous public subset of the block chain, and comprises the following steps:
The global predicate setting module is used for setting a global predicate of the practical multi-element verifiable consensus protocol, wherein for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by the value proposed by the node and an array formed by the values proposed by other nodes;
A reliable broadcast instance execution module, configured to propose a value for each node in the asynchronous public subset, and execute a reliable broadcast instance corresponding to the node, where the reliable broadcast instance is a process in which the node transmits the value proposed by the node using reliable broadcast; recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1;
The practical multi-element verifiable consensus protocol assignment module is used for forming an array of the reliable broadcast instances completed by the node after n-f reliable broadcast instances are finished, and assigning the array to the practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in the asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1;
A practical multi-element verifiable consensus protocol execution module for proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs;
and the asynchronous public subset consensus module is used for obtaining a consensus set of the node based on the output array, and consensus is achieved on the consensus set in the asynchronous public subset.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the asynchronous public subset consensus method when executing the computer program.
Embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the asynchronous common subset consensus method described above.
Embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the asynchronous common subset consensus method described above.
In the embodiment of the invention, a practical multi-element verifiable consensus protocol global predicate is set, wherein for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by the value proposed by the node and an array formed by the values proposed by other nodes; each node in the asynchronous common subset proposes a value and performs a reliable broadcast instance corresponding to the node, wherein the reliable broadcast instance is a process in which the node transmits the value proposed by the node using a reliable broadcast; recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1; after n-f reliable broadcast instances are finished, forming an array by the reliable broadcast instances completed by the node, and assigning a practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in an asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1; proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs; and obtaining a consensus set of the node based on the output array, and consensus is achieved on the consensus set in an asynchronous common subset. Through the above procedure, a post quantum secure, constant time ACS (asynchronous common subset consensus, asynchronous Common Subset) protocol is provided. In the ACS protocol, each node proposes an array, and in the presence of 1/3 bayer-nodes, the final correct node can agree on the values proposed by the n-f nodes.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of an asynchronous common subset consensus method in an embodiment of the present invention;
FIG. 2 is a flow chart of consensus among asynchronous common subsets for consensus sets in an embodiment of the present invention;
FIG. 3 is pseudo code for asynchronous common subset consensus in an embodiment of the present invention;
FIG. 4 is a flow chart of a construction of a multi-element verifiable consensus protocol in accordance with an embodiment of the present invention;
FIG. 5 is a flow chart of obtaining values for node agreement in an embodiment of the present invention;
FIG. 6 is a flow chart of a method for achieving consensus among a plurality of validated consensus protocols in accordance with an embodiment of the present invention;
FIG. 7 is a flow chart of an implementation of a weak reliable broadcast example in an embodiment of the present invention;
FIG. 8 is a pseudo code of a weak reliable broadcast protocol and a multi-element verifiable consensus protocol for use in constructing the present invention in an embodiment;
FIG. 9 is a schematic diagram of an asynchronous common subset consensus device in an embodiment of the present invention;
fig. 10 is a schematic diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
First, concepts related to the embodiments of the present invention are explained.
(1) Asynchronous public subset consensus (Asynchronous Common Subset ACS)
In an asynchronous common subset consensus (Asynchronous Common Subset, ACS), each node proposes a value v e {0,1}, all correct nodes agree on the values proposed by n-f nodes. ACS has the following properties:
Effectiveness is as follows: if a correct node agrees with a set of values V, V contains at least n-f values, where n-2f are proposed by the correct node.
Consensus: if a correct node pair V is agreed upon, any correct node pair V is agreed upon.
Ending property: if all correct nodes propose a certain value, all correct nodes finally reach consensus.
(2) Multiple verifiable consensus (Multi-valued Validated Byzantine agreement, MVBA)
In the multivariate verifiable consensus identification, each node presents a value v epsilon {0,1}, the input of each node needs to be added with a predicate (global predictor) Q which can be verified by all nodes, and the value v presented by each node needs to satisfy Q (v) to be accepted by other nodes. MVBA allow all correct nodes to agree on the same value. MVBA has the following properties:
external verifiability: if the correct node agrees with a certain value v, the predicate Q (v) may be verified.
Consensus: if a correct node agrees with v, any correct node eventually agrees with v.
Ending property: all correct nodes eventually reach consensus.
Integrity: all nodes agree on only one value v, and v is proposed by a certain node.
(3) Reliable broadcast (reliable broadcast RBC)
In reliable broadcasting, a certain node sends a message m e {0,1}, and 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.
The reliable broadcast is specifically defined as follows:
Effectiveness is as follows: if the correct node sends message m, all correct nodes will eventually deliver m.
Consensus: if one correct node delivers message m, any correct node ultimately delivers m.
Integrity: all nodes deliver the message only once. If a correct node delivers message m, the sender sends m.
(4) Binary asynchronous re-voted consensus (repsoposable asynchronous binary agreement, RABA)
In the binary asynchronous re-voted consensus, each node presents a binary value v e {0,1} and all correct nodes agree on the same value. RABA is biased to a certain value, and if it defaults to 1, the correct node votes for 0, then re-voting for 1 is allowed, and if the correct node votes for 1, then re-voting for 0 is not allowed.
The definition of the binary asynchronous re-voted consensus is specifically as follows:
Effectiveness is as follows: if all correct nodes set forth the same value v and 1-v is not re-voted, then all correct nodes agree on v.
Consistency ending: if all correct nodes propose the same value v and 1-v is not re-voted, then all correct nodes can agree.
Consensus: if a correct node agrees with v, any correct node ultimately agrees with v
Biased ending: defining Q as the set of all correct nodes, Q1 as the set of correct nodes that voted for 1, Q2 as the set of correct nodes that voted for 0 and then re-voted for 1, if the union of Q1 and Q2 is equal to Q, all correct nodes can eventually agree.
Integrity: all nodes agree on only one value.
FIG. 1 is a flow chart of an asynchronous common subset consensus method in an embodiment of the present invention, comprising:
step 101, setting a global predicate Q (w_j, W) of a practical multi-element verifiable consensus protocol, wherein for each node p_i in the practical multi-element verifiable consensus protocol, the global predicate Q (w_j, W) is determined for an array W formed by the values proposed by the node p_i and an array w_j formed by the values proposed by other nodes p_j;
Step 102, each node p_i in the asynchronous public subset proposes a value v_i, and executes a reliable broadcast instance rbc_i corresponding to the node p_i, wherein the reliable broadcast instance rbc_i is a process of transmitting the value v_i proposed by the node p_i through reliable broadcast;
Step 103, recording after the node p_i ends the corresponding reliable broadcast instance rbc_i, wherein after the other nodes p_j in the asynchronous public subset end the reliable broadcast instance rbc_j corresponding to the other nodes p_j, setting any value in the array W [ j ] of the other nodes p_j to 1;
104, after n-f reliable broadcast instances are finished, forming an array W_i by the reliable broadcast instance completed by the node p_i, and assigning the array W_i to a practical multi-element verifiable common protocol as an input W of the node, wherein n is the number of nodes in an asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1;
Step 105, proposing an array W of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned node p_i and other nodes p_j in the practical multi-element verifiable consensus protocol, the global predicates Q (w_j, W) of the assigned node p_i must be verified;
Step 106, obtaining a practical array W_k of the multi-element verifiable consensus protocol output;
step 107, based on the output array w_k, obtaining a consensus set V of the node, and consensus the consensus set V in the asynchronous common subset.
Setting a global predicate of a practical multi-element verifiable consensus protocol, wherein the global predicate comprises the following steps:
For each node p_i in the multi-element verifiable consensus, after the node p_i receives the array W_j of the other nodes p_j, judging whether the array W_j of the other nodes p_j meets the following condition, if so, determining the global predicate Q (W_j, W) of the node p_i according to the array W of the node p_i and the array W_j of the other nodes p_j:
The array W_j of the other nodes comprises n values, n-f values are 1, and for the case that any value in the array W_j of each other node p_j is 1, any value in the array W of the node p_i is also 1;
wherein n is the number of nodes in the practical multi-element verifiable consensus protocol, f is the number of error nodes, and n is not less than 3f+1.
Fig. 2 is a flowchart for consensus among asynchronous common subsets of consensus sets in an embodiment of the present invention, in an embodiment, based on the output array w_k, a consensus set V of the node is obtained, and consensus among asynchronous common subsets is achieved, including:
Step 201, when any value in the output array w_k is 1, the node p_i waits for the reliable broadcast instance of the other node p_j to end rbc_j and outputs the value v_j proposed by the other node p_j;
step 202, adding the value v_j proposed by the other node p_j to the consensus set V;
In step 203, the node outputs a consensus set V, which is consensus among the asynchronous common subsets V.
The steps of fig. 1 and fig. 2 completely provide a flow of an asynchronous public subset consensus method, and the corresponding pseudo code is shown in fig. 3, and the asynchronous public subset consensus method provided by the embodiment of the invention is asynchronous public subset consensus of constant time under a quantum security model (quantum attack resistance), and provides a practical asynchronous public subset consensus protocol. The key is that a global predicate (predicate) setting the multiple verifiable consensus MVBA is a condition, rather than a substantial proof (e.g., digital signature, etc.).
Fig. 4 is a construction flow of a practical multi-element verifiable consensus protocol according to an embodiment of the present invention, and the specific steps include:
step 401, a practical multi-element verifiable consensus protocol wherein each node p_i proposes an array W, said array comprising a plurality of values v_i proposed by the node;
step 402, the node p_i executes a corresponding weak reliable broadcast instance WRBC _i, where the weak reliable broadcast instance WRBC _i is an array W of transmission proposals of the node p_i by weak reliable broadcast;
Step 403, after the node p_i waits for n-f weak reliable broadcast instances to end, executing the following loop, wherein the number of rounds r in the loop is initialized to 0:
Step 4031, the node p_i calls Election () function, wherein, after Election () function call is performed by the practical multi-element verifiable consensus protocol f+1 nodes, election () function returns a common random number k;
Step 4032, obtaining the agreed value of the node p_i according to the weak reliable broadcast instance WRBC _k corresponding to the executed node k;
Step 4033, if the node reaches the consensus value of 0, entering the next round of the current cycle, and adding 1 to the number of rounds;
Step 4034, if the node achieves a consensus value of 1, the node waits for the output h_k of the kth weak reliable broadcast instance WRBC _k;
step 4035, consensus is reached in the practical multi-element verifiable consensus protocol based on the output of the kth weakly reliable broadcast instance WRBC _k.
Wherein, a function Election () of randomly selecting the leader node can be constructed by a common coin-freed protocol, and in Election () function, a node k can be randomly selected as long as more than f+1 nodes trigger the protocol.
Fig. 5 is a flowchart of obtaining a node consensus value according to an embodiment of the present invention, where in an embodiment, obtaining the node consensus value according to an executed weak reliable broadcast instance corresponding to a node k includes:
step 501, if the weak reliable broadcast instance WRBC _k corresponding to the node k has ended, the node k calls the binary re-voteable consensus raba_r and votes for 1, otherwise, votes for 0;
Step 502, if the weak reliable broadcast instance WRBC _k corresponding to the node k is not finished, waiting for the weak reliable broadcast instance WRBC _k corresponding to the node k to finish, and after the weak reliable broadcast instance WRBC _k corresponding to the node k finishes, the node calls the binary re-voted consensus raba_r and votes 1;
in step 503, when the vote is 1, it is determined that the node achieves consensus value is 1, otherwise it is 0.
FIG. 6 is a flow chart of a method for achieving agreement in a practical multi-component verifiable consensus protocol according to an embodiment of the present invention, wherein the method comprises:
step 601, if the node p_i has set a stored Value t_i [ k ], the node p_i sends a Value message (Value, t_i [ k ]) to other nodes, and outputs the stored Value t_i [ k ], a practical multi-element verifiable consensus protocol agrees with the stored Value t_i [ k ], the message content of the Value message (Value, t_i [ k ]) is the stored Value t_i [ k ], and the stored Value t_i [ k ] is an array W of the node p_i;
In step 602, if the node p_i has not set the stored Value, wait for a Value message (Value, v_k) until the hash Value of the message content in the Value message (Value, v_k) is the output of the kth weak broadcast instance (i.e. hash (v_k) =h), and output the Value of the kth node, and the practical multi-element verifiable consensus protocol agrees with the message content v_k in the Value message (Value, v_k), where the message content in the Value message is the Value v_k of the kth node.
In the Value message, value is a message type, and represents that the message is a Value message;
Fig. 7 is a flowchart of an implementation of a weak reliable broadcast example in an embodiment of the present invention, where specific steps include:
Step 701, each node p_s in the practical multi-element verifiable consensus protocol sends an array v_s of the proposal of the node by adopting a sending message (Send, v_s), and the message content of the sending message is the array of the proposal; wherein, send in the sending message (Send, v_s) is the message type, represent the message is the sending message;
Step 702, the practical multiple element can verify whether the global predicate Q (v_s) of the proposed array is valid after other nodes p_i in the consensus protocol receive the proposed array v_s of the node;
Step 703, if yes, setting the stored value as the proposed array v_s, and sending an Echo message (Echo, h) to all nodes, wherein the message content of the Echo message is a hash value of the proposed array; wherein Echo in Echo message (Echo, h) is message type, representing that the message is Echo message; h=hash (v_s);
Step 704, after the other node receives n-f consistent Echo messages (Echo, h), sending a Ready message (Ready, h) to all nodes, where the message content of the Ready message is the hash value; wherein Ready is a message type in the Ready message (Ready, h), and the representative message is the Ready message;
step 705, after the other node receives f+1 consistent Ready messages (Ready, h), the echo message of the other node is not yet sent, and the Ready messages (Ready, h) of the other node are sent to all nodes;
Step 706, after the other node receives n-f consistent Ready messages (Ready, h), finishing weak reliable broadcasting WRBC and storing the hash value;
Step 707, if the other node has set a stored value, and the stored value is not the hash value t_i [ s ], clearing the stored value.
The steps of fig. 6 and fig. 7 fully provide a flow of a weak reliable broadcast protocol and constructing a practical multi-element verifiable consensus protocol, and the corresponding pseudo code is shown in fig. 8, wherein the practical multi-element verifiable consensus protocol is a brand new one, and the brand new weak reliable broadcast protocol is utilized to provide a multi-element asynchronous verifiable consensus with a constant time and a lowest communication complexity under quantum security assumption.
In summary, in the method provided by the embodiment of the present invention, a global predicate of a practical multi-element verifiable consensus protocol is set, where, for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by values proposed by the node and an array formed by values proposed by other nodes; each node in the asynchronous common subset proposes a value and performs a reliable broadcast instance corresponding to the node, wherein the reliable broadcast instance is a process in which the node transmits the value proposed by the node using a reliable broadcast; recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1; after n-f reliable broadcast instances are finished, forming an array by the reliable broadcast instances completed by the node, and assigning a practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in an asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1; proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs; and obtaining a consensus set of the node based on the output array, and consensus is achieved on the consensus set in an asynchronous common subset. Through the above procedure, a post quantum secure, constant time ACS (asynchronous common subset consensus, asynchronous Common Subset) protocol is provided. In the ACS protocol, each node proposes an array, and in the presence of 1/3 bayer-nodes, the final correct node can agree on the values proposed by the n-f nodes.
The embodiment of the invention also provides an asynchronous public subset consensus device, the principle of which is similar to that of an asynchronous public subset consensus method, and the description is omitted here.
FIG. 9 is a schematic diagram of an asynchronous common subset consensus device according to an embodiment of the present invention, comprising:
the global predicate setting module 901 is configured to set a global predicate of a practical multi-element verifiable consensus protocol, where, for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by values proposed by the node and an array formed by values proposed by other nodes;
A reliable broadcast instance execution module 902, configured to propose a value for each node in the asynchronous public subset, and execute a reliable broadcast instance corresponding to the node, where the reliable broadcast instance is a process in which the node sends the value proposed by the node using a reliable broadcast; recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1;
The practical multi-element verifiable consensus protocol assignment module 903 is configured to assign a practical multi-element verifiable consensus protocol to an input of a node formed by the reliable broadcast instances completed by the node after n-f reliable broadcast instances are finished, where n is the number of nodes in the asynchronous public subset, f is the number of error nodes, and n is greater than or equal to 3f+1;
A utility multi-element verifiable consensus protocol execution module 904 for proposing an array of assigned nodes using the utility multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the utility multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs;
An asynchronous common subset consensus module 905, configured to obtain a consensus set of the node based on the output array, and agree on the consensus set in the asynchronous common subset.
In one embodiment, the global predicate setting module is specifically configured to:
for each node in the multi-element verifiable consensus, after the node receives the arrays of other nodes, judging whether the arrays of other nodes meet the following conditions, if so, determining the global predicate of the node according to the arrays of the node and the arrays of other nodes:
The array of other nodes contains n values, n-f values are 1, and for the case that any value in the array of each other node is 1, any value in the array of the node is also 1;
wherein n is the number of nodes in the practical multi-element verifiable consensus protocol, f is the number of error nodes, and n is not less than 3f+1.
In one embodiment, the asynchronous common subset consensus module is specifically configured to:
When any value in the output array is 1, the node waits for the end of the reliable broadcast instance of other nodes and outputs the value proposed by other nodes;
Adding values proposed by other nodes to the consensus set;
The node outputs a consensus set, consensus is reached for the consensus set in the asynchronous common subset.
In one embodiment, the apparatus further comprises a utility multi-element verifiable consensus protocol construction module 906 for:
each node p_i in the practical multi-element verifiable consensus protocol proposes an array comprising a plurality of values v_i proposed by the node;
the node p_i executes a corresponding weak reliable broadcast instance, wherein the weak reliable broadcast instance is an array of proposals sent by the node p_i by using weak reliable broadcast;
After the node p_i waits for n-f weak reliable broadcast instances to finish, executing the following loop, wherein the number r of the loops is initialized to 0:
The node calls Election () function, wherein after Election () function call is performed on practical multi-element verifiable consensus protocol f+1 nodes, election () function returns a common random number k;
obtaining a consensus value of the node according to the weak reliable broadcast instance corresponding to the executed node k;
if the node reaches the consensus value of 0, entering the next round of current circulation, and adding 1 to the number of rounds;
if the node achieves consensus value of 1, the node waits for the output h_k of the kth weak reliable broadcast instance;
consensus is achieved in a practical multi-element verifiable consensus protocol based on the output of the kth weakly reliable broadcast instance.
In one embodiment, the practical multi-element verifiable consensus protocol construction module is specifically configured to:
if the weak reliable broadcast instance corresponding to the node k is finished, the node calls the binary re-voteable consensus RABA_r and votes for 1, otherwise, votes for 0;
If the weak reliable broadcast instance corresponding to the node k is not finished, waiting for the weak reliable broadcast instance corresponding to the node k to finish, and after the weak reliable broadcast instance corresponding to the node k is finished, calling a binary re-voted common knowledge RABA_r by the node, and voting to be 1;
When the vote is 1, the consensus value of the node is determined to be 1, otherwise, the consensus value is determined to be 0.
In one embodiment, the practical multi-element verifiable consensus protocol construction module is specifically configured to:
If the node sets a stored Value T_i [ k ], the node sends a Value message (Value, T_i [ k ] to other nodes and outputs the stored Value, a practical multi-element verifiable consensus protocol agrees with the stored Value, the message content of the Value message is the stored Value, and the stored Value is an array of the node;
If the node p_i does not set a stored value, waiting for a value message until a hash value of the message content in the value message is the output of the kth weak reliable broadcast instance, outputting the value of the kth node, and enabling the practical multi-element verifiable consensus protocol to agree on the message content in the value message, wherein the message content in the value message is the value of the kth node.
In an embodiment, the apparatus further comprises a weak reliable broadcast instance execution module 907 for:
each node p_s in the practical multi-element verifiable consensus protocol adopts a sending message to send an array v_s proposed by the node, wherein the message content of the sending message is the array of the proposals;
the practical multiple elements can verify whether the global predicate Q (v_s) of the proposed array is valid or not after other nodes p_i in the consensus protocol receive the proposed array v_s of the node;
If yes, setting the stored value as the proposed array v_s, and sending an Echo message (Echo, hash (v_s)) to all nodes, wherein the message content of the Echo message is the hash value of the proposed array;
After receiving n-f identical Echo messages (Echo, h) from the other nodes, sending Ready messages (Ready, h) to all nodes, wherein the message content of the Ready messages is the hash value;
After the other nodes receive f+1 consistent Ready messages (Ready, h), echo messages of the other nodes are not sent yet, and the Ready messages (Ready, h) of the other nodes are sent to all nodes;
After the other node receives n-f consistent Ready messages (Ready, h), finishing weak reliable broadcasting WRBC and storing the hash value;
And if the other node sets the stored value and the stored value is not the hash value T_i [ s ], clearing the stored value.
In summary, in the device provided by the embodiment of the present invention, a global predicate of a practical multi-element verifiable consensus protocol is set, where, for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by values proposed by the node and an array formed by values proposed by other nodes; each node in the asynchronous common subset proposes a value and performs a reliable broadcast instance corresponding to the node, wherein the reliable broadcast instance is a process in which the node transmits the value proposed by the node using a reliable broadcast; recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1; after n-f reliable broadcast instances are finished, forming an array by the reliable broadcast instances completed by the node, and assigning a practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in an asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1; proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs; and obtaining a consensus set of the node based on the output array, and consensus is achieved on the consensus set in an asynchronous common subset. Through the above procedure, a post quantum secure, constant time ACS (asynchronous common subset consensus, asynchronous Common Subset) protocol is provided. In the ACS protocol, each node proposes an array, and in the presence of 1/3 bayer-nodes, the final correct node can agree on the values proposed by the n-f nodes.
An embodiment of the present invention further provides a computer device, and fig. 10 is a schematic diagram of a computer device in an embodiment of the present invention, where the computer device 1000 includes a memory 1010, a processor 1020, and a computer program 1030 stored in the memory 1010 and capable of running on the processor 1020, and the processor 1020 implements the asynchronous public subset consensus method described above when executing the computer program 1030.
Embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the asynchronous common subset consensus method described above.
Embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the asynchronous common subset consensus method described above.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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, and the like) having computer-usable program code embodied therein.
The present 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 flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (10)
1. An asynchronous common subset consensus method, comprising:
Setting a global predicate of a practical multi-element verifiable consensus protocol, wherein for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by values proposed by the node and an array formed by values proposed by other nodes;
Each node in the asynchronous common subset proposes a value and performs a reliable broadcast instance corresponding to the node, wherein the reliable broadcast instance is a process in which the node transmits the value proposed by the node using a reliable broadcast;
recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1;
After n-f reliable broadcast instances are finished, forming an array by the reliable broadcast instances completed by the node, and assigning a practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in an asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1;
proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified;
obtaining a practical array of multi-element verifiable consensus protocol outputs;
based on the output array, obtaining a consensus set of the node, and consensus is achieved on the consensus set in an asynchronous public subset;
Setting a global predicate of a practical multi-element verifiable consensus protocol, comprising:
for each node in the multi-element verifiable consensus, after the node receives the arrays of other nodes, judging whether the arrays of other nodes meet the following conditions, if so, determining the global predicate of the node according to the arrays of the node and the arrays of other nodes:
The array of other nodes contains n values, n-f values are 1, and for the case that any value in the array of each other node is 1, any value in the array of the node is also 1;
wherein n is the number of nodes in the practical multi-element verifiable consensus protocol, f is the number of error nodes, and n is not less than 3f+1.
2. The method of claim 1, wherein obtaining a consensus set for the node based on the array of outputs, consensus the consensus set in an asynchronous common subset, comprises:
When any value in the output array is 1, the node waits for the end of the reliable broadcast instance of other nodes and outputs the value proposed by other nodes;
Adding values proposed by other nodes to the consensus set;
The node outputs a consensus set, consensus is reached for the consensus set in the asynchronous common subset.
3. The method of claim 1, wherein the constructing step of the utility multi-element verifiable consensus protocol comprises:
each node in the practical multi-element verifiable consensus protocol proposes an array comprising a plurality of values for the node proposal;
The node executes a corresponding weak reliable broadcast instance, wherein the weak reliable broadcast instance is an array of proposals sent by the node p_i by using weak reliable broadcast;
After waiting for n-f weak reliable broadcast instances to end, the node performs a loop in which the number of rounds in the loop is initialized to 0:
The node calls Election () function, wherein after Election () function call is performed on practical multi-element verifiable consensus protocol f+1 nodes, election () function returns a common random number k;
obtaining a consensus value of the node according to the weak reliable broadcast instance corresponding to the executed node k;
if the node reaches the consensus value of 0, entering the next round of current circulation, and adding 1 to the number of rounds;
If the node achieves consensus value of 1, the node waits for the output of the kth weak reliable broadcast instance;
consensus is achieved in a practical multi-element verifiable consensus protocol based on the output of the kth weakly reliable broadcast instance.
4. The method of claim 3, wherein obtaining the node agreed upon value based on the performed weak reliable broadcast instance corresponding to node k comprises:
if the weak reliable broadcast instance corresponding to the node k is finished, the node invokes binary re-voting consensus and votes for 1, otherwise, votes for 0;
If the weak reliable broadcast instance corresponding to the node k is not finished, waiting for the weak reliable broadcast instance corresponding to the node k to finish, and after the weak reliable broadcast instance corresponding to the node k is finished, the node calls the binary re-voting consensus and votes for 1;
When the vote is 1, the consensus value of the node is determined to be 1, otherwise, the consensus value is determined to be 0.
5. The method of claim 3, wherein the agreement in the applicable multi-element verifiable consensus protocol is reached based on the output of the kth weak reliable broadcast instance, comprising:
If the node sets a stored value, the node sends a value message to other nodes and outputs the stored value, a practical multi-element verifiable consensus protocol agrees with the stored value, the message content of the value message is the stored value, and the stored value is an array of the node;
if the node does not set the stored value, waiting for the value message until the hash value of the message content in the value message is the output of the kth weak reliable broadcast instance, outputting the value of the kth node, and enabling the practical multi-element verifiable consensus protocol to agree on the message content in the value message, wherein the message content in the value message is the value of the kth node.
6. The method of claim 1, wherein the performing step of the weak reliable broadcast instance comprises:
Each node in the practical multi-element verifiable consensus protocol adopts a sending message to send an array proposed by the node, wherein the message content of the sending message is the array proposed;
The practical multiple can verify whether the global predicate of the proposed array is valid or not after other nodes in the consensus protocol receive the proposed array of the node;
if yes, setting the stored value as the proposed array, and sending echo information to all nodes, wherein the information content of the echo information is the hash value of the proposed array;
After the other nodes receive n-f consistent echo messages, sending preparation messages to all nodes, wherein the message content of the preparation messages is the hash value;
After the other nodes receive f+1 consistent preparation messages, echo messages of the other nodes are not sent yet, and the preparation messages of the other nodes are sent to all nodes;
After the other nodes receive n-f consistent preparation messages, finishing weak and reliable broadcasting and storing the hash value;
and if the other nodes set the stored value and the stored value is not the hash value, emptying the stored value.
7. An asynchronous common subset consensus device, comprising:
The global predicate setting module is used for setting a global predicate of the practical multi-element verifiable consensus protocol, wherein for each node in the practical multi-element verifiable consensus protocol, the global predicate is determined for an array formed by the value proposed by the node and an array formed by the values proposed by other nodes;
A reliable broadcast instance execution module, configured to propose a value for each node in the asynchronous public subset, and execute a reliable broadcast instance corresponding to the node, where the reliable broadcast instance is a process in which the node transmits the value proposed by the node using reliable broadcast; recording after the corresponding reliable broadcast instance of the node is finished, wherein after the corresponding reliable broadcast instance of the other node is finished, other nodes in the asynchronous public subset set any value in an array of the other node to be 1;
The practical multi-element verifiable consensus protocol assignment module is used for forming an array of the reliable broadcast instances completed by the node after n-f reliable broadcast instances are finished, and assigning the array to the practical multi-element verifiable consensus protocol as the input of the node, wherein n is the number of nodes in the asynchronous public subset, f is the number of error nodes, and n is more than or equal to 3f+1;
A practical multi-element verifiable consensus protocol execution module for proposing an array of assigned nodes using a practical multi-element verifiable consensus protocol, wherein for the assigned nodes and other nodes in the practical multi-element verifiable consensus protocol, a global predicate of the assigned nodes must be verified; obtaining a practical array of multi-element verifiable consensus protocol outputs;
The asynchronous public subset consensus module is used for obtaining a consensus set of the node based on the output array, and consensus is achieved on the consensus set in the asynchronous public subset;
The global predicate setting module is used for:
for each node in the multi-element verifiable consensus, after the node receives the arrays of other nodes, judging whether the arrays of other nodes meet the following conditions, if so, determining the global predicate of the node according to the arrays of the node and the arrays of other nodes:
The array of other nodes contains n values, n-f values are 1, and for the case that any value in the array of each other node is 1, any value in the array of the node is also 1;
wherein n is the number of nodes in the practical multi-element verifiable consensus protocol, f is the number of error nodes, and n is not less than 3f+1.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 6.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310097713.3A CN116170153B (en) | 2023-01-19 | 2023-01-19 | Asynchronous public subset consensus method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310097713.3A CN116170153B (en) | 2023-01-19 | 2023-01-19 | Asynchronous public subset consensus method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116170153A CN116170153A (en) | 2023-05-26 |
CN116170153B true CN116170153B (en) | 2024-06-21 |
Family
ID=86415953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310097713.3A Active CN116170153B (en) | 2023-01-19 | 2023-01-19 | Asynchronous public subset consensus method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116170153B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117812092B (en) * | 2024-02-28 | 2024-05-14 | 中国信息通信研究院 | Predicate-based block compression transmission method and apparatus, device and medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110022216A (en) * | 2019-02-18 | 2019-07-16 | 西安西电链融科技有限公司 | Efficient asynchronous Byzantium's common recognition method, network communication platform of low communication complexity |
CN113660272A (en) * | 2021-08-18 | 2021-11-16 | 北京航空航天大学 | Asynchronous consensus method and device for anti-Byzantine sequencing |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020033048A1 (en) * | 2018-08-09 | 2020-02-13 | Hrl Laboratories, Llc | System and method for consensus ordering of broadcast messages |
CN111522800B (en) * | 2020-07-03 | 2020-10-30 | 支付宝(杭州)信息技术有限公司 | Block chain consensus method, node and system of badger Byzantine fault-tolerant consensus mechanism |
-
2023
- 2023-01-19 CN CN202310097713.3A patent/CN116170153B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110022216A (en) * | 2019-02-18 | 2019-07-16 | 西安西电链融科技有限公司 | Efficient asynchronous Byzantium's common recognition method, network communication platform of low communication complexity |
CN113660272A (en) * | 2021-08-18 | 2021-11-16 | 北京航空航天大学 | Asynchronous consensus method and device for anti-Byzantine sequencing |
Also Published As
Publication number | Publication date |
---|---|
CN116170153A (en) | 2023-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200396059A1 (en) | Fast and partition-resilient blockchains | |
CN116170153B (en) | Asynchronous public subset consensus method and device | |
CN108876384B (en) | Transaction data processing method and device | |
CN110928880B (en) | Data processing method, device, terminal and medium based on block chain | |
CN112597240B (en) | Federal learning data processing method and system based on alliance chain | |
CN110557420A (en) | operation method and system of independent sub-chains | |
CN109886810B (en) | Crowdsourcing transaction method and system, readable storage medium and terminal | |
CN113448694B (en) | Block chain consensus method for improving transaction processing capability | |
CN110930254A (en) | Data processing method, device, terminal and medium based on block chain | |
CN112749968A (en) | Service data recording method and device based on block chain | |
CN112634034A (en) | Reservation method, reservation device, electronic equipment and computer readable storage medium | |
CN110990790B (en) | Data processing method and equipment | |
CN113157450A (en) | Method and apparatus for performing blocks in a blockchain system | |
Micali et al. | Optimal and player-replaceable consensus with an honest majority | |
CN109391643A (en) | Block chain light-weight technologg method, block chain node and storage medium | |
CN111405027A (en) | Block chain consensus result screening method and device, computer equipment and storage medium | |
CN116318842A (en) | Asynchronous constant time multielement verifiable consensus method and device | |
CA3086361A1 (en) | Fast and partition-resilient blockchains | |
CN116132058A (en) | Block chain consensus method, apparatus, device and computer readable storage medium | |
CN110555764A (en) | method and system for block chain consistency under decentralized environment | |
CN111371769B (en) | Consensus processing method, consensus node, electronic device, and readable storage medium | |
CN118677617A (en) | Synchronous consensus method and device | |
EP3928461A1 (en) | Energized identity powered blockchain | |
CN114465866B (en) | DPoS method based on trust degree and PBFT | |
CN115269234B (en) | Task message transmission method and device and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |