CN116170153A - Asynchronous public subset consensus method and device - Google Patents
Asynchronous public subset consensus method and device Download PDFInfo
- Publication number
- CN116170153A CN116170153A CN202310097713.3A CN202310097713A CN116170153A CN 116170153 A CN116170153 A CN 116170153A CN 202310097713 A CN202310097713 A CN 202310097713A CN 116170153 A CN116170153 A CN 116170153A
- 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.)
- Pending
Links
Images
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 the asynchronous common subset consensus (Asynchronous Common Subset, ACS), each node presents a value v e {0,1}, all correct nodes agree on the values presented 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 allows 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:
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;
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:
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) of a set multiple verifiable consensus MVBA is a condition, rather than a substantial proof (such as a 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:
in step 4035, a consensus is reached in the practical multi-element verifiable consensus protocol based on the output of the kth weak reliable broadcast instance wrbc_k.
The function of randomly selecting the leader node, namely the electric () can be constructed by a public coin-freed protocol, and in the electric () function, a node k can be randomly selected as long as 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:
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:
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:
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 an electric () function, wherein after the electric () function is called by the practical multi-element verifiable consensus protocol f+1 nodes, the electric () 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 nodes receive n-f consistent preparation 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 (11)
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;
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.
2. The method of claim 1, wherein setting a global predicate for a utility multi-element verifiable consensus protocol, comprises:
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.
3. 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.
4. 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 an electric () function, wherein after the electric () function is called by the practical multi-element verifiable consensus protocol f+1 nodes, the electric () 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.
5. The method of claim 4, 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.
6. The method of claim 4, wherein the agreement is reached in a practical multi-element verifiable consensus protocol 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.
7. 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.
8. 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;
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.
9. 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 7 when executing the computer program.
10. 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 7.
11. 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 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310097713.3A CN116170153A (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 CN116170153A (en) | 2023-01-19 | 2023-01-19 | Asynchronous public subset consensus method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116170153A true CN116170153A (en) | 2023-05-26 |
Family
ID=86415953
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310097713.3A Pending CN116170153A (en) | 2023-01-19 | 2023-01-19 | Asynchronous public subset consensus method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116170153A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117812092A (en) * | 2024-02-28 | 2024-04-02 | 中国信息通信研究院 | Predicate-based block compression transmission method and apparatus, device and medium |
-
2023
- 2023-01-19 CN CN202310097713.3A patent/CN116170153A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117812092A (en) * | 2024-02-28 | 2024-04-02 | 中国信息通信研究院 | Predicate-based block compression transmission method and apparatus, device and medium |
CN117812092B (en) * | 2024-02-28 | 2024-05-14 | 中国信息通信研究院 | Predicate-based block compression transmission method and apparatus, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109872152B (en) | Block chain consensus method based on share authorization certification mechanism and related equipment | |
CN108876384B (en) | Transaction data processing method and device | |
Ben-Or et al. | Resilient-optimal interactive consistency in constant time | |
CN110557420B (en) | Operation method and system of independent sub-chains | |
CN110928880B (en) | Data processing method, device, terminal and medium based on block chain | |
CN116170153A (en) | Asynchronous public subset consensus method and device | |
CN109660545B (en) | Alliance chain consensus method and computer storage medium | |
CN112597240B (en) | Federal learning data processing method and system based on alliance chain | |
CN112749968B (en) | Service data recording method and device based on block chain | |
CN110930254A (en) | Data processing method, device, terminal and medium based on block chain | |
CN110990790B (en) | Data processing method and equipment | |
Pauwels et al. | Adaptive advantage in entanglement-assisted communications | |
CN113448694B (en) | Block chain consensus method for improving transaction processing capability | |
CN113157450A (en) | Method and apparatus for performing blocks in a blockchain system | |
WO2019024631A1 (en) | Blockchain lightweight processing method, blockchain node and storage medium | |
CN111405027A (en) | Block chain consensus result screening method and device, computer equipment and storage medium | |
CN111177263A (en) | Block chain consensus method and node | |
CN116318842A (en) | Asynchronous constant time multielement verifiable consensus method and device | |
CN116132058A (en) | Block chain consensus method, apparatus, device and computer readable storage medium | |
CN115883578A (en) | 5G power network node trust management method based on block chain technology | |
CA3086361A1 (en) | Fast and partition-resilient blockchains | |
CN114780217A (en) | Task scheduling method and device, computer equipment and 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 | |
CN112634034A (en) | Reservation method, reservation device, electronic equipment and computer readable storage medium |
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 |