CN111080288A - Block chain consensus achieving method and device based on directed acyclic graph - Google Patents

Block chain consensus achieving method and device based on directed acyclic graph Download PDF

Info

Publication number
CN111080288A
CN111080288A CN201910990847.1A CN201910990847A CN111080288A CN 111080288 A CN111080288 A CN 111080288A CN 201910990847 A CN201910990847 A CN 201910990847A CN 111080288 A CN111080288 A CN 111080288A
Authority
CN
China
Prior art keywords
tree
block
view
dag
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.)
Granted
Application number
CN201910990847.1A
Other languages
Chinese (zh)
Other versions
CN111080288B (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.)
Hunan Tianhe Guoyun Technology Co Ltd
Original Assignee
Hunan Tianhe Guoyun 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 Hunan Tianhe Guoyun Technology Co Ltd filed Critical Hunan Tianhe Guoyun Technology Co Ltd
Priority to CN201910990847.1A priority Critical patent/CN111080288B/en
Publication of CN111080288A publication Critical patent/CN111080288A/en
Application granted granted Critical
Publication of CN111080288B publication Critical patent/CN111080288B/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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
    • G06F16/2379Updates performed during online database operations; commit processing
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a block chain consensus achieving method and a block chain consensus achieving device based on a directed acyclic graph, wherein the method comprises the following steps: when a network node on a block chain issues a certain transaction, creating a new block corresponding to the certain transaction in a current DAG view, and updating a shaft center tree in the current DAG view and the current DAG view according to a rule of an optimal shaft center tree and the new block; and according to the PBFT algorithm, enabling the whole network of the block chain to achieve consensus on the axis tree of the updated DAG view. By the embodiment of the invention, the processing efficiency of the block chain system can be improved on the premise of ensuring decentralization and safety.

Description

Block chain consensus achieving method and device based on directed acyclic graph
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a block chain consensus achieving method and device based on a directed acyclic graph, a terminal device and a computer readable medium.
Background
The block chain technology is a brand new distributed infrastructure and computing paradigm that verifies and stores data using a block chain data structure, generates and updates data using a distributed node consensus algorithm, ensures the security of data transmission and access using cryptography, and programs and operates data using an intelligent contract composed of automated script codes.
After several years of verification, the inventor is informed that the decentralized system can provide safe and reliable data service. Meanwhile, the common mechanism of POW (workload certification) provided by the bitcoin is slow in speed and high in energy consumption, and the most serious problem is caused. Subsequently, through the introduction of new blockchain systems such as etherhouses and the like, many new consensus mechanisms appear, such as POS (entitlement certificate), BFT (byzantine fault-tolerant algorithm) and the like, which solve the energy consumption problem of POW and improve efficiency, but the speed of the mechanisms cannot meet the expectation of people. Even some people do not sacrifice coring to increase the speed of the block chain, which is free of a bit of southern beam rut. Therefore, the decentration, safety and speed of the current blockchain are called "impossible triangles" and become stubborn for blockchains, and the efficiency problem of blockchains is driving the development of blockchains.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a block chain consensus achieving method, apparatus, terminal device and computer readable medium based on a directed acyclic graph, which can improve the processing efficiency of a block chain system on the premise of decentralized and security.
A first aspect of an embodiment of the present invention provides a block chain consensus achieving method based on a directed acyclic graph, including:
when a network node on a block chain issues a certain transaction, creating a new block corresponding to the certain transaction in a current DAG view, and updating a shaft center tree in the current DAG view and the current DAG view according to a rule of an optimal shaft center tree and the new block;
and according to the PBFT algorithm, enabling the whole network of the block chain to achieve consensus on the axis tree of the updated DAG view.
A second aspect of the present invention provides a block chain consensus achieving apparatus based on a directed acyclic graph, including:
the system comprises a first building module, a second building module and a third building module, wherein the first building module is used for creating a new block corresponding to a certain transaction in a current DAG view when a network node on a block chain releases the certain transaction, and updating an axis tree in the current DAG view and the current DAG view according to rules of an optimal axis tree and the new block;
a first curing module, configured to enable the entire network of the block chain to agree on the axis tree of the updated DAG view according to a PBFT algorithm.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the block chain consensus method based on a directed acyclic graph when executing the computer program.
A fourth aspect of the embodiments of the present invention provides a computer-readable medium, which stores a computer program, and when the computer program is processed and executed, the computer program implements the steps of the above block chain consensus achieving method based on a directed acyclic graph.
In the block chain consensus achieving method based on the directed acyclic graph provided by the embodiment of the present invention, when a network node on the block chain issues a certain transaction, a new block corresponding to the certain transaction may be created in the current DAG view, and according to the rule of the optimal axis tree and the new block, the axis tree in the current DAG view and the current DAG view may be updated, and according to the PBFT algorithm, the entire network of the block chain may achieve consensus on the axis tree of the updated DAG view, so that the processing efficiency of the block chain system may be improved on the premise of decentralization and security.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of a block chain consensus achieving method based on DAG according to an embodiment of the present invention;
FIG. 2 is a DAG view provided by an embodiment of the invention;
FIG. 3 is a schematic flow chart illustrating the solidification of a hub tree in a DAG view according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a block chain consensus achieving apparatus based on DAG according to an embodiment of the present invention;
FIG. 5 is a detailed block diagram of the first building block of FIG. 4;
FIG. 6 is a detailed block diagram of the first curing module of FIG. 4;
fig. 7 is a schematic structural diagram of another block chain consensus achieving apparatus based on DAG according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a flowchart illustrating a block chain consensus method based on a Directed Acyclic Graph (DAG), according to an embodiment of the present invention. As shown in fig. 1, the block chain consensus method based on DAG of the present embodiment includes the following steps:
s101, when a network node on a block chain releases a certain transaction, a new block corresponding to the certain transaction is created in the current directed acyclic graph DAG view, and according to the rule of the optimal axis tree and the new block, the axis tree in the current DAG view and the current DAG view are updated.
In the embodiment of the present invention, when a certain network node on a blockchain issues a certain transaction, the method may start from a created block in a current DAG view (i.e., a leaf of a core tree of a DAG view that has reached consensus last time) according to a rule of an optimal core tree, determine the core tree of the current DAG view, create a new block corresponding to the certain transaction in the current directed acyclic graph DAG view, point a parent edge of the new block corresponding to the certain transaction to a leaf block of the core tree of the current DAG view, and point a reference edge of the new block corresponding to the certain transaction to other leaf blocks of the current DAG view, so as to update the current DAG view; wherein, according to the rule of the optimal hub tree, the other blocks except the created block in the hub tree of the current DAG view have a larger number of blocks contained in the sub-tree than the other blocks contained in the sub-tree of a single sub-block except the other blocks in all sub-blocks of the parent block on the hub tree; then, the new block corresponding to the certain transaction may be released, so that after the other network nodes in the network of the block chain receive and check the new block corresponding to the certain transaction, the current DAG view local to the other network nodes is updated, and all the network nodes in the network of the block chain are respectively updated with the axis tree of the local current DAG view, where the axis tree of the updated DAG view includes the current DAG view and the new block. Taking fig. 2 as an example, when a certain network node on the blockchain issues a certain transaction, starting from the created block, one block is selected from all sub-blocks of the created block as a subsequent block of the created block in the axis tree of the current DAG view, and the number 11 of blocks included in the sub-tree (created block-a-C-E-H, created block-a-D, created block-a-G) of the selected block a is greater than the number 6 of blocks included in the sub-trees (created block-B-F-J-I-K) of other single sub-blocks B of the created block; then, C is selected as the block in the current DAG axis tree among sub-blocks C, D and G of block a, because block C has a sub-tree (created blocks-a-C-E-H) that contains 5 more blocks than 3 and also 3 more blocks than the sub-tree (created blocks-a-D) where block D is located, and so on until a leaf sub-block H is found, thereby using "created blocks-a-C-E-H" as the current DAG view axis tree. Then, the parent edge of the New block New may point to the leaf block H of the axis tree, and the reference edge of the New block New points to other leaf sub-blocks (e.g., block K) of the current DAG view, and the current DAG view is updated, that is, the DAG view shown in fig. 2 is constructed. After the DAG view is constructed, the New block New corresponding to the certain transaction may be released, so that after the New block corresponding to the certain transaction is received and checked by other network nodes in the network of the block chain, the current DAG view local to the other network nodes is updated, and all network nodes in the network of the block chain are respectively updated with the axis tree of the local current DAG view, where the updated axis tree is "created block-a-C-E-H-New".
S102: the entire network of block chains is made to agree on an axis tree of the updated DAG view according to a practical byzantine fault-tolerant (PBFT) algorithm.
In the embodiment of the present invention, a proposer node is selected from the block chain through a verifiable pseudo-random algorithm (which is the same as the pseudo-random algorithm in the prior art, and therefore, the pseudo-random algorithm is not described herein again), so that the proposer node selects a block from the locally updated DAG view as a leaf block of the axis tree according to the locally updated DAG view, and initiates a proposal. And after verifying and voting by other verifier nodes in the block chain on the leaf blocks selected by the proposer node, and allowing the leaf blocks selected by the proposer node to be approved by network nodes exceeding 2/3 of the block chain, confirming the proposal, and allowing the whole network of the block chain to achieve consensus on the axis tree of the updated DAG view. It should be noted that the flow of the selection of the proposer, the initiation and confirmation of the proposal (for example, who votes, statistics of votes, etc.) in the process of making consensus on the axis tree of the DAG view is the implementation process of the PBFT algorithm. Furthermore, the selection rule of the hub tree in S101 and the voting rule (rule of voting for or against) of the network node in S102 are an improvement to the GHOST (greedy most observable sub-tree protocol) algorithm. Further, when another transaction is issued by a network node on the blockchain, a new block corresponding to the another transaction may be created in the updated DAG view, the DAG view may be updated again according to the new block corresponding to the another transaction and the axis tree of the DAG view achieving the consensus, the axis tree achieving the consensus may be expanded, and the entire network of the blockchain may achieve the consensus on the axis tree of the expanded DAG view according to the PBFT algorithm. Taking fig. 2 as an example, assuming that when a network node on the blockchain issues a certain transaction (which may be referred to as a first transaction), the ordering of the DAG view is developed to block a, block B, and block D, that is, none of the subsequent blocks C, block E, and block H has appeared yet, and therefore a is a leaf sub-block at this time, the axis tree of the current DAG view at this time is created block to block a, the parent edge of the new block corresponding to the first transaction points to leaf block a of the axis tree, and the reference edge of the new block corresponding to the first transaction points to other sub-block leaves (e.g., block B) of the current DAG view, so as to update and construct the DAG view at the time of issuing the first transaction, and solidify the DAG view at the time of issuing the first transaction (i.e., the axis tree in the DAG view is agreed to create block a, and then to the new block corresponding to the first transaction); when another transaction (which can be called as a second transaction) is issued by the network node on the blockchain, a New block New corresponding to the second transaction is created in the DAG view after the first transaction is issued, the New block New corresponding to the second transaction and the shared axle center tree (created block-block A-New block corresponding to the first transaction) of the DAG view after the first transaction is issued are used for updating the DAG view again, the shared axle center tree is expanded (expanded into created block-A-C-E-H-New) from the leaf speed of the axle center number (namely, the New block corresponding to the first transaction) after the first transaction is issued, and then the shared axle center tree of the expanded DAG view is shared by the whole network of the blockchain according to the PBFT algorithm, and at the time of creating the block time slice when the first transaction is issued, The time slice a is added with a plurality of time slices C, E and H, and other transactions included in the time slices will be finally serialized and agreed with the newly identified hub tree. It is understood that the DAG view has an uncontrollable derivation direction due to its concurrent mechanism, so that the axis tree of the DAG view may be changed over time, for example, the direction of the created block-B-F-J-I-K is extended and changed. However, in the embodiment of the invention, the improved GHOST algorithm is used for selecting and determining the axis tree, and the PBFT algorithm is introduced to perform one verification and solidification operation on the axis tree (such as the Chuangshi blocks-A-C-E-H), so that the derivative direction of the DAG view is controlled, the whole view is converged, and the execution sequence of each transaction is ensured. More specifically, regarding verification and validation of a proposal, referring to fig. 3, after a proposer node initiates a proposal on a blockchain, a verifier node on the blockchain can pre-vote whether the proposal is legal, and if the verifier node considers that the proposal is legal, vote for the proposal; if the verifier node considers the proposal to be illegal, the verifier node votes for an objection. When 2/3 approval for the pre-vote is received, the pre-vote is confirmed to be successful, which represents that most verifier nodes receive the proposal message; if a pre-vote approval less than 2/3 is received or the pre-vote times out, the pre-vote success is confirmed to fail. After confirming that the pre-voting is successful, the verifier node on the blockchain can perform pre-confirmation, i.e. pre-confirmation approval or pre-confirmation objection, when receiving 2/3 pre-confirmation approval, the pre-voting is successful, which represents that a proposal is confirmed to be completed, i.e. the time slice (leaf block) selected as the axis tree by the proposer node from the local DAG view is confirmed, and then the above process can be repeated for a new time slice (new proposal) in the next round to confirm the new time slice; if the confirmation approval less than 2/3 or the pre-confirmation time-out is received, the pre-confirmation fails, and the verification work of the pre-voting and the pre-confirmation can be performed on the proposal.
In the block chain consensus achieving method based on the DAG provided in fig. 1, the DAG technology may be utilized to manage the transaction, ensure concurrent execution of the transaction, adopt the improved GHOST algorithm as a criterion of the consensus mechanism to ensure that the whole network of the block chain regularly constructs a DAG view, achieve consensus on the axis tree of the DAG view, and use the PBFT algorithm to achieve rapid convergence of the DAG view, thereby solidifying the consensus result. The embodiment of the invention provides an asynchronous, parallel, safe and reliable consensus mechanism, ensures the speed by parallel processing (a block can be provided with a plurality of sub-blocks in a DAG view), also keeps the peculiarity of decentralization, ensures that the block chain consensus can be executed in parallel by combining DAG and PBFT technologies, ensures that the speed of the block chain is comparable to that of other existing centralization systems on the basis of keeping decentralization and safety, further ensures the whole block chain system, can efficiently and stably achieve consensus in a fluctuating and large-scale network environment, and provides real-time and reliable service for various applications carried on the chain.
Referring to fig. 4, fig. 4 is a block diagram of a block chain consensus device based on DAG according to an embodiment of the present invention. As shown in fig. 4, the DAG-based blockchain consensus achieving apparatus 40 of the present embodiment includes a first building module 401 and a first curing module 402. The first building module 401 and the first curing module 402 are respectively used for executing the specific methods in S101 and S102 in fig. 1, and details can be referred to the related introduction of fig. 4, which is only briefly described here:
the first building module 401 is configured to, when a network node on a blockchain issues a certain transaction, create a new block corresponding to the certain transaction in a current DAG view, and update a core tree in the current DAG view and the current DAG view according to a rule of an optimal core tree and the new block.
A first curing module 402, configured to enable the entire network of the block chains to agree on the axis tree of the updated DAG view according to the PBFT algorithm.
Further, referring to fig. 5, the first building module 401 may specifically include a building unit 4011 and a publishing unit 4012:
a building unit 4011, configured to, when a network node on a blockchain issues a certain transaction, determine an axis tree of a current DAG view from a created block in the current DAG view, create a new block corresponding to the certain transaction in the current directed acyclic graph DAG view, point a parent edge of the new block corresponding to the certain transaction to a leaf block of the axis tree of the current DAG view, and point a reference edge of the new block corresponding to the certain transaction to other leaf blocks of the current DAG view, so as to update the current DAG view; wherein, according to a rule of an optimal hub tree, other blocks except the created block in the hub tree of the current DAG view have a larger number of blocks contained in a sub-tree than the other blocks contained in a sub-tree that a single sub-block except the other blocks in all sub-blocks of a parent block on the hub tree.
The publishing unit 4012 is configured to publish the new block corresponding to the certain transaction, so that after other network nodes in the network of the block chain receive and verify the new block corresponding to the certain transaction, the current DAG view local to the other network nodes is updated, and all network nodes in the network of the block chain are enabled to update the axis tree of the local current DAG view respectively.
Further, as can be seen in fig. 6, the first curing module 402 may specifically include a proposal unit 4021 and a consensus unit 4022:
the proposal unit 4021 is configured to select a proposer node from the blockchain through a verifiable pseudo-random algorithm, so that the proposer node selects one block from the local updated DAG view as a leaf block of the axial tree according to the local updated DAG view, and initiates a proposal.
A consensus unit 4022, configured to validate and vote the leaf blocks selected by the proposer node by other verifier nodes in the block chain, so that the leaf blocks selected by the proposer node are approved by network nodes exceeding 2/3 of the block chain, and then confirm the proposal, so that the entire network of the block chain agrees on the axis tree of the updated DAG view.
Referring to fig. 7, fig. 7 is a block diagram illustrating another block chain consensus device based on DAG according to an embodiment of the present invention. As shown in fig. 7, the DAG-based blockchain consensus achieving device 70 of the present embodiment is optimized by the DAG-based blockchain consensus achieving device 40 shown in fig. 4. The DAG-based blockchain consensus achieving apparatus 70 further includes, in addition to the first building module 401 and the first solidification module 402 in the DAG-based blockchain consensus achieving apparatus 40, a second building module 701 and a second solidification module 702:
a second building module 701, configured to, when another transaction is issued by a network node on the blockchain, create a new block corresponding to the another transaction in the updated DAG view, update the DAG view again according to the new block corresponding to the another transaction and the axis tree achieving consensus, and expand the axis tree achieving consensus.
A second curing module 702, configured to make the entire network of block chains agree on the extended tree according to the PBFT algorithm.
The block chain consensus achieving device based on the DAG, which is provided in fig. 4 or fig. 7, can manage the transaction by using a DAG technology, ensure concurrent execution of the transaction, adopt the modified GHOST algorithm as a criterion of a consensus mechanism to ensure that the whole network of the block chain regularly constructs a DAG view, achieve consensus on the axis tree of the DAG view, and use the PBFT algorithm to achieve rapid convergence of the DAG view, thereby solidifying the consensus result. The embodiment of the invention provides an asynchronous, parallel, safe and reliable consensus mechanism, ensures the speed by parallel processing (a block can be provided with a plurality of sub-blocks in a DAG view), also keeps the peculiarity of decentralization, ensures that the block chain consensus can be executed in parallel by combining DAG and PBFT technologies, ensures that the speed of the block chain is comparable to that of other existing centralization systems on the basis of keeping decentralization and safety, further ensures the whole block chain system, can efficiently and stably achieve consensus in a fluctuating and large-scale network environment, and provides real-time and reliable service for various applications carried on the chain.
Fig. 8 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 8, the terminal device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as a program for performing DAG-based blockchain consensus. The processor 80, when executing the computer program 82, implements the steps in the above-described method embodiments, e.g., S101 to S102 shown in fig. 1. Alternatively, the processor 80, when executing the computer program 82, implements the functions of each module/unit in each device embodiment described above, for example, the functions of the modules 401 to 402 shown in fig. 4.
Illustratively, the computer program 82 may be partitioned into one or more modules/units that are stored in the memory 81 and executed by the processor 80 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 82 in the terminal device 8. For example, the computer program 82 may be partitioned into a first building module 401 and a first curing module 402. (modules in the virtual device), the specific functions of each module are as follows:
the first building module 401 is configured to, when a network node on a blockchain issues a certain transaction, create a new block corresponding to the certain transaction in a current DAG view, and update a core tree in the current DAG view and the current DAG view according to a rule of an optimal core tree and the new block.
A first curing module 402, configured to enable the entire network of the block chains to agree on the axis tree of the updated DAG view according to the PBFT algorithm.
The terminal device 8 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. Terminal device 8 may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a terminal device 8 and does not constitute a limitation of terminal device 8 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), and the like, which are provided on the terminal device 8. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is used for storing the computer programs and other programs and data required by the terminal device 6. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A block chain consensus achieving method based on a directed acyclic graph is characterized by comprising the following steps:
when a network node on a block chain issues a certain transaction, creating a new block corresponding to the certain transaction in a current Directed Acyclic Graph (DAG) view, and updating a shaft center tree in the current DAG view and the current DAG view according to a rule of an optimal shaft center tree and the new block;
and according to a practical Byzantine fault-tolerant PBFT algorithm, enabling the whole network of the block chain to achieve consensus on the axis tree of the updated DAG view.
2. The method as claimed in claim 1, wherein when a network node on the blockchain issues a transaction, creating a new block corresponding to the transaction in a current directed acyclic graph DAG view, and updating the axis tree in the current DAG view and the current DAG view according to a rule of an optimal axis tree and the new block, includes:
when a network node on a block chain issues a certain transaction, starting from a created block in a current DAG view, determining a core tree of the current DAG view, creating a new block corresponding to the certain transaction in the current directed acyclic graph DAG view, pointing a parent edge of the new block corresponding to the certain transaction to a leaf block of the core tree of the current DAG view, and pointing a reference edge of the new block corresponding to the certain transaction to other leaf blocks of the current DAG view so as to update the current DAG view; wherein, according to the rule of the optimal hub tree, the other blocks except the created block in the hub tree of the current DAG view have a larger number of blocks contained in the sub-tree than the other blocks contained in the sub-tree of a single sub-block except the other blocks in all sub-blocks of the parent block on the hub tree;
and releasing the new block corresponding to the certain transaction, updating the local current DAG view of other network nodes after the other network nodes in the network of the block chain receive and check the new block corresponding to the certain transaction, and respectively updating the axis tree of the local current DAG view by all the network nodes in the network of the block chain.
3. The method as claimed in claim 1 or 2, wherein the enabling the whole network of the blockchain to agree on the axis tree of the updated DAG view according to the practical byzantine fault-tolerant PBFT algorithm comprises:
selecting an offerer node from the block chain through a verifiable pseudo-random algorithm, and enabling the offerer node to select a block from the block as a leaf block of the axis tree according to a local updated DAG view of the offerer node and initiate a proposal;
and after verifying and voting by other verifier nodes in the block chain on the leaf blocks selected by the proposer node, and allowing the leaf blocks selected by the proposer node to be approved by network nodes exceeding 2/3 of the block chain, confirming the proposal, and allowing the whole network of the block chain to achieve consensus on the axis tree of the updated DAG view.
4. The method as claimed in claim 1, wherein after making the entire network of the blockchain agree on the axis tree of the updated DAG view according to the applicable byzantine fault-tolerant PBFT algorithm, the method further comprises:
when a network node on the block chain issues another transaction, creating a new block corresponding to the another transaction in the updated DAG view, updating the DAG view again according to the new block corresponding to the another transaction and the axis tree achieving consensus, and expanding the axis tree achieving consensus;
and according to a PBFT algorithm, enabling the whole network of the block chain to achieve consensus on the expanded axis tree.
5. An apparatus for block chain consensus based on a directed acyclic graph, comprising:
the system comprises a first building module, a second building module and a third building module, wherein the first building module is used for creating a new block corresponding to a certain transaction in a current Directed Acyclic Graph (DAG) view when the network node on a block chain releases the certain transaction, and updating an axis tree in the current DAG view and the current DAG view according to rules of an optimal axis tree and the new block;
and the first curing module is used for enabling the whole network of the block chain to achieve consensus on the axis tree of the updated DAG view according to a practical Byzantine fault-tolerant PBFT algorithm.
6. The apparatus according to claim 5, wherein the first building module comprises:
a building unit, configured to, when a network node on a blockchain issues a certain transaction, determine an axis tree of a current DAG view from a created block in the current DAG view, create a new block corresponding to the certain transaction in the current directed acyclic graph DAG view, point a parent edge of the new block corresponding to the certain transaction to a leaf block of the axis tree of the current DAG view, and point a reference edge of the new block corresponding to the certain transaction to other leaf blocks of the current DAG view, so as to update the current DAG view; wherein, according to the rule of the optimal hub tree, the other blocks except the created block in the hub tree of the current DAG view have a larger number of blocks contained in the sub-tree than the other blocks contained in the sub-tree of a single sub-block except the other blocks in all sub-blocks of the parent block on the hub tree;
and the issuing unit is used for issuing the new block corresponding to the certain transaction, updating the local current DAG view of other network nodes after the other network nodes in the network of the block chain receive and verify the new block corresponding to the certain transaction, and enabling all network nodes in the network of the block chain to respectively update the axis tree of the local current DAG view.
7. The apparatus of claim 5 or 6, wherein the first curing module comprises:
a proposal unit, configured to select a proposer node from the block chain through a verifiable pseudo-random algorithm, so that the proposer selects a block from the local updated DAG view as a leaf block of the axis tree according to the local updated DAG view, and initiates a proposal;
and a consensus unit, configured to, after the other verifier nodes in the block chain verify and vote on the leaf block selected by the presenter node, so that the leaf block selected by the presenter node is approved by a network node exceeding 2/3 of the block chain, confirm the proposal, so that the entire network of the block chain agrees with the axis tree of the updated DAG view.
8. The apparatus of claim 5, further comprising:
a second building module, configured to, when another transaction is issued by a network node on the blockchain, create a new block corresponding to the another transaction in the updated DAG view, update the DAG view again according to the new block corresponding to the another transaction and the axis tree achieving consensus, and expand the axis tree achieving consensus;
and the second curing module is used for enabling the whole network of the block chain to achieve consensus on the expanded axis tree according to the PBFT algorithm.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-4 when executing the computer program.
10. A computer-readable medium, in which a computer program is stored which, when being processed and executed, carries out the steps of the method according to any one of claims 1 to 4.
CN201910990847.1A 2019-10-18 2019-10-18 Block chain consensus achieving method and device based on directed acyclic graph Active CN111080288B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910990847.1A CN111080288B (en) 2019-10-18 2019-10-18 Block chain consensus achieving method and device based on directed acyclic graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910990847.1A CN111080288B (en) 2019-10-18 2019-10-18 Block chain consensus achieving method and device based on directed acyclic graph

Publications (2)

Publication Number Publication Date
CN111080288A true CN111080288A (en) 2020-04-28
CN111080288B CN111080288B (en) 2023-08-18

Family

ID=70310426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910990847.1A Active CN111080288B (en) 2019-10-18 2019-10-18 Block chain consensus achieving method and device based on directed acyclic graph

Country Status (1)

Country Link
CN (1) CN111080288B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116470A (en) * 2020-08-12 2020-12-22 北京大学 Method and device for creating schema book based on random witnesses
CN112615846A (en) * 2020-12-14 2021-04-06 重庆邮电大学 Block chain system authentication threshold updating method based on DAG
CN112783983A (en) * 2021-02-07 2021-05-11 中国人民解放军国防科技大学 Self-adaptive consensus method based on major-minor block diagram chain structure block chain account book design
CN113065960A (en) * 2021-03-22 2021-07-02 江苏派智信息科技有限公司 Transaction system based on block chain
CN113077343A (en) * 2021-04-09 2021-07-06 中山大学 Block chain consensus system based on directed acyclic graph
CN113115315A (en) * 2021-04-02 2021-07-13 青岛科技大学 IOT equipment behavior credible supervision method based on block chain
CN114401271A (en) * 2022-01-13 2022-04-26 中国人民解放军国防科技大学 Test data tamper-proof method, block chain system and medium
CN115037472A (en) * 2022-03-28 2022-09-09 湖南天河国云科技有限公司 Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment
US20230017790A1 (en) * 2021-07-13 2023-01-19 Huazhong University Of Science And Technology Graphic-blockchain-orientated hybrid consensus implementation apparatus and implementation method thereof

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150326450A1 (en) * 2014-05-12 2015-11-12 Cisco Technology, Inc. Voting strategy optimization using distributed classifiers
US20170212781A1 (en) * 2016-01-26 2017-07-27 International Business Machines Corporation Parallel execution of blockchain transactions
US20180101560A1 (en) * 2016-10-07 2018-04-12 International Business Machines Corporation Establishing overlay trust consensus for blockchain trust validation system
CN108595720A (en) * 2018-07-12 2018-09-28 中国科学院深圳先进技术研究院 A kind of block chain spatiotemporal data warehouse method, system and electronic equipment
CN108984789A (en) * 2018-08-15 2018-12-11 赵东洋 Method, apparatus, storage medium and the electronic equipment of distribution book keeping operation
CN109214795A (en) * 2018-09-18 2019-01-15 北京物链互联科技有限公司 A kind of block chain mixing common recognition method based on DAG algorithm
CN109697606A (en) * 2018-09-30 2019-04-30 贝克链区块链技术有限公司 The distributed network and the ecosystem of common recognition agreement are proved based on innovative prestige
US20190147553A1 (en) * 2017-11-14 2019-05-16 TitleFlow LLC Storing linked lists of mineral rights transactions in directed acyclic graphs of cryptographic hash pointers
CN110084596A (en) * 2019-04-01 2019-08-02 杜晓楠 A kind of method and apparatus of processing block chain mixing common recognition
US20190266145A1 (en) * 2018-02-27 2019-08-29 Alibaba Group Holding Limited Executing transactions based on blockchain
CN110198233A (en) * 2019-05-09 2019-09-03 中国人民解放军国防科技大学 Block chain consensus method and system based on trusted execution environment and directed acyclic graph
KR20190104793A (en) * 2018-03-02 2019-09-11 주식회사 아이콘루프 Method for generating block chain and verifying integrity in smart contract system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150326450A1 (en) * 2014-05-12 2015-11-12 Cisco Technology, Inc. Voting strategy optimization using distributed classifiers
US20170212781A1 (en) * 2016-01-26 2017-07-27 International Business Machines Corporation Parallel execution of blockchain transactions
US20180101560A1 (en) * 2016-10-07 2018-04-12 International Business Machines Corporation Establishing overlay trust consensus for blockchain trust validation system
US20190147553A1 (en) * 2017-11-14 2019-05-16 TitleFlow LLC Storing linked lists of mineral rights transactions in directed acyclic graphs of cryptographic hash pointers
US20190266145A1 (en) * 2018-02-27 2019-08-29 Alibaba Group Holding Limited Executing transactions based on blockchain
KR20190104793A (en) * 2018-03-02 2019-09-11 주식회사 아이콘루프 Method for generating block chain and verifying integrity in smart contract system
CN108595720A (en) * 2018-07-12 2018-09-28 中国科学院深圳先进技术研究院 A kind of block chain spatiotemporal data warehouse method, system and electronic equipment
CN108984789A (en) * 2018-08-15 2018-12-11 赵东洋 Method, apparatus, storage medium and the electronic equipment of distribution book keeping operation
CN109214795A (en) * 2018-09-18 2019-01-15 北京物链互联科技有限公司 A kind of block chain mixing common recognition method based on DAG algorithm
CN109697606A (en) * 2018-09-30 2019-04-30 贝克链区块链技术有限公司 The distributed network and the ecosystem of common recognition agreement are proved based on innovative prestige
CN110084596A (en) * 2019-04-01 2019-08-02 杜晓楠 A kind of method and apparatus of processing block chain mixing common recognition
CN110198233A (en) * 2019-05-09 2019-09-03 中国人民解放军国防科技大学 Block chain consensus method and system based on trusted execution environment and directed acyclic graph

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112116470A (en) * 2020-08-12 2020-12-22 北京大学 Method and device for creating schema book based on random witnesses
CN112615846A (en) * 2020-12-14 2021-04-06 重庆邮电大学 Block chain system authentication threshold updating method based on DAG
CN112615846B (en) * 2020-12-14 2022-03-22 重庆邮电大学 Block chain system authentication threshold updating method based on DAG
CN112783983A (en) * 2021-02-07 2021-05-11 中国人民解放军国防科技大学 Self-adaptive consensus method based on major-minor block diagram chain structure block chain account book design
CN113065960A (en) * 2021-03-22 2021-07-02 江苏派智信息科技有限公司 Transaction system based on block chain
CN113115315A (en) * 2021-04-02 2021-07-13 青岛科技大学 IOT equipment behavior credible supervision method based on block chain
CN113077343A (en) * 2021-04-09 2021-07-06 中山大学 Block chain consensus system based on directed acyclic graph
US20230017790A1 (en) * 2021-07-13 2023-01-19 Huazhong University Of Science And Technology Graphic-blockchain-orientated hybrid consensus implementation apparatus and implementation method thereof
CN114401271A (en) * 2022-01-13 2022-04-26 中国人民解放军国防科技大学 Test data tamper-proof method, block chain system and medium
CN115037472A (en) * 2022-03-28 2022-09-09 湖南天河国云科技有限公司 Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment
CN115037472B (en) * 2022-03-28 2023-06-23 湖南天河国云科技有限公司 Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment

Also Published As

Publication number Publication date
CN111080288B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN111080288A (en) Block chain consensus achieving method and device based on directed acyclic graph
CN111414210B (en) Method, apparatus and computer readable storage medium for generating side chains based on main chains
CN109815657B (en) Identity authentication method and device based on alliance chain, computer readable storage medium and terminal equipment
CN111382456B (en) Proposal message processing method, device, equipment and storage medium
CN105573828B (en) A kind of operation processing method and device
EP3779760B1 (en) Blockchain-based data processing method and apparatus, and electronic device
CN113489671B (en) Cross-alliance chain communication method and device based on verifiable random function
CN110750341B (en) Task scheduling method, device, system, terminal equipment and storage medium
CN104169952A (en) Network payment method, device and system
CN108347483B (en) Decentralized computing system based on double-layer network
DE112006001308T5 (en) Reconfigure hardware resources within a system
CN112163950A (en) Block chain network construction method and system convenient for expansion and node resource reuse and terminal equipment
CN113256297B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN109447636A (en) A kind of assets transfer method and device
EP4050542B1 (en) Blockchain-based data processing method and apparatus, and device and readable storage medium
CN108629588B (en) Computer readable medium for block chain consensus achievement
CN115409507A (en) Block processing method, block processing device, computer equipment and storage medium
CN116055052A (en) Block chain-based data processing method, device, equipment and readable storage medium
CN110262892B (en) Ticket issuing method and device based on distributed storage data chain and data chain node
CN110515591A (en) Random digit generation method and device based on block chain
CN110858211B (en) Data storage method, device and system and storage medium
CN115037472B (en) Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment
EP4365808A1 (en) Data verification method and apparatus
US11704726B1 (en) Systems and methods for bartering services and goods using distributed ledger techniques
CN114528893A (en) Machine learning model training method, electronic device and storage medium

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