A binary consensus method and device based on threshold signature with re-voting

By adopting a re-voting binary consensus method based on threshold signatures in a distributed system, the problem of low efficiency of binary consensus in the existing technology is solved, achieving consensus quickly and improving system performance.

CN113783946BActive Publication Date: 2024-10-15SHANDONG INST OF BLOCKCHAIN +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110984380.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-25
Publication Date
2024-10-15
Estimated Expiration
2041-08-25

AI Technical Summary

Technical Problem

The execution efficiency of binary consensus in the existing technology is low, resulting in poor performance of distributed systems in reaching consensus in an asynchronous environment.

Method used

The re-voting binary consensus method based on threshold signatures is used to quickly determine the consensus results by broadcasting voting values ​​and threshold signature shares among consensus nodes in the distributed system, thereby improving the system's processing capabilities.

Benefits of technology

It improves the consensus efficiency in the distributed system, enables each node to quickly reach consensus, and improves the performance and processing capabilities of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113783946B_ABST
    Figure CN113783946B_ABST
Patent Text Reader

Abstract

In an embodiment of the present application, a threshold signature-based re-voting binary consensus method and device are applied to any consensus node in a distributed system, and the method includes: determining an initial voting value for any consensus proposal; when the initial voting value is other voting values ​​and meets a preset condition, re-determining the initial voting value as a priority voting value; threshold-signing the initial voting value based on a local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1; broadcasting a first-round consensus message carrying the initial voting value and the threshold signature share; determining the consensus status of the consensus proposal based on the first-round consensus message broadcast by other consensus nodes. By adopting the above method, each consensus node in the distributed system can have fewer consensus steps in each round of consensus, so consensus can be reached quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a threshold signature-based re-voting binary consensus method and device. Background Art

[0002] Binary consensus is the main component of the Byzantine Fault Tolerance (Byzantine consensus, BFT). Currently known asynchronous Byzantine consensus protocols all directly or indirectly rely on binary consensus, which enables distributed systems to reach consensus in an asynchronous environment. At the same time, binary consensus can also be used to construct state machine replication, and then use state machine replication to establish the foundation for distributed fault-tolerant systems. In addition, binary consensus can also be applied in technical fields such as databases. Therefore, the study of binary consensus is an important research direction in the industry. Summary of the invention

[0003] The present application provides a consensus method in a distributed system to solve the problem of low consensus efficiency in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a threshold signature-based re-voting binary consensus method is proposed, which is applied to any consensus node in a distributed system, wherein the distributed system includes at least N consensus nodes, where N≥3f+1, and f is a preset positive integer. The method includes:

[0005] Determine the initial voting value for any consensus proposal; the voting value includes the priority voting value and other voting values, and the initial voting value is the priority voting value or other voting value;

[0006] If the initial voting value is another voting value and meets a preset condition, re-determine the initial voting value as the priority voting value;

[0007] Performing a threshold signature on the initial voting value based on the local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1;

[0008] Broadcast the first round consensus message with the voting value and the threshold signature share corresponding to the voting value;

[0009] The consensus status of the consensus proposal is determined based on the first-round consensus message broadcast by other consensus nodes.

[0010] According to a second aspect of an embodiment of the present application, a threshold signature-based re-voting binary consensus device is applied to any consensus node in a distributed system, wherein the distributed system includes at least N consensus nodes, where N≥3f+1, and f is a preset positive integer, and the device includes:

[0011] A processing module, configured to determine an initial voting value for any consensus proposal; wherein the voting value includes a priority voting value and other voting values, and the initial voting value is the priority voting value or other voting value; when the initial voting value is other voting values ​​and meets a preset condition, the initial voting value is re-determined as the priority voting value;

[0012] Performing a threshold signature on the initial voting value based on the local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1;

[0013] A communication module, used to broadcast a first-round consensus message carrying a voting value and a threshold signature share corresponding to the voting value;

[0014] The processing module is further used to determine the consensus status of the proposal to be agreed upon based on the first round of consensus messages broadcast by other consensus nodes.

[0015] By adopting the consensus method provided in the embodiments of the present application, each consensus node can quickly reach a consensus on the consensus proposal by broadcasting the voting value and the threshold signature share, thereby improving the processing capacity of the distributed system. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0017] Figure 1a A schematic diagram of the structure of a consensus node maintenance consensus instance in an embodiment of this specification;

[0018] Figure 1b A schematic diagram of the structure of another consensus node maintenance consensus instance in an embodiment of this specification;

[0019] Figure 2 A flowchart of a binary consensus method with re-voting based on threshold signatures according to an embodiment of this specification;

[0020] Figure 3 A schematic diagram of a process of broadcasting a consensus message according to an embodiment of this specification;

[0021] Figure 4 A schematic diagram of another re-voting binary consensus method based on threshold signatures according to an embodiment of this specification;

[0022] Figure 5 This is a schematic diagram of the structure of a threshold signature-based re-voting binary consensus device according to an embodiment of this specification;

[0023] Figure 6 It is a structural diagram of a device used to configure the embodiment of the present specification. DETAILED DESCRIPTION

[0024] Binary consensus is the main component of the Byzantine Fault Tolerance (Byzantine consensus, BFT). Currently known asynchronous Byzantine consensus protocols all directly or indirectly rely on binary consensus, which can enable distributed systems such as blockchain to reach consensus in an asynchronous environment. At the same time, binary consensus can also be used to construct state machine replication, and then use state machine replication to establish the foundation for distributed fault-tolerant systems. In addition, binary consensus can also be applied in technical fields such as databases.

[0025] In binary consensus, binary refers to two values, usually represented by 0 and 1. Each node in a distributed system can reach a consensus on one of the two values, and this value often has important practical significance for the distributed system. Taking the application of binary consensus in blockchain network as an example, the data of each node in the blockchain network needs to be consistent. If the binary consensus method is used to ensure the data consistency of each node in the blockchain, then when each node reaches a consensus of 1 for a batch of transactions, each node stores the data. When each node reaches a consensus of 0 for a batch of transactions, each node does not store the data, thus ensuring the consistency of the data stored by each node. It is understandable that if the execution efficiency of binary consensus is higher, each node can quickly reach a consensus on a value in the binary, and the performance of the distributed system will be better. Therefore, how to improve the efficiency of binary consensus is an important research direction in the industry.

[0026] In response to the above problems, an embodiment of the present application provides a threshold signature-based re-voting binary consensus method, which is applied to any consensus node in a distributed system. The node broadcasts a consensus message including a voting value and a threshold signature share, and determines the consensus result based on the consensus messages received from other consensus nodes, so that each node in the system can reach a consensus.

[0027] The solutions in the embodiments of the present application can be implemented using various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0028] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0029] In this specification, the consensus proposal can be understood as data sent by any consensus node, and it is hoped that other consensus nodes will participate in the consensus on the data, and the voting value is used to represent the consensus opinion of each consensus node on the data, where the voting value includes two values: priority voting value and other voting value, that is, each consensus node can have two consensus opinions on the consensus proposal. In one embodiment, the priority voting value and the other voting value can be represented by 1 and 0 respectively, and in other embodiments, they can also be represented by other forms and symbols. This specification does not limit the specific form of the priority voting value and other voting values, as long as they can be used to distinguish the priority voting value from other voting values.

[0030] Taking the blockchain scenario as an example, a consensus proposal can be a batch of transactions obtained by any consensus node from the local transaction pool, and it is hoped that other consensus nodes can receive and store the batch of transactions, and the voting value is used to indicate whether each consensus node agrees to store the consensus proposal.

[0031] In other application scenarios, consensus proposals and voting values ​​may have other different practical meanings, which are not limited in this specification.

[0032] like Figure 1a As shown in the figure, it is a schematic diagram of a binary consensus instance to be executed by any consensus node in a distributed system. For example, there are N consensus nodes in the distributed system. For the convenience of explanation, any consensus node is called a target node. The target node in the distributed system will use the binary consensus method with re-voting proposed in this description to determine the consensus result of the consensus proposal proposed by the node for each consensus node (including itself); as shown in the figure, RABA 1 -RABA N , respectively represent the schematic diagram of the re-voting binary consensus method RABA for N consensus proposals, RABA 1 This is an illustration of how the target node processes the consensus proposal proposed by consensus node 1 using the threshold signature-based re-voting binary consensus method proposed in this specification, RABA 2 This is an illustration of how the target node processes the consensus proposal proposed by consensus node 2 using the threshold signature-based re-voting binary consensus method proposed in this specification, and so on.

[0033] As can be seen from the schematic diagram, when the target node reaches consensus on each proposal to be agreed upon, it will determine an initial voting value (0 or 1), and ultimately the threshold signature-based re-voting binary consensus method proposed in this description will also obtain a consensus result (0 or 1) for the proposal to be agreed upon.

[0034] like Figure 2As shown, based on the above description, this specification proposes a re-voting binary consensus method based on threshold signatures. The distributed system includes at least N consensus nodes. The consensus node refers to the node participating in the consensus process. It can be understood that there are usually other nodes that do not participate in the consensus in the distributed system. These nodes only receive and store the consensus results of the consensus node without participating in the consensus process; in addition, when there are too many malicious nodes or Byzantine nodes in the system, any consensus method cannot ensure that the consensus nodes in the system reach a consensus. Therefore, this specification stipulates that the distributed system includes N consensus nodes, and f malicious nodes are allowed to exist among the N consensus nodes, N≥3f+1, and both f and N are integers greater than or equal to 0. For example, when N is 4, f can only be 1, and when N is 8, f is 2 or 1. In this specification, the f value is pre-set to any positive integer corresponding to the N value. For example, when N is 8, f can be set to 2. The method proposed in this specification is applied to any correct node among the multiple consensus nodes. It can be understood that in the distributed system proposed in this specification, there is no distinction between primary and secondary nodes, and each consensus node executes the following method asynchronously. When the target node obtains a consensus result for a consensus proposal proposed by any consensus node, other correct consensus nodes will eventually obtain the same consensus result for the consensus proposal. The distributed system can be a blockchain network or other distributed systems, and this specification does not limit this.

[0035] The method includes:

[0036] S201, determining the initial voting value for any consensus proposal;

[0037] S202, when the initial voting value is other voting values ​​and meets a preset condition, re-determine the initial voting value as a priority voting value;

[0038] In this specification, voting values ​​include priority voting values ​​and other voting values. The initial voting value is the priority voting value or other voting values. This specification proposes setting one of the voting values ​​as the priority voting value, that is, it is hoped that each consensus node will tend to use the priority voting value to reach a consensus. In a specific example, 0 and 1 can be used to represent the priority voting value and other voting values ​​respectively, where the priority voting value can be either 1 or 0. The following description will take the priority voting value as 1 and the other voting value as 0 as an example.

[0039] According to the above Figure 1a , and for Figure 1a As can be seen from the description, the target node will determine the consensus result for each consensus node’s pending consensus proposal. Figure 2 What is described is the consensus process that the target node has to perform for each consensus proposal.

[0040] In S201, the initial voting value can be determined according to different data in different application scenarios. The following is an example of the blockchain scenario to illustrate the method of determining the initial voting value of the target node: in the blockchain network, each consensus node can broadcast the consensus proposal based on the reliable broadcast protocol RBC, and can determine the initial voting value for the consensus proposal based on the situation of receiving the consensus proposal. In the blockchain network, the target node can randomly obtain a preset number of transactions from the local transaction pool, or give priority to obtaining the earlier stored preset number of transactions in the order of transaction storage. It can be understood that since each consensus node will receive transactions requested by the client, each consensus node can maintain its own transaction pool locally. After obtaining the transaction, the target node can package the obtained transaction into the consensus proposal for this time. After obtaining the local consensus proposal, the target node can broadcast the local consensus proposal to other consensus nodes based on the reliable broadcast RBC protocol, and can also receive the consensus proposal broadcast by other consensus nodes based on the reliable broadcast RBC protocol. The specific content of the reliable broadcast RBC protocol can refer to the relevant technology, and this specification will not be described in detail. Each consensus node can send out local consensus proposals at the same time, so the target node may receive consensus proposals sent by different consensus nodes one after another. The target node can determine the initial voting value for the consensus proposal based on the situation of receiving the consensus proposal. Specifically, the target node can determine the initial voting value of the consensus proposal as the priority voting value 1 when receiving the consensus proposal broadcasted by any consensus node through the reliable broadcast RBC protocol, if the consensus process, i.e., S201-S205, has not yet been started for the consensus proposal;

[0041] When receiving the consensus proposals broadcasted by Nf consensus nodes, the initial voting value of the consensus proposals that have not yet started the consensus process is determined as other voting values ​​0;

[0042] In addition, when the target node receives a consensus proposal broadcasted by any consensus node through the reliable broadcast RBC protocol, if the consensus process has been started for the consensus proposal and the consensus result of the consensus proposal has not been obtained, the initial voting value of the consensus proposal is re-determined as the priority voting value 1.

[0043] In this embodiment, when receiving the consensus proposals broadcasted by Nf consensus nodes, the initial voting value of the consensus proposals that have not yet started the consensus process is determined as other voting value 0, and the reliable broadcast RBC protocol can ensure that the target node will only receive any consensus proposal once, rather than receiving the same consensus proposal multiple times. Therefore, after receiving any consensus proposal, if the consensus process has been started for the consensus proposal, it means that the execution is started with other voting value 0 as the initial voting value, and further, the initial voting value can be modified from other voting value 0 to priority voting value 1. That is, in the blockchain network scenario, the preset condition can be configured as: if the consensus proposal is received and the consensus result of the consensus proposal has not yet been obtained.

[0044] Taking N as 7 and f as 2 as an example, after receiving the consensus proposal broadcasted by any consensus node, the target node determines whether the consensus process has been started for the consensus proposal. If not, the initial voting value of the consensus proposal is determined as the priority voting value 1, and S203-S205 are executed to obtain a consensus result for the consensus proposal.

[0045] In addition, when it is determined that Nf, i.e., 7-2=5 consensus nodes have broadcasted consensus proposals to be agreed upon, that is, the consensus process has begun for each of the five consensus proposals to be agreed upon with the priority voting value 1 as input, the initial voting value of the remaining two consensus proposals that have not yet started the consensus process can be determined as the other voting value 0, and the consensus process can be started for the remaining two consensus proposals to be agreed upon.

[0046] At the same time, after receiving a consensus proposal broadcast by any consensus node, if the target node has started the consensus process for the consensus proposal, and the initial voting value of the consensus proposal is other voting values ​​0, and the consensus result of the consensus proposal has not yet been obtained, then the initial voting value of the consensus proposal is re-determined as the priority voting value.

[0047] When it is determined that any consensus-to-be proposal has an initial voting value, the consensus process is performed for the consensus-to-be proposal.

[0048] like Figure 1b As described above, there are 7 consensus nodes in the blockchain network. Each consensus node needs to reach consensus on the consensus proposals issued to the 7 consensus nodes. As shown in the figure, 7 pairs of RBC+RABA instances need to be maintained, where RBA is the threshold signature-based re-voting binary consensus method proposed in this specification, where N is 7, f is 2, and after the target node receives the 5 consensus proposals from nodes 0 to 4, it starts to execute the binary consensus method proposed in this specification for the consensus proposals from nodes 0 to 4, that is, RBA0 -RABA 4 The inputs of are all set to 1 (priority voting value) and execution begins, and the RABA corresponding to nodes 5 and 6 are directly 5 and RABA 6 The inputs of the RABA are all set to 0 (other voting values) and start to execute. That is, when the last consensus proposal of the Nf consensus nodes is received, the remaining f consensus proposals that have not yet started to execute RABA are triggered to start execution. As shown in the figure, when node 3 takes 1 as input to start RABA 3 When RABA 5 and RABA 6 The inputs of the trigger are set to 0, which starts the execution of RABA 5 and RABA 6 In addition, the RABA of nodes 5 and 6 5 and RABA 6 After the input is set to 0, and RABA is not obtained 5 and RABA 6 When the output result is received, if the consensus proposals from nodes 5 and 6 are received, RABA 5 and RABA 6 The input of changes to 1, triggering the execution of RABA again 5 and RABA 6, To get RABA 5 and RABA 6 The above method can ensure that the binary consensus process of each consensus proposal is basically processed and occurs in parallel, further improving the efficiency of consensus.

[0049] It is understandable that the above method is only a method for determining the initial voting value in the blockchain network. In other application scenarios, the initial voting value of the consensus proposal can also be determined based on different data.

[0050] In the above S201, when the target node has determined the initial voting value, no matter whether the initial voting value is a priority voting value or other voting values, the target node can execute S203, that is, broadcast the initial voting value, and receive the initial voting value for the consensus proposal broadcasted by other consensus nodes.

[0051] In addition, this specification proposes that in order to enable each consensus node to quickly reach a consensus on the priority voting value, the target node is allowed to determine the initial voting value as other voting values. If it is determined that the preset conditions are met, the initial voting value can be re-determined as the priority voting value, and S203 is executed again. If the preset conditions are not met, the target node is not allowed to modify the initial voting value, and different preset conditions can be flexibly configured in different distributed system application scenarios. It can be understood that the above is only explained by taking the blockchain network application scenario as an example. In other application scenarios, different preset conditions can be configured according to different scenario requirements. In this step, the target node is allowed to vote again, that is, the initial voting value is determined twice for the same consensus proposal. The target node is allowed to modify the initial voting value to the priority voting value when the initial voting value of a consensus proposal is other voting values. The purpose is to enable each consensus node to quickly reach a consensus on the priority voting value.

[0052] S203, performing a threshold signature on the initial voting value based on the local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1;

[0053] S204, broadcasting a first-round consensus message carrying a voting value and a threshold signature share corresponding to the voting value;

[0054] S205: Determine the consensus status of the proposal to be agreed upon based on the first-round consensus message broadcast by other consensus nodes.

[0055] In the above S203, the threshold signature technology is similar to the basic signature mechanism, and is usually divided into two parts, one is the threshold key generation process, and the other is the threshold signature process. The threshold key generation process will generate a common public key and the private key shares belonging to different participants. By gathering a preset number of private key shares, a real private key can be constructed. The threshold signature process is that each participant uses its own private key share to perform distributed collaborative signing on the same message content and output the final verifiable signature. This verifiable signature is the same as the content signed with the real private key. In simple terms, each participant performs a threshold signature on the message based on the local private key share to obtain a threshold signature share, and then merges the preset number of threshold signature shares of each participant to obtain a verifiable threshold signature. In this specification, the threshold of 2f+1 specifically means that after obtaining 2f+1 threshold signature shares for the same content, the 2f+1 threshold signature shares can be merged to obtain a complete threshold signature, which can be verified based on the shared public key. The complete threshold signature is referred to as a verifiable threshold signature in the following text. The specific process and implementation method of the threshold signature technology can refer to the relevant technology, and this specification does not elaborate on this. In addition, in this step, in addition to using the threshold signature share to sign the initial voting value, the threshold signature share can also be used to sign the combined data of the initial voting value, the consensus round number, and the ID of the proposal to be agreed upon.

[0056] In the above S204, the target node may specifically execute the following Figure 3 The method described:

[0057] S301, carrying the initial voting value and the threshold signature share in the first round of the first consensus message for broadcasting, and receiving the first round of the first consensus message broadcasted by other consensus nodes;

[0058] In this step, the initial voting value and the threshold signature share can be determined in the above manner, which will not be described in detail here.

[0059] The target node can transmit the first consensus message to other consensus nodes in the distributed system through an authentication channel. Of course, when there is no authentication channel, in order to ensure the security of data transmission, cryptographic tools such as digital signatures or public key technology facilities can also be used to ensure the security of consensus message transmission. This manual does not limit this.

[0060] In one embodiment, the first consensus message may be bval r The target node can broadcast messages in the form of bval r (est r ,ts2.share) message, where est ris the voting value, ts2.share is the threshold signature share with a threshold of 2f+1, and the voting value est r is a binary number (0 or 1), r is the number of consensus rounds, the first round is round 0, and the consensus rounds start from 0 and increase in steps of 1.

[0061] It can be understood that all correct nodes in the distributed system are executing the steps performed by the target node, that is, other consensus nodes will also send a first consensus message including the voting value; at this time, the target node will receive the first consensus message sent by other consensus nodes.

[0062] S302, based on the first-round first consensus message broadcasted by other consensus nodes, the first-round voting value, the threshold signature share, and the verifiable threshold signature of the first-round voting value are re-determined; the re-determined first-round voting value, the verifiable threshold signature, and the threshold signature share are carried in the first-round second consensus message for broadcasting;

[0063] After receiving Nf first-round first consensus messages, the target node can re-determine the voting value based on the received first-round first consensus messages.

[0064] Specifically, if the voting values ​​in the Nf first-round first consensus messages are the same, the target node determines that the initial voting value carried by the Nf first-round first consensus messages is the re-determined first-round voting value, and performs a threshold signature on the re-determined first-round voting value based on the local private key share to obtain a threshold signature share, and merges the threshold signature shares carried by the Nf first-round first consensus messages to obtain a verifiable threshold signature for the first-round voting value.

[0065] For example, if the target node receives Nf bval 0 (b,ts2.share) message, b∈{0,1}. Then the voting value is re-determined to be b, and b is signed with the local private key share to obtain ts2.share, and the threshold signature shares carried by the Nf first-round first consensus messages are merged to obtain a verifiable threshold signature sig. The voting values ​​in the Nf first-round first consensus messages are the same, and the initial voting value carried by the Nf first-round first consensus messages is determined to be the re-determined first-round voting value, which can avoid malicious nodes from doing evil, that is, avoid malicious nodes from manipulating the order of messages received by nodes, so that even if f+1 correct nodes broadcast priority voting values, there will still be nodes broadcasting other voting values ​​in the second consensus message, which can avoid different voting values ​​carried by each consensus node in the second consensus message, resulting in failure to reach consensus in the end.

[0066] After the above content is determined, it can be carried in the first round of second consensus message for broadcast;

[0067] For example, combining the above example, the target node can broadcast aux 0 (v, sig, ts2.share) message, where aux r It is the second consensus message format, v=b, sig is the verifiable threshold signature, and ts2.share is the threshold signature share.

[0068] S303, based on the second consensus message broadcast by other consensus nodes, the first-round voting value, the verifiable threshold signature and the threshold signature share are re-determined; the re-determined first-round voting value, the verifiable threshold signature and the threshold signature share are carried in the first-round third consensus message for broadcasting.

[0069] Specifically, the method for determining the content carried in the third consensus message may be:

[0070] In the case of receiving Nf first-round second consensus messages with successful signature verification, if the voting values ​​carried in the Nf first-round second consensus messages are the same, the voting values ​​carried by the Nf first-round second consensus messages are determined to be the re-determined first-round voting values; wherein, successful signature verification means that the verifiable threshold signature carried in the second consensus message is successfully verified; after determining the first-round voting value, the re-determined first-round voting value can be threshold-signed based on the local private key share to obtain the threshold signature share; and the threshold signature shares carried by the Nf first-round second consensus messages are merged to obtain a verifiable threshold signature for the first-round voting value.

[0071] In addition, if the voting values ​​carried in the Nf first-round second consensus messages are not the same, the first-round voting value is determined to be empty, and the re-determined first-round voting value is threshold-signed based on the local private key share to obtain a threshold signature share, and the value of the verifiable threshold signature is set to the multiple different voting values ​​received.

[0072] After the above content is determined, it can be carried in the first round of the third consensus message for broadcast;

[0073] For example, combining the above example, the target node can broadcast conf 0 (v, sig, ts2.share) message, where conf r It is the third consensus message format, v is the voting value, sig is the verifiable threshold signature, and ts2.share is the threshold signature share.

[0074] The above S301-S303 describe the process of S204, that is, the process of broadcasting the voting value in the first round. The process in S205 is described below:

[0075] The consensus result may be obtained based on the first round of consensus messages broadcasted by other consensus nodes, or may be obtained based on the third consensus messages broadcasted by other consensus nodes.

[0076] Specifically, when Nf first-round third consensus messages with successful signature verification are received, the first-round public coin tossing value is set as the priority voting value. If the voting values ​​carried in the Nf first-round third consensus messages are the same, the voting values ​​carried by the Nf first-round third consensus messages are determined as the consensus result.

[0077] In addition, when the voting values ​​carried in the Nf first-round third consensus messages are different, it is determined that no consensus has been reached in the first round, and the next round of consensus process needs to be continued.

[0078] The successful signature verification means that the verifiable threshold signature carried in the third consensus message is successfully verified. For example, if the voting values ​​carried in the Nf first-round third consensus messages that are successfully verified are all 1, then the consensus result is determined to be 1.

[0079] In this step, the public coin is set as the priority voting value. This is to ensure that when the voting values ​​broadcast by each node are different, in the next round of consensus, each node can tend to reach a consensus on the priority voting value.

[0080] It can be seen that the adoption of the above consensus method can enable each consensus node to quickly reach consensus in the first round of consensus, thereby improving consensus efficiency.

[0081] The consensus method proposed in this specification is executed in rounds, where each round of consensus includes several steps. The above S201-S205 are the steps executed in the first round of consensus. The following introduces the steps executed in other rounds of consensus:

[0082] Except for the first round, the consensus of other rounds is as follows: Figure 4 The methods shown reach consensus:

[0083] If no consensus result is obtained in the first round, S401-S402 can be executed cyclically until a preset stop condition is reached. The preset stop condition can be that a consensus result is obtained in the previous round of consensus and the third consensus message is sent in this round, that is, after the consensus result is obtained, the target node will still participate in the next round of consensus process, and exit the consensus process after sending the third consensus message in the next round, so that other consensus nodes can obtain the consensus result.

[0084] S401, determine the voting value of this round, and broadcast the consensus message of this round; the consensus message carries the voting value of this round and the threshold signature share of the voting value of this round;

[0085] S402: Determine the consensus status of the consensus proposal to be agreed upon based on the received consensus messages broadcasted by other consensus nodes.

[0086] The method of determining the voting value in S401 is different from the method of determining the initial voting value in the first round of consensus. The determination method may be:

[0087] Determine whether there is at least one third consensus message in the third consensus message received in the previous round that has been successfully verified; if so, determine that the voting value of this round is the voting value carried by the third consensus message that has been successfully verified, perform a threshold signature on the voting value based on the local private key share to obtain a threshold signature share, and determine that the verifiable threshold signature of this round is the verifiable threshold signature carried in the third consensus message that has been successfully verified;

[0088] For example, in the third consensus message of the previous round, there are both third consensus messages with a voting value of 1 and third consensus messages with an empty voting value. According to the above description, when the voting value is 1, the verifiable threshold signature in the third consensus message can be successfully verified, while when the voting value is empty, the value of the verifiable threshold signature in the third consensus message is not obtained by combining the threshold signature share, but is directly set to the multiple different voting values ​​received, so it cannot be successfully verified. In the case that there is at least one third consensus message that is successfully verified, the voting value of this round is directly set to the voting value in the third consensus message that is successfully verified, and then the voting value is signed using the local threshold private key share to obtain the threshold signature share, and the verifiable threshold signature carried in the third consensus message is directly used.

[0089] In addition, if there is no third consensus message with successful signature verification in the third consensus message received in the previous round, the voting value of this round is determined to be the public coin value of the previous round, and the voting value of this round is threshold-signed based on the local private key share to obtain the threshold signature share, and the threshold signature shares carried by the Nf third consensus messages in the previous round are merged to obtain the verifiable threshold signature of this round.

[0090] That is, if the voting values ​​in the third consensus message of the previous round are all empty, and the verifiable signatures in the third consensus message of the previous round cannot be successfully verified, the public coin tossing value of the previous round is directly determined as the voting value of this round. Since the public coin tossing value of the first round is the default priority voting value 1, during the second round of consensus, if it is determined that the third consensus messages in the first round of consensus cannot be successfully verified, the voting value of this round is directly determined as the priority voting value.

[0091] After the voting value is determined, the consensus message of this round can be broadcasted, which can be:

[0092] S401a, broadcasting the determined voting value, verifiable threshold signature, and threshold signature share in the second consensus message;

[0093] S401b, receiving the second consensus message broadcasted by other consensus nodes;

[0094] S401c, re-determine the voting value, threshold signature share, and verifiable threshold signature based on the second consensus message broadcast by other consensus nodes;

[0095] S401d, broadcast the re-determined voting value, verifiable threshold signature, and threshold signature share in the first round third consensus message.

[0096] S401a-S401d may specifically be that in the case of receiving Nf second consensus messages with successful signature verification, if the voting values ​​carried in the Nf second consensus messages are the same, the voting values ​​carried by the Nf second consensus messages are determined to be the re-determined voting values, and the re-determined voting values ​​are threshold-signed based on the local private key share to obtain the threshold signature share; the threshold signature shares carried by the Nf second consensus messages are merged to obtain a verifiable threshold signature for the voting value;

[0097] If the voting values ​​carried in the Nf second consensus messages are different, the voting value for this round is determined to be empty, and the threshold signature is performed on the re-determined voting value for this round based on the local private key share to obtain a threshold signature share, and the value of the verifiable threshold signature is set to the multiple different voting values ​​received;

[0098] The determined voting value, threshold signature share, and verifiable threshold signature for this round are carried in the third consensus message for broadcast.

[0099] After executing S401, S402 may be executed. S402 may specifically be:

[0100] In the case of receiving Nf third consensus messages with successful signature verification, the public coin value of this round is determined. If the voting values ​​carried in the Nf third consensus messages are the same, the voting values ​​carried by the Nf third consensus messages are determined as the consensus result. Among them, the public coin value has only two values, 0 or 1. Each consensus node can obtain the same public coin value in a round, and the coin value of each round is random. The method for obtaining the public coin value can be obtained by using a threshold signature algorithm or other methods. The specific content can refer to the relevant technology and is not limited here.

[0101] For example, the received Nf legal third consensus messages conf rIf the voting values ​​in () are the same, the priority voting value is 1, or the other voting values ​​are 0, the consensus result is determined to be the voting value, otherwise the next round of consensus will be executed.

[0102] It can be understood that the above method is the method executed by any correct node in the consensus node, and other correct consensus nodes also execute the above method asynchronously. By adopting the above method, each consensus node can quickly reach a consensus on the priority voting value through interactive voting values ​​and threshold signature shares in the distributed system in an asynchronous environment. In each round of consensus, the probability of reaching a consensus is 1 / 2. At the same time, the threshold signature technology is used to complete it, which can make each consensus node perform fewer consensus steps in each round. Each consensus node only needs to broadcast three consensus messages in the first round of consensus, and starting from the second round of consensus, only two consensus messages need to be broadcast in each round, which improves the consensus efficiency. At the same time, setting the priority voting value and setting the first round of public coin tossing value as the priority voting value can make each consensus node tend to reach a consensus on the priority voting value. At the same time, the above consensus method can ensure that the consensus nodes in the distributed system meet the following properties, that is, the following technical effects: Validity: When the voting values ​​broadcast by all correct nodes are v and no other voting values ​​are broadcast again, then the consensus results of all correct nodes are the voting value v; Consensus termination: When the voting values ​​broadcast by all correct nodes are the same value v and no other voting values ​​are broadcast again, then all correct nodes can terminate the consensus operation, that is, reach a consensus; Consensus: If any correct node determines that a certain voting value v is the consensus result, then other correct nodes that terminate the consensus operation will also determine that the voting value v is the consensus result; Biased validity: If f+1 correct nodes broadcast the voting value v, then when the correct nodes terminate the consensus, they can determine that the voting value v is the consensus result; Biased termination: If Q is a set of correct nodes, where Q1 is the set of correct nodes that broadcast the voting value 1 and did not broadcast the voting value 0 again, and Q2 is the set of correct nodes that broadcast the voting value 0 and then broadcast the voting value 1 again, if And Q = Q1 ∪ Q2, then all correct nodes will reach a consensus; Integrity: The correct nodes reach a consensus on a proposal only once.

[0103] After reaching a consensus on the consensus proposals put forward by each consensus node, each correct consensus node will obtain the same consensus result, which is 1 or 0. After reaching a consensus on the consensus proposals put forward by all consensus nodes, a sequence containing 0 and 1 will be obtained. Further, the corresponding transaction processing can be performed based on the sequence. Taking the blockchain network as an example, in the blockchain network, 0 or 1 is used to indicate whether the corresponding consensus proposal is packaged into a block. For example, there are four consensus nodes in total. The consensus proposal put forward by consensus node 1 is P1, the consensus proposal put forward by consensus node 2 is P2, the consensus proposal put forward by consensus node 3 is P3, and the consensus proposal put forward by consensus node 4 is P4. After consensus is reached using the above consensus method, consensus results will be obtained for P1-P4 respectively, and then four consensus results will be obtained, forming a 01 sequence. For example, the obtained sequence is (1,1,1,0), and the consensus result reached is that all nodes package P1, P2 and P3 into blocks and store them locally without storing P4, that is, each consensus node performs consistency processing on each consensus proposal according to the consensus result to ensure the data consistency of each consensus node.

[0104] The following is an explanation of S201-S204 of this specification from the perspective of code implementation:

[0105] The pseudo code is as follows:

[0106]

[0107]

[0108] In the above pseudo code:

[0109] ts2 represents the threshold signature of (n, Nf), that is, the total number is n, the threshold is Nf, and ts2.share is the threshold signature part generated locally by the node;

[0110] The * symbol represents an arbitrary value;

[0111] majority(vals) means more than half of the values ​​in the vals array are consistent.

[0112] After each node triggers propose() in round 0, it broadcasts bval 0 (est 0 ,ts2.share) message, where est 0 is the initial input of the protocol, ts2.share is based on est 0 And additional information of the protocol, such as the instance id of the protocol, the number of rounds, etc. This behavior applies to all threshold signatures and will not be repeated below). Set the public coin toss value of round 0 to 1, thus entering the cycle of the protocol.

[0113] After each node triggers repropose(), it directly broadcasts bval 0 (*). The following describes the process in round r.

[0114] If r = 0, then each node collects nf bvals 0 () message. The node needs to receive nf consistent b values ​​before proceeding to the next step. After collecting, merge the threshold signature part received to obtain the sig signature;

[0115] If r>0, the node determines whether it has received at least one valid conf in the previous round (r-1). r-1 (b, t2sig) message (described in detail later), and t2sig is a verifiable signature of b. If it exists, the node selects v = b value and assigns t2sig to sig. If there is no valid conf r-1 () message, then select the public coin value coin in the previous round r-1 As the selected value, sig is set to the threshold signature of the last round of nf conf votes for b being empty. Based on the above two situations, the node now has v, the selected binary value, as well as sig and a valid threshold signature (or empty value), and the node then broadcasts aux r (v,sig,ts2.share) message, where ts2.share is the threshold signature share based on v.

[0116] The node collects nf aux r () message, where vals is the received aux r () The binary value in the message, shares is the share of threshold signatures that can be verified. Each node will only receive the aux that can be verified. r (b, sig, ts2.share) message, that is, b is not empty. If the node only receives a value b, then the node selects b as the value for the next step, and merges the received threshold signature shares to obtain sig. If there is no such unique value, then the node selects * as the value and sets sig to the conflicting vote. At this moment, the node has the value v for the next step, as well as the corresponding signature sig, and the node then broadcasts conf r (v,sig,ts2.share), ts2.share is the threshold signature share of v.

[0117] The node collects nf conf r() message and interact with other nodes to generate a public coin (in round 0, the public coin is directly set to 1), and then start judging, where vals is the received binary value and shares is the share of threshold signatures that can be verified. Each node will only receive verifiable conf r (b, sig, ts2.share) message, that is, if b is not, sig is a verifiable merged threshold signature. If the node only receives one b value, then the node decides b. Otherwise, it goes to the next round.

[0118] like Figure 5 As shown, corresponding to the aforementioned threshold signature-based re-voting binary consensus method, this specification also provides a threshold signature-based re-voting binary consensus device, which is applied to any consensus node in a distributed system, wherein the distributed system includes at least N consensus nodes, where N≥3f+1, and f is a preset positive integer, and the device includes:

[0119] Processing module 510 is used to determine an initial voting value for any consensus proposal; wherein the voting value includes two values: a priority voting value and another voting value, and the initial voting value is the priority voting value or another voting value; if the initial voting value is another voting value and meets a preset condition, the initial voting value is re-determined as the priority voting value;

[0120] Performing a threshold signature on the initial voting value based on the local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1;

[0121] A communication module 520, configured to broadcast a first-round consensus message of a voting value and a threshold signature share corresponding to the voting value;

[0122] The processing module 510 is further configured to determine the consensus status of the proposal to be agreed upon based on the first round consensus message broadcast by other consensus nodes.

[0123] In one embodiment, the processing module 510 is further configured to loop through other rounds of consensus steps if no consensus result is obtained in the first round until a preset stop condition is reached;

[0124] In other rounds of consensus:

[0125] Processing module 510, used to determine the voting value of this round;

[0126] Communication module 520, used to broadcast the consensus message of this round; the consensus message carries the voting value of this round and the threshold signature share of the voting value of this round;

[0127] The processing module 510 is further configured to determine the consensus status of the consensus proposal to be agreed upon based on the received consensus messages broadcasted by other consensus nodes.

[0128] In one embodiment, the communication module 520 is specifically configured to carry the initial voting value and the threshold signature share in a first-round first consensus message for broadcasting; and receive the first-round first consensus message broadcasted by other consensus nodes;

[0129] The processing module 510 is specifically used to re-determine the first-round voting value, the threshold signature share, and obtain a verifiable threshold signature of the first-round voting value based on the first-round first consensus message broadcast by other consensus nodes;

[0130] The communication module 520 is further used to carry the re-determined first-round voting value, verifiable threshold signature, and threshold signature share in the first-round second consensus message for broadcasting;

[0131] The processing module 510 is further used to re-determine the first-round voting value based on the second consensus message broadcast by other consensus nodes, and can verify the threshold signature and the threshold signature share;

[0132] The communication module 520 is also used to carry the re-determined first-round voting value, verifiable threshold signature and threshold signature share in the first-round third consensus message for broadcasting.

[0133] In one embodiment, the processing module 510 is specifically used to, when receiving Nf first-round first consensus messages, if the initial voting values ​​carried in the Nf first-round first consensus messages are the same, determine that the initial voting values ​​carried by the Nf first-round first consensus messages are the re-determined first-round voting values; perform threshold signing on the re-determined first-round voting values ​​based on the local private key share to obtain a threshold signature share; and merge the threshold signature shares carried by the Nf first-round first consensus messages to obtain a verifiable threshold signature for the first-round voting value.

[0134] In one embodiment, the processing module 510 is specifically used to, when receiving Nf successfully verified first-round second consensus messages, determine that the voting value carried by the Nf first-round second consensus messages is the re-determined first-round voting value if the voting values ​​carried in the Nf first-round second consensus messages are the same; perform a threshold signature on the re-determined first-round voting value based on the local private key share to obtain a threshold signature share; and merge the threshold signature shares carried by the Nf first-round second consensus messages to obtain a verifiable threshold signature for the first-round voting value.

[0135] In this embodiment, the processing module 510 is also used to determine that the first-round voting value is empty if the voting values ​​carried in the Nf first-round second consensus messages are not the same, perform a threshold signature on the re-determined first-round voting value based on the local private key share to obtain a threshold signature share, and set the value of the verifiable threshold signature to the multiple different voting values ​​received.

[0136] In one embodiment, the processing module 510 is specifically used to set the public coin tossing value of this round as the priority voting value when receiving Nf first-round third consensus messages that have been successfully verified. If the voting values ​​carried in the Nf first-round third consensus messages are the same, the voting values ​​carried by the Nf first-round third consensus messages are determined as the consensus result.

[0137] In one embodiment, the preset stop condition is: determining that a consensus result is obtained in the previous round of consensus, and sending a third consensus message in this round.

[0138] In one embodiment, the processing module 510 is specifically used to determine whether there is at least one third consensus message in the third consensus message received in the previous round that has been successfully verified; if so, determine that the voting value of this round is the voting value carried by the third consensus message that has been successfully verified, perform a threshold signature on the voting value based on the local private key share to obtain a threshold signature share, and determine that the verifiable threshold signature of this round is the verifiable threshold signature carried in the third consensus message that has been successfully verified;

[0139] If it does not exist, the voting value of this round is determined to be the public coin value of the previous round, and the voting value is threshold-signed based on the local private key share to obtain the threshold signature share, and the threshold signature shares carried by the Nf third consensus messages in the previous round are merged to obtain the verifiable threshold signature of this round.

[0140] In one embodiment, the communication module 520 is specifically the same as carrying the determined voting value, verifiable threshold signature and threshold signature share in the second consensus message for broadcasting; receiving the second consensus message broadcasted by other consensus nodes;

[0141] The processing module 510 is specifically used to re-determine the voting value, the threshold signature share and the verifiable threshold signature based on the second consensus message broadcast by other consensus nodes;

[0142] The communication module 520 is specifically equivalent to broadcasting the re-determined voting value, verifiable threshold signature and threshold signature share in the third consensus message of this round.

[0143] In one embodiment, the processing module 510 is specifically used to, when receiving Nf verified second consensus messages, if the voting values ​​carried in the Nf second consensus messages are the same, determine that the voting values ​​carried by the Nf second consensus messages are the re-determined voting values ​​for this round, perform threshold signatures on the re-determined voting values ​​for this round based on the local private key share to obtain threshold signature shares; merge the threshold signature shares carried by the Nf second consensus messages to obtain a verifiable threshold signature for the voting values ​​for this round;

[0144] If the voting values ​​carried in the Nf second consensus messages are not the same, the voting value for this round is determined to be empty, and a threshold signature is performed on the re-determined voting value for this round based on the local private key share to obtain a threshold signature share, and the value of the verifiable threshold signature is set to the multiple different voting values ​​received.

[0145] In one embodiment, the processing module 510 is specifically used to determine the public coin tossing value of this round when Nf third consensus messages with successful signature verification are received. If the voting values ​​carried in the Nf third consensus messages are the same, the voting values ​​carried by the Nf third consensus messages are determined as the consensus result.

[0146] The implementation process of the functions and effects of each component in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0147] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts refer to the partial description of the method embodiment. The device embodiment described above is only illustrative. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0148] The embodiment of this specification also provides a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the aforementioned method is implemented when the processor executes the program. The method at least includes the aforementioned Figure 2 The method shown.

[0149] Figure 6 A more specific hardware structure diagram of a computing device provided in an embodiment of this specification is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0150] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0151] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0152] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0153] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0154] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0155] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0156] The present specification also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the aforementioned method is implemented. The method at least includes the aforementioned Figure 2 The method shown.

[0157] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0158] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the embodiments of this specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of this specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments of this specification.

[0159] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0160] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.

[0161] The above is only a specific implementation of the embodiments of this specification. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiments of this specification. These improvements and modifications should also be regarded as the protection scope of the embodiments of this specification.

Claims

1. A threshold signature-based re-voting binary consensus method, applied to any consensus node in a distributed system, wherein the distributed system includes at least N consensus nodes, where N≥3f+1, and f is a preset positive integer. include: Determine the initial voting value for any consensus proposal; the voting value includes the priority voting value and other voting values, and the initial voting value is the priority voting value or other voting value; In the case where the initial voting value is other voting values, if the proposal to be reached is received and the consensus result of the proposal to be reached has not yet been obtained, the initial voting value is re-determined as the priority voting value; Performing a threshold signature on the initial voting value based on the local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1; Broadcast the first round consensus message with the voting value and the threshold signature share corresponding to the voting value; Determine the consensus status of the consensus proposal based on the first round consensus message broadcast by other consensus nodes; The broadcast carries a first-round consensus message containing a voting value and a threshold signature share corresponding to the voting value, including: The initial voting value and the threshold signature share are carried in the first round first consensus message for broadcasting; Receive the first round of first consensus messages broadcast by other consensus nodes; Re-determine the first round voting value, threshold signature share, and verifiable threshold signature of the first round voting value based on the first round first consensus message broadcast by other consensus nodes; The re-determined first-round voting value, verifiable threshold signature, and threshold signature share are carried in the first-round second consensus message for broadcast; The first round voting value is determined again based on the second consensus message broadcast by other consensus nodes, and the threshold signature and threshold signature share can be verified; The reconfirmed first-round voting value, verifiable threshold signature, and threshold signature share are carried in the first-round third consensus message for broadcast.

2. The method according to claim 1, It is characterized in that Also includes: If no consensus result is obtained in the first round, the following other rounds of consensus steps are executed cyclically until the preset stop condition is reached. The other rounds of consensus steps include: Determine the voting value for this round and broadcast the consensus message for this round; the consensus message carries the voting value for this round and the threshold signature share of the voting value for this round; The consensus status of the consensus proposal to be agreed upon is determined based on the received consensus messages broadcasted by other consensus nodes.

3. The method according to claim 1, It is characterized in that The re-determining the first-round voting value and the threshold signature share based on the first-round first consensus message broadcast by other consensus nodes and obtaining the verifiable threshold signature of the re-determined first-round voting value includes: In the case of receiving Nf first-round first consensus messages, if the initial voting values ​​carried in the Nf first-round first consensus messages are the same, determining the initial voting values ​​carried by the Nf first-round first consensus messages as the re-determined first-round voting values; Performing a threshold signature on the re-determined first-round voting value based on the local private key share to obtain a threshold signature share; The threshold signature shares carried by the Nf first-round first consensus messages are merged to obtain a verifiable threshold signature for the first-round voting value.

4. The method according to claim 3, It is characterized in that The first-round voting value is determined again based on the first-round second consensus message broadcast by other consensus nodes, and the threshold signature and threshold signature share can be verified, including: In the case of receiving Nf first-round second consensus messages with successful signature verification, if the voting values ​​carried in the Nf first-round second consensus messages are the same, then the voting values ​​carried by the Nf first-round second consensus messages are determined to be the re-determined first-round voting values; Performing a threshold signature on the re-determined first-round voting value based on the local private key share to obtain a threshold signature share; The threshold signature shares carried by the Nf first-round second consensus messages are merged to obtain a verifiable threshold signature for the first-round voting value.

5. The method according to claim 4, It is characterized in that Also includes: If the voting values ​​carried in the Nf first-round second consensus messages are not the same, the first-round voting value is determined to be empty, and a threshold signature is performed on the re-determined first-round voting value based on the local private key share to obtain a threshold signature share, and the value of the verifiable threshold signature is set to the multiple different voting values ​​received.

6. The method according to claim 5, It is characterized in that The consensus status of the consensus proposal to be determined based on the first round consensus message broadcast by other consensus nodes includes: When Nf first-round third consensus messages with successful signature verification are received, the public coin value of this round is set as the priority voting value. If the voting values ​​carried in the Nf first-round third consensus messages are the same, the voting values ​​carried by the Nf first-round third consensus messages are determined as the consensus result.

7. The method according to claim 2, It is characterized in that The preset stop condition is: determining that a consensus result is obtained in the previous round of consensus, and sending a third consensus message in this round.

8. The method according to claim 2, It is characterized in that Determining the voting value of this round includes: Determine whether there is at least one third consensus message in the third consensus message received in the previous round that has been successfully verified; if so, determine that the voting value of this round is the voting value carried by the third consensus message that has been successfully verified, perform a threshold signature on the voting value based on the local private key share to obtain a threshold signature share, and determine that the verifiable threshold signature of this round is the verifiable threshold signature carried in the third consensus message that has been successfully verified; If it does not exist, the voting value of this round is determined to be the public coin value of the previous round, and the voting value is threshold-signed based on the local private key share to obtain the threshold signature share, and the threshold signature shares carried by the Nf third consensus messages in the previous round are merged to obtain the verifiable threshold signature of this round.

9. The method according to claim 8, It is characterized in that The broadcast of this round of consensus message includes: The determined voting value, verifiable threshold signature, and threshold signature share of this round are broadcasted in the second consensus message of this round; Receive the second consensus message of this round broadcasted by other consensus nodes; Re-determine the voting value, threshold signature share, and verifiable threshold signature based on the second consensus message of this round broadcasted by other consensus nodes; The re-determined voting value, verifiable threshold signature, and threshold signature share are carried in the third consensus message of this round and broadcast.

10. The method according to claim 9, It is characterized in that The re-determining of the voting value, the threshold signature share, and the verifiable threshold signature based on the second consensus message broadcast by other consensus nodes includes: In the case of receiving Nf second consensus messages with successful signature verification, if the voting values ​​carried in the Nf second consensus messages are the same, the voting values ​​carried by the Nf second consensus messages are determined to be the re-determined voting values, and the re-determined voting values ​​are threshold-signed based on the local private key share to obtain the threshold signature share; the threshold signature shares carried by the Nf second consensus messages are merged to obtain a verifiable threshold signature for the voting value of this round; If the voting values ​​carried in the Nf second consensus messages are not the same, the voting value for this round is determined to be empty, and a threshold signature is performed on the re-determined voting value for this round based on the local private key share to obtain a threshold signature share, and the value of the verifiable threshold signature is set to the multiple different voting values ​​received.

11. The method according to claim 10, It is characterized in that The determining the consensus status of the consensus proposal based on the received consensus message broadcasted by other consensus nodes includes: When Nf third consensus messages with successful signature verification are received, the public coin tossing value of this round is determined. If the voting values ​​carried in the Nf third consensus messages are the same, the voting values ​​carried by the Nf third consensus messages are determined as the consensus result.

12. A threshold signature-based re-voting binary consensus device, applied to any consensus node in a distributed system, the distributed system includes at least N consensus nodes, where N≥3f+1, f is a preset positive integer, the device include: A processing module, configured to determine an initial voting value for any proposal to be agreed upon; wherein the voting value includes two values, namely, a priority voting value and other voting values, and the initial voting value is the priority voting value or other voting value; in the case where the initial voting value is other voting values, if the proposal to be agreed upon is received and a consensus result of the proposal to be agreed upon has not yet been obtained, the initial voting value is re-determined as the priority voting value; Performing a threshold signature on the initial voting value based on the local private key share to obtain a threshold signature share; the threshold of the threshold signature is 2f+1; A communication module, used to broadcast a first-round consensus message carrying the initial voting value and the threshold signature share; The processing module is also used to obtain a consensus result based on the first round consensus message broadcast by other consensus nodes; The communication module is specifically used to carry the initial voting value and the threshold signature share in the first-round first consensus message for broadcasting; receive the first-round first consensus message broadcasted by other consensus nodes; redetermine the first-round voting value, the threshold signature share, and obtain a verifiable threshold signature of the first-round voting value based on the first-round first consensus message broadcasted by other consensus nodes; carry the redetermined first-round voting value, the verifiable threshold signature, and the threshold signature share in the first-round second consensus message for broadcasting; determine the first-round voting value, the verifiable threshold signature, and the threshold signature share again based on the second consensus message broadcasted by other consensus nodes; carry the redetermined first-round voting value, the verifiable threshold signature, and the threshold signature share in the first-round third consensus message for broadcasting.

13. A computer device, It is characterized in that The method comprises a memory, a processor, a communication interface, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 11 when executing the program.

14. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and when the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Block chain transaction rapid confirmation method and system

    CN110246038A

  • DPoS consensus method based on threshold signature and fair reward and system

    CN111988137A

  • Consensus method for block chain data and related device

    CN112689848A

  • Transaction request consensus method and system based on threshold signature

    CN112994891A

  • Blockchain system and method

    US20210256016A1