CN117354318A - Practical distributed voting consensus method, device, equipment and storage medium - Google Patents

Practical distributed voting consensus method, device, equipment and storage medium Download PDF

Info

Publication number
CN117354318A
CN117354318A CN202311280432.8A CN202311280432A CN117354318A CN 117354318 A CN117354318 A CN 117354318A CN 202311280432 A CN202311280432 A CN 202311280432A CN 117354318 A CN117354318 A CN 117354318A
Authority
CN
China
Prior art keywords
node
response
broadcast message
nodes
target network
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.)
Granted
Application number
CN202311280432.8A
Other languages
Chinese (zh)
Other versions
CN117354318B (en
Inventor
张宗洋
周游
李天宇
刘建伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN202311280432.8A priority Critical patent/CN117354318B/en
Publication of CN117354318A publication Critical patent/CN117354318A/en
Application granted granted Critical
Publication of CN117354318B publication Critical patent/CN117354318B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1051Group master selection mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1065Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT] 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application relates to a practical distributed voting consensus method, a device, equipment and a storage medium, wherein the method comprises the following steps: broadcasting the proposal value corresponding to each node to other nodes in the target network, so that each node constructs a response broadcast message according to the acquired proposal value, generates a confirmation broadcast message based on the response broadcast message, and transmits the confirmation broadcast message to the other nodes so as to judge whether each node meets the preset propagation and verification requirements according to the quantity of the received confirmation broadcast messages; after each node performs multiple rounds of message interaction, electing a leading node in a target network; and carrying out three-step message interaction through a request response structure according to the response node and the request node, and recovering the proposal value of the leader node, so that all nodes output a global unified result. Therefore, the problems that the existing asynchronous distributed voting consensus protocol depends on trusted starting, and has data redundancy expansion, so that the robustness and the universality of the protocol are poor, the communication efficiency and the practicability are low, the resource waste is serious and the like are solved.

Description

Practical distributed voting consensus method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of information security technologies, and in particular, to a practical distributed voting consensus method, device, apparatus, and storage medium.
Background
A distributed system is a fault tolerant system that is commonly maintained and engaged by multiple nodes to achieve a common objective. In a distributed environment, the system is inevitably disturbed by the bayer nodes, which can perform any malicious actions to prevent the system from running and even induce the system to generate erroneous data. To combat the existence of the bayer node in a distributed system, the academia has proposed many bayer fault-tolerance protocols. The distributed voting consensus is a Bayesian fault-tolerant protocol at the bottom layer, aims at enabling each node in the system to achieve consensus on proposals, and can be used for systems of safe multiparty computation, block chains and the like.
The distributed voting consensus can be divided into a synchronous protocol, a semi-synchronous protocol and an asynchronous protocol according to a network model of the distributed voting consensus, wherein the asynchronous protocol does not depend on any time hypothesis, has the strongest robustness and has the widest application prospect.
The VABA is used as a first asynchronous distributed voting consensus protocol and is composed of components such as a consistency broadcast CBC, an asynchronous binary consensus ABBA and the like, and the safety of the voting process is ensured by using a threshold signature technology, so that a trusted third party or an additional distributed key distribution protocol is required to complete a trusted starting process by using the protocol, and the application scene of the protocol is greatly limited; furthermore, the speed MVBA is an asynchronous distributed voting consensus protocol with optimal performance, which can reduce the delay of the protocol in running by reducing the number of communication steps, however, since the protocol also uses the threshold signature technology, the problem of trusted starting is still encountered in practical application.
Another category of research is directed to designing asynchronous distributed voting consensus protocols without using signature technology, however, such schemes have higher communication overhead, assuming that the proposed size of each node in the protocol is λ as a security parameter, n is the number of nodes, and the communication complexity of the best existing unsigned asynchronous distributed voting consensus protocol is (n 2 +n 3 ) And has a data expansion of at least 2 times, i.e. ln 2 The coefficient of the term is at least 2, and when the scheme is applied to a scene of large-scale input, even if no node is bad, bandwidth resources which are at least doubled in cost are used for transmitting redundant proposal data, so that great resource waste is caused.
To further push the asynchronous distributed voting consensus protocol from theory to reality, in recent years, those skilled in the art have focused on studying the reduction of the latency of the asynchronous distributed voting consensus protocol and increasing its versatility, but the existing research schemes still face the following two problems:
1. relying on trusted boot issues:
the existing asynchronous distributed voting consensus protocol with better performance uses a threshold signature technology to ensure the safety of the voting process and reduce communication steps, but the problem of dependence on trusted starting is inevitably brought about: during initialization, a trusted third party or an additional distributed key generation protocol is required to complete the distribution process of the signature key; on one hand, the method needs to introduce additional security assumption, reduces the robustness and universality of the protocol, and is not suitable for systems such as secure multiparty calculation, quantum block chain resistance and the like; on the other hand, the additional distributed key generation protocol brings challenges to engineering implementation, and when the system performs node reconfiguration, the node signature key needs to be updated, so that how to safely and efficiently complete the key replacement between the new node and the old node is still an engineering problem.
2. Data redundancy expansion problem:
the existing unsigned asynchronous practical distributed voting consensus protocol has at least 2 times data expansion, and ln in the case of large data input or batch processing technology 2 >>λn 3 I.e. the communication overhead is mainly composed of ln 2 The term decides that the protocol uses at least one time more bandwidth resources for transmitting redundant proposal data. More seriously, in the conventional situation that nodes are disliked in practical application most of the time, the data redundancy expansion still exists, so that great resource waste is caused.
In summary, the existing asynchronous distributed voting consensus protocol depends on trusted starting, and has the condition of data redundancy expansion, so that the robustness and the universality of the protocol are poor, the communication efficiency and the practicability are low, the resource waste is serious, and the problem needs to be solved.
Disclosure of Invention
The application provides a practical distributed voting consensus method, device, equipment and storage medium, which are used for solving the problems that the existing asynchronous distributed voting consensus protocol depends on reliable starting, and has data redundancy expansion, so that the robustness and the universality of the protocol are poor, the communication efficiency and the practicability are low, the resource waste is serious and the like.
An embodiment of a first aspect of the present application provides a practical distributed voting consensus method, including the steps of: broadcasting proposal values corresponding to each node participating in a consensus protocol in a target network to other nodes in the target network, so that each node constructs a response broadcast message according to the acquired proposal values, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and judges whether each node meets preset propagation and verification requirements according to the number of the received confirmation broadcast messages; after each node in the target network performs multi-round message interaction according to a preset election algorithm and a re-throwing asynchronous binary consensus protocol instance, electing a leading node in the target network; if at least one node meets the preset propagation and verification requirements, constructing a corresponding request broadcast message through each request node in the at least one node, sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and restoring the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm when the number of the response reply messages is larger than a preset response threshold value, so that all nodes in the target network output a global unified result.
Optionally, in an embodiment of the present application, broadcasting, to other nodes in the target network, a proposal value corresponding to each node participating in a consensus protocol, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and makes each node determine, according to the number of received confirmation broadcast messages, whether each node meets a preset propagation and verification requirement, including: broadcasting the proposal value corresponding to each node to other nodes in the target network, carrying out hash operation on the proposal value received by each node to obtain a hash value corresponding to each node, constructing a response broadcast message corresponding to each node according to the hash value, and broadcasting the response broadcast message to the other nodes; when each node receives the same response broadcast messages with preset quantity, constructing a confirmation broadcast message based on the response broadcast messages, and broadcasting the confirmation broadcast message to other nodes; analyzing the propagation condition of the proposal value according to the number of the received confirmation broadcast messages by each node, and dividing each node in the target network according to the propagation condition to obtain a plurality of response nodes and request nodes with different amounts.
Optionally, in an embodiment of the present application, after each node in the target network performs multiple rounds of message interaction according to a preset election algorithm and a re-casting asynchronous binary consensus protocol instance, electing a leader node in the target network includes: each node in the target network invokes the preset election algorithm to generate a globally uniform leader node number; and starting a re-throwing asynchronous binary consensus protocol instance based on the leader node number so as to agree whether the proposal value of the leader node is effectively propagated according to the output result of the re-throwing asynchronous binary consensus protocol instance.
Optionally, in an embodiment of the present application, if at least one node meets the preset propagation and verification requirement, constructing a corresponding request broadcast message by each requesting node in the at least one node, and sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and when the number of the response reply messages is greater than a preset response threshold, recovering the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm, including: coding the proposal value by utilizing each response node in the at least one response node through a preset coding mode to obtain a code word share of the proposal value, constructing the request broadcast message by each request node, and sending the request broadcast message to other nodes in the target network; each node which acquires the request broadcast message sends double-share unicast or single-share unicast according to the state of the node so as to reply to each request node; judging the number of the code word shares received by each request node, decoding the code word shares by utilizing the preset online reconstruction algorithm when the number of the code word shares is larger than a preset share threshold value to obtain a value to be output, and outputting the value to be output as a proposal value of the globally unified leader node.
Embodiments of a second aspect of the present application provide a practical distributed voting consensus device comprising: a broadcasting module, configured to broadcast a proposal value corresponding to each node participating in a consensus protocol in a target network to other nodes in the target network, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and makes each node determine whether each node meets a preset propagation and verification requirement according to the number of the received confirmation broadcast messages; the election module is used for electing a leader node in the target network after each node in the target network performs multi-round message interaction according to a preset election algorithm and a re-throwing asynchronous binary consensus protocol instance; and the recovery module is used for constructing a corresponding request broadcast message through each request node in the at least one node if at least one node meets the preset propagation and verification requirements, sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and recovering the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm when the number of the response reply messages is larger than a preset response threshold value, so that all nodes in the target network output a global unified result.
Optionally, in one embodiment of the present application, the broadcasting module includes: a calculating unit, configured to broadcast the proposed value corresponding to each node to other nodes in the target network, perform hash operation on the proposed value received by each node, obtain a hash value corresponding to each node, construct a response broadcast message corresponding to each node according to the hash value, and broadcast the response broadcast message to the other nodes; a construction unit, configured to construct a confirmation broadcast message based on a preset number of identical response broadcast messages when each node receives the response broadcast messages, and broadcast the confirmation broadcast message to the other nodes; and the analysis unit is used for analyzing the propagation condition of the proposal value according to the number of the received confirmation broadcast messages by each node, and dividing each node in the target network according to the propagation condition to obtain a plurality of response nodes and request nodes with different amounts.
Optionally, in one embodiment of the present application, the election module includes: the calling unit is used for calling the preset election algorithm by each node in the target network to generate a globally uniform leading node number; and the consensus unit is used for starting a re-throwing asynchronous binary consensus protocol instance based on the leader node number so as to agree whether the proposal value of the leader node is effectively propagated according to the output result of the re-throwing asynchronous binary consensus protocol instance.
Optionally, in one embodiment of the present application, the recovery module includes: the coding unit is used for coding the proposal value by utilizing each response node in the at least one response node in a preset coding mode to obtain a code word share of the proposal value, constructing the request broadcast message by each request node and sending the request broadcast message to other nodes in the target network; a reply unit, configured to reply to each requesting node by acquiring each node of the request broadcast message and sending a double-share unicast or a single-share unicast according to its own state; and the decoding unit is used for judging the number of the code word shares received by each request node, decoding the code word shares by utilizing the preset online reconstruction algorithm when the number of the code word shares is larger than a preset share threshold value to obtain a value to be output, and outputting the value to be output as a proposal value of the globally unified leader node.
An embodiment of a third aspect of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the practical distributed voting consensus method as described in the embodiments above.
A fourth aspect of the present application provides a computer readable storage medium storing a computer program which when executed by a processor implements a practical distributed voting consensus method as above.
Thus, embodiments of the present application have the following benefits:
according to the embodiment of the application, the proposal value corresponding to each node is broadcasted to other nodes in the target network, so that each node constructs a response broadcast message according to the acquired proposal value, generates a confirmation broadcast message based on the response broadcast message, and sends the confirmation broadcast message to the other nodes, and whether each node meets preset propagation and verification requirements is judged according to the number of the received confirmation broadcast messages; after each node performs multiple rounds of message interaction, electing a leading node in a target network; according to the response node and the request node, three-step message interaction is carried out through the request response structure, the proposal value of the leader node is recovered, and all nodes output global unified results, so that trusted starting is not needed, zero data redundancy expansion and communication load balancing under the conventional condition are realized, the communication pressure of a single sending node is effectively relieved, the delay of a system is reduced, higher robustness and efficiency are achieved, and the method can be used for supporting the construction of protocols or systems such as safe multiparty calculation, quantum block chain resistance and the like. Therefore, the problems that the existing asynchronous distributed voting consensus protocol depends on trusted starting, and has data redundancy expansion, so that the robustness and the universality of the protocol are poor, the communication efficiency and the practicability are low, the resource waste is serious and the like are solved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a flow chart of a practical distributed voting consensus method provided in accordance with an embodiment of the present application;
FIG. 2 is a schematic diagram of a logic architecture of a practical distributed voting consensus method according to an embodiment of the present application;
FIG. 3 is an example diagram of a practical distributed voting consensus device in accordance with an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Wherein, 10-practical distributed voting consensus device, 100-broadcasting module, 200-election module, 300-recovery module, 401-memory, 402-processor, 403-communication interface.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended for the purpose of explaining the present application and are not to be construed as limiting the present application.
A practical distributed voting consensus method, apparatus, device and storage medium according to embodiments of the present application are described below with reference to the accompanying drawings. In view of the above-mentioned problems in the background art, the present application provides a practical distributed voting consensus method, in which a proposal value corresponding to each node is broadcasted to other nodes in a target network, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, and sends the confirmation broadcast message to the other nodes, so as to determine whether each node meets preset propagation and verification requirements according to the number of received confirmation broadcast messages; after each node performs multiple rounds of message interaction, electing a leading node in a target network; according to the response node and the request node, three-step message interaction is carried out through the request response structure, the proposal value of the leader node is recovered, and all nodes output global unified results, so that trusted starting is not needed, zero data redundancy expansion and communication load balancing under the conventional condition are realized, the communication pressure of a single sending node is effectively relieved, the delay of a system is reduced, higher robustness and efficiency are achieved, and the method can be used for supporting the construction of protocols or systems such as safe multiparty calculation, quantum block chain resistance and the like. Therefore, the problems that the existing asynchronous distributed voting consensus protocol depends on trusted starting, and has data redundancy expansion, so that the robustness and the universality of the protocol are poor, the communication efficiency and the practicability are low, the resource waste is serious and the like are solved.
To facilitate an understanding of the practical distributed voting consensus method of the present application by those skilled in the art, the following brief description and description of the hypothetical conditions, the definitions of the variables involved, and the key steps of the present application are presented.
1. Assume the condition:
the entities referred to in this application are nodes: all nodes form a participant of the consensus system together and are responsible for broadcasting self proposal values, electing leading nodes, driving a consensus protocol and outputting globally unified proposal values; the application assumes that the number of nodes in the consensus network is n (n=3f+1, where f is the maximum number of malicious nodes that the system can tolerate), each node being uniquely identified by an integer i, where i e [1, n ]; each node can call a hash function H, an Election algorithm electric, a re-throwing asynchronous binary consensus protocol RABA and an RS error correction code RSCODE, and has all auxiliary inputs required.
2. Variable definition:
the meanings of the variables and each variable referred to in this application are shown in table 1:
TABLE 1
3. The key technology is as follows:
the practical distributed voting consensus method provided by the application abandons a threshold signature technology which is largely used in the existing asynchronous distributed voting consensus protocol, and designs a communication complexity as O (ln) based on RS error correction codes and through a request response mechanism 2 +n 3 ) And ln 2 An asynchronous distributed voting consensus protocol with a term coefficient of only 1, in which global unified proposal value generation needs to go through three stages of broadcasting, electing and recovering.
Specifically, the execution logic and key steps of the practical distributed voting consensus method proposed in the present application are shown in table 2:
TABLE 2
Specifically, fig. 1 is a flowchart of a practical distributed voting consensus method provided in an embodiment of the present application.
As shown in fig. 1, the practical distributed voting consensus method comprises the following steps:
in step S101, the proposal value corresponding to each node participating in the consensus protocol in the target network is broadcasted to other nodes in the target network, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and makes each node determine whether each node meets the preset propagation and verification requirements according to the number of the received confirmation broadcast messages.
In the broadcasting stage, each node participating in the consensus protocol can broadcast the proposal value input by the node to other nodes in the network; each node carries out hash operation on the collected proposal values and constructs response broadcast messages, and then each node can construct confirmation broadcast messages after collecting enough response broadcast messages; and then, each node can judge the transmission condition of each proposal value according to the number of the collected acknowledgement broadcast messages, and can enter an election stage after the proposal values meeting the effective transmission and verification requirements reach a certain number.
Optionally, in one embodiment of the present application, broadcasting a proposal value corresponding to each node participating in a consensus protocol in a target network to other nodes in the target network, so that each node constructs a response broadcast message according to the acquired proposal value, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and makes each node determine whether each node meets preset propagation and verification requirements according to the number of received confirmation broadcast messages, including: broadcasting the proposal value corresponding to each node to other nodes in the target network, carrying out hash operation on the proposal value received by each node to obtain a hash value corresponding to each node, constructing a response broadcast message corresponding to each node according to the hash value, and broadcasting the response broadcast message to the other nodes; when each node receives the same response broadcast messages with preset quantity, constructing a confirmation broadcast message based on the response broadcast messages, and broadcasting the confirmation broadcast message to other nodes; and analyzing the propagation condition of the proposal value according to the number of the received confirmation broadcast messages by each node, and dividing each node in the target network according to the propagation condition to obtain a plurality of response nodes and request nodes with different amounts.
It should be noted that, in the embodiment of the present application, the broadcasting stage mainly includes four steps of original message broadcasting, predicate condition checking, message response broadcasting, and message total amount confirmation, and the specific processes are as follows:
step 1: original message broadcast:
(1) Each node participating in the consensus protocol broadcasts its own input proposal value to other nodes in the network. Specifically, at the beginning of the consensus protocol, node i constructs a proposal value comprising a message type PROPOSE, a node sequence number i and a proposal value v i And broadcast it to all nodes in the system, as follows:
propMsg←Message(PROPOSE,i,v i );
Channel[i,k].Send(propMsg),k∈[1,n].
step 2: predicate condition checking:
(1) After receiving a proposal value from a node j, the node i checks whether the proposal value accords with a predicate condition constraint Q given by an upper layer protocol, and the predicate condition constraint Q is expressed as follows:
result←Q(j,v j ).
if result=false, then (j, v j ) Store into buffer S prop Wait for predicate condition to be satisfied, expressed as follows:
S prop ←S prop ∪{(j,v j )}.
(2) The node i will satisfy (j, v) corresponding to the proposal value of the predicate condition j ) The set of stored proposal values T is expressed as follows:
T[j]←(j,v j ).
(3) Subsequently, node i constructs a response broadcast containing the message type ECHO, node number i, j and Hash of the proposal value (v j ) And broadcast it to all other sections in the system The dots are represented as follows:
echoMsg←Message(ECHO,i,j,Hash(v j ));
Channel[i,k].Send(echoMsg),k∈[1,n].
step 3: message response broadcast:
when a node receives enough response broadcast messages about the same hash value, a confirmation broadcast message is constructed for the value and broadcast to other nodes in the network, as follows:
(1) When node i receives a legitimate response broadcast Message (ECHO, j, j', hash (v) j′ ) After (j', hash (v) j′ ) A response broadcast message count incremented by one, as follows:
D echo [(j′,Hash(v j′ ))]←D echo [(j′,Hash(v j′ ))]+1.
only the first response broadcast message of node j to message source j' is considered a legitimate message.
(2) When the received information (j', hash (v j′ ) When the number of response broadcast messages reaches n-f), the node i constructs an acknowledge broadcast message comprising the message type READY, the node sequence number i, the key value pair (j', hash (v) j′ ) Broadcast it to all other nodes in the system, as follows:
readyMsg←Message(READY,i,j′,Hash(v j′ ));
Channel[i,k].Send(readyMsg),k∈[1,n].
step 4: message total amount confirmation:
after a node receives a certain amount of acknowledgement broadcast information about the same hash value, if the node does not acknowledge the broadcast of the value, the node assists in performing acknowledgement broadcast to accelerate the protocol execution speed, after the node receives enough acknowledgement broadcast information about the same hash value, the node considers that the information is effectively transmitted, and compares the value with a result obtained by hashing a locally stored corresponding proposal value to confirm whether the node obtains the correct original information, and after enough information is effectively transmitted, the node can enter an election stage, which is as follows:
(1) When node i receives a Message (READY, j, j', hash (v) j′ ) After (j', hash (v) j′ ) A confirmation broadcast message count incremented by one, as follows:
D ready [(j′,Hash(v j′ ))]←D ready [(j′,Hash(v j′ ))]+1.
only the first acknowledgment broadcast by node j to message source j' is considered a legitimate message.
(2) When the received information (j', hash (v j′ ) If node i has not performed a confirmation broadcast on the key, constructing the confirmation broadcast and broadcasting to all nodes in the system when the number of confirmation broadcast messages reaches f+1, which is expressed as follows:
readyMsg←Message(READY,i,j′,Hash(v j′ ));
Channel[i,k].Send(readyMsg),k∈[1,n].
(3) When the received information (j', hash (v j′ ) If the number of acknowledgement broadcast messages reaches n-f, the corresponding value in vector W is set to 1, as follows:
W[j′]←1.
(4) Subsequently, node i will acknowledge the Hash value Hash (v j′ ) With a locally stored proposal value T [ j ]']The comparison is shown below:
result←equal(T[j′],(j,Hash(v j′ ))).
if result=false, then T [ j' ] is reset, as follows:
T[j′]←⊥.
(5) If not less than n-f components in the waiting vector W are 1, the node i enters the election stage.
The broadcasting stage ensures that the vector W of all honest nodes eventually agree with at least n-f 1 s, and for each W [ j '] =1, there are at least f+1 proposal value array elements T [ j' ] not equal to T.
Therefore, the embodiment of the application conveys the proposal of each node through four steps of original message broadcasting, predicate condition checking, message response broadcasting and message total quantity confirmation, and provides reliable data basis and guidance for the election of the leader node in the subsequent network.
In step S102, after each node in the target network performs multiple rounds of message interaction according to a preset election algorithm and a re-casting asynchronous binary consensus protocol instance, the leader node in the target network is elected.
After a certain number of proposal values meet the effective transmission and verification requirements, further, the embodiment of the application can enter an election stage, and a globally uniform leader node number is generated by calling an election algorithm by utilizing each node; furthermore, the node starts the re-casting asynchronous binary consensus protocol instance, as shown in fig. 2, so that each node performs multiple rounds of message interaction in the election stage, and whether the proposed value of which node or the proposed value of the leading node should be output is effectively transmitted to achieve consensus is judged, and the embodiment of the application can also decide to enter the recovery stage or repeatedly execute the election stage according to the output result of the re-casting asynchronous binary consensus protocol instance.
Optionally, in one embodiment of the present application, after each node in the target network performs multiple rounds of message interaction according to a preset election algorithm and a re-casting asynchronous binary consensus protocol instance, electing a leader node in the target network includes: each node in the target network invokes a preset election algorithm to generate a globally uniform leader node number; starting a re-throwing asynchronous binary consensus protocol instance based on the leader node number so as to achieve consensus on whether the proposal value of the leader node is effectively propagated according to the output result of the re-throwing asynchronous binary consensus protocol instance.
It should be noted that, the election stage in the embodiment of the present application mainly includes two steps of electing a leader node and receiving a vote by a message, and the specific process is as follows:
step 1: electing a leader node:
(1) The node i calls an Election algorithm, generates a globally unified leader node number k, and is expressed as follows:
k←Election().
step 2: message reception voting:
the node starts a re-throwing asynchronous binary consensus protocol instance aiming at the leader node number, and consensus is achieved on whether the proposal value of the leader node is effectively transmitted. If the example outputs 1, representing that the proposal value is effectively transmitted to all nodes finally and becomes a globally unified final output value, and each node enters a recovery stage; if the instance outputs 0, each node reselects the leading node, and the specific implementation process is as follows:
(1) Node i starts restarting asynchronous binary consensus protocol instance RABA k Propose, if W [ k ]]=1 then inputs 1, indicating that the message is effectively conveyed in view of the node, otherwise inputs 0, as follows:
IFW[k]=1THEN value←1ELSE value←0;
RABA k .Propose(k,value).
(2) When the input is 0, if the corresponding proposal value completes valid transmission (wk=1) before the end of the re-casting asynchronous binary consensus protocol, node i may re-input 1 as follows:
RABA k .Repropose(k,1).
(3) Node i waits for the re-jettisonable asynchronous binary consensus protocol instance output, if the output value is 0 (i.e. 0+.RABA) k Decode ()), then node i repeats the election phase; if the output value is 1 (i.e. 1+.RABA) k Decode ()), node i enters the recovery phase.
In the embodiment of the application, the output representative node of the re-throwing asynchronous binary consensus protocol can effectively convey whether the message corresponding to the current election result is consensus or not, so that all honest nodes can be ensured to enter the same stage completely and consistently, the election stage ensures that the number of rounds carried out in the stage is expected to be constant, and the nodes in the system can enter the recovery stage rapidly. Under the conventional condition, the node only needs to execute the broadcasting stage and the election stage of the embodiment of the application, so that the delay of the system can be effectively reduced.
In step S103, if at least one node meets the preset propagation and verification requirements, constructing a corresponding request broadcast message by each request node in the at least one node, and sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and when the number of the response reply messages is greater than a preset response threshold, restoring the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm, so that all nodes in the target network output a global unified result.
After entering a recovery stage, the embodiment of the application can obtain a codeword share by using an RS error correction code proposal value for the nodes which pass the verification in a broadcasting stage, and the nodes which do not pass the verification construct a request broadcast message and send the request broadcast message to other nodes in the network; a node receiving the request broadcast message sends a double-share unicast or single-share unicast reply request node according to the state of the node; the request node collects the code word shares and adjusts the self state according to the collection condition of the corresponding shares; in addition, after receiving enough code word shares, the requesting node can decode the proposed value by using an online reconstruction algorithm of the RS error correction code, so that in a recovery stage, the embodiment of the application can perform three-step message interaction on the node which does not acquire the value to be output through the request response structure, recover the proposed value of the leading node, and finally all the nodes output a global unified result.
Therefore, the embodiment of the application realizes the balance of communication load by cooperatively responding each recovery request by other nodes in a coding mode, and effectively relieves the communication pressure of a single sending node.
Optionally, in an embodiment of the present application, if at least one node meets the preset propagation and verification requirements, constructing a corresponding request broadcast message by each requesting node in the at least one node, and sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and when the number of the response reply messages is greater than the preset response threshold, recovering the proposal value of the leader node based on the response reply message and the preset online reconstruction algorithm, including: coding the proposal value by utilizing each response node in at least one response node through a preset coding mode to obtain a code word share of the proposal value, constructing a request broadcast message by each request node, and sending the request broadcast message to other nodes in a target network; each node obtaining the request broadcast message sends double-share unicast or single-share unicast according to the state of the node so as to reply each request node; judging the number of the code word shares received by each request node, decoding the code word shares by using a preset online reconstruction algorithm when the number of the code word shares is larger than a preset share threshold value to obtain a value to be output, and outputting the value to be output as a proposal value of a globally unified leader node.
It should be noted that, the recovery stage in the embodiment of the present application mainly includes five steps of step request construction, share sending, share collecting, local decoding, and decision output, and the specific implementation process is as follows:
step 1: request construction:
in the step, the node waits for the proposal value of the leader node to be effectively transmitted locally, judges that the node belongs to a request node or a response node according to the execution result of the value when the total amount of the messages in the broadcasting stage is confirmed, if the node belongs to the request node, constructs a request broadcasting message and broadcasts the request broadcasting message to other nodes in the network; if the code belongs to the responding node, confirming the value to be output in advance, encoding the proposal value by using an RS error correction code, correspondingly obtaining code words one by one as the share of each node, and waiting for the request broadcast transmission, wherein the specific process is as follows:
(1) When the re-throwing asynchronous binary consensus protocol instance RABA k After outputting the value 1, if the node is local W [ k ]]=0, then the thread is blocked until W [ k ]]=1;
(2) If T [ k ] = T, the node constructs a REQUEST broadcast message including the message type REQUEST and the sequence number i, and broadcasts the REQUEST broadcast message to all nodes in the system, which is expressed as follows:
requestMsg←Message(REQUEST,i);
Channel[i,k].Send(requestMsg),k∈[1,n].
(3) If T [ k ] is not equal to T, slicing T [ k ] into a vector coef of f+1 components through an RS code, encoding the vector coef into n codeword shares through the RS code, and simultaneously assigning a value v' to be output as T [ k ], and updating the state of the vector coef to be waited for query, wherein the method is represented as follows:
coef←SPLIT(T[k],f+1);
(d 1 ,d 2 ,...,d n )←RSCODE.Encode(coef,n,f+1);
v′←T[k];
Ans←1.
The subsequent share sending step and share collecting step are performed concurrently by node i.
Step 2: share sending:
the step can construct a double-share unicast message which comprises the corresponding share of the response node and the corresponding share of the request node to reply to the request node after the response node receives the request broadcast; after receiving the request broadcast messages of other nodes, the request node which receives enough self-shares constructs a single-share unicast message containing the self-shares and replies the single-share unicast message to the request node.
(1) When the response node i receives the request broadcast message from the node j, if ans=0, the request is put aside until ans=1.
(2) If T [ k ]]If not, node i constructs a double unicast including message type DRELPY, sequence number i and self share d calculated in request construction stage i Share with other party d j The transmission to the requesting node j is expressed as follows:
dreplyMsg←Message(DREPLY,i,d i ,d j );
Channel[i,j].Send(dreplyMsg).
(3) If T [ k ]]When the node i constructs a single share unicast, the unicast comprises a message type SRELPY, a sequence number i and a share obtained in a share collecting stageThe transmission to the requesting node j is expressed as follows:
Channel[i,j].Send(requestMsg).
step 3: share collection:
in the share collecting process, after receiving the single share unicast or the double share unicast, the request node stores the sender share contained in the unicast into the share set, and counts the number of self shares from the double share unicast at the same time, so as to construct the single share unicast in the share sending step and reply to other request nodes.
(1) When the requesting node i receives a legal double-share unicast Message (DREPLY, j, d) from node j j ,d i ) Then, will be related to d i By one, store the shares of node j in the share set S codewords The expression is as follows:
D dreply [d i ]←D direply [d i ]+1;
S codewords ←S codewords ∪{d j }.
node i considers the first double unicast of node j as a legitimate message only when T k = ∈t.
(2) When the received d is the same i When the number of (1) reaches f+1, node i will noteUpdate self status to wait for query:
Ans←1.
(3) When node i receives a legal single share unicast from node jThereafter, the shares of node j are stored in the share set S codewords The expression is as follows:
node i only considers the first single-share unicast of node j as a legitimate message when T k = ∈t.
Step 4: and (3) local decoding:
in the process, after receiving enough codeword shares, the requesting node can decode by using an on-line reconstruction algorithm of the RS error correction code to obtain a value to be output.
(1) When |S codewords When the I is more than or equal to 2f+1, the decoding fault-tolerant parameter e is calculated and expressed as follows:
e←|S codewords |-(2f+1).
(2) Assume a set of shares S codewords In e errors, invoking an RS code decoding algorithm to calculate an f-degree decoding polynomial poly' containing f+1 components, which is expressed as follows:
poly′←RSCODE.Decode(S codewords ,f+1,e).
(3) Verifying a set of shares S codewords Whether the element in (c) is on the decoding polynomial poly 'and the total number of correct shares that satisfy poly' is noted as cCount. The magnitude relation between the judgment and the cCount and the threshold value 2f+1 is expressed as follows:
result←cCount≥2f+1.
If result=false, the thread is blocked until S codewords Repeating (1) to (3) after new elements are included.
If result=true, the node merges the coefficients of the decoding polynomial poly 'into a decoding polynomial coefficient vector coef', and assigns the value v 'to be output as coef', expressed as follows:
coef′←MERGE(poly′);
v′←coef′.
step 5: determining output:
and waiting for the node to output the value to be output as a globally uniform proposal value if the value v' to be output is not equal to T.
It can be understood that, in the embodiment of the application, the RS error correction code online reconstruction algorithm can be integrated into the voting consensus protocol flow, so as to design a broadcasting stage without redundant expansion and a flexibly selectable recovery stage, thereby ensuring the security of the protocol without using any signature algorithm, and based on the assumption of an additional election algorithm, the protocol itself does not need the trusted establishment and initialization of a key; the problem of data redundancy expansion is solved, and a brand new proposed data recovery algorithm is designed based on a lower-layer RS error correction code algorithm, so that zero data redundancy expansion under the conventional condition is realized; in addition, the embodiment of the application solves the problem that the existing asynchronous distributed voting consensus application scene is limited, and by virtue of the advantages of no signature and high communication efficiency, higher robustness and efficiency are realized, so that the method and the device can be used for supporting the construction of protocols or systems such as safe multiparty calculation and quantum block chain resistance.
According to the practical distributed voting consensus method provided by the embodiment of the application, the proposal value corresponding to each node is broadcasted to other nodes in the target network, so that each node constructs a response broadcast message according to the acquired proposal value, generates a confirmation broadcast message based on the response broadcast message, and sends the confirmation broadcast message to the other nodes so as to judge whether each node meets preset propagation and verification requirements according to the number of the received confirmation broadcast messages; after each node performs multiple rounds of message interaction, electing a leading node in a target network; according to the response node and the request node, three-step message interaction is carried out through the request response structure, the proposal value of the leader node is recovered, and all nodes output global unified results, so that trusted starting is not needed, zero data redundancy expansion and communication load balancing under the conventional condition are realized, the communication pressure of a single sending node is effectively relieved, the delay of a system is reduced, higher robustness and efficiency are achieved, and the method can be used for supporting the construction of protocols or systems such as safe multiparty calculation, quantum block chain resistance and the like.
Next, a practical distributed voting consensus device proposed according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 3 is a block schematic diagram of a practical distributed voting consensus device in accordance with an embodiment of the present application.
As shown in fig. 3, the practical distributed voting consensus device 10 includes: a broadcast module 100, an election module 200, and a recovery module 300.
The broadcasting module 100 is configured to broadcast a proposal value corresponding to each node participating in the consensus protocol in the target network to other nodes in the target network, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and makes each node determine whether each node meets a preset propagation and verification requirement according to the number of the received confirmation broadcast messages.
And the election module 200 is configured to elect a leader node in the target network after each node in the target network performs multiple rounds of message interaction according to a preset election algorithm and a re-throwable asynchronous binary consensus protocol instance.
And the recovery module 300 is configured to, if at least one node meets the preset propagation and verification requirements, construct a corresponding request broadcast message through each request node in the at least one node, send the request broadcast message to each other node in the target network, control each other node to generate a response reply message, and recover the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm when the number of the response reply messages is greater than a preset response threshold, so that all nodes in the target network output a global unified result.
Optionally, in one embodiment of the present application, the broadcasting module 100 includes: a calculation unit, a construction unit and an analysis unit.
The computing unit is used for broadcasting the proposal value corresponding to each node to other nodes in the target network, carrying out hash operation on the proposal value received by each node to obtain a hash value corresponding to each node, constructing a response broadcast message corresponding to each node according to the hash value, and broadcasting the response broadcast message to the other nodes.
And a construction unit for constructing an acknowledgement broadcasting message based on the response broadcasting message and broadcasting the acknowledgement broadcasting message to other nodes when each node receives a preset number of identical response broadcasting messages.
And the analysis unit is used for analyzing the propagation condition of the proposal value according to the number of the received confirmation broadcast messages by each node, and dividing each node in the target network according to the propagation condition to obtain a plurality of response nodes and request nodes with different amounts.
Optionally, in one embodiment of the present application, the election module 200 includes: a calling unit and a consensus unit.
The calling unit is used for calling a preset election algorithm by each node in the target network to generate a globally uniform leader node number.
And the consensus unit is used for starting the re-throwing asynchronous binary consensus protocol instance based on the leader node number so as to agree whether the proposal value of the leader node is effectively propagated according to the output result of the re-throwing asynchronous binary consensus protocol instance.
Optionally, in one embodiment of the present application, the recovery module 300 includes: an encoding unit, a restoring unit and a decoding unit.
The coding unit is used for coding the proposal value by utilizing each response node in the at least one response node in a preset coding mode to obtain a code word share of the proposal value, constructing a request broadcast message by each request node, and sending the request broadcast message to other nodes in the target network.
And the replying unit is used for sending double-share unicast or single-share unicast according to the self state by each node obtaining the request broadcast message so as to reply each request node.
And the decoding unit is used for judging the number of the code word shares received by each request node, decoding the code word shares by utilizing a preset online reconstruction algorithm when the number of the code word shares is larger than a preset share threshold value to obtain a decoded value to be output, and outputting the decoded value to be output as a proposal value of a globally unified leader node.
It should be noted that the foregoing explanation of the embodiment of the practical distributed voting consensus method is also applicable to the practical distributed voting consensus device of this embodiment, and will not be repeated herein.
According to the practical distributed voting consensus device provided by the embodiment of the application, by broadcasting the proposal value corresponding to each node to other nodes in a target network, each node constructs a response broadcast message according to the acquired proposal value, generates a confirmation broadcast message based on the response broadcast message, and sends the confirmation broadcast message to the other nodes so as to judge whether each node meets preset propagation and verification requirements according to the number of the received confirmation broadcast messages; after each node performs multiple rounds of message interaction, electing a leading node in a target network; according to the response node and the request node, three-step message interaction is carried out through the request response structure, the proposal value of the leader node is recovered, and all nodes output global unified results, so that trusted starting is not needed, zero data redundancy expansion and communication load balancing under the conventional condition are realized, the communication pressure of a single sending node is effectively relieved, the delay of a system is reduced, higher robustness and efficiency are achieved, and the method can be used for supporting the construction of protocols or systems such as safe multiparty calculation, quantum block chain resistance and the like.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include:
memory 401, processor 402, and a computer program stored on memory 401 and executable on processor 402.
The processor 402, when executing the program, implements the practical distributed voting consensus method provided in the above-described embodiments.
Further, the electronic device further includes:
a communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing a computer program executable on the processor 402.
Memory 401 may comprise high-speed RAM memory or may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 401, the processor 402, and the communication interface 403 are implemented independently, the communication interface 403, the memory 401, and the processor 402 may be connected to each other by a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, abbreviated ISA) bus, an external device interconnect (Peripheral Component, abbreviated PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a chip, the memory 401, the processor 402, and the communication interface 403 may complete communication with each other through internal interfaces.
The processor 402 may be a central processing unit (Central Processing Unit, abbreviated as CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a practical distributed voting consensus method as described above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "N" is at least two, such as two, three, etc., unless explicitly defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer cartridge (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. Although embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (10)

1. A method of practical distributed voting consensus, comprising the steps of:
broadcasting proposal values corresponding to each node participating in a consensus protocol in a target network to other nodes in the target network, so that each node constructs a response broadcast message according to the acquired proposal values, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and judges whether each node meets preset propagation and verification requirements according to the number of the received confirmation broadcast messages;
after each node in the target network performs multi-round message interaction according to a preset election algorithm and a re-throwing asynchronous binary consensus protocol instance, electing a leading node in the target network;
If at least one node meets the preset propagation and verification requirements, constructing a corresponding request broadcast message through each request node in the at least one node, sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and restoring the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm when the number of the response reply messages is larger than a preset response threshold value, so that all nodes in the target network output a global unified result.
2. The method according to claim 1, wherein broadcasting the proposal value corresponding to each node participating in the consensus protocol in the target network to other nodes in the target network, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, and sends the confirmation broadcast message to the other nodes, and making each node determine whether the each node meets a preset propagation and verification requirement according to the number of received confirmation broadcast messages, includes:
Broadcasting the proposal value corresponding to each node to other nodes in the target network, carrying out hash operation on the proposal value received by each node to obtain a hash value corresponding to each node, constructing a response broadcast message corresponding to each node according to the hash value, and broadcasting the response broadcast message to the other nodes;
when each node receives the same response broadcast messages with preset quantity, constructing a confirmation broadcast message based on the response broadcast messages, and broadcasting the confirmation broadcast message to other nodes;
analyzing the propagation condition of the proposal value according to the number of the received confirmation broadcast messages by each node, and dividing each node in the target network according to the propagation condition to obtain a plurality of response nodes and request nodes with different amounts.
3. The method according to claim 1, wherein after each node in the target network performs multiple rounds of message interaction according to a preset election algorithm and a re-jettisonable asynchronous binary consensus protocol instance, electing a leader node in the target network includes:
each node in the target network invokes the preset election algorithm to generate a globally uniform leader node number;
And starting a re-throwing asynchronous binary consensus protocol instance based on the leader node number so as to agree whether the proposal value of the leader node is effectively propagated according to the output result of the re-throwing asynchronous binary consensus protocol instance.
4. The method according to claim 2, wherein if at least one node satisfies the preset propagation and verification requirement, constructing a corresponding request broadcast message by each requesting node in the at least one node, and sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and when the number of the response reply messages is greater than a preset response threshold, recovering the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm, including:
coding the proposal value by utilizing each response node in the at least one response node through a preset coding mode to obtain a code word share of the proposal value, constructing the request broadcast message by each request node, and sending the request broadcast message to other nodes in the target network;
Each node which acquires the request broadcast message sends double-share unicast or single-share unicast according to the state of the node so as to reply to each request node;
judging the number of the code word shares received by each request node, decoding the code word shares by utilizing the preset online reconstruction algorithm when the number of the code word shares is larger than a preset share threshold value to obtain a value to be output, and outputting the value to be output as a proposal value of the globally unified leader node.
5. A practical distributed voting consensus device, comprising:
a broadcasting module, configured to broadcast a proposal value corresponding to each node participating in a consensus protocol in a target network to other nodes in the target network, so that each node constructs a response broadcast message according to the obtained proposal value, generates a confirmation broadcast message based on the response broadcast message, sends the confirmation broadcast message to the other nodes, and makes each node determine whether each node meets a preset propagation and verification requirement according to the number of the received confirmation broadcast messages;
the election module is used for electing a leader node in the target network after each node in the target network performs multi-round message interaction according to a preset election algorithm and a re-throwing asynchronous binary consensus protocol instance;
And the recovery module is used for constructing a corresponding request broadcast message through each request node in the at least one node if at least one node meets the preset propagation and verification requirements, sending the request broadcast message to each other node in the target network, controlling each other node to generate a response reply message, and recovering the proposal value of the leader node based on the response reply message and a preset online reconstruction algorithm when the number of the response reply messages is larger than a preset response threshold value, so that all nodes in the target network output a global unified result.
6. The apparatus of claim 5, wherein the broadcast module comprises:
a calculating unit, configured to broadcast the proposed value corresponding to each node to other nodes in the target network, perform hash operation on the proposed value received by each node, obtain a hash value corresponding to each node, construct a response broadcast message corresponding to each node according to the hash value, and broadcast the response broadcast message to the other nodes;
a construction unit, configured to construct a confirmation broadcast message based on a preset number of identical response broadcast messages when each node receives the response broadcast messages, and broadcast the confirmation broadcast message to the other nodes;
And the analysis unit is used for analyzing the propagation condition of the proposal value according to the number of the received confirmation broadcast messages by each node, and dividing each node in the target network according to the propagation condition to obtain a plurality of response nodes and request nodes with different amounts.
7. The apparatus of claim 5, wherein the election module comprises:
the calling unit is used for calling the preset election algorithm by each node in the target network to generate a globally uniform leading node number;
and the consensus unit is used for starting a re-throwing asynchronous binary consensus protocol instance based on the leader node number so as to agree whether the proposal value of the leader node is effectively propagated according to the output result of the re-throwing asynchronous binary consensus protocol instance.
8. The apparatus of claim 6, wherein the recovery module comprises:
the coding unit is used for coding the proposal value by utilizing each response node in the at least one response node in a preset coding mode to obtain a code word share of the proposal value, constructing the request broadcast message by each request node and sending the request broadcast message to other nodes in the target network;
A reply unit, configured to reply to each requesting node by acquiring each node of the request broadcast message and sending a double-share unicast or a single-share unicast according to its own state;
and the decoding unit is used for judging the number of the code word shares received by each request node, decoding the code word shares by utilizing the preset online reconstruction algorithm when the number of the code word shares is larger than a preset share threshold value to obtain a value to be output, and outputting the value to be output as a proposal value of the globally unified leader node.
9. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the practical distributed voting consensus method as claimed in any one of claims 1 to 4.
10. A computer readable storage medium having stored thereon a computer program, wherein the program is executed by a processor for implementing a practical distributed voting consensus method according to any one of claims 1-4.
CN202311280432.8A 2023-09-28 2023-09-28 Practical distributed voting consensus method, device, equipment and storage medium Active CN117354318B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311280432.8A CN117354318B (en) 2023-09-28 2023-09-28 Practical distributed voting consensus method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311280432.8A CN117354318B (en) 2023-09-28 2023-09-28 Practical distributed voting consensus method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117354318A true CN117354318A (en) 2024-01-05
CN117354318B CN117354318B (en) 2024-04-05

Family

ID=89370370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311280432.8A Active CN117354318B (en) 2023-09-28 2023-09-28 Practical distributed voting consensus method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117354318B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329051A (en) * 2020-10-23 2021-02-05 中国科学院数据与通信保护研究教育中心 Safe and efficient consensus mechanism implementation method and system
KR20210061243A (en) * 2019-11-19 2021-05-27 한양대학교 산학협력단 Blockchain consensus method based on variable quorum, blockcahin node device and program using the same
CN113794694A (en) * 2021-08-25 2021-12-14 清华大学 Binary consensus method and device based on reliable broadcast
CN114928473A (en) * 2022-04-22 2022-08-19 北京航空航天大学 Asynchronous consensus method and system adapting to dynamic change of transaction amount
WO2023035065A1 (en) * 2021-09-07 2023-03-16 Jalalzai Mohammad Methods and systems for fast consensus within distributed ledgers
CN116582543A (en) * 2023-04-26 2023-08-11 浙江大学 Consensus method based on slice

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210061243A (en) * 2019-11-19 2021-05-27 한양대학교 산학협력단 Blockchain consensus method based on variable quorum, blockcahin node device and program using the same
CN112329051A (en) * 2020-10-23 2021-02-05 中国科学院数据与通信保护研究教育中心 Safe and efficient consensus mechanism implementation method and system
CN113794694A (en) * 2021-08-25 2021-12-14 清华大学 Binary consensus method and device based on reliable broadcast
WO2023035065A1 (en) * 2021-09-07 2023-03-16 Jalalzai Mohammad Methods and systems for fast consensus within distributed ledgers
CN114928473A (en) * 2022-04-22 2022-08-19 北京航空航天大学 Asynchronous consensus method and system adapting to dynamic change of transaction amount
CN116582543A (en) * 2023-04-26 2023-08-11 浙江大学 Consensus method based on slice

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘懿中、刘建伟、张宗洋等: "区块链共识机制研究综述", 《密码学报》, 15 August 2019 (2019-08-15), pages 397 - 431 *

Also Published As

Publication number Publication date
CN117354318B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN108769150B (en) Data processing method and device of block chain network, cluster node and storage medium
CN111522800B (en) Block chain consensus method, node and system of badger Byzantine fault-tolerant consensus mechanism
CN111049895B (en) Improved PBFT consensus method based on ISM
US6754845B2 (en) Method of achieving optimistic multiple processor agreement in potentially asynchronous networks
CN111934889B (en) Key generation method, signature and signature verification method, device, equipment and medium
US20190251007A1 (en) Byzantine agreement in open networks
CN110022216B (en) Efficient asynchronous Byzantine consensus method with low communication complexity and network communication platform
Wu et al. Distributed error correction coding scheme for low storage blockchain systems
US20190258610A1 (en) Byzantine fault-tolerant algorithm with four steps
He et al. An improvement of consensus fault tolerant algorithm applied to alliance chain
CN111045843B (en) Distributed data processing method with fault tolerance capability
CN115134086A (en) Method and device for dynamic committee secret sharing and updating of asynchronous network
CN113923093B (en) Novel Bayesian-preemption fault-tolerant consensus method based on trusted execution environment
CN117354318B (en) Practical distributed voting consensus method, device, equipment and storage medium
CN114140233A (en) Safe cross-slice view conversion method and device for partitioned block chain
Abraham et al. Communication and round efficient parallel broadcast protocols
CN114928473B (en) Asynchronous consensus method and system adapting to dynamic change of transaction amount
CN113852470A (en) Proposal broadcasting method, device, equipment and storage medium
CN111064813B (en) Method and device for synchronizing processing messages during block chain consensus processing
CN115378788B (en) Block chain performance self-adaptive optimization method based on hierarchical consensus and reinforcement learning
CN114696963B (en) High-reliability communication system for network-on-chip of multi-core processor system
CN116232893A (en) Consensus method and device of distributed system, electronic equipment and storage medium
CN115348278A (en) Distributed storage method of block chain
CN111818152B (en) Leader election consensus method based on distributed network
Patra et al. Constant phase efficient protocols for secure message transmission in directed networks

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