CN112184244A - Block chain-based consensus achieving method and device and storage medium - Google Patents

Block chain-based consensus achieving method and device and storage medium Download PDF

Info

Publication number
CN112184244A
CN112184244A CN202011050963.4A CN202011050963A CN112184244A CN 112184244 A CN112184244 A CN 112184244A CN 202011050963 A CN202011050963 A CN 202011050963A CN 112184244 A CN112184244 A CN 112184244A
Authority
CN
China
Prior art keywords
transaction
consensus
block
nodes
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011050963.4A
Other languages
Chinese (zh)
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.)
One Chain Alliance Ecological Technology Co ltd
Original Assignee
One Chain Alliance Ecological Technology 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 One Chain Alliance Ecological Technology Co ltd filed Critical One Chain Alliance Ecological Technology Co ltd
Priority to CN202011050963.4A priority Critical patent/CN112184244A/en
Publication of CN112184244A publication Critical patent/CN112184244A/en
Pending legal-status Critical Current

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention relates to the technical field of block chains, and discloses a block chain-based consensus achieving method, a block chain-based consensus achieving device and a storage medium, wherein the block chain-based consensus achieving method comprises the steps of executing transactions in a local transaction pool, generating a to-be-signed confirmation block, and the to-be-signed confirmation block comprises the transactions and temporary transaction results; synchronizing the confirmation block to be signed to other consensus nodes so that the other consensus nodes verify the transaction after executing the transaction; receiving a verification signature returned by the consensus node passing the verification; and if the occupation ratio of the consensus node returning the verification signature in all the consensus nodes exceeds the preset ratio, writing the signature information into the block to be confirmed and broadcasting the signature information to other consensus nodes so that the other consensus nodes can take out the cached temporary result from the respective state cache pool to update. The block chain-based consensus achieving method, the block chain-based consensus achieving device and the storage medium can improve the consensus achieving efficiency of the block chain.

Description

Block chain-based consensus achieving method and device and storage medium
Technical Field
The present invention relates to the field of blockchain technology, and in particular, to a method, an apparatus, and a storage medium for achieving consensus based on blockchains.
Background
In the blockchain technology, a consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights and interests among different trust subject nodes, and the consensus mechanism can be provided for distributed network reference nodes to confirm data changes in an account book caused by transaction actions, can achieve final consistency, and is the core for maintaining safe and stable operation of a blockchain.
Byzantine fault tolerance is a consensus mechanism in a block chain, which is mainly to select special bookkeepers (bookkeeping nodes) based on the ownership and interest ratio, and then the bookkeepers reach consensus through a few majority-obeying voting mechanism to decide to dynamically participate in the nodes.
However, the common identification is achieved by using the byzantine fault-tolerant method, two checks are required, the block chain common identification achieving process is complicated, and the common identification achieving efficiency is low.
Disclosure of Invention
In order to solve the problem of low consensus efficiency in the prior art, an object of the present invention is to provide a block chain-based consensus method, apparatus and storage medium, so as to improve the block chain consensus efficiency.
In a first aspect, the present invention provides a block chain-based consensus method, including:
executing the transaction in the local transaction pool, and generating a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
synchronizing the confirmation block to be signed to other consensus nodes so that the other consensus nodes verify the transaction after executing the transaction, and storing the temporary transaction results into respective state cache pools;
receiving a verification signature returned by the consensus node passing the verification;
and if the occupation ratio of the consensus nodes returning the verification signatures in all the consensus nodes exceeds a preset ratio, writing the signature information into the block to be confirmed and broadcasting the signature information to other consensus nodes so that the other consensus nodes can take out the cached temporary transaction results from the respective state cache pools to update the block chain.
In one possible design, the method further includes:
sequencing the transactions in the local transaction pool, and selecting batch transactions without mutually exclusive resources;
the executing transactions in the local transaction pool includes:
and executing batch transactions without mutually exclusive resources in parallel.
In a possible design, if the occupation ratio of the common node returning the verification signature in all common nodes exceeds a preset ratio, writing the signature information into the block to be confirmed and broadcasting the signature information to other common nodes, including:
if the occupation ratio of the returned consensus nodes for verifying the signatures exceeds 2/3 in all the consensus nodes, the signature information is written into the block to be confirmed and broadcasted to other consensus nodes.
In a second aspect, the present invention provides another block chain-based consensus achieving method, including:
the block outlet node executes the transaction in the local transaction pool to generate a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
the block outlet node synchronizes the confirmation block to be signed to other common nodes;
other consensus nodes verify the transaction after executing the transaction, and store the temporary transaction result into respective state cache pools;
returning respective verification signatures to the common identification nodes passing the verification to give out the block nodes;
and if the occupation ratio of the common identification nodes returning the verification signature in all the common identification nodes exceeds a preset ratio, the block outlet node writes the signature information into the block to be confirmed and broadcasts the signature information to other common identification nodes so that the other common identification nodes can take out the cached temporary transaction result from the respective state cache pools to update the block chain.
In one possible design, the other consensus node verifies after execution of the transaction, comprising:
and each of the other consensus nodes compares the temporary transaction result generated by executing the transaction by the consensus node with the temporary transaction result generated by executing the transaction by the block node.
In one possible design, before the out-block node executes the transaction in the local transaction pool, the method further includes:
and determining the block outlet node through a random extraction algorithm.
In a third aspect, the present invention provides an apparatus for block chain based consensus, including:
the execution unit is used for executing the transaction in the local transaction pool and generating a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
the synchronization unit is used for synchronizing the confirmation block to be signed to other consensus nodes so that the other consensus nodes verify the transaction after executing the transaction and store the temporary transaction result into respective state cache pools;
the receiving unit is used for receiving a verification signature returned by the common node passing the verification;
the judging unit is used for judging whether the occupation ratio of the returned consensus nodes with the verification signatures in all the consensus nodes exceeds a preset ratio or not;
and the advertising unit is used for writing the signature information into the block to be confirmed and broadcasting the signature information to other common identification nodes if the occupation ratio of the common identification nodes returning the verification signature in all the common identification nodes exceeds a preset ratio so that the other common identification nodes can take out the cached temporary transaction result from the respective state cache pools to update the block chain.
In one possible design, the block chain-based consensus achieving apparatus further includes:
the sequencing unit is used for sequencing the transactions in the local transaction pool and selecting batch transactions without mutually exclusive resources;
when the execution unit is configured to execute the transaction in the local transaction pool, the execution unit is specifically configured to:
and executing batch transactions without mutually exclusive resources in parallel.
In a fourth aspect, the present invention provides another block chain based consensus method, including a memory, a processor and a transceiver, which are sequentially connected in communication, where the memory is used to store a computer program, the transceiver is used to transmit and receive a message, and the processor is used to read the computer program and perform the block chain based consensus method as described in the first aspect.
In a fifth aspect, the present invention provides a computer-readable storage medium having stored thereon instructions which, when executed on a computer, perform the block chain based consensus method of the first aspect.
In a sixth aspect, the present invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the block chain based consensus method as described in the first aspect.
The block chain-based consensus achieving method, the block chain-based consensus achieving device and the block chain-based consensus achieving storage medium provided by the invention at least have the following beneficial effects:
the block chain-based consensus achieving method, the block chain-based consensus achieving device and the storage medium can achieve consensus only through one-time verification in the consensus achieving process, the consensus achieving process is simpler and more convenient, and the block chain consensus achieving efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an application environment of a block chain-based consensus method, an apparatus and a storage medium provided in the present invention.
Fig. 2 is a flowchart of a block chain-based consensus method provided in the present invention.
Fig. 3 is a flowchart of another block chain-based consensus method provided in the present invention.
Fig. 4 is a schematic structural diagram of a block chain-based consensus device provided in the present invention.
Fig. 5 is a schematic structural diagram of another block chain-based consensus device provided in the present invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments. It should be noted that the description of the embodiments is provided to help understanding of the present invention, but the present invention is not limited thereto. Specific structural and functional details disclosed herein are merely illustrative of example embodiments of the invention. This invention may, however, be embodied in many alternate forms and should not be construed as limited to the embodiments set forth herein.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of example embodiments of the present invention.
It should be understood that, for the term "and/or" as may appear herein, it is merely an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, B exists alone, and A and B exist at the same time; for the term "/and" as may appear herein, which describes another associative object relationship, it means that two relationships may exist, e.g., a/and B, may mean: a exists independently, and A and B exist independently; in addition, for the character "/" that may appear herein, it generally means that the former and latter associated objects are in an "or" relationship.
It will be understood that when an element is referred to herein as being "connected," "connected," or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Conversely, if a unit is referred to herein as being "directly connected" or "directly coupled" to another unit, it is intended that no intervening units are present. In addition, other words used to describe the relationship between elements should be interpreted in a similar manner (e.g., "between … …" versus "directly between … …", "adjacent" versus "directly adjacent", etc.).
It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments of the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used herein, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, numbers, steps, operations, elements, components, and/or groups thereof.
It should also be noted that, in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed substantially concurrently, or the figures may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
It should be understood that specific details are provided in the following description to facilitate a thorough understanding of example embodiments. However, it will be understood by those of ordinary skill in the art that the example embodiments may be practiced without these specific details. For example, systems may be shown in block diagrams in order not to obscure the examples in unnecessary detail. In other instances, well-known processes, structures and techniques may be shown without unnecessary detail in order to avoid obscuring example embodiments.
Examples
In order to improve the consensus efficiency, embodiments of the present application provide a block chain-based consensus method, an apparatus, and a storage medium, where the block chain-based consensus method, the apparatus, and the storage medium can complete consensus through one-time verification, so that the consensus is simpler and more convenient, and the block chain consensus efficiency is improved.
First, in order to more intuitively understand the scheme provided by the embodiment of the present application, a system architecture of the block chain-based consensus achieving scheme provided by the embodiment of the present application is described below with reference to fig. 1.
Fig. 1 is a schematic application environment diagram of a block chain-based consensus method, an apparatus and a storage medium according to one or more embodiments of the present application. As shown in fig. 1, a block consensus network is formed by one-to-one communication connection among a plurality of consensus nodes, and each consensus node is in communication connection with one or more candidate nodes for data communication or interaction. Wherein, one of the common nodes in the block common-identification achieving network is a block outlet node needing to outlet blocks.
The block chain-based consensus method provided in the embodiments of the present application will be described in detail below.
As shown in fig. 2, which is a flowchart of a block chain-based consensus method applied to a block output node according to an embodiment of the present application, the block chain-based consensus method may include the following steps:
and S201, executing the transaction in the local transaction pool to generate a confirmation block to be signed.
The local transaction pool is a transaction pool of the designated block node end, and the confirmation block to be signed comprises the transaction and the temporary transaction result.
In the embodiment of the application, mutual exclusion resources do not exist among partial transactions in the local transaction pool, namely, common resources cannot be occupied among the partial transactions. Therefore, when executing the transaction in the local transaction pool, the out-blocking node can sequence the transactions in the local transaction pool first and select the batch transaction without the mutually exclusive resource, and when executing the transaction in the local transaction pool, the batch transaction without the mutually exclusive resource can be executed in parallel, and the transaction with the mutually exclusive resource is executed in series. Thus, CPU resources of the machine can be utilized to the maximum extent, and the throughput of transaction processing can be improved.
Step S202, the confirmation block to be signed is synchronized to other consensus nodes so that the other consensus nodes can verify the transaction after the transaction is executed.
After executing the transaction in the local transaction pool and generating the confirmation block to be signed, the block-out node may synchronize the confirmation block to be signed to other consensus nodes through the network achieving consensus, where the other consensus nodes are consensus nodes in the network achieving block consensus except the block-out node.
For example, the block consensus network includes a consensus node a, a consensus node B, a consensus node C and a consensus node D, and if the consensus node a is a block node, the other consensus nodes are the consensus node B, the consensus node C and the consensus node D.
After the other common identification nodes receive the confirmation block to be signed, each common identification node in the other common identification nodes executes the transaction in the confirmation block to be signed and generates a temporary transaction result. And each of the consensus nodes compares the generated transaction temporary result with the transaction temporary result in the confirmation block to be signed, judges whether the transaction temporary result is consistent with the transaction temporary result in the confirmation block to be signed, if so, indicates that the verification is passed, and if not, indicates that the verification is not passed.
In this embodiment, after receiving the confirmation block to be signed, the other consensus nodes may also buffer the temporary transaction result in the confirmation block to be signed into their respective state buffer pools, where a state buffer pool is a state set established on the consensus node for temporarily storing a state.
And S203, receiving a verification signature returned by the common identification node passing the verification.
And the common identification node which passes the verification generates a verification signature and returns the verification signature to the given block node, and the given block node receives the verification signature returned by the common identification node which passes the verification.
And S204, if the occupation ratio of the common identification nodes returning the verification signature in all the common identification nodes exceeds a preset ratio, writing the signature information into the block to be confirmed and broadcasting the signature information to other common identification nodes.
The block-out node can preset a ratio for judging whether to achieve consensus, after receiving the verification signature returned by the consensus node passing the verification, the block-out node can judge whether the occupation ratio of the consensus node of the returned verification signature in all the consensus nodes exceeds the preset ratio, if the occupation ratio of the consensus node of the returned verification signature in all the consensus nodes exceeds the preset ratio, the consensus is achieved, and at the moment, the signature information is written into the block to be confirmed and broadcasted to other consensus nodes, so that the other consensus nodes take out the temporary result of the cached transaction from the respective state cache pools to update the block chain.
The preset ratio can be adjusted, for example, the preset ratio can be 1/2, 2/3, 3/4, etc., and is not particularly limited in the embodiments of the present application.
Thus, by executing the transaction in the local transaction pool, the block to be signed is generated as a confirmation block, and then the confirmation block to be signed is synchronized to other consensus nodes, so that the other consensus nodes verify the transaction after executing the transaction, and when the occupation ratio of the returned consensus nodes for verifying the signature in all the consensus nodes exceeds a preset ratio, the signature information is written into the block to be confirmed and broadcast to the other consensus nodes, so that the other consensus nodes take out the temporary result of the cached transaction from their respective state cache pools to perform block chain update. Therefore, consensus can be achieved through one-time verification, the consensus achieving process is simpler and more convenient, and the consensus achieving efficiency of the block chain is improved. Meanwhile, the transactions in the local transaction pool can be sequenced firstly, batch transactions without mutually exclusive resources are selected, when the transactions in the local transaction pool are executed, the batch transactions without the mutually exclusive resources are executed in parallel, and the transactions with the mutually exclusive resources are executed in series, so that the CPU resources of the machine are utilized to the maximum extent, and the throughput of transaction processing is improved.
In a second aspect, an embodiment of the present application provides another block chain based consensus method, which can be applied to a block chain based consensus network, please refer to fig. 3, where the block chain based consensus method includes:
and S301, the block output node executes the transaction in the local transaction pool to generate a to-be-signed confirmation block.
Wherein, the confirmation block to be signed comprises the transaction and the temporary result of the transaction.
In the embodiment of the present application, before the block-out node executes the transaction in the local transaction pool, the block-out node may be determined from the block consensus network by using a random extraction algorithm.
Step S302, the block output node synchronizes the confirmation block to be signed to other common nodes.
And S303, verifying the transaction after the other consensus nodes execute the transaction, and storing the temporary transaction result into respective state cache pools.
Specifically, each of the other consensus nodes compares the temporary transaction result generated by the consensus node executing the transaction with the temporary transaction result generated by the block-out node executing the transaction. If the two are consistent, the verification is passed, and if the two are not consistent, the verification is not passed.
In the embodiment of the application, after receiving the confirmation area to be signed, the other consensus nodes store the temporary transaction result in the confirmation area to be signed into the respective state cache pools.
And S304, returning respective verification signatures to the common identification nodes passing the verification to give the block nodes.
Step S305, if the occupation ratio of the common identification nodes returning the verification signatures exceeds the preset ratio in all the common identification nodes, the block outlet node writes the signature information into the block to be confirmed and broadcasts the signature information to other common identification nodes so that other common identification nodes can take out the cached temporary transaction results from the respective state cache pools to update the block chain.
For the working process, the working details, and the technical effects of the apparatus provided in the second aspect of this embodiment, reference may be made to the first aspect of this embodiment, which is not described herein again.
In a third aspect, an embodiment of the present invention provides a block chain-based consensus device, which is applicable to a block output node, and referring to fig. 4, the block chain-based consensus device includes:
the execution unit is used for executing the transaction in the local transaction pool and generating a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
the synchronization unit is used for synchronizing the confirmation block to be signed to other consensus nodes so that the other consensus nodes verify the transaction after executing the transaction and store the temporary transaction result into respective state cache pools;
the receiving unit is used for receiving a verification signature returned by the common node passing the verification;
the judging unit is used for judging whether the occupation ratio of the returned consensus nodes with the verification signatures in all the consensus nodes exceeds a preset ratio or not;
and the advertising unit is used for writing the signature information into the block to be confirmed and broadcasting the signature information to other common identification nodes if the occupation ratio of the common identification nodes returning the verification signature in all the common identification nodes exceeds a preset ratio so that the other common identification nodes can take out the cached temporary transaction result from the respective state cache pools to update the block chain.
In one possible design, the block chain-based consensus achieving apparatus further includes:
the sequencing unit is used for sequencing the transactions in the local transaction pool and selecting batch transactions without mutually exclusive resources;
when the execution unit is configured to execute the transaction in the local transaction pool, the execution unit is specifically configured to:
and executing batch transactions without mutually exclusive resources in parallel.
For the working process, the working details, and the technical effects of the apparatus provided in the third aspect of this embodiment, reference may be made to the first aspect of the embodiment, which is not described herein again.
As shown in fig. 5, a fourth aspect of the present application provides a block chain based consensus method, including a memory, a processor, and a transceiver, which are sequentially connected in a communication manner, where the memory is used to store a computer program, the transceiver is used to transmit and receive a message, and the processor is used to read the computer program and perform the block chain based consensus method according to the first aspect of the present application.
By way of specific example, the Memory may include, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Flash Memory (Flash Memory), a first-in-first-out Memory (FIFO), a first-in-last-out Memory (FILO), and/or the like; the processor may not be limited to a processor adopting an architecture processor such as a model STM32F105 series microprocessor, an arm (advanced RISC machines), an X86, or a processor of an integrated NPU (neutral-network processing unit); the transceiver may be, but is not limited to, a WiFi (wireless fidelity) wireless transceiver, a bluetooth wireless transceiver, a General Packet Radio Service (GPRS) wireless transceiver, a ZigBee protocol (ieee 802.15.4 standard-based low power local area network protocol), a 3G transceiver, a 4G transceiver, and/or a 5G transceiver, etc.
For the working process, the working details, and the technical effects of the apparatus provided in the fourth aspect of this embodiment, reference may be made to the first aspect of the embodiment, which is not described herein again.
A fifth aspect of the present invention provides a computer-readable storage medium storing instructions for implementing the block chain based consensus method according to the first aspect, where the instructions are stored on the computer-readable storage medium and when the instructions are executed on a computer, the block chain based consensus method according to the first aspect is performed. The computer-readable storage medium refers to a carrier for storing data, and may include, but is not limited to, floppy disks, optical disks, hard disks, flash memories, flash disks and/or Memory sticks (Memory sticks), etc., and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
For the working process, the working details, and the technical effects of the computer-readable storage medium provided in the fifth aspect of the embodiment, reference may be made to the first aspect of the embodiment, which is not described herein again.
A sixth aspect of the present embodiments provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method for block chain based consensus as described in the first aspect of the embodiments, wherein the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
The embodiments described above are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a repository code combining means to execute the methods according to the embodiments or parts of the embodiments.
The invention is not limited to the above alternative embodiments, and any other various forms of products can be obtained by anyone in the light of the present invention, but any changes in shape or structure thereof, which fall within the scope of the present invention as defined in the claims, fall within the scope of the present invention.

Claims (10)

1. A block chain based consensus method, comprising:
executing the transaction in the local transaction pool, and generating a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
synchronizing the confirmation block to be signed to other consensus nodes so that the other consensus nodes verify the transaction after executing the transaction, and storing the temporary transaction results into respective state cache pools;
receiving a verification signature returned by the consensus node passing the verification;
and if the occupation ratio of the consensus nodes returning the verification signatures in all the consensus nodes exceeds a preset ratio, writing the signature information into the block to be confirmed and broadcasting the signature information to other consensus nodes so that the other consensus nodes can take out the cached temporary transaction results from the respective state cache pools to update the block chain.
2. The method of claim 1, wherein the method further comprises:
sequencing the transactions in the local transaction pool, and selecting batch transactions without mutually exclusive resources;
the executing transactions in the local transaction pool includes:
and executing batch transactions without mutually exclusive resources in parallel.
3. The method as claimed in claim 1, wherein if the ratio of the common node returning the verification signature among all common nodes exceeds a preset ratio, writing the signature information into the block to be confirmed and broadcasting the signature information to other common nodes, comprises:
if the occupation ratio of the returned consensus nodes for verifying the signatures exceeds 2/3 in all the consensus nodes, the signature information is written into the block to be confirmed and broadcasted to other consensus nodes.
4. A block chain based consensus method, comprising:
the block outlet node executes the transaction in the local transaction pool to generate a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
the block outlet node synchronizes the confirmation block to be signed to other common nodes;
other consensus nodes verify the transaction after executing the transaction, and store the temporary transaction result into respective state cache pools;
returning respective verification signatures to the common identification nodes passing the verification to give out the block nodes;
and if the occupation ratio of the common identification nodes returning the verification signature in all the common identification nodes exceeds a preset ratio, the block outlet node writes the signature information into the block to be confirmed and broadcasts the signature information to other common identification nodes so that the other common identification nodes can take out the cached temporary transaction result from the respective state cache pools to update the block chain.
5. The method of claim 4, wherein the other consensus node performs authentication after the transaction is performed, comprising:
and each of the other consensus nodes compares the temporary transaction result generated by executing the transaction by the consensus node with the temporary transaction result generated by executing the transaction by the block node.
6. The method of claim 4, wherein prior to the egress node performing the transaction in the local transaction pool, the method further comprises:
and determining the block outlet node through a random extraction algorithm.
7. An apparatus for block chain based consensus, comprising:
the execution unit is used for executing the transaction in the local transaction pool and generating a confirmation block to be signed, wherein the confirmation block to be signed comprises the transaction and a temporary transaction result;
the synchronization unit is used for synchronizing the confirmation block to be signed to other consensus nodes so that the other consensus nodes verify the transaction after executing the transaction and store the temporary transaction result into respective state cache pools;
the receiving unit is used for receiving a verification signature returned by the common node passing the verification;
the judging unit is used for judging whether the occupation ratio of the returned consensus nodes with the verification signatures in all the consensus nodes exceeds a preset ratio or not;
and the advertising unit is used for writing the signature information into the block to be confirmed and broadcasting the signature information to other common identification nodes if the occupation ratio of the common identification nodes returning the verification signature in all the common identification nodes exceeds a preset ratio so that the other common identification nodes can take out the cached temporary transaction result from the respective state cache pools to update the block chain.
8. The block chain based consensus reaching apparatus of claim 7, further comprising:
the sequencing unit is used for sequencing the transactions in the local transaction pool and selecting batch transactions without mutually exclusive resources;
when the execution unit is configured to execute the transaction in the local transaction pool, the execution unit is specifically configured to:
and executing batch transactions without mutually exclusive resources in parallel.
9. An apparatus for block chain based consensus comprises a memory, a processor and a transceiver, wherein the memory, the processor and the transceiver are sequentially connected in communication, the memory is used for storing a computer program, the transceiver is used for transmitting and receiving messages, and the processor is used for reading the computer program and executing the block chain based consensus method as claimed in any one of claims 1-3.
10. A computer-readable storage medium having stored thereon instructions for performing the block chain based consensus method as claimed in any one of claims 1-3 when run on a computer.
CN202011050963.4A 2020-09-29 2020-09-29 Block chain-based consensus achieving method and device and storage medium Pending CN112184244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011050963.4A CN112184244A (en) 2020-09-29 2020-09-29 Block chain-based consensus achieving method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011050963.4A CN112184244A (en) 2020-09-29 2020-09-29 Block chain-based consensus achieving method and device and storage medium

Publications (1)

Publication Number Publication Date
CN112184244A true CN112184244A (en) 2021-01-05

Family

ID=73946283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011050963.4A Pending CN112184244A (en) 2020-09-29 2020-09-29 Block chain-based consensus achieving method and device and storage medium

Country Status (1)

Country Link
CN (1) CN112184244A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819463A (en) * 2021-01-15 2021-05-18 山大地纬软件股份有限公司 Block chain high-concurrency signature checking method and system based on trusted key system
CN112907369A (en) * 2021-02-08 2021-06-04 网易(杭州)网络有限公司 Block chain-based data consensus method and device, electronic equipment and storage medium
CN113095930A (en) * 2021-04-13 2021-07-09 中国工商银行股份有限公司 Transaction matching method and device for banking loan
CN113810378A (en) * 2021-08-19 2021-12-17 广东中科智能区块链技术有限公司 Transaction preprocessing method based on consensus sequencing
CN115002106A (en) * 2022-04-22 2022-09-02 中国农业银行股份有限公司 Block chain verification method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201806112D0 (en) * 2018-04-13 2018-05-30 Nchain Holdings Ltd Computer-implemented system and method
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random
US20190260574A1 (en) * 2018-02-21 2019-08-22 Thunder Token Inc. Blockchain consensus methods and systems
CN111259078A (en) * 2020-01-15 2020-06-09 广州运通链达金服科技有限公司 Block chain consensus method, block chain consensus device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190260574A1 (en) * 2018-02-21 2019-08-22 Thunder Token Inc. Blockchain consensus methods and systems
GB201806112D0 (en) * 2018-04-13 2018-05-30 Nchain Holdings Ltd Computer-implemented system and method
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random
CN111259078A (en) * 2020-01-15 2020-06-09 广州运通链达金服科技有限公司 Block chain consensus method, block chain consensus device, computer equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819463A (en) * 2021-01-15 2021-05-18 山大地纬软件股份有限公司 Block chain high-concurrency signature checking method and system based on trusted key system
CN112819463B (en) * 2021-01-15 2022-08-02 山大地纬软件股份有限公司 Block chain high-concurrency signature checking method and system based on trusted key system
CN112907369A (en) * 2021-02-08 2021-06-04 网易(杭州)网络有限公司 Block chain-based data consensus method and device, electronic equipment and storage medium
CN113095930A (en) * 2021-04-13 2021-07-09 中国工商银行股份有限公司 Transaction matching method and device for banking loan
CN113810378A (en) * 2021-08-19 2021-12-17 广东中科智能区块链技术有限公司 Transaction preprocessing method based on consensus sequencing
CN115002106A (en) * 2022-04-22 2022-09-02 中国农业银行股份有限公司 Block chain verification method, device, equipment and medium
CN115002106B (en) * 2022-04-22 2024-04-12 中国农业银行股份有限公司 Block chain verification method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN112184244A (en) Block chain-based consensus achieving method and device and storage medium
US11830001B2 (en) Blockchain consensus method, accounting node and node
CN109886681B (en) Block chain consensus method and system
CN108446947B (en) Real estate transaction method and device
CN113783935B (en) Byzantine fault-tolerant method and device
Coulouma et al. A characterization of oblivious message adversaries for which consensus is solvable
CN110609872A (en) Method and apparatus for synchronizing node data
CN113794694B (en) Binary consensus method and device based on reliable broadcast
CN108776897B (en) Data processing method, device, server and computer readable storage medium
CN110557420B (en) Operation method and system of independent sub-chains
CN111698315B (en) Data processing method and device for block and computer equipment
CN111130801A (en) Data processing method and device, node equipment and computer storage medium
CN113810465B (en) Asynchronous binary consensus method and device
CN112134883B (en) Method, device and related product for carrying out rapid authentication on trust relationship between nodes based on trusted computing
CN109325744B (en) Payment processing method, payment processing device, payment processing medium and electronic equipment
CN110648136A (en) Consensus and transaction synchronous parallel processing method and device and electronic equipment
CN111275438A (en) Consensus method, device, equipment and storage medium for block chain network
WO2022160901A1 (en) Blockchain consensus method, consensus node, and electronic device
Czumaj et al. Leader election in multi-hop radio networks
CN110928952A (en) Data synchronization method and device based on block chain
CN112825525B (en) Method and apparatus for processing transactions
US9509780B2 (en) Information processing system and control method of information processing system
CN115174090A (en) Block chain consensus method and device
CN113783946A (en) Re-voting binary consensus method and device based on threshold signature
CN115037472A (en) Transaction processing method and system based on double-layer DAG consensus mechanism and service 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