WO2020043047A1 - 一种平行链共识方法、设备和存储介质 - Google Patents

一种平行链共识方法、设备和存储介质 Download PDF

Info

Publication number
WO2020043047A1
WO2020043047A1 PCT/CN2019/102507 CN2019102507W WO2020043047A1 WO 2020043047 A1 WO2020043047 A1 WO 2020043047A1 CN 2019102507 W CN2019102507 W CN 2019102507W WO 2020043047 A1 WO2020043047 A1 WO 2020043047A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
information
parachain
consensus
main chain
Prior art date
Application number
PCT/CN2019/102507
Other languages
English (en)
French (fr)
Inventor
王志文
吴思进
Original Assignee
杭州复杂美科技有限公司
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 杭州复杂美科技有限公司 filed Critical 杭州复杂美科技有限公司
Priority to US17/272,626 priority Critical patent/US20210352141A1/en
Publication of WO2020043047A1 publication Critical patent/WO2020043047A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1065Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT] 
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0637Strategic management or analysis, e.g. setting a goal or target of an organisation; Planning actions based on goals; Analysis or evaluation of effectiveness of goals
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1093Some peer nodes performing special functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/46Secure multiparty computation, e.g. millionaire problem
    • H04L2209/463Electronic voting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Definitions

  • the present application relates to the field of Internet financial technology, and in particular, to a parallel-chain consensus method, device, and storage medium.
  • the shortcomings in the existing parachain mechanism are that after the parachain node generates a block, whether the block is correct or not cannot be guaranteed, and there are cases where the data of the parachain is not reliable. If consensus is made directly on the parachain, the parachain and the main chain become two separate consensus blockchains, and a large amount of resources are needed to perform consensus on the parachain.
  • the present invention provides a parachain consensus method, including:
  • the present invention provides a parachain consensus method, including:
  • the first block information is the first block of the first parallel chain to be agreed by the parallel chain node Generation of some information
  • the block is written into the first parachain.
  • the present invention further provides an apparatus, including one or more processors and a memory, where the memory contains instructions executable by the one or more processors to cause the one or more processors to perform operations according to the present invention.
  • the embodiment provides a parachain consensus method.
  • the present invention also provides a storage medium storing a computer program, which causes the computer to execute a parachain consensus method according to various embodiments of the present invention.
  • a parachain consensus method, device, and storage medium provided by many embodiments of the present invention generate first block information by first packing a number of pieces of information about a first block of the first parachain to be consensused; second, The block information is sent to the corresponding main chain node, so that the main chain node records the first block information on the main chain, and verifies whether each of the first block information recorded by the main chain is not less than a first threshold number of The first block has the same information and generates a consensus result.
  • the method of synchronizing the consensus results and writing the verified first block to the first parallel chain solves the unreliable data of the parallel chain.
  • the parallel chain consensus will consume a lot of resources The problem.
  • a parachain consensus method, device, and storage medium provided by some embodiments of the present invention further reduce the cost of parachain consensus by configuring all parachain nodes as partial parachain nodes (parallel chain nodes configured as verification nodes), Improved the performance of the parachain and optimized the user experience.
  • FIG. 1 is a schematic diagram of a parachain consensus scenario according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a parachain consensus method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a parallel chain consensus method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a parachain consensus scenario according to an embodiment of the present invention.
  • a parallel chain node 201 on the parallel chain 20
  • a main chain node 101 is on the main chain 10
  • the parallel chain node 201 cooperates with the main chain node 101 to provide a parallel chain 20 Consensus method.
  • the following describes a parachain consensus method provided by the present invention in detail with reference to FIG. 2.
  • FIG. 2 is a flowchart of a parachain consensus method according to an embodiment of the present invention. As shown in FIG. 2, in this embodiment, the present invention provides a parachain consensus method applicable to parachain nodes, including:
  • S12 Packing several pieces of information of the first block to be agreed in the first parallel chain to generate first block information
  • S14 Send the first block information to the corresponding main chain node for the main chain node to record the first block information on the main chain, and verify whether there are many first block information recorded in the main chain.
  • the first block information is the same as the first threshold number and generates a consensus result;
  • the first block to be agreed on in the first parallel chain is a block with a block height H on the first parallel chain, and some information is in the first block.
  • the consensus result is the state hash of the first block, block height, status information of each packaged transaction, and authentication identification.
  • step S12 the parachain node 201 packages several pieces of information of the first block to be agreed on in the first parallel chain 20 to generate the first block information. Since the first block to be agreed in the first parallel chain is the first A block with a block height of H on the parachain, some information is the state hash of the first block, the block height, the signature information, and the status information of each packaged transaction. Therefore, the parachain node 201 packages the first parachain 20 The state hash of the block whose block height is H, the block height, the signature information, and the state information of each packaged transaction to generate the first block information;
  • step S14 the parachain node 201 sends the first block information to the corresponding main chain node 101 for the main chain node 101 to record the first block information on the main chain 10, and the main chain node 101 verifies the main chain 10 Whether there is not less than a first threshold amount of first block information recorded in each of the first block information, and a consensus result is generated, because the consensus result is the state hash, block height,
  • the status information and authentication identification of each transaction are packaged, so the parachain node 201 sends the first block information to the corresponding main chain node 101 for the main chain node 101 to record the first block information on the main chain 10.
  • the chain node 101 verifies whether the first block information recorded in the main chain 10 is not less than the first threshold amount of the first block information is the same and generates the state hash, block height, and packing of the first block.
  • Status information and authentication identification of each transaction is packaged, so the parachain node 201 sends the first block information to the corresponding main chain node 101 for the main chain node 101
  • step S16 the parachain node 201 synchronizes the state hash of the first block, the block height, the status information of each packaged transaction, and the authentication identifier, and writes the verified first block into the first parachain 20.
  • step S14 the main chain node 101 verifies whether the first block information recorded in the main chain 10 is not less than the first threshold amount of the first block information is the same and generates a consensus result. No less than the first threshold number of first block information is the same, no consensus result is generated; if the parachain node 201 fails to synchronize the consensus result within the pre-configured timeout period, the first block is not written to the first Parallel chain 20.
  • the first block to be agreed on the first parallel chain is a block with a block height of H on the first parallel chain, and some information is a state hash of the first block, a block height, signature information,
  • the state information of each packaged transaction, the consensus result is the state hash of the first block, the block height, the state information of each packaged transaction, and the authentication identifier.
  • a parallel chain consensus method provided by the present invention is detailed. It is stated that in more embodiments, the parachain consensus method provided by the present invention is not limited to the above examples, and some information can be configured as the state hash of the first block, the block height, the signature information, and the packaged transactions. One or any number of status information can also be configured as other information such as the block header hash according to actual needs, which can achieve the same technical effect.
  • the method shown in FIG. 2 is applicable to a verification node of a parallel chain.
  • the parachain nodes are divided into parachain consensus nodes and parachain verification nodes, and the parachain consensus nodes are used to process the first block to be consensus.
  • the business logic of the transaction information, and the verification node of the parallel chain is used to execute the method shown in FIG. 2.
  • only some parachain nodes execute the method shown in FIG. 2, which reduces the cost of the parachain consensus, improves the performance of the parachain, and optimizes the user experience.
  • the number of verification nodes is configured to be at least 3N + 1, where N is a positive integer and N is the number of verification nodes of the first block information allowed to generate errors.
  • a consensus is reached using the BFT consensus algorithm.
  • the main chain node verifies that the first block information generated by the verification nodes recorded in the main chain is greater than or equal to 3 first block information, the consensus result is generated and the verification nodes are synchronized As a result of the consensus, the verified first block is written into the first parachain.
  • a description is made by using BFT consensus algorithm to reach a consensus, and the number of verification nodes is configured to be at least 3N + 1.
  • other consensus algorithms may be used for consensus and the configuration of verification nodes. The method can also be configured according to actual needs.
  • the information includes at least one of the following: a state hash of the first block, a block height, signature information, and state information of each packaged transaction, wherein the state information is used to identify the first block Whether each transaction packaged by the block is successful.
  • the state information is a key-value table, each transaction is configured with a first index, and the first index is a key in the key-value table; whether each transaction is successfully packaged and configured with a binary value, and the binary value is in the key-value table For example, if the transaction with the first index of 1 is successfully packaged, the binary value of the transaction is configured as 1. If the transaction with the first index of 1 is packaged, the binary value of the transaction is configured as 0.
  • the packing status of these 4 transactions is: success, success, success, and failure.
  • the status information is: (1,1), (2, 1), (3,1), (4,0).
  • the state information is used as a key-value table as an example.
  • the state information can also be configured as other tables or other data types according to actual needs, such as a bitmap. Both can achieve the same technical effect.
  • step S16 in the method shown in FIG. 2 includes: synchronizing the consensus results, and writing the verified first block to the first parallel chain when each block before the first block passes the verification. .
  • the consensus result includes: an authentication identifier configured for the first block that passes the verification.
  • the consensus result further includes: the authentication height of the first parallel chain determined according to the authentication identifier; the authentication height is recorded on the main chain. Specifically, it is assumed that the first block to be agreed on the first parallel chain is a block with a block height of H on the first parallel chain, and the authentication height is the block height of the first block to be agreed on the first parallel chain.
  • the main chain node verifies whether there is not less than a first threshold number of first block information recorded in the first block information recorded by the main chain and generates a consensus result, because the consensus result includes the first block that passed the verification
  • the configured authentication ID so the main chain updates the authentication height H-1 of the first parallel chain to H, and records the information that the authentication height of the first parallel chain is H on the main chain according to the authentication ID.
  • FIG. 3 is a flowchart of a parallel chain consensus method according to an embodiment of the present invention. As shown in FIG. 3, in this embodiment, the present invention provides a parallel chain consensus method applicable to a main chain node, including:
  • S22 Receive the first block information sent by the corresponding parachain node, and record the first block information on the main chain; wherein the first block information is packaged by the parachain node in the first parachain Generation of some information of the first block to be consensus;
  • S24 verify whether there is not less than a first threshold number of first block information recorded in each of the first block information recorded in the main chain, and generate a consensus result for the parallel chain node to synchronize the consensus result, The verified first block is written into the first parachain.
  • the first block to be agreed on in the first parallel chain is a block with a block height H on the first parallel chain, and some information is in the first block.
  • the consensus result is the state hash of the first block, block height, status information of each packaged transaction, and authentication identification.
  • the main chain node 101 receives the first block information sent by the corresponding parallel chain node 201, and records the first block information on the main chain 10.
  • the first block information is packed by the parallel chain node 201 Several pieces of information of the first block to be agreed on the first parallel chain are generated; since the first block to be agreed on the first parallel chain is a block with a block height H on the first parallel chain, some information is the first The state hash of the block, the block height, the signature information, and the status information of each packaged transaction. Therefore, the first block information is packaged by the parallel chain node 201 of the first block of the first block whose height is H. State hash of the first block, block height, signature information, and status information of each packaged transaction are generated;
  • step S24 the main chain node 101 verifies whether there is not less than a first threshold number of first block information in each first block information recorded in the main chain 10, and generates a consensus result for the parallel chain nodes 201 synchronizes the consensus result and writes the verified first block into the first parallel chain 20; because the consensus result is the state hash of the first block, the block height, the status information of each packaged transaction, and the authentication identifier, The main chain node 101 verifies whether each of the first block information recorded in the main chain 10 is not less than the first threshold number of the first block information is the same, and generates a state hash and a block height of the first block. The status information and authentication ID of each packaged transaction for the parallel chain node 201 to synchronize the state hash of the first block, the block height, the status information of each packaged transaction, and the authentication ID. The block is written into the first parallel chain 20.
  • the first block to be agreed on the first parallel chain is a block with a block height of H on the first parallel chain, and some information is a state hash of the first block, a block height, signature information,
  • the state information of each packaged transaction, the consensus result is the state hash of the first block, the block height, the state information of each packaged transaction, and the authentication identifier.
  • a parallel chain consensus method provided by the present invention is detailed. It is stated that in more embodiments, the parachain consensus method provided by the present invention is not limited to the above examples, and some information can be configured as the state hash of the first block, the block height, the signature information, and the packaged transactions. One or any number of status information can also be configured as other information such as block header hash according to actual needs, which can achieve the same technical effect.
  • step S24 the main chain node 101 verifies whether there is not less than a first threshold number of first block information in each of the first block information recorded in the main chain 10 and generates a consensus result. No less than the first threshold number of first block information is the same, no consensus result is generated; if the parachain node 201 fails to synchronize the consensus result within the pre-configured timeout period, the first block is not written to the first Parallel chain 20.
  • the consensus result includes: an authentication identifier configured for the first block that passes the verification.
  • the consensus result further includes: updating the authentication height of the first parallel chain according to the authentication identifier, and recording the updated authentication height on the main chain.
  • the first block to be agreed on the first parallel chain is a block with a block height of H on the first parallel chain
  • the authentication height is the block height of the first block to be agreed on the first parallel chain.
  • the main chain node verifies whether the first block information recorded in the main chain is not less than the first threshold number of the first block information is the same and generates a consensus result, because the consensus result includes the first block that passed the verification
  • the configured authentication identifier so the main chain updates the authentication height H-1 of the first parallel chain to H according to the authentication identifier, and records the information that the authentication height of the first parallel chain is H on the main chain.
  • the number of verification nodes is configured to be at least 3N + 1, where N is a positive integer and N is the number of verification nodes of the first block information allowed to generate errors.
  • a consensus is reached using the BFT consensus algorithm.
  • the main chain node verifies that the first block information generated by the verification nodes recorded in the main chain is greater than or equal to 3 first block information, the consensus result is generated and the verification nodes are synchronized As a result of the consensus, the verified first block is written into the first parachain.
  • a description is made by using BFT consensus algorithm to reach a consensus, and the number of verification nodes is configured to be at least 3N + 1.
  • other consensus algorithms may be used for consensus and the configuration of verification nodes. The method can also be configured according to actual needs.
  • the information includes at least one of the following: a state hash of the first block, a block height, signature information, and state information of each packaged transaction, wherein the state information is used to identify the first block Whether each transaction packaged by the block is successful.
  • the state information is a key-value table, each transaction is configured with a first index, and the first index is a key in the key-value table; whether each transaction is successfully packaged and configured with a binary value, and the binary value is in the key-value table For example, if the transaction with the first index of 1 is successfully packaged, the binary value of the transaction is configured as 1. If the transaction with the first index of 1 is packaged, the binary value of the transaction is configured as 0.
  • the packing status of these 4 transactions is: success, success, success, and failure.
  • the status information is: (1,1), (2, 1), (3,1), (4,0).
  • the state information is used as a key-value table as an example.
  • the state information can also be configured as other tables or other data types according to actual needs, such as a bitmap. Both can achieve the same technical effect.
  • step S24 in the method shown in FIG. 3 includes: the first block that passes the verification is written into the first parallel chain only when each block before the first block passes the verification.
  • FIG. 4 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the present application further provides a device 400 including one or more central processing unit (CPU) 401, which may be based on a program stored in a read-only memory (ROM) 402 or The program loaded from the storage section 408 into the random access memory (RAM) 403 performs various appropriate actions and processes.
  • CPU central processing unit
  • RAM random access memory
  • various programs and data required for the operation of the device 400 are also stored.
  • the CPU 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404.
  • An input / output (I / O) interface 405 is also connected to the bus 404.
  • the following components are connected to the I / O interface 405: an input portion 406 including a keyboard, a mouse, and the like; an output portion 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the speaker; a storage portion 408 including a hard disk and the like And a communication section 409 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 409 performs communication processing via a network such as the Internet.
  • the driver 410 is also connected to the I / O interface 405 as needed.
  • a removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
  • a parachain consensus method described in any of the above embodiments may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing a parachain consensus method.
  • the computer program may be downloaded and installed from a network through the communication section 409, and / or installed from a removable medium 411.
  • the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium may be a computer-readable storage medium included in the device of the foregoing embodiment; it may also exist alone and not assembled in Computer-readable storage media in a device.
  • the computer-readable storage medium stores one or more programs, which are used by one or more processors to execute a parachain consensus method described in this application.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions.
  • the functions noted in the blocks may also occur in a different order than those marked in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • the units or modules described in the embodiments of the present application may be implemented in a software manner, or may be implemented in a hardware manner.
  • the described units or modules may also be provided in a processor.
  • each of the units may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device.
  • the names of these units or modules do not in any way constitute a limitation on the units or modules themselves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Educational Administration (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种平行链共识方法、设备和存储介质,该方法包括:打包第一平行链的待共识的第一区块的若干信息以生成第一区块信息;将第一区块信息发送至对应的主链节点,以供主链节点将第一区块信息记录到主链上,验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果;同步共识结果,将通过验证的第一区块写入第一平行链的方法,解决了平行链的数据不可靠,平行链共识将耗费大量资源的问题。

Description

一种平行链共识方法、设备和存储介质 技术领域
本申请涉及互联网金融技术领域,具体涉及一种平行链共识方法、设备和存储介质。
背景技术
现有的平行链机制中存在的缺陷是,平行链节点生成区块后,该区块是否正确无法得到保障,存在平行链的数据不可靠的情况。若直接在平行链上做共识,则平行链与主链成为两条单独的共识的区块链,平行链上需要耗费大量资源去进行共识。
发明内容
鉴于现有技术中的上述缺陷或不足,期望提供一种资源耗费低、又能保证平行链区块的正确性的一种平行链共识方法、设备和存储介质。
第一方面,本发明提供一种平行链共识方法,包括:
打包第一平行链的待共识的第一区块的若干信息以生成第一区块信息;
将第一区块信息发送至对应的主链节点,以供主链节点将第一区块信息记录到主链上,验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果;
同步共识结果,将通过验证的第一区块写入第一平行链。
第二方面,本发明提供一种平行链共识方法,包括:
接收对应的平行链节点发送的第一区块信息,将第一区块信息记录到主链上;其中,第一区块信息由平行链节点打包第一平行链的待共识的第一区块的若干信息生成;
验证主链所记录的各第一区块信息中是否有不少于第一阈值数量 的第一区块信息相同,并生成共识结果,以供平行链节点同步共识结果,将通过验证的第一区块写入第一平行链。
第三方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的一种平行链共识方法。
第四方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的一种平行链共识方法。
本发明诸多实施例提供的一种平行链共识方法、设备和存储介质通过首先打包第一平行链的待共识的第一区块的若干信息以生成第一区块信息;其次,将第一区块信息发送至对应的主链节点,以供主链节点将第一区块信息记录到主链上,验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果;最后,同步共识结果,将通过验证的第一区块写入第一平行链的方法,解决了平行链的数据不可靠,平行链共识将耗费大量资源的问题。
本发明一些实施例提供的一种平行链共识方法、设备和存储介质进一步通过将所有平行链节点配置为部分平行链节点(配置为验证节点的平行链节点),降低了平行链共识的成本,提高了平行链的性能,优化了用户体验。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为本发明一实施例中平行链共识场景的示意图。
图2为本发明一实施例提供的一种平行链共识方法的流程图。
图3为本发明一实施例提供的一种平行链共识方法的流程图。
图4为本发明一实施例提供的一种设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1为本发明一实施例中平行链共识场景的示意图。如图1所示,在本实施例中,平行链20上有平行链节点201,主链10上有主链节点101,平行链节点201与主链节点101配合,提供了一种平行链20的共识方法。以下结合图2对本发明提供的一种平行链共识方法进行具体说明。
图2为本发明一实施例提供的一种平行链共识方法的流程图。如图2所示,在本实施例中,本发明提供一种平行链共识方法,适用于平行链节点,包括:
S12:打包第一平行链的待共识的第一区块的若干信息以生成第一区块信息;
S14:将第一区块信息发送至对应的主链节点,以供主链节点将第一区块信息记录到主链上,验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果;
S16:同步共识结果,将通过验证的第一区块写入第一平行链。
具体地,以图1所示的应用场景为例,假设第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,若干信息为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,共识结果为第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识。
在步骤S12中,平行链节点201打包第一平行链20的待共识的第一区块的若干信息以生成第一区块信息,由于第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,若干信息为第一区 块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,因此,平行链节点201打包第一平行链20的区块高度为H的区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息以生成第一区块信息;
在步骤S14中,平行链节点201将第一区块信息发送至对应的主链节点101,以供主链节点101将第一区块信息记录到主链10上,主链节点101验证主链10所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果,由于共识结果为第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识,因此平行链节点201将第一区块信息发送至对应的主链节点101,以供主链节点101将第一区块信息记录到主链10上,主链节点101验证主链10所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识;
在步骤S16中,平行链节点201同步第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识,将通过验证的第一区块写入第一平行链20。
若在步骤S14中,主链节点101验证主链10所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果,若未验证到有不少于第一阈值数量的第一区块信息相同,则不生成共识结果;平行链节点201在预配置的超时时长内若同步不到共识结果,则不将第一区块写入第一平行链20。
上述实施例以第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,若干信息为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,共识结果为第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识为例对本发明提供的一种平行链共识方法进行了详细的阐述,在更多实施例中,本发明提供的平行链共识方法不以上述举例为限,若干信息可以配置为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息的一项或任意多项,也可以根据实际需求配置为区块头哈希等其它信息, 均可实现相同的技术效果。
在一优选实施例中,图2所示的方法适用于平行链的验证节点。具体地,假设在图2所示的方法的步骤S12前,平行链节点被分为平行链的共识节点和平行链的验证节点,平行链的共识节点用于处理待共识的第一区块的交易信息的业务逻辑,平行链的验证节点用于执行图2所示的方法。在本实施例中,只有部分平行链节点(配置为验证节点的平行链节点)执行图2所示的方法,降低了平行链共识的成本,提高了平行链的性能,优化了用户体验。
在一优选实施例中,验证节点的数量至少配置为3N+1个,其中,N为正整数,N为允许产生错误的第一区块信息的验证节点的数量。具体地,验证节点执行图2所示的方法后,使用BFT共识算法达成共识,BFT共识算法的一个条件是,验证节点的数量至少配置为3N+1,其中,N为正整数,N为允许产生错误的第一区块信息的验证节点的数量,如果N=1,则验证节点的数量至少配置为4个。假设配置有4个验证节点,若主链节点验证主链所记录的验证节点生成的各第一区块信息,有大于或等于3个第一区块信息相同,则生成共识结果,验证节点同步共识结果,将通过验证的第一区块写入第一平行链。在本实施例中,以使用BFT共识算法达成共识,将验证节点的数量至少配置为3N+1个为例进行说明,在更多实施例中,可采用其它共识算法进行共识,验证节点的配置方法也可以根据实际需求进行配置。
在一优选实施例中,若干信息包括以下至少一项:第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,其中,状态信息用于标识所述第一区块所打包的各交易是否成功。具体地,假设状态信息为键值表,每个交易配置有第一索引,第一索引为键值表中的键;每个交易是否成功打包配置有一个二进制值,二进制值为键值表中的值,例如第一索引为1的交易打包成功,则为该交易的二进制值配置为1,第一索引为1的交易打包失败,则为该交易的二进制值配置为0;假设在当前区块中,有索引值为1、2、3、4的4条交易,这4条交易的打包状态为:成功、成功、成功、失败,则状态信息为:(1,1)、(2,1)、(3,1)、(4,0)。在本实施例中,以状态信息为键值表为例 进行介绍,在更多实施例中,状态信息还可以根据实际需求将状态信息配置为其它表或其它数据类型,例如配置为位图表,均可实现相同的技术效果。
在一优选实施例中,图2所示的方法中的步骤S16包括:同步共识结果,在第一区块之前的各区块均通过验证时将通过验证的第一区块写入第一平行链。
在一优选实施例中,共识结果包括:为通过验证的第一区块配置的认证标识。
在一优选实施例中,共识结果还包括:根据认证标识确定的第一平行链的认证高度;认证高度记录在主链上。具体地,假设第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,认证高度为第一平行链的待共识的第一区块的区块高度,主链节点验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果,由于共识结果包括为通过验证的第一区块配置的认证标识,因此主链根据认证标识将第一平行链的认证高度H-1更新为H,第一平行链的认证高度为H的信息记录在主链上。
图3为本发明一实施例提供的一种平行链共识方法的流程图。如图3所示,在本实施例中,本发明提供一种平行链共识方法,适用于主链节点,包括:
S22:接收对应的平行链节点发送的第一区块信息,将所述第一区块信息记录到主链上;其中,所述第一区块信息由所述平行链节点打包第一平行链的待共识的第一区块的若干信息生成;
S24:验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同,并生成共识结果,以供所述平行链节点同步所述共识结果,将通过验证的第一区块写入所述第一平行链。
具体地,以图1所示的应用场景为例,假设第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,若干信息为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,共识结果为第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识。
在步骤S22中,主链节点101接收对应的平行链节点201发送的第一区块信息,将第一区块信息记录到主链10上;其中,第一区块信息由平行链节点201打包第一平行链的待共识的第一区块的若干信息生成;由于第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,若干信息为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,因此第一区块信息由平行链节点201打包第一平行链的区块高度为H的第一区块的第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息生成;
在步骤S24中,主链节点101验证主链10所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同,并生成共识结果,以供平行链节点201同步共识结果,将通过验证的第一区块写入第一平行链20;由于共识结果为第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识,因此,主链节点101验证主链10所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同,并生成第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识,以供平行链节点201同步第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识,将通过验证的第一区块写入第一平行链20。
上述实施例以第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,若干信息为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,共识结果为第一区块的状态哈希、区块高度、所打包各交易的状态信息、认证标识为例对本发明提供的一种平行链共识方法进行了详细的阐述,在更多实施例中,本发明提供的平行链共识方法不以上述举例为限,若干信息可以配置为第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息的一项或任意多项,也可以根据实际需求配置为区块头哈希等其它信息,均可实现相同的技术效果。
若在步骤S24中,主链节点101验证主链10所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果,若未验证到有不少于第一阈值数量的第一区块信息相同,则不生 成共识结果;平行链节点201在预配置的超时时长内若同步不到共识结果,则不将第一区块写入第一平行链20。
在一优选实施例中,共识结果包括:为通过验证的第一区块配置的认证标识。
在一优选实施例中,共识结果还包括:根据认证标识更新第一平行链的认证高度,并将更新后的认证高度记录到主链上。具体地,假设第一平行链的待共识的第一区块为第一平行链上区块高度为H的区块,认证高度为第一平行链的待共识的第一区块的区块高度;主链节点验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果,由于共识结果包括为通过验证的第一区块配置的认证标识,因此主链根据认证标识将第一平行链的认证高度H-1更新为H,并将第一平行链的认证高度为H的信息记录在主链上。
在一优选实施例中,验证节点的数量至少配置为3N+1个,其中,N为正整数,N为允许产生错误的第一区块信息的验证节点的数量。具体地,验证节点执行图2所示的方法后,使用BFT共识算法达成共识,BFT共识算法的一个条件是,验证节点的数量至少配置为3N+1,其中,N为正整数,N为允许产生错误的第一区块信息的验证节点的数量,如果N=1,则验证节点的数量至少配置为4个。假设配置有4个验证节点,若主链节点验证主链所记录的验证节点生成的各第一区块信息,有大于或等于3个第一区块信息相同,则生成共识结果,验证节点同步共识结果,将通过验证的第一区块写入第一平行链。在本实施例中,以使用BFT共识算法达成共识,将验证节点的数量至少配置为3N+1个为例进行说明,在更多实施例中,可采用其它共识算法进行共识,验证节点的配置方法也可以根据实际需求进行配置。
在一优选实施例中,若干信息包括以下至少一项:第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息,其中,状态信息用于标识所述第一区块所打包的各交易是否成功。具体地,假设状态信息为键值表,每个交易配置有第一索引,第一索引为键值表中的键;每个交易是否成功打包配置有一个二进制值,二进制值为键 值表中的值,例如第一索引为1的交易打包成功,则为该交易的二进制值配置为1,第一索引为1的交易打包失败,则为该交易的二进制值配置为0;假设在当前区块中,有索引值为1、2、3、4的4条交易,这4条交易的打包状态为:成功、成功、成功、失败,则状态信息为:(1,1)、(2,1)、(3,1)、(4,0)。在本实施例中,以状态信息为键值表为例进行介绍,在更多实施例中,状态信息还可以根据实际需求将状态信息配置为其它表或其它数据类型,例如配置为位图表,均可实现相同的技术效果。
在一优选实施例中,图3所示的方法中的步骤S24包括:通过验证的第一区块仅在第一区块之前的各区块均通过验证时写入第一平行链。
图4为本发明一实施例提供的一种设备的结构示意图。
如图4所示,作为另一方面,本申请还提供了一种设备400,包括一个或多个中央处理单元(CPU)401,其可以根据存储在只读存储器(ROM)402中的程序或者从存储部分408加载到随机访问存储器(RAM)403中的程序而执行各种适当的动作和处理。在RAM403中,还存储有设备400操作所需的各种程序和数据。CPU401、ROM402以及RAM403通过总线404彼此相连。输入/输出(I/O)接口405也连接至总线404。
以下部件连接至I/O接口405:包括键盘、鼠标等的输入部分406;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分407;包括硬盘等的存储部分408;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分409。通信部分409经由诸如因特网的网络执行通信处理。驱动器410也根据需要连接至I/O接口405。可拆卸介质411,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器410上,以便于从其上读出的计算机程序根据需要被安装入存储部分408。
特别地,根据本公开的实施例,上述任一实施例描述的一种平行链共识方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算 机程序,所述计算机程序包含用于执行一种平行链共识方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分409从网络上被下载和安装,和/或从可拆卸介质411被安装。
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请的一种平行链共识方法。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各所述单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (16)

  1. 一种平行链共识方法,适用于平行链节点,其特征在于,包括:
    打包第一平行链的待共识的第一区块的若干信息以生成第一区块信息;
    将所述第一区块信息发送至对应的主链节点,以供所述主链节点将所述第一区块信息记录到主链上,验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同并生成共识结果;
    同步所述共识结果,将通过验证的第一区块写入所述第一平行链。
  2. 根据权利要求1所述的方法,其特征在于,所述方法适用于平行链的验证节点。
  3. 根据权利要求2所述的方法,其特征在于,所述验证节点的数量至少配置为3N+1个,其中,N为正整数,N为允许产生错误的所述第一区块信息的所述验证节点的数量。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述若干信息包括以下至少一项:所述第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息;
    所述状态信息用于标识所述第一区块所打包的各交易是否成功。
  5. 根据权利要求1-3任一项所述的方法,其特征在于,所述同步所述共识结果,将通过验证的第一区块写入所述第一平行链包括:
    同步所述共识结果,在所述第一区块之前的各区块均通过验证时将通过验证的第一区块写入所述第一平行链。
  6. 根据权利要求1-3任一项所述的方法,其特征在于,所述共识结果包括:为通过验证的第一区块配置的认证标识。
  7. 根据权利要求6所述的方法,其特征在于,所述共识结果还包括:根据所述认证标识确定的所述第一平行链的认证高度;
    所述认证高度记录在所述主链上。
  8. 一种平行链共识方法,适用于主链节点,其特征在于,包括:
    接收对应的平行链节点发送的第一区块信息,将所述第一区块信息记录到主链上;其中,所述第一区块信息由所述平行链节点打包第一平行链的待共识的第一区块的若干信息生成;
    验证主链所记录的各第一区块信息中是否有不少于第一阈值数量的第一区块信息相同,并生成共识结果,以供所述平行链节点同步所述共识结果,将通过验证的第一区块写入所述第一平行链。
  9. 根据权利要求8所述的方法,其特征在于,还包括:
    为通过验证的第一区块配置认证标识。
  10. 根据权利要求9所述的方法,其特征在于,还包括:
    根据所述认证标识更新所述第一平行链的认证高度,并将更新后的认证高度记录到主链上。
  11. 根据权利要求8-10任一项所述的方法,其特征在于,所述平行链节点为所述第一平行链的验证节点。
  12. 根据权利要求11所述的方法,其特征在于,所述验证节点的数量至少配置为3N+1个,其中,N为正整数,N为允许产生错误的所述第一区块信息的所述验证节点的数量。
  13. 根据权利要求8-10任一项所述的方法,其特征在于,所述若干信息包括以下至少一项:所述第一区块的状态哈希、区块高度、签名信息、所打包各交易的状态信息;
    所述状态信息用于标识所述第一区块所打包的各交易是否成功。
  14. 根据权利要求8-10任一项所述的方法,其特征在于,所述通过验证的第一区块仅在所述第一区块之前的各区块均通过验证时写入所述第一平行链。
  15. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-14中任一项所述的方法。
  16. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-14中任一项所述的方法。
PCT/CN2019/102507 2018-08-30 2019-08-26 一种平行链共识方法、设备和存储介质 WO2020043047A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/272,626 US20210352141A1 (en) 2018-08-30 2019-08-26 Method And Device For Reaching Consensus In Parachain, And Storage Medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811005421.8A CN109410045B (zh) 2018-08-30 2018-08-30 一种平行链共识方法、设备和存储介质
CN201811005421.8 2018-08-30

Publications (1)

Publication Number Publication Date
WO2020043047A1 true WO2020043047A1 (zh) 2020-03-05

Family

ID=65463809

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102507 WO2020043047A1 (zh) 2018-08-30 2019-08-26 一种平行链共识方法、设备和存储介质

Country Status (3)

Country Link
US (1) US20210352141A1 (zh)
CN (1) CN109410045B (zh)
WO (1) WO2020043047A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111667367A (zh) * 2020-05-22 2020-09-15 安庆师范大学 一种区块链节点设备及其区块链网络系统
CN112241435A (zh) * 2020-10-23 2021-01-19 山西特信环宇信息技术有限公司 一种锥体区块链的存储系统及共识存储方法

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109410045B (zh) * 2018-08-30 2020-08-14 杭州复杂美科技有限公司 一种平行链共识方法、设备和存储介质
CN109831514B (zh) * 2019-03-02 2020-06-09 杭州复杂美科技有限公司 平行链共识方法、数据异常处理方法、设备和存储介质
CN109872156A (zh) * 2019-03-11 2019-06-11 赛迪(青岛)区块链研究院有限公司 一种联盟链共识系统及方法
CN110084601B (zh) * 2019-04-30 2021-03-16 杭州复杂美科技有限公司 平行链主链交易状态同步方法、设备和存储介质
CN110113409B (zh) * 2019-04-30 2021-07-06 杭州复杂美科技有限公司 平行链授权节点配置方法、设备和存储介质
CN110210972B (zh) * 2019-05-31 2021-04-13 杭州复杂美科技有限公司 共识交易发送方法、设备和存储介质
CN110298756B (zh) * 2019-06-28 2022-12-20 杭州复杂美科技有限公司 平行链自共识方法、设备和存储介质
CN110287263B (zh) * 2019-06-28 2021-03-16 杭州复杂美科技有限公司 平行链自共识方法、设备和存储介质
CN110287196B (zh) * 2019-06-29 2021-11-02 杭州复杂美科技有限公司 区块存储方法、平行链交易获取方法、设备和存储介质
CN110390524B (zh) * 2019-07-31 2021-10-26 中国工商银行股份有限公司 区块链中作业数据处理方法、装置、电子设备及存储介质
CN110535922B (zh) * 2019-08-15 2021-10-01 杭州复杂美科技有限公司 状态数据存储方法和平行链区块生成方法
CN110516150B (zh) * 2019-08-26 2021-12-10 杭州复杂美科技有限公司 平行链交易推送方法、设备和存储介质
CN110535933B (zh) * 2019-08-26 2021-07-06 杭州复杂美科技有限公司 平行链共识方法、设备和存储介质
CN110516006B (zh) * 2019-08-26 2021-10-01 杭州复杂美科技有限公司 平行链区块生成方法、设备和存储介质
CN110392121B (zh) * 2019-09-02 2021-10-01 杭州复杂美科技有限公司 平行链区块生成方法、设备和存储介质
CN111274313B (zh) * 2020-01-12 2023-05-30 杭州复杂美科技有限公司 分段共识方法、设备和存储介质
CN111524011B (zh) * 2020-05-06 2023-05-30 杭州复杂美科技有限公司 平行链共识确认方法、设备和存储介质
CN111524010B (zh) * 2020-05-06 2023-06-02 杭州复杂美科技有限公司 平行链共识方法、设备和存储介质
CN112184227B (zh) * 2020-09-30 2023-05-30 杭州复杂美科技有限公司 平行链监督共识方法、设备和存储介质
CN114584326B (zh) * 2022-05-07 2022-08-30 腾讯科技(深圳)有限公司 区块链数据处理方法、装置、电子设备及存储介质
CN117668121A (zh) * 2023-12-25 2024-03-08 北京大学长沙计算与数字经济研究院 一种区块链共识、区块引用方法以及平行型图区块链系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729471A (zh) * 2017-10-13 2018-02-23 上海策赢网络科技有限公司 一种区块链及其生成方法与设备
CN107909369A (zh) * 2017-10-13 2018-04-13 布比(北京)网络技术有限公司 基于跨链交易的共识方法、装置和存储介质
US20180220278A1 (en) * 2017-02-01 2018-08-02 BriefTrace Ltd. System and method for securing and verifying information from transportation monitors
CN109410045A (zh) * 2018-08-30 2019-03-01 杭州复杂美科技有限公司 一种平行链共识方法、设备和存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6992063B2 (en) * 2000-09-29 2006-01-31 The Trustees Of Princeton University Compositions and method for regulating apoptosis
WO2017190175A1 (en) * 2016-05-06 2017-11-09 Othera Pty Ltd Methods and systems for blockchain based "segmented risk based securities"
CN108090750A (zh) * 2016-11-22 2018-05-29 深圳银链科技有限公司 区块链清结算系统及方法
CN108241968B (zh) * 2017-03-26 2020-08-14 杭州复杂美科技有限公司 前置机参与区块链共识的方法
CN106899698B (zh) * 2017-04-11 2020-12-18 张铮文 一种区块链之间的跨链互操作方法
CN112865982A (zh) * 2017-07-26 2021-05-28 创新先进技术有限公司 数字证书管理方法、装置及电子设备
CN107742210A (zh) * 2017-10-13 2018-02-27 布比(北京)网络技术有限公司 一种不同区块链间的跨链转账系统和方法
CN108182635A (zh) * 2017-12-18 2018-06-19 深圳前海微众银行股份有限公司 区块链共识方法、系统和计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180220278A1 (en) * 2017-02-01 2018-08-02 BriefTrace Ltd. System and method for securing and verifying information from transportation monitors
CN107729471A (zh) * 2017-10-13 2018-02-23 上海策赢网络科技有限公司 一种区块链及其生成方法与设备
CN107909369A (zh) * 2017-10-13 2018-04-13 布比(北京)网络技术有限公司 基于跨链交易的共识方法、装置和存储介质
CN109410045A (zh) * 2018-08-30 2019-03-01 杭州复杂美科技有限公司 一种平行链共识方法、设备和存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111667367A (zh) * 2020-05-22 2020-09-15 安庆师范大学 一种区块链节点设备及其区块链网络系统
CN111667367B (zh) * 2020-05-22 2023-10-31 安庆师范大学 一种区块链节点设备及其区块链网络系统
CN112241435A (zh) * 2020-10-23 2021-01-19 山西特信环宇信息技术有限公司 一种锥体区块链的存储系统及共识存储方法

Also Published As

Publication number Publication date
CN109410045B (zh) 2020-08-14
US20210352141A1 (en) 2021-11-11
CN109410045A (zh) 2019-03-01

Similar Documents

Publication Publication Date Title
WO2020043047A1 (zh) 一种平行链共识方法、设备和存储介质
CN109359222B (zh) 数据存储方法及系统、设备和存储介质
CN107577427B (zh) 用于区块链系统的数据迁移方法、设备和存储介质
WO2020043048A1 (zh) 一种平行链数据同步方法、设备和存储介质
CN110741342B (zh) 区块链交易提交排序
WO2020001370A1 (zh) 一种多链并发交易方法
WO2020029931A1 (zh) 数据查询方法及系统、共识方法及系统、设备和存储介质
CN110084601B (zh) 平行链主链交易状态同步方法、设备和存储介质
US8463746B2 (en) Method and system for replicating data
WO2021139533A1 (zh) 共识交易发送方法、设备和存储介质
US20110066592A1 (en) Real Time Data Replication
JP7004423B2 (ja) 誤り訂正符号に基づく共有されたブロックチェーンデータの記憶のデータセキュリティ
CN103164523A (zh) 数据一致性检查方法、装置及系统
CN110837505B (zh) 状态数据存储方法、状态数据同步方法、设备和存储介质
JP2021522738A (ja) 誤り訂正符号に基づく共有されたブロックチェーンデータの記憶のコンセンサス
JP2021528882A (ja) 共有されたブロックチェーンデータの記憶の優先順位付け
US11228446B2 (en) Blockchain-based reconciliation method and apparatus and electronic device
CN112837163A (zh) 基于区块链的批量交易上链方法及系统
US10999062B2 (en) Blockchain-type data storage
WO2022041900A1 (zh) 区块链的区块存储方法、装置、节点设备及存储介质
WO2023160077A1 (zh) 区块链数据恢复方法及装置、电子设备
CN109672752A (zh) 数据同步的方法及节点
Cadambe et al. Information-theoretic lower bounds on the storage cost of shared memory emulation
US9043283B2 (en) Opportunistic database duplex operations
WO2019109256A1 (zh) 一种日志管理方法、服务器和数据库系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19853794

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19853794

Country of ref document: EP

Kind code of ref document: A1