CN110708163B - Block chain consensus method, device and system and electronic equipment - Google Patents

Block chain consensus method, device and system and electronic equipment Download PDF

Info

Publication number
CN110708163B
CN110708163B CN201910851309.4A CN201910851309A CN110708163B CN 110708163 B CN110708163 B CN 110708163B CN 201910851309 A CN201910851309 A CN 201910851309A CN 110708163 B CN110708163 B CN 110708163B
Authority
CN
China
Prior art keywords
special
consensus
signature
vote
votes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910851309.4A
Other languages
Chinese (zh)
Other versions
CN110708163A (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.)
Hangzhou Rivtower Technology Co Ltd
Original Assignee
Cryptape Co ltd
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 Cryptape Co ltd filed Critical Cryptape Co ltd
Priority to CN201910851309.4A priority Critical patent/CN110708163B/en
Publication of CN110708163A publication Critical patent/CN110708163A/en
Application granted granted Critical
Publication of CN110708163B publication Critical patent/CN110708163B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3255Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using group based signatures, e.g. ring or threshold signatures

Abstract

The embodiment of the specification discloses a block chain consensus method, a block chain consensus device, a block chain consensus system and electronic equipment, wherein the block chain consensus method comprises the following steps: when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with the consensus or invalid ratio larger than the threshold value to obtain a special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.

Description

Block chain consensus method, device and system and electronic equipment
Technical Field
The present disclosure relates to the field of computer software technologies, and in particular, to a block chain consensus method, apparatus, system, and electronic device.
Background
As the block chain technology develops, endrmingerint can be further understood as a new consensus algorithm combining the Practical Byzantine Fault Tolerance algorithm (PBFT) with the block chain technology.
In the terminertin consensus algorithm, referring to fig. 1, a round of consensus operations for a block can be briefly understood as including the following processes:
the first stage is as follows: in the stage of position, one consensus node is selected as a Leader node, and the Leader node contains the block in a proposal and broadcasts the block to other consensus nodes;
in the second stage, in the credit stage, after each consensus node receives the proposal, generating credit votes for the proposal, and broadcasting the signed credit votes to other consensus nodes;
and in the third stage, in the presimit stage, after each consensus node receives the prevote of more than 2/3 aiming at the same proposal, generating the presimit vote of the proposal, and broadcasting the signed presimit vote to other consensus nodes. When the consensus node receives a presommit vote of 2/3 or more for the same proposal, consensus is achieved for the blocks contained in the proposal.
Based on the above analysis, the complexity of the interacted messages can be defined as O (N ^2) in the whole consensus process, and N is the number of the consensus nodes participating in the consensus. When the number of the participating consensus nodes is large, for example, close to 100, the message complexity in the consensus process may be very large, which affects the message communication interaction, and further causes the consensus algorithm to be wrong or unavailable.
Disclosure of Invention
An object of the embodiments of the present specification is to provide a block chain consensus method, apparatus, system, and electronic device, so as to effectively reduce complexity of an interactive message in a consensus process, support a large number of consensus nodes to perform consensus, and ensure that a consensus algorithm operates normally.
In order to solve the above technical problem, the embodiments of the present specification are implemented as follows:
in a first aspect, a block chain consensus method is provided, including:
the method comprises the steps that a first consensus node receives votes sent by a plurality of second consensus nodes aiming at a current proposal, wherein the second consensus nodes comprise part or all of the first consensus nodes in a current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1;
broadcasting the first aggregated signature to the plurality of second consensus nodes.
In a second aspect, an apparatus for recognizing a blockchain is provided, including:
the receiving module is used for receiving votes sent by a plurality of second consensus nodes aiming at the current proposal, wherein the second consensus nodes comprise part or all of the consensus nodes including the first consensus node in the current block chain network;
the aggregation module is used for aggregating the votes with the consensus ratio larger than a threshold value to obtain a first aggregated signature if the consensus ratio in the received votes is larger than the threshold value, wherein the threshold value is greater than or equal to 2/3 and less than or equal to 1;
a sending module that broadcasts the first aggregated signature to the plurality of second consensus nodes.
In a third aspect, a method for consensus of a block chain is provided, including:
after receiving a proposal initiated by a first consensus node, a second consensus node sends a vote aiming at the current proposal to the first consensus node;
and receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio larger than a threshold value when the consensus ratio of the received votes by the first consensus node is larger than the threshold value, and the threshold value is greater than or equal to 2/3 and less than or equal to 1.
In a fourth aspect, an apparatus for recognizing a blockchain is provided, including:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a vote aiming at a current proposal to a first consensus node after receiving the proposal initiated by the first consensus node;
a receiving module, configured to receive a first aggregated signature returned by the first consensus node, where the first aggregated signature is obtained by aggregating votes with a consensus ratio greater than a threshold when the consensus ratio of the received votes by the first consensus node is greater than the threshold, where the threshold is greater than or equal to 2/3 and less than or equal to 1.
In a fifth aspect, a block chain consensus system is provided, including: a first consensus node and a plurality of second consensus nodes;
the first consensus node receives votes sent by a plurality of second consensus nodes aiming at the current proposal, wherein the plurality of second consensus nodes comprise part or all of the first consensus nodes in the current block chain network;
if the consensus occupation ratio in the received votes is greater than a threshold value, the first consensus node performs aggregation processing on the votes with the consensus occupation ratio greater than the threshold value to obtain a first aggregated signature, wherein the threshold value is greater than or equal to 2/3 and less than or equal to 1;
the first consensus node broadcasts the first aggregate signature to the plurality of second consensus nodes.
In a sixth aspect, an electronic device is provided, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the first consensus nodes in the current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1;
broadcasting the first aggregated signature to the plurality of second consensus nodes.
In a seventh aspect, an electronic device is provided, including:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
after receiving a proposal initiated by a first consensus node, sending a vote aiming at the current proposal to the first consensus node;
and receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio larger than a threshold value when the consensus ratio of the received votes by the first consensus node is larger than the threshold value, and the threshold value is greater than or equal to 2/3 and less than or equal to 1.
In an eighth aspect, a computer-readable storage medium is presented, the computer-readable storage medium storing one or more programs that, when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the first consensus nodes in the current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1;
broadcasting the first aggregated signature to the plurality of second consensus nodes.
In a ninth aspect, a computer-readable storage medium is presented, storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to:
after receiving a proposal initiated by a first consensus node, sending a vote aiming at the current proposal to the first consensus node;
and receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio larger than a threshold value when the consensus ratio of the received votes by the first consensus node is larger than the threshold value, and the threshold value is greater than or equal to 2/3 and less than or equal to 1.
The specification can achieve at least the following technical effects:
through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with the consensus or invalid ratio larger than the threshold value to obtain the special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic diagram illustrating a step of a block chain consensus method according to an embodiment of the present disclosure.
Fig. 2 is a second schematic step diagram of a block chain consensus method provided in an embodiment of the present disclosure.
Fig. 3 is a third step schematic diagram of a block chain consensus method provided in an embodiment of the present disclosure.
Fig. 4 is a fourth step schematic diagram of a block chain consensus method provided in an embodiment of the present disclosure.
Fig. 5 is a fifth step schematic diagram of a block chain consensus method provided in an embodiment of the present disclosure.
Fig. 6 is a schematic diagram of a consensus process of a block chain according to an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification.
Fig. 8 is a schematic structural diagram of a consensus device of a block chain according to an embodiment of the present disclosure.
Fig. 9 is a second schematic structural diagram of a consensus device of a block chain according to an embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
Example one
Referring to fig. 1, a schematic step diagram of a block chain consensus method provided in an embodiment of the present specification is shown, where an execution subject of the consensus method may be a consensus node initiating a proposal, which is defined as a first consensus node in the present specification; the first common node may specifically be an electronic device such as a terminal and a server. The consensus method may comprise the steps of:
step 102: receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the consensus nodes including the first consensus node in the current block chain network.
It should be understood that the votes generated by each second consensus node for the current proposal may not be consistent, and therefore, the votes received by the first consensus node include votes indicating approval (i.e., so-called consensus in this specification) for the current proposal and may also include votes indicating objection to the current proposal.
In this specification, only the first consensus node receives votes returned by the second consensus nodes, and the second consensus nodes do not receive votes from each other, so that the number of message interactions between the consensus nodes is reduced, and the message interaction complexity is reduced.
Step 104: and if the consensus occupation ratio in the received votes is greater than a threshold value, aggregating the votes with the consensus occupation ratio greater than the threshold value to obtain a first aggregated signature, wherein the threshold value is greater than or equal to 2/3 and less than or equal to 1.
It should be noted that the votes aggregated in step 104 are votes for the same proposal, and when performing aggregation processing, the votes whose consensus ratio is greater than the threshold may be aggregated into the first aggregated signature by using a BLS aggregated signature algorithm or a Schnorr aggregated signature algorithm.
It will be appreciated that in determining that the consensus occupancy is greater than the threshold in the received votes, one achievable way is to: determining whether the ratio of the voting number corresponding to the consensus signature in the received votes to the total voting number is larger than the threshold value;
another way that can be achieved is: and determining whether the sum of the voting weights of the second consensus nodes corresponding to the consensus signatures in the received votes is greater than the threshold value.
Step 106: broadcasting the first aggregated signature to the plurality of second consensus nodes.
Through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the votes with the received consensus ratio larger than the threshold value to obtain the first aggregated signature, and broadcasts the first aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is saved, the number of message interactions is reduced, the complexity of the message interaction is reduced, a large number of consensus nodes are supported to carry out consensus, and the normal operation of the consensus algorithm is ensured.
Especially for a large number of common nodes (for example, the number is N), the complexity of message interaction can be reduced from O (N ^2) to O (N), so that hundreds of common nodes can be supported for common identification in production.
Optionally, the vote is a prevote for the current proposal or a precommit vote for the current proposal. In other words, the above steps 102-106 can be applied to the previous stage of the same proposal, or the previous stage of the same proposal.
In this embodiment of the present specification, based on the foregoing steps 102 to 106, referring to fig. 2, if the vote is a vote of a vote reservation, after broadcasting the first aggregated signature to the plurality of second consensus nodes, the method further includes:
step 108: the first consensus node receives presimit votes for a current proposal sent by a plurality of second consensus nodes, wherein the plurality of second consensus nodes comprise part or all of the consensus nodes except the first consensus node initiating the current proposal in a current block chain network.
Step 110: and if the consensus ratio in the received presimit votes is larger than the threshold, performing aggregation processing on the presimit votes with the consensus ratio larger than the threshold to obtain a second aggregated signature.
Step 112: broadcasting the second aggregate signature to the plurality of second consensus nodes.
Therefore, in the whole consensus process, the vote stage and the commit stage can both adopt a mode of sending the vote to the consensus node initiating the proposal, carrying out aggregation processing by the consensus node to obtain an aggregated signature, and broadcasting the aggregated signature to other consensus nodes again, so that the message interaction between other consensus nodes can be omitted, the number of message interaction is reduced, and the message interaction complexity is reduced.
Considering that the first consensus node initiating the proposal may be malicious or fail, and the second consensus node cannot receive the proposal, the first aggregate signature or the second aggregate signature, and the like, the consensus process cannot be advanced. Therefore, in this embodiment of the present disclosure, a timer may be set in the second consensus node, so that after the timer expires (the second consensus node fails to receive the proposal or the aggregated signature for a long time; or the second consensus node receives the proposal or the aggregated signature after the timeout), the second consensus node is triggered to send a special vote (also referred to as a cast vote).
It should be understood that the timer set in the second common node may be understood as a timing logic, and may set timing for three phases of the second common node respectively. A timer may also be set for each phase.
Optionally, in an embodiment of the present specification, the voting comprises a special vote; the special vote is an invalid vote sent by a second consensus node after a timer arranged in the second consensus node is overtime;
correspondingly, referring to fig. 3, based on the above scheme, the method further includes:
step 114: and if the invalid ratio in the received votes is larger than the threshold, performing aggregation processing on the special votes with the invalid ratio larger than the threshold to obtain a first special aggregation signature.
It should be understood that when the invalid occupancy ratio in the received vote is determined to be greater than the threshold, the manner is similar to the manner adopted when the consensus occupancy ratio in the received vote is determined to be greater than the threshold, and details are not repeated here.
Step 116: broadcasting the first special aggregate signature to the plurality of second consensus nodes.
It should be understood that the scenario shown in fig. 3 may be applicable to the prevote phase of the same proposal, or, the presommit phase of the same proposal.
Optionally, when the vote is a special presommit vote for a current proposal, the first special aggregated signature is a special presommit aggregated signature;
broadcasting the first special aggregation signature to the plurality of second consensus nodes, specifically including:
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
In fact, the special vote may be an invalid vote sent by the second consensus node after a timer set in the second consensus node expires, or may be an invalid vote sent by the second consensus node after receiving the first special aggregated signature.
Specifically, the votes include special votes, which are invalid votes sent by the second consensus node after receiving the first special aggregated signature;
when the vote is a special vote for the current proposal, the method further comprises:
if the invalid ratio in the received presimit votes is larger than the threshold, carrying out aggregation processing on the special presimit votes with the invalid ratio larger than the threshold to obtain a special presimit aggregation signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
Through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with invalid ratios larger than a threshold value to obtain a special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.
Referring to fig. 4, a schematic diagram of a consensus method for a block chain provided in an embodiment of this specification is shown, where an execution subject of the consensus method may be a consensus node initiating a vote on a proposal, which is defined as a second consensus node in this specification; the second consensus node may specifically be an electronic device such as a terminal and a server. The consensus method may comprise the steps of:
step 202: after receiving a proposal initiated by a first consensus node, a second consensus node sends a vote aiming at the current proposal to the first consensus node.
Step 204: and receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio larger than a threshold value when the consensus ratio of the received votes by the first consensus node is larger than the threshold value, and the threshold value is greater than or equal to 2/3 and less than or equal to 1.
Optionally, the vote is a prevote for the current proposal or a precommit vote for the current proposal. In other words, the above steps 202-204 can be applied to the previous stage of the same proposal, or the previous stage of the same proposal.
Optionally, in an embodiment of this specification, a timer is locally disposed in the second consensus node; the vote comprises a special vote;
accordingly, step 202, when sending the vote for the current proposal to the first consensus node, may specifically perform as: sending a special vote for a current proposal to the first consensus node, wherein the special vote is an invalid vote; the method further comprises the following steps:
receiving a first special aggregation signature returned by the first common node; and the first special aggregation signature is obtained by aggregating the special votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first common node in the received special votes is larger than the threshold value.
Optionally, the special vote is a special vote generated after a locally set timer expires; referring to fig. 5, based on the scheme of steps 202 to 204, after receiving the special revote aggregation signature returned by the first common identity node, the method further includes:
step 206: sending a special presimit vote for a current proposal to the first consensus node, wherein the special presimit vote is an invalid vote generated based on the special prevote aggregate signature;
step 208: receiving a special presommit aggregated signature returned by the first consensus node, and reselecting the consensus node initiating the next proposal; and the special presimit aggregation signature is obtained by aggregating the special presimit votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first consensus node in the received special presimit votes is larger than the threshold value.
The consensus scheme referred to in the present specification is detailed below by specific examples.
Referring to fig. 6, there are a consensus node (denoted as leader in fig. 6) initiating the current proposal and a consensus node (assumed to be 3, and denoted as node0, node1, and node2 in fig. 6) receiving the current proposal in the blockchain network.
An implementable scheme:
in the stage of promotion, leader packs blocks in the proposal and broadcasts to node0, node1, and node2, respectively.
In the prevote stage, node0, node1 and node2 generate prevote votes for the proposal respectively, sign the votes and send the votes to the leader, the leader collects votes from node0, node1, node2 and the leader, and if the received votes have the consensus ratio larger than 2/3, the votes are aggregated to be a prevote aggregated signature. At the same time, the prevote aggregate signature is broadcast to node0, node1, node 2.
In the presimit stage, after node0, node1 and node2 receive the prevote aggregate signature, presimit votes for the proposal are respectively generated and sent to the leader after signing, the leader collects votes from node0, node1, node2 and the leader, and if the received voting consensus ratio is more than 2/3, the votes are aggregated into a presimit aggregate signature. Meanwhile, the presommit aggregate signature is broadcast to node0, node1, node 2.
Another implementation scheme is as follows:
in the stage of promotion, leader packs blocks in the proposal and broadcasts to node0, node1, and node2, respectively.
In the period of prevote, if the timer of node0, node1 and node2 is overtime, special prevote votes for the proposal are generated respectively and sent to the leader after signature, the leader collects votes from node0, node1, node2 and the leader, and if the invalid ratio of the received votes is more than 2/3, the votes are aggregated to be a special prevote aggregated signature. Meanwhile, a special prevote aggregate signature is broadcast to node0, node1, node 2.
In the presommit stage, when the node0, node1 and node2 receive special presote aggregate signatures or the timers of the node0, node1 and node2 are overtime, special presommit votes for the proposal are respectively generated and sent to the leader after the signatures are generated, the leader collects votes from the node0, node1, node2 and the leader, and if the received votes have invalid ratio larger than 2/3, the votes are aggregated to be a special presommit aggregate signature. Meanwhile, a special presommit aggregated signature is broadcast to node0, node1, node2 to facilitate reselection of the consensus node to initiate a new proposal.
Example two
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present specification. Referring to fig. 7, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the shared resource access control device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the first consensus nodes in the current block link network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1;
broadcasting the first aggregate signature to the plurality of second consensus nodes.
Alternatively, the first and second liquid crystal display panels may be,
after receiving a proposal initiated by a first consensus node, sending a vote aiming at the current proposal to the first consensus node;
and receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio larger than a threshold value when the consensus ratio of the received votes by the first consensus node is larger than the threshold value, and the threshold value is greater than or equal to 2/3 and less than or equal to 1.
The method performed by the block chain consensus device as disclosed in the embodiments of fig. 1-5 of the present specification can be implemented in or by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present specification may be embodied directly in a hardware decoding processor, or in a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and combines hardware thereof to complete the steps of the method.
The electronic device may further execute the method shown in fig. 1 or fig. 4, and implement the functions of the block chain consensus device in the embodiments shown in fig. 1 and fig. 4, which are not described herein again in this specification.
Of course, besides the software implementation, the electronic device of the embodiment of the present disclosure does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
Through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with the consensus or invalid ratio larger than the threshold value to obtain the special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.
EXAMPLE III
Embodiments of the present specification also propose a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, are capable of causing the portable electronic device to perform the method of the embodiment shown in fig. 1, and in particular for performing the method of:
receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the first consensus nodes in the current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, aggregating the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is greater than or equal to 2/3 and less than or equal to 1;
broadcasting the first aggregate signature to the plurality of second consensus nodes.
Alternatively, the first and second electrodes may be,
after receiving a proposal initiated by a first consensus node, sending a vote aiming at the current proposal to the first consensus node;
and receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio larger than a threshold value when the consensus ratio of the received votes by the first consensus node is larger than the threshold value, and the threshold value is greater than or equal to 2/3 and less than or equal to 1.
Through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with the consensus or invalid ratio larger than the threshold value to obtain the special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.
Example four
Fig. 8 is a schematic structural diagram of a consensus device 800 of a block chain according to an embodiment of the present disclosure. Referring to fig. 8, in a software implementation, the block chain consensus apparatus includes:
a receiving module 802, configured to receive votes sent by a plurality of second consensus nodes for a current proposal, where the plurality of second consensus nodes include some or all of the first consensus nodes in a current block chain network;
an aggregation module 804, configured to aggregate votes with a consensus ratio greater than a threshold to obtain a first aggregated signature if the consensus ratio in the received votes is greater than the threshold, where the threshold is greater than or equal to 2/3 and less than or equal to 1;
a sending module 806 that broadcasts the first aggregated signature to the plurality of second consensus nodes.
In a specific implementation of the embodiments of the present specification, the vote is a prevote for the current proposal or a presommit vote for the current proposal.
In another specific implementation manner of this embodiment of this specification, if the vote is a vote, after the sending module 806 broadcasts the first aggregated signature to the plurality of second consensus nodes, the receiving module 802 is further configured to:
receiving presommit votes for a current proposal sent by a plurality of second consensus nodes, wherein the plurality of second consensus nodes comprise part or all of the consensus nodes except the first consensus node initiating the current proposal in a current block chain network;
the aggregating module 804 is further configured to, if the consensus ratio in the received presimit votes is greater than the threshold, aggregate the presimit votes whose consensus ratio is greater than the threshold to obtain a second aggregated signature;
the sending module 806 is further configured to broadcast the second aggregate signature to the plurality of second consensus nodes.
In another particular implementation of the embodiments of the present description, the voting includes special voting; the special vote is an invalid vote sent by a second consensus node after a timer arranged in the second consensus node is overtime;
the aggregation module 804 is further configured to aggregate the special votes with the invalid occupancy ratio larger than the threshold value to obtain a first special aggregated signature if the invalid occupancy ratio in the received votes is larger than the threshold value;
the sending module 806 is further configured to broadcast the first special aggregated signature to the plurality of second consensus nodes.
In another particular implementation of an embodiment of the present specification, when the vote is a special presimit vote for a current proposal, the first special aggregated signature is a special presimit aggregated signature;
the sending module 806, when broadcasting the first special aggregated signature to the plurality of second common node, is specifically configured to:
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
In another specific implementation manner of the embodiment of the present specification, the votes include special votes, where the special votes are invalid votes sent by the second consensus node after receiving the first special aggregated signature;
when the vote is a special prevote for the current proposal, the aggregation module 804 is further configured to aggregate the special precommit votes with invalid occupation ratios larger than a threshold value to obtain a special precommit aggregate signature if the invalid occupation ratios in the received precommit votes are larger than the threshold value;
the sending module 806 is further configured to broadcast a special presmit aggregate signature to the second consensus nodes, so that the second consensus nodes reselect the consensus node initiating the next proposal after receiving the special presmit aggregate signature.
In another specific implementation manner of the embodiment of this specification, an aggregation algorithm used in aggregating the votes includes at least one or a combination of the following:
BLS aggregate signature algorithm, Schnorr aggregate signature algorithm.
In another specific implementation manner of the embodiment of the present specification, when it is determined that the consensus percentage in the received votes is greater than the threshold, determining according to whether the ratio of the number of votes corresponding to the consensus signature in the received votes to the total number of votes is greater than the threshold; or, the determination is made according to whether the sum of the voting weights of the second consensus nodes corresponding to the consensus signatures in the received votes is greater than the threshold.
Through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with the consensus or invalid ratio larger than the threshold value to obtain the special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.
Fig. 9 is a schematic structural diagram of a block chain consensus device 900 according to an embodiment of the present disclosure. Referring to fig. 9, in a software implementation, the block chain consensus apparatus includes:
a sending module 902, configured to send, after receiving a proposal initiated by a first consensus node, a vote for a current proposal to the first consensus node;
a receiving module 904, configured to receive a first aggregation signature returned by the first consensus node, where the first aggregation signature is obtained by aggregating, by the first consensus node, votes whose consensus ratio is greater than a threshold when the consensus ratio in the received votes is greater than the threshold, where the threshold is greater than or equal to 2/3 and less than or equal to 1.
In a specific implementation manner of the embodiment of the present specification, a timer is locally disposed in the second consensus node; the vote comprises a special vote;
when the sending module 902 sends the vote for the current proposal to the first consensus node, it is specifically configured to: sending a special vote for a current proposal to the first consensus node, wherein the special vote is an invalid vote;
the receiving module 904 is further configured to receive a first special aggregation signature returned by the first common node; and the first special aggregation signature is obtained by aggregating the special votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first common node in the received special votes is larger than the threshold value.
In another specific implementation manner of the embodiment of the present specification, the special vote is a special vote generated after a locally set timer expires;
after the receiving module 904 receives the special prevote aggregation signature returned by the first common identification node, the sending module 902 is further configured to send a special precommit vote for the current proposal to the first common identification node, where the special precommit vote is an invalid vote generated based on the special prevote aggregation signature;
the receiving module 904 is further configured to receive a special presommit aggregated signature returned by the first consensus node, and reselect a consensus node initiating a next proposal; and the special presimit aggregation signature is obtained by aggregating the special presimit votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first consensus node in the received special presimit votes is larger than the threshold value.
In another specific implementation manner of the embodiment of the present specification, the special vote is a special presimit vote generated based on the special prevote aggregate signature;
before the sending module 902 sends the special precommit vote for the current proposal to the first common node, the sending module 902 is further configured to send the special prevote for the current proposal to the first common node, where the special prevote is an invalid vote generated after a locally set timer expires;
the receiving module 904 is further configured to receive a special revote aggregation signature returned by the first common identity node; and the special prevote aggregation signature is obtained by aggregating the special prevote with the invalid occupation ratio being greater than the threshold value when the invalid occupation ratio of the first common identification node in the received special prevote is greater than the threshold value.
Through the technical scheme, when voting is carried out on the initiated proposal, only the consensus node initiating the proposal receives the voting, and other consensus nodes do not receive the voting, so that the consensus node initiating the proposal aggregates the received votes with the consensus or invalid ratio larger than the threshold value to obtain the special aggregated signature, and broadcasts the special aggregated signature to other consensus nodes. Therefore, only the consensus node initiating the proposal carries out message interaction with other consensus nodes, but the message interaction between other consensus nodes is omitted, the number of message interactions is reduced, and the complexity of the message interaction is reduced.
It should be understood that the block chain consensus device in this specification may also perform the method performed by the block chain consensus device (or apparatus) in fig. 1-5, and implement the functions of the block chain consensus device (or apparatus) in the embodiments shown in fig. 1-5, which are not described herein again.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (15)

1. A method for block chain consensus, comprising:
the method comprises the steps that a first consensus node receives votes sent by a plurality of second consensus nodes aiming at a current proposal, wherein the second consensus nodes comprise part or all of the first consensus nodes in a current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1;
broadcasting the first aggregated signature to the plurality of second consensus nodes;
wherein the votes include two special votes; the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage; if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature;
broadcasting the special prevote aggregate signature to the plurality of second consensus nodes;
the second special vote is a special presommit vote which is sent by the second common identification node after receiving the special prevote aggregation signature in a presommit stage; if the invalid ratio in the received special presimit votes is larger than the threshold, carrying out aggregation processing on the special presimit votes with the invalid ratio larger than the threshold to obtain a special presimit aggregation signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
2. The method of claim 1, wherein the vote is a special prevote for the current proposal or a special presommit vote for the current proposal.
3. The method of claim 2, after broadcasting the first aggregated signature to the plurality of second consensus nodes if the vote is a special vote, further comprising:
the first consensus node receives a special presommit vote for a current proposal sent by a plurality of second consensus nodes, wherein the plurality of second consensus nodes comprise part or all of the consensus nodes except the first consensus node initiating the current proposal in the current block chain network;
if the consensus occupation ratio in the received special presimit votes is larger than the threshold value, carrying out aggregation processing on the special presimit votes of which the consensus occupation ratio is larger than the threshold value to obtain a special presimit aggregation signature;
broadcasting the special presimit aggregate signature to the plurality of second consensus nodes.
4. The method of claim 1, wherein the first aggregated signature is a special presimit aggregated signature when the vote is a special presimit vote for a current proposal;
broadcasting the first aggregated signature to the plurality of second consensus nodes, specifically including:
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
5. The method of claim 1, wherein an aggregation algorithm used in aggregating the votes comprises at least one or a combination of the following:
BLS aggregate signature algorithm, Schnorr aggregate signature algorithm.
6. The method of claim 1, wherein upon determining that the consensus percentage of the received votes is greater than the threshold, determining based on whether a ratio of a number of votes corresponding to consensus signatures in the received votes to a total number of votes is greater than the threshold; or, the determination is made according to whether the sum of the voting weights of the second consensus nodes corresponding to the consensus signatures in the received votes is greater than the threshold.
7. An apparatus for block chain consensus, comprising:
the receiving module is used for receiving votes which are sent by a plurality of second consensus nodes and aim at the current proposal, wherein the second consensus nodes comprise part or all of the consensus nodes including the first consensus node in the current block chain network;
the aggregation module is used for aggregating the votes with the consensus ratio larger than a threshold value to obtain a first aggregated signature if the consensus ratio in the received votes is larger than the threshold value, wherein the threshold value is greater than or equal to 2/3 and less than or equal to 1; wherein the votes include two special votes; the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage;
if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature; broadcasting the special prevote aggregate signature to the plurality of second consensus nodes;
the second special vote is a special presmit vote which is sent by the second consensus node after receiving the special presote aggregate signature in the presmit stage;
if the invalid ratio in the received special presimit votes is larger than the threshold, carrying out aggregation processing on the special presimit votes with the invalid ratio larger than the threshold to obtain a special presimit aggregation signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature;
a sending module that broadcasts the first aggregated signature to the plurality of second consensus nodes.
8. A method for block chain consensus, comprising:
after receiving a proposal initiated by a first consensus node, a second consensus node sends a vote aiming at the current proposal to the first consensus node;
receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio greater than a threshold when the consensus ratio of the received votes by the first consensus node is greater than the threshold, and the threshold is greater than or equal to 2/3 and less than or equal to 1;
a timer is arranged in the second consensus node locally; the voting comprises two special votes, wherein the first special vote is a special prevote which is sent by a second consensus node after a timer arranged in the second consensus node is overtime in a prevote stage, and the second special vote is a special prevote which is sent by the second consensus node after a special prevote aggregation signature is received in a prevote stage;
sending, to the first consensus node, a vote for a current proposal, specifically including: sending a special presommit vote for a current proposal to the first consensus node, wherein the special presommit vote is an invalid vote sent after receiving a special prevote aggregate signature; the method further comprises the following steps: receiving a special presommit aggregated signature returned by the first consensus node; the special presimit aggregation signature is obtained by aggregating the special presimit votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first consensus node in the received special presimit votes is larger than the threshold value;
before sending a special presmit vote for a current proposal to the first consensus node, the method further comprises: sending a special vote for a current proposal to the first common identification node, wherein the special vote is an invalid vote generated after a locally set timer is overtime in a vote stage; receiving a special prevote aggregation signature returned by the first common identification node; and the special prevote aggregation signature is obtained by aggregating the special prevote with the invalid occupation ratio being greater than the threshold value when the invalid occupation ratio of the first common identification node in the received special prevote is greater than the threshold value.
9. The method according to claim 8, wherein the special vote is a special vote generated after a locally set timer expires in a vote phase;
after receiving the special prevote aggregation signature returned by the first common identification node, the method further includes:
sending a special presimit vote for a current proposal to the first consensus node, wherein the special presimit vote is an invalid vote generated based on the special prevote aggregate signature during a presimit phase;
receiving a special presommit aggregated signature returned by the first consensus node, and reselecting the consensus node initiating the next proposal; and the special presimit aggregation signature is obtained by aggregating the special presimit votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first consensus node in the received special presimit votes is larger than the threshold value.
10. An apparatus for block chain consensus, comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a vote aiming at a current proposal to a first consensus node after receiving the proposal initiated by the first consensus node;
a receiving module, configured to receive a first aggregation signature returned by the first consensus node, where the first aggregation signature is obtained by aggregating votes with a consensus ratio greater than a threshold when the consensus ratio of the received votes by the first consensus node is greater than the threshold, where the threshold is greater than or equal to 2/3 and less than or equal to 1; the voting comprises two special votes, wherein the first special vote is a special prevote which is sent by a second consensus node after a timer arranged in the second consensus node is overtime in a prevote stage, and the second special vote is a special prevote which is sent by the second consensus node after a special prevote aggregation signature is received in a prevote stage;
the sending module is specifically configured to: sending a special presommit vote for a current proposal to the first consensus node, wherein the special presommit vote is an invalid vote sent after receiving a special prevote aggregate signature; the receiving module is further configured to: receiving a special presommit aggregated signature returned by the first consensus node; the special presimit aggregation signature is obtained by aggregating the special presimit votes with the invalid occupation ratio larger than the threshold value when the invalid occupation ratio of the first consensus node in the received special presimit votes is larger than the threshold value;
before sending a special presommit vote for a current proposal to the first consensus node, the sending module is further to: sending a special vote for a current proposal to the first common identification node, wherein the special vote is an invalid vote generated after a locally set timer is overtime in a vote stage; the receiving module is further configured to: receiving a special prevote aggregation signature returned by the first common identification node; and the special prevote aggregation signature is obtained by aggregating the special prevote with the invalid occupation ratio being greater than the threshold value when the invalid occupation ratio of the first common identification node in the received special prevote is greater than the threshold value.
11. A system for consensus on blockchains, comprising: a first consensus node and a plurality of second consensus nodes;
the first consensus node receives votes sent by a plurality of second consensus nodes aiming at the current proposal, wherein the plurality of second consensus nodes comprise part or all of the first consensus nodes in the current block chain network;
if the consensus occupation ratio in the received votes is greater than a threshold, the first consensus node aggregates the votes with the consensus occupation ratio greater than the threshold to obtain a first aggregated signature, wherein the threshold is greater than or equal to 2/3 and less than or equal to 1; wherein the votes include two special votes;
the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage;
if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature; broadcasting the special prevote aggregate signature to the plurality of second consensus nodes;
the second special voting is that in a presommit stage, the second common identification node sends a special presommit voting after receiving the special presote aggregate signature, and if the invalid ratio in the received special presommit voting is greater than the threshold, the special presommit voting with the invalid ratio greater than the threshold is aggregated to obtain a special presommit aggregate signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature;
the first consensus node broadcasts the first aggregate signature to the plurality of second consensus nodes.
12. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the consensus nodes including the first consensus node in the current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1; wherein the votes include two special votes;
the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage;
if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature; broadcasting the special prevote aggregate signature to the plurality of second consensus nodes;
the second special voting is that in a presommit stage, the second common identification node sends a special presommit voting after receiving the special presote aggregate signature, and if the invalid ratio in the received special presommit voting is greater than the threshold, the special presommit voting with the invalid ratio greater than the threshold is aggregated to obtain a special presommit aggregate signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature;
broadcasting the first aggregated signature to the plurality of second consensus nodes.
13. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
after receiving a proposal initiated by a first consensus node, sending a vote aiming at the current proposal to the first consensus node;
receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio greater than a threshold when the consensus ratio of the received votes by the first consensus node is greater than the threshold, and the threshold is greater than or equal to 2/3 and less than or equal to 1; wherein the votes include two special votes;
the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage;
if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature; broadcasting the special prevote aggregate signature to a plurality of second consensus nodes;
the second special voting is that in a presommit stage, the second common identification node sends a special presommit voting after receiving the special presote aggregate signature, and if the invalid ratio in the received special presommit voting is greater than the threshold, the special presommit voting with the invalid ratio greater than the threshold is aggregated to obtain a special presommit aggregate signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
14. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
receiving votes sent by a plurality of second consensus nodes for the current proposal, wherein the plurality of second consensus nodes comprise part or all of the consensus nodes including the first consensus node in the current block chain network;
if the consensus occupation ratio in the received votes is larger than a threshold value, performing aggregation processing on the votes with the consensus occupation ratio larger than the threshold value to obtain a first aggregated signature, wherein the threshold value is larger than or equal to 2/3 and smaller than or equal to 1; wherein the votes include two special votes;
the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage;
if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature; broadcasting the special credit aggregated signature to the plurality of second consensus nodes;
the second special voting is that in a presommit stage, the second common identification node sends a special presommit voting after receiving the special presote aggregate signature, and if the invalid ratio in the received special presommit voting is greater than the threshold, the special presommit voting with the invalid ratio greater than the threshold is aggregated to obtain a special presommit aggregate signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature;
broadcasting the first aggregated signature to the plurality of second consensus nodes.
15. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
after receiving a proposal initiated by a first consensus node, sending a vote aiming at the current proposal to the first consensus node;
receiving a first aggregation signature returned by the first consensus node, wherein the first aggregation signature is obtained by aggregating votes with a consensus ratio greater than a threshold when the consensus ratio of the received votes by the first consensus node is greater than the threshold, and the threshold is greater than or equal to 2/3 and less than or equal to 1; wherein the votes include two special votes;
the first special vote is a special vote sent by the second common identification node after a timer arranged in the second common identification node is overtime in a vote stage;
if the invalid occupation ratio in the received special prevote is larger than the threshold value, carrying out aggregation processing on the special prevote with the invalid occupation ratio larger than the threshold value to obtain a special prevote aggregation signature; broadcasting the special credit aggregated signature to the plurality of second consensus nodes;
in the second special voting stage, when the second consensus node receives the special presimit voting sent after the special presvite aggregated signature, if the invalid ratio in the received special presimit voting is greater than the threshold, the special presimit voting with the invalid ratio greater than the threshold is aggregated to obtain the special presimit aggregated signature;
broadcasting a special presimit aggregate signature to the second consensus nodes so that the second consensus nodes reselect a consensus node initiating a next proposal after receiving the special presimit aggregate signature.
CN201910851309.4A 2019-09-10 2019-09-10 Block chain consensus method, device and system and electronic equipment Active CN110708163B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910851309.4A CN110708163B (en) 2019-09-10 2019-09-10 Block chain consensus method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910851309.4A CN110708163B (en) 2019-09-10 2019-09-10 Block chain consensus method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN110708163A CN110708163A (en) 2020-01-17
CN110708163B true CN110708163B (en) 2022-08-02

Family

ID=69194587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910851309.4A Active CN110708163B (en) 2019-09-10 2019-09-10 Block chain consensus method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN110708163B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314067B (en) * 2020-02-05 2021-04-16 腾讯科技(深圳)有限公司 Block storage method and device, computer equipment and storage medium
CN111427957B (en) * 2020-03-26 2021-05-11 财付通支付科技有限公司 Block chain voting information verification method, device, equipment and storage medium
CN111478775B (en) * 2020-06-22 2020-10-23 杭州趣链科技有限公司 Interactive aggregated signature method, equipment and storage medium
CN112511338A (en) * 2020-11-09 2021-03-16 迅鳐成都科技有限公司 Block chain consensus network dynamic recovery method, electronic device, system and medium
CN113609515B (en) * 2021-10-09 2022-02-18 支付宝(杭州)信息技术有限公司 Consensus method and block chain system
CN115396504B (en) * 2022-08-23 2024-01-16 浪潮工业互联网股份有限公司 Block chain voting data caching method, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108648078A (en) * 2018-05-02 2018-10-12 杭州秘猿科技有限公司 A kind of transaction preprocess method, device and electronic equipment
WO2018193355A1 (en) * 2017-04-18 2018-10-25 nChain Holdings Limited Secure blockchain-based consensus
CN109104286A (en) * 2018-07-26 2018-12-28 杭州安恒信息技术股份有限公司 A kind of new block generation method of the common recognition based on threshold digital signature
CN109360100A (en) * 2018-11-13 2019-02-19 北京航空航天大学 Transaction rapid acknowledgment method and device based on block chain technology

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060036B (en) * 2016-05-26 2019-07-16 布比(北京)网络技术有限公司 Decentralization common recognition method and device
CN107590738A (en) * 2017-08-24 2018-01-16 阿里巴巴集团控股有限公司 Processing method, device and the server of selection common recognition node
CN109150971B (en) * 2018-06-29 2020-10-23 腾讯科技(深圳)有限公司 Super node voting and election method and device and network node
CN109064328B (en) * 2018-07-09 2022-04-15 夸克链科技(深圳)有限公司 Consensus method of block chains

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018193355A1 (en) * 2017-04-18 2018-10-25 nChain Holdings Limited Secure blockchain-based consensus
CN108648078A (en) * 2018-05-02 2018-10-12 杭州秘猿科技有限公司 A kind of transaction preprocess method, device and electronic equipment
CN109104286A (en) * 2018-07-26 2018-12-28 杭州安恒信息技术股份有限公司 A kind of new block generation method of the common recognition based on threshold digital signature
CN109360100A (en) * 2018-11-13 2019-02-19 北京航空航天大学 Transaction rapid acknowledgment method and device based on block chain technology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Facebook主导的Libra所基于的共识HotStuff是如何工作的?;Ontology Blockchain;《CSDN》;20190829;正文第二节、HotStuff 基础协议介绍 *
LibraBFT中文翻译;邃谧;《http://isuimi.com/2019/06/LibraBFT-翻译》;20190619;正文2.3拜占庭容错,正文第11、32页 *

Also Published As

Publication number Publication date
CN110708163A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN110708163B (en) Block chain consensus method, device and system and electronic equipment
CN110659988B (en) Parallel processing method and device for block chain consensus and execution and electronic equipment
CN109447810B (en) Parallel block chain consensus method, system, electronic device and computer-readable storage medium
CN107391320B (en) Consensus method and device
CN108648078B (en) Transaction preprocessing method and device and electronic equipment
KR102469267B1 (en) Blockchain consensus method, accounting node and node
CN111461887B (en) Block chain consensus processing method and device and electronic equipment
CN109660594B (en) Directional pushing method, display method, device and equipment for business processing result
CN110648136B (en) Consensus and transaction synchronous parallel processing method and device and electronic equipment
CN109951534B (en) Consensus method, device and system
CN110020859B (en) Parallel execution block chain consensus method and device and electronic equipment
CN110557445A (en) Access request routing method and device, storage medium and electronic equipment
US20220035796A1 (en) Block Confirmation Method, Device and Storage Medium
CN111369358B (en) Block chain consensus method and device and electronic equipment
CN112153143B (en) Flow scheduling method and device for Kubernetes cluster and electronic equipment
CN113205416A (en) Service processing method and system based on block chain prediction machine
CN109582398B (en) State processing method and device and electronic equipment
TWI748438B (en) Content display method, device and electronic equipment
CN111698244B (en) Method and device for rapidly participating in consensus of newly added nodes and electronic equipment
CN110806971A (en) Version testing method and device and electronic equipment
CN110781153B (en) Cross-application information sharing method and system based on block chain
CN110648125B (en) Packaging transaction method and device, electronic equipment and storage medium
CN109392196B (en) Big data analysis method and system based on mobile terminal
CN110599139B (en) Block output method and device in block chain consensus algorithm
CN110321384B (en) Block chain-based data recording method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200117

Assignee: Hangzhou Xita Technology Co.,Ltd.

Assignor: CRYPTAPE Co.,Ltd.

Contract record no.: X2022330000524

Denomination of invention: A consensus method, device, system and electronic equipment of blockchain

Granted publication date: 20220802

License type: Common License

Record date: 20221010

EE01 Entry into force of recordation of patent licensing contract
TR01 Transfer of patent right

Effective date of registration: 20231221

Address after: 10/F, Guotou Building, No. 398 Shaoxing Road, Gongshu District, Hangzhou City, Zhejiang Province, 310000

Patentee after: Hangzhou Xita Technology Co.,Ltd.

Address before: Room 1301, block a, Huaxing Times Square, 478 Wensan Road, Xihu District, Hangzhou City, Zhejiang Province, 310013

Patentee before: CRYPTAPE Co.,Ltd.

TR01 Transfer of patent right