CN109447810B - Parallel block chain consensus method, system, electronic device and computer-readable storage medium - Google Patents

Parallel block chain consensus method, system, electronic device and computer-readable storage medium Download PDF

Info

Publication number
CN109447810B
CN109447810B CN201811440414.0A CN201811440414A CN109447810B CN 109447810 B CN109447810 B CN 109447810B CN 201811440414 A CN201811440414 A CN 201811440414A CN 109447810 B CN109447810 B CN 109447810B
Authority
CN
China
Prior art keywords
consensus
result
nodes
consensus node
submission
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
CN201811440414.0A
Other languages
Chinese (zh)
Other versions
CN109447810A (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 CN201811440414.0A priority Critical patent/CN109447810B/en
Publication of CN109447810A publication Critical patent/CN109447810A/en
Application granted granted Critical
Publication of CN109447810B publication Critical patent/CN109447810B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses a parallel block chain consensus method, a system, electronic equipment and a computer-readable storage medium. The method comprises the following steps: when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer; after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a verification request to a verification module while broadcasting the pre-voting result to other consensus nodes; each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result; each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes; and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.

Description

Parallel block chain consensus method, system, electronic device and computer-readable storage medium
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a parallel block chain consensus method, a parallel block chain consensus system, electronic equipment and a computer-readable storage medium.
Background
The blockchain technique, also known as distributed ledger technique, is essentially a decentralized distributed internet database. In the blockchain technology, a consensus mechanism is an important method for establishing trust and obtaining rights and interests among different blockchain nodes in a blockchain network.
Most of the current block chain systems adopt a mode of executing first, then performing consensus and then executing, and most of the consensus methods adopt three-stage protocols, namely a pre-preparation stage, a preparation stage and a submission stage. Before the preparation stage, a packed transaction module of the blockchain system packs transaction data and transmits the transaction data to a consensus module for consensus. After the submission stage of the consensus, the consensus module submits the consensus to the execution module for execution, and the execution result needs to be consensus again. Throughout the process, the execution module is in an idle state during the course of the consensus three-phase protocol. In the process of packaging the transaction by the packaging transaction module and the execution process of the execution module, the consensus module is also in an idle state, and the efficiency of the blockchain system is low.
In view of the above, the present invention provides a parallel blockchain consensus method, system, electronic device and computer-readable storage medium, which parallels the operation of a consensus module with the operation of a packed transaction module and an execution module to improve the efficiency of a blockchain system.
Disclosure of Invention
In order to overcome the above technical problems or at least partially solve the above technical problems, the following technical solutions are proposed:
in a first aspect, an embodiment of the present application provides a parallel blockchain consensus method, including the following steps:
when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a verification request to a verification module while broadcasting the pre-voting result to other consensus nodes;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
Preferably, the pre-vote results include two types: empty block and legal;
when the consensus node does not receive the proposal or receives an illegal proposal within a preset time, the result of the pre-voting is an empty block; when the consensus node receives a legal offer within a preset time, the result of the pre-voting is legal;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result, and the method specifically comprises the following steps:
and counting the number of the received pre-voting results by each consensus node according to the type, wherein the type of which the number reaches the preset proportion of the total number of the consensus nodes is the pre-submission result of the consensus node.
Preferably, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result, and the method specifically includes:
each consensus node carries out quantity statistics on the types of the received pre-submission results, and when the quantity of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails.
Preferably, the preset proportion of the total number of the common nodes is two thirds.
Preferably, when the consensus result of the proposer in the consensus nodes is successful, the proposer sends the proposal block to an execution module to obtain an execution result; and entering the next round of consensus when the consensus result of the proposer in the consensus nodes is that the consensus fails.
Preferably, the execution result will follow a new round of proposal and consensus along with the proposed block at a fixed delay height.
In a second aspect, an embodiment of the present invention further provides a parallel blockchain consensus system, including a checking module and a consensus module including a plurality of consensus nodes,
when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a verification request to a verification module while broadcasting the pre-voting result to other consensus nodes;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
Preferably, the pre-vote results include two types: empty block and legal;
when the consensus node does not receive the proposal or receives an illegal proposal within a preset time, the result of the pre-voting is an empty block; when the consensus node receives a legal offer within a preset time, the result of the pre-voting is legal;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result, and the method specifically comprises the following steps:
and counting the number of the received pre-voting results by each consensus node according to the type, wherein the type of which the number reaches the preset proportion of the total number of the consensus nodes is the pre-submission result of the consensus node.
Preferably, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result, and the method specifically includes:
each consensus node carries out quantity statistics on the types of the received pre-submission results, and when the quantity of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails.
Preferably, the preset proportion of the total number of the common nodes is two thirds.
Preferably, the method further comprises an execution module, when the consensus result of the proposer in the consensus node is successful, the proposer sends the proposal block to the execution module to obtain an execution result; and entering the next round of consensus when the consensus result of the proposer in the consensus nodes is that the consensus fails.
Preferably, the system further comprises a packaging transaction module, and the packaging transaction module packages the execution result along with the proposal block on the fixed delay height to carry out a new round of proposal and consensus.
In a third aspect, an electronic device is further provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the computer program is executed by the processor to perform the parallel block chain consensus method described above.
In a fourth aspect, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the parallel blockchain consensus method is implemented.
The invention has the following beneficial effects:
1. the verification process of the verification module is executed in parallel with the process of sending and receiving the pre-votes by the consensus node, so that the transaction processing capacity is improved;
2. and sending the block to an execution module for execution in a consensus submission stage, and carrying out a new round of proposal and consensus on the consensus of the execution result along with the recommendation block at the fixed delay height, so that the execution efficiency of the system is improved.
Drawings
FIG. 1 is a flowchart illustrating a parallel blockchain consensus method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a parallel blockchain consensus method according to a second embodiment of the present invention;
FIG. 3 is a block diagram of a parallel blockchain consensus system according to a third embodiment of the present invention;
FIG. 4 is a block diagram of a parallel blockchain consensus system according to a fourth embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the invention;
fig. 6 is a schematic structural diagram of a block chain consensus device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of the present invention discloses a parallel blockchain consensus method, including the following steps:
s101, when a round of consensus starts, the proposer in the consensus nodes is determined, and the proposer broadcasts the proposal block to other consensus nodes.
Specifically, each consensus node determines whether the consensus node is a proposer or not through a deterministic algorithm. With this arrangement, the consensus node can uniquely identify a proposer. In one embodiment, the proposed block may comprise a plurality of proposed blocks for a transaction.
S102, after each consensus node conducts pre-voting on the received proposed block, each consensus node sends a check request to the check module while broadcasting the pre-voting result to other consensus nodes.
In a specific application example, the pre-voting has three cases: the proposed consensus node is not received within a certain time, and the result of pre-voting is as follows: empty blocks; the pre-vote result of the consensus node receiving the illegal proposal is as follows: empty blocks; the pre-vote result of the consensus node receiving the legal proposal is as follows: and (4) legality. When the consensus node does not receive the proposal within the preset time or the proposal is illegal, the result of pre-voting is an empty block; and when the consensus node receives a legal offer within the preset time, the result of the pre-voting is legal.
And S103, each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result.
Specific application examples include: and counting the number of the received pre-voting results by each consensus node according to the type, wherein the type of which the number reaches the preset proportion of the total number of the consensus nodes is the pre-submission result of the consensus node.
S104, each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcasted to other consensus nodes; and if the check fails, sending the pre-submission result of the empty block to other common identification nodes.
According to the foregoing technical solution, the empty block pre-commit result has two sources: firstly, the consensus node obtains a pre-submission result of the empty block, and the verification is successful; and the common node obtains a legal pre-submission result but fails to check.
And S105, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
In a specific application example, each consensus node performs quantity statistics on the types of the received pre-submission results, and if the quantity of the pre-submission results of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the empty block type pre-submission results reaches the preset proportion of the total number of the consensus nodes, the consensus fails. Typically, the predetermined ratio of the total number of the common nodes is two thirds. Namely, if more than two thirds of the consensus nodes submit legal pre-submission, the consensus is successful; and if more than two thirds of the consensus nodes submit empty blocks, the consensus fails. Those skilled in the art can understand that the preset proportion of the total number of the consensus nodes can be set according to actual requirements.
The parallel block chain consensus method implemented above is one of Byzantine fault-tolerant algorithms, a plurality of nodes participate in consensus of the current height at each height, and the consensus nodes achieve final consensus through at least one round of consensus under the condition that the total number of the consensus nodes is up to the honesty of the nodes in the preset proportion. According to the parallel block chain consensus method implemented in the steps, the node sends the check request to the check module while casting the legal pre-vote, so that the transaction processing capacity is improved.
Referring to fig. 2, a parallel blockchain consensus method according to a second embodiment of the present invention is shown, including the following steps:
s101, when a round of consensus starts, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
s102, after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a check request to a check module while broadcasting the pre-voting result to other consensus nodes;
s103, each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
s104, each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcasted to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
s105, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result;
s106, each consensus node counts the number of the types of the received pre-submission results, and if the number of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails.
Typically, the predetermined ratio of the total number of the common nodes is two thirds. Namely, if more than two thirds of the consensus nodes submit legal pre-submission, the consensus is successful; and if more than two thirds of the consensus nodes submit empty blocks, the consensus fails.
Referring to fig. 3, a parallel blockchain consensus method according to a third embodiment of the present invention is shown, including the following steps:
s101, when a round of consensus starts, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
s102, after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a check request to a check module while broadcasting the pre-voting result to other consensus nodes;
and S103, each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result.
S104, each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcasted to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
s105, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result;
s106, each consensus node counts the number of the types of the received pre-submission results, and if the number of the legal types reaches a preset proportion of the total number of the consensus nodes, the consensus is successful; when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails;
s107, when the consensus result of the proposer in the consensus nodes is successful, the proposer sends the proposal block to an execution module to obtain an execution result; when the consensus result of the proposer in the consensus nodes is that the consensus fails, the next round of consensus is entered.
Referring to fig. 4, a parallel blockchain consensus method according to a fourth embodiment of the present invention is shown, including the following steps:
s101, when a round of consensus starts, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
s102, after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a check request to a check module while broadcasting the pre-voting result to other consensus nodes;
s103, each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
s104, each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcasted to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
s105, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result;
s106, each consensus node counts the number of the types of the received pre-submission results, and if the number of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails;
s107, when the consensus result of the proposer in the consensus nodes is successful, the proposer sends the proposal block to an execution module to obtain an execution result; when the consensus result of the proposer in the consensus nodes is that the consensus fails, the next round of consensus is entered.
The execution result will be a new round of proposition and consensus along with the proposed block at the fixed delay height S108.
In the specific application example, the fixed delay height is the next or two next trades.
According to the parallel block chain consensus method provided by the embodiment of the invention, on the basis that the check request is sent to the check module while the node throws out the pre-vote, the block is sent to the execution module for execution in the consensus submitting stage, and the consensus of the execution result is carried out along with the proposal of the next block, so that the transaction processing capacity is improved, and the execution efficiency of the system is also improved.
The electronic device of the embodiment of the present invention is described in detail below with reference to fig. 5. On a hardware level, the electronic device includes a processor, and optionally 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 (NVM), such as at least one 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 interconnected by an internal bus, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. Wherein the bus can 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. 5, but this does not represent only one bus or one type of bus.
The memory for storing the program, in particular, the program may include program code including computer operating instructions, the memory may include memory and non-volatile storage, and provide 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 content recommendation device on a logic level. And the processor is used for executing the program stored in the memory and is specifically used for executing the method operation executed when the server is taken as an execution main body.
The parallel blockchain consensus method according to the embodiments of the present invention shown in fig. 1 to fig. 4 can be applied to or implemented 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), etc., and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in embodiments of the present invention 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 the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in a decoder. 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 completes the steps of the method in combination with hardware of the processor.
Of course, the electronic device in the embodiment of the present specification does not exclude other implementations, such as a logic device or a combination of software and hardware, besides a software implementation, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or a logic device.
Embodiments of the present invention also provide 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 perform operations comprising:
when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a verification request to a verification module while broadcasting the pre-voting result to other consensus nodes;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Referring to fig. 6, a schematic structural diagram of a parallel blockchain consensus device 10 according to an embodiment of the present invention is shown, the device mainly includes a check module 101 and a consensus module 102 including a plurality of consensus nodes,
when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
after each consensus node (shown as consensus node 1, consensus node 2 to consensus node N) pre-votes for the received proposed block, each consensus node sends a check request to the check module while broadcasting the pre-voted result to other consensus nodes;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
Through the parallel block chain consensus device implemented above, by using one of the Byzantine fault-tolerant algorithms, at each height, a plurality of nodes participate in consensus at the current height, and under the condition that the total number of the consensus nodes reaches the honesty of the nodes in a preset proportion, the consensus nodes reach final consensus through at least one round of consensus. The parallel block chain consensus device implemented in the steps sends the check request to the check module while the node throws out the legal pre-vote, so that the transaction processing capacity is improved.
Further, each consensus node obtains a consensus result of the consensus node according to the received pre-submission result, and the method specifically includes: each consensus node carries out quantity statistics on the types of the received pre-submission results, and when the quantity of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails.
In a specific application example, the preset proportion of the total number of the consensus nodes can be set to be two thirds. Of course, in other application examples, the required preset proportion of the total number of the consensus nodes can be set
Further, the parallel blockchain consensus device of the embodiment of the present invention further includes an execution module, where when the consensus result of the proposer in the consensus node is successful, the proposer sends the proposed block to the execution module to obtain an execution result; and entering the next round of consensus when the consensus result of the proposer in the consensus nodes is that the consensus fails.
Further, the parallel blockchain consensus device of the embodiment of the present invention further includes a packaging transaction module, where the packaging transaction module packages the execution result with the proposed blockchain at the fixed delay height, and performs a new round of proposal and consensus.
The parallel block chain consensus device provided by the embodiment of the invention sends the blocks to the execution module for execution in the consensus submitting stage on the basis of sending the check request to the check module while the node throws the pre-vote, and performs consensus on the execution result along with the proposal of the next block, thereby improving the transaction processing capacity and the system execution efficiency.
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, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Computer storage media includes, but is not limited to, Phase Change Memory (PCM), 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 disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computer device. As defined in this specification, a computer readable medium does not include a transitory 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, or apparatus. The use of the phrase "including a" does not exclude the presence of other, identical elements in the process, method, article, or apparatus that comprises the same element, whether or not the same element is present in all of the same element.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the embodiments of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the embodiments of the present invention shall be included in the protection scope of the embodiments of the present specification.
It is to be understood that the exemplary embodiments described herein are illustrative and not restrictive. Although one or more embodiments of the present invention have been described with reference to the accompanying drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.

Claims (13)

1. A method for parallel blockchain consensus, comprising the steps of:
when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a verification request to a verification module while broadcasting the pre-voting result to other consensus nodes;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
2. The parallel blockchain consensus method of claim 1,
the pre-vote results include two types: empty block and legal;
when the consensus node does not receive the proposal or receives an illegal proposal within a preset time, the result of the pre-voting is an empty block; when the consensus node receives a legal offer within a preset time, the result of the pre-voting is legal;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result, and the method specifically comprises the following steps:
and counting the number of the received pre-voting results by each consensus node according to the type, wherein the type of which the number reaches the preset proportion of the total number of the consensus nodes is the pre-submission result of the consensus node.
3. The method of claim 2, wherein each of the consensus nodes obtains the consensus result of the consensus node according to the received pre-commit result, comprising:
each consensus node carries out quantity statistics on the types of the received pre-submission results, and when the quantity of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails.
4. The method according to claim 2 or 3, wherein the predetermined ratio of the total number of the common nodes is two thirds.
5. The parallel blockchain consensus method of claim 1, wherein if a consensus result of an proposer in the consensus node is successful, the proposer sends the proposed block to an execution module to obtain an execution result; and entering the next round of consensus when the consensus result of the proposer in the consensus nodes is that the consensus fails.
6. The method of claim 5, wherein the execution result is a new round of proposing and consensus along with the proposed block at a fixed delay height.
7. A parallel blockchain consensus system comprises a check module and a consensus module including a plurality of consensus nodes,
when a round of consensus begins, determining a proposer in the consensus nodes, and broadcasting the proposal block to other consensus nodes by the proposer;
after each consensus node carries out pre-voting on the received proposed block, each consensus node sends a verification request to a verification module while broadcasting the pre-voting result to other consensus nodes;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result;
each consensus node receives the verification result sent by the verification module, and if the verification is successful, the pre-submission result is broadcast to other consensus nodes; if the check fails, sending a pre-submission result of the empty block to other common identification nodes;
and each consensus node obtains a consensus result of the consensus node according to the received pre-submission result.
8. The parallel blockchain consensus system of claim 7, wherein the pre-voting results comprise two types: empty block and legal;
when the consensus node does not receive the proposal or receives an illegal proposal within a preset time, the result of the pre-voting is an empty block; when the consensus node receives a legal offer within a preset time, the result of the pre-voting is legal;
each consensus node obtains a pre-submission result of the consensus node according to the received pre-vote result, and the method specifically comprises the following steps:
and counting the number of the received pre-voting results by each consensus node according to the type, wherein the type of which the number reaches the preset proportion of the total number of the consensus nodes is the pre-submission result of the consensus node.
9. The parallel blockchain consensus system of claim 8, wherein each consensus node obtains the consensus result for the consensus node according to the received pre-commit result, comprising:
each consensus node carries out quantity statistics on the types of the received pre-submission results, and when the quantity of the legal types reaches the preset proportion of the total number of the consensus nodes, the consensus is successful; and when the number of the null block types reaches the preset proportion of the total number of the consensus nodes, the consensus fails.
10. The parallel blockchain consensus system of claim 7, further comprising an execution module, wherein if the consensus result of the proposer in the consensus node is successful, the proposer sends the proposal block to the execution module to obtain an execution result; and entering the next round of consensus when the consensus result of the proposer in the consensus nodes is that the consensus fails.
11. The parallel blockchain consensus system of claim 10, further comprising a packed transaction module that packs the execution results with proposed blocks at a fixed delay height for a new round of proposal and consensus.
12. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executable by the processor to perform the consensus method of any of claims 1-6.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the consensus method as claimed in one of the claims 1-6.
CN201811440414.0A 2018-11-29 2018-11-29 Parallel block chain consensus method, system, electronic device and computer-readable storage medium Active CN109447810B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811440414.0A CN109447810B (en) 2018-11-29 2018-11-29 Parallel block chain consensus method, system, electronic device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811440414.0A CN109447810B (en) 2018-11-29 2018-11-29 Parallel block chain consensus method, system, electronic device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN109447810A CN109447810A (en) 2019-03-08
CN109447810B true CN109447810B (en) 2021-03-09

Family

ID=65555850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811440414.0A Active CN109447810B (en) 2018-11-29 2018-11-29 Parallel block chain consensus method, system, electronic device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN109447810B (en)

Families Citing this family (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3607733B1 (en) * 2019-03-18 2022-02-09 Advanced New Technologies Co., Ltd. Consensus system downtime recovery
CN110012100B (en) * 2019-04-09 2021-04-27 杭州秘猿科技有限公司 Bandwidth-optimized block chain consensus method and device and electronic equipment
CN110059981B (en) * 2019-04-29 2021-06-04 威富通科技有限公司 Trust degree evaluation method and device and terminal equipment
CN110298641B (en) * 2019-06-12 2022-08-05 广东投盟科技有限公司 Rule updating method and device for block chain, block chain node and network
CN110311958B (en) * 2019-06-14 2021-01-01 柳州市蓝海数链科技有限公司 Block chain network system
CN110443052B (en) * 2019-07-30 2021-05-07 深圳市科迈爱康科技有限公司 Modification method and system for block chain block
CN110493148B (en) * 2019-08-12 2022-04-01 深圳前海微众银行股份有限公司 Block processing, block consensus and block synchronization method and device
CN110599139B (en) * 2019-08-19 2022-09-13 杭州秘猿科技有限公司 Block output method and device in block chain consensus algorithm
CN110618841B (en) * 2019-09-10 2022-12-06 杭州秘猿科技有限公司 Internal loose coupling consensus method and system and electronic equipment
CN110659988B (en) * 2019-09-10 2022-11-18 杭州秘猿科技有限公司 Parallel processing method and device for block chain consensus and execution and electronic equipment
CN110851146A (en) * 2019-11-08 2020-02-28 福州汇思博信息技术有限公司 Terminal application publishing method and system based on distributed network
CN110995439A (en) * 2019-11-20 2020-04-10 上海链颉科技有限公司 Block chain consensus method, electronic device and storage medium
CN111062811B (en) * 2019-12-02 2024-01-12 远光软件股份有限公司 Block chain consensus method, system and storage medium
CN111104460B (en) * 2019-12-02 2023-09-19 远光软件股份有限公司 Block chain consensus method, system, electronic equipment and storage medium
CN111405027B (en) * 2020-03-12 2023-06-23 金蝶软件(中国)有限公司 Block chain consensus result screening method, device, computer equipment and storage medium
CN111522874B (en) * 2020-03-20 2023-09-05 金蝶软件(中国)有限公司 Block chain consensus method, apparatus, computer device and storage medium
CN111427957B (en) * 2020-03-26 2021-05-11 财付通支付科技有限公司 Block chain voting information verification method, device, equipment and storage medium
CN111507840B (en) * 2020-04-15 2024-03-26 财付通支付科技有限公司 Block chain consensus method, apparatus, computer and readable storage medium
CN111683118B (en) * 2020-05-16 2023-07-11 中信银行股份有限公司 Block chain-based consensus method and device, master node equipment and slave node equipment
CN111522648B (en) * 2020-07-03 2020-10-09 支付宝(杭州)信息技术有限公司 Transaction processing method and device for block chain and electronic equipment
CN112104482B (en) * 2020-08-11 2021-06-29 佛山赛思禅科技有限公司 Consensus method based on parallel voting
CN112232954A (en) * 2020-10-15 2021-01-15 杭州溪塔科技有限公司 Dynamic adjustment method and device for proposal timeout threshold value and electronic equipment
CN112182113A (en) * 2020-10-23 2021-01-05 网易(杭州)网络有限公司 Block chain consensus method, system, electronic device and storage medium
US11743327B2 (en) 2021-02-05 2023-08-29 International Business Machines Corporation Topological ordering of blockchain associated proposals
CN112685796B (en) * 2021-03-12 2021-06-18 腾讯科技(深圳)有限公司 Block chain-based block consensus method and related equipment
CN113783935B (en) * 2021-08-12 2022-04-01 清华大学 Byzantine fault-tolerant method and device
CN114401271A (en) * 2022-01-13 2022-04-26 中国人民解放军国防科技大学 Test data tamper-proof method, block chain system and medium
CN116192868B (en) * 2023-04-27 2023-09-08 南方科技大学 Parallel Bayesian fault tolerance consensus method and terminal applied to alliance chain

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445711B (en) * 2016-08-28 2019-04-30 杭州云象网络技术有限公司 A kind of Byzantine failure tolerance common recognition method applied to block chain
US11165589B2 (en) * 2017-05-11 2021-11-02 Shapeshift Ag Trusted agent blockchain oracle
CN107688999B (en) * 2017-08-11 2020-11-13 杭州溪塔科技有限公司 Block chain-based parallel transaction execution method
CN108320160A (en) * 2018-02-02 2018-07-24 张超 Block catenary system, block common recognition method and apparatus
CN108648078B (en) * 2018-05-02 2021-03-23 杭州溪塔科技有限公司 Transaction preprocessing method and device and electronic equipment

Also Published As

Publication number Publication date
CN109447810A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109447810B (en) Parallel block chain consensus method, system, electronic device and computer-readable storage medium
CN110659988B (en) Parallel processing method and device for block chain consensus and execution and electronic equipment
CN108648078B (en) Transaction preprocessing method and device and electronic equipment
CN109474682B (en) Block chain network transmission method and device and electronic equipment
CN110012100B (en) Bandwidth-optimized block chain consensus method and device and electronic equipment
CN108846749B (en) Partitioned transaction execution system and method based on block chain technology
CN110708163B (en) Block chain consensus method, device and system and electronic equipment
CN108765159B (en) Block chain-based uplink and state processing method and device and interconnection system
CN110648136B (en) Consensus and transaction synchronous parallel processing method and device and electronic equipment
CN111369358B (en) Block chain consensus method and device and electronic equipment
CN108550038A (en) A kind of data dissemination system and method applied to block chain
CN109951534B (en) Consensus method, device and system
CN110061930B (en) Method and device for determining data flow limitation and flow limiting values
CN111698244B (en) Method and device for rapidly participating in consensus of newly added nodes and electronic equipment
CN110648125B (en) Packaging transaction method and device, electronic equipment and storage medium
CN110781153B (en) Cross-application information sharing method and system based on block chain
CN111882322A (en) Method and device for packaging transactions in sequence and electronic equipment
CN108519909B (en) Stream data processing method and device
CN111709748A (en) Transaction execution method and device with service attribute and electronic equipment
CN115118625B (en) Data verification method and device
CN116455974A (en) Transaction caching and ordering method, device, electronic equipment and storage medium
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
CN112258184A (en) Method and device for freezing area block chain network, electronic equipment and readable storage medium
CN110535785B (en) Control method and device for sending frequency and distributed system

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: 20190308

Assignee: Hangzhou Xita Technology Co.,Ltd.

Assignor: CRYPTAPE Co.,Ltd.

Contract record no.: X2021330000025

Denomination of invention: Parallel blockchain consensus method, system, electronic device and computer readable storage medium

Granted publication date: 20210309

License type: Common License

Record date: 20210317

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 and 1302, 13 / F, block a, Huaxing Times Square, 478 Wensan Road, Xihu District, Hangzhou, Zhejiang 310007

Patentee before: CRYPTAPE Co.,Ltd.

TR01 Transfer of patent right