WO2021057259A1 - 平行链共识方法、设备及存储介质 - Google Patents

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

Info

Publication number
WO2021057259A1
WO2021057259A1 PCT/CN2020/106281 CN2020106281W WO2021057259A1 WO 2021057259 A1 WO2021057259 A1 WO 2021057259A1 CN 2020106281 W CN2020106281 W CN 2020106281W WO 2021057259 A1 WO2021057259 A1 WO 2021057259A1
Authority
WO
WIPO (PCT)
Prior art keywords
parachain
consensus
account group
updated
contract
Prior art date
Application number
PCT/CN2020/106281
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 杭州复杂美科技有限公司
Publication of WO2021057259A1 publication Critical patent/WO2021057259A1/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
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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

Definitions

  • This application relates to the field of blockchain technology, in particular to a parachain consensus method, equipment and storage medium.
  • parachain nodes synchronize parachain transactions from the main chain to generate parachain blocks, and each authorized node of the parachain is packaged according to the execution results of the parachain block of the current node (respectively in The consensus transaction executed by the main chain and the parachain is sent to the main chain node;
  • the main chain node records each consensus transaction on the main chain for voting. If the pre-configured conditions are met (for example, more than 2/3 of the votes are unanimous, etc.), the consensus of the parachain block is successful, thereby completing the parallel with the main chain consensus.
  • the present invention provides a parachain consensus method suitable for main chain nodes.
  • the contract configured on the main chain for parachain consensus and the contract used to update the parachain account group are the same contract. This method include:
  • the parachain consensus of the first parachain will be carried out according to the updated parachain authorized account group.
  • the present invention also provides a parachain consensus method suitable for parachain nodes.
  • the contract configured on the parachain for self-consensus on the parachain and the contract for updating the parachain account group are the same contract.
  • the method includes:
  • the parachain self-consensus of the current parachain will be carried out according to the updated parachain authorized account group.
  • the present invention also provides a device, including one or more processors and a memory, where the memory contains instructions executable by the one or more processors to make the one or more processors execute each of the processors according to the present invention.
  • the parachain consensus method provided in the embodiment.
  • the present invention also provides a storage medium storing a computer program, which causes the computer to execute the parachain consensus method provided according to the embodiments of the present invention.
  • the parachain consensus method, equipment and storage medium configured the parachain consensus on the main chain and the update of the parachain account group in the same contract, so that the parachain authorization can be updated on the main chain through the contract Parachain consensus is triggered directly after the account group, which enables the parachain consensus to be triggered directly on the main chain after the parachain authorized account group is reconfigured, without the need to be re-triggered by the parachain;
  • the parachain consensus method, device and storage medium provided by some embodiments of the present invention further optimize the consensus mechanism by configuring the trigger mechanism to trigger the parachain consensus only when the number of authorized accounts has not increased, so as to avoid triggering the consensus when the consensus is temporarily unable to succeed. .
  • FIG. 1 is a flowchart of a parachain consensus method provided by an embodiment of the present invention.
  • Fig. 2 is a flowchart of a preferred embodiment of the method shown in Fig. 1.
  • Fig. 3 is a flowchart of a preferred embodiment of the method shown in Fig. 1.
  • Fig. 4 is a flowchart of a preferred embodiment of the method shown in Fig. 1.
  • Fig. 5 is a schematic structural diagram of a device provided by an embodiment of the present invention.
  • FIG. 1 is a flowchart of a parachain consensus method provided by an embodiment of the present invention.
  • the present invention provides a parachain consensus method suitable for main chain nodes.
  • the contract configured on the main chain for performing parachain consensus and used to update the parachain account group The contract is the same contract, and the method includes:
  • step S14 the parachain consensus of the first parachain is performed according to the updated parachain authorized account group.
  • the condition for the success of the parachain consensus is that more than 2/3 of the votes are unanimous.
  • the parachain consensus module of the authorized node ad cannot perceive the authorized node account of the Pa chain Group changes.
  • the main chain node broadcasts tx a -tx d and packs tx a -tx d Go to several main chain blocks, execute tx a -tx d separately through the above contract, and judge the parachain of the first parachain Pa when executing the last authorized node account group update transaction (for example, tx d ) Is the authorized account group updated successfully:
  • step S14 perform the parachain consensus of the first parachain according to the updated authorized node account group of the Pa chain (for example, ad): according to the above contract according to each authorization in the authorized node account group of the updated Pa chain
  • the parachain consensus on the main chain and the parachain account group update are configured in the same contract, so that the parachain consensus can be triggered directly after the parachain authorized account group is updated on the main chain through the contract. After configuring the parachain authorized account group, the parachain consensus is triggered directly on the main chain without the need to be re-triggered by the parachain.
  • Fig. 2 is a flowchart of a preferred embodiment of the method shown in Fig. 1.
  • step S14 includes:
  • step S143 each first consensus transaction pair of the first parachain block that is generated by each authorized account in the updated parachain authorized account group, successfully executed by the above contract and recorded on the main chain Parachain blocks carry out parachain consensus.
  • step S12 take the change of the authorized node account group of the Pa chain from af to ag in step S12 as an example.
  • step S141 it is determined whether the number of authorized accounts in the parachain authorized account group after the update has increased compared with that before the update:
  • step S143 is executed to trigger the parachain consensus.
  • step S143 (when the number of authorized accounts is reduced or unchanged), there is still a certain probability that the new authorized node has not yet sent the consensus transaction of the first parachain block, or the original authorized node is abnormal and other reasons lead to parallelism.
  • the chain consensus fails. At this time, it is also waiting for the above contract to execute the consensus transaction of the first parachain block sent by the new authorized node, or waiting for the parachain authorization account group to be updated again to trigger the parachain consensus again.
  • the foregoing embodiment further optimizes the consensus mechanism by configuring the trigger mechanism to trigger the parachain consensus only when the number of authorized accounts has not increased, so as to avoid triggering the consensus when the consensus is temporarily unable to succeed.
  • Fig. 3 is a flowchart of a preferred embodiment of the method shown in Fig. 1.
  • step S14 includes:
  • step S143 perform a parachain consensus on the first parachain block according to each first consensus transaction.
  • the parachain consensus before triggering the parachain consensus, it can be judged according to the updated parachain authorization account group, whether each first consensus transaction currently recorded on the main chain meets the conditions for the success of the parachain consensus, or not if it does not. Trigger the parachain consensus.
  • Fig. 4 is a flowchart of a preferred embodiment of the method shown in Fig. 1. As shown in FIG. 4, in another preferred embodiment, step S14 includes:
  • step S142 determine each first consensus transaction of the first parachain block that is generated by each authorized account in the updated parachain authorized account group and is successfully executed by the above contract and recorded on the main chain. Whether a parachain block meets the conditions for the success of the parachain consensus:
  • step S143 perform a parachain consensus on the first parachain block according to each first consensus transaction.
  • the trigger mechanism of the method shown in FIG. 4 can refer to the methods shown in FIG. 2 and FIG. 3, which will not be repeated here.
  • this application also provides a set of parachain consensus methods applicable to parachain nodes. Due to the principle of self-consensus of parachains and the main chain The principle of the parachain consensus is the same, so the difference between this group of methods and the methods shown in Figure 1-4 is only that this group of methods is executed by the parachain nodes, and the details will not be repeated one by one.
  • Fig. 5 is a schematic structural diagram of a device provided by an embodiment of the present invention.
  • the present application also provides a device 500, including one or more central processing units (CPU) 501, which can be based on a program stored in a read-only memory (ROM) 502 or The program loaded from the storage section 508 into the random access memory (RAM) 503 executes various appropriate actions and processing. In the RAM 503, various programs and data required for the operation of the device 500 are also stored.
  • the CPU501, the ROM502, and the RAM503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also connected to the bus 504.
  • the following components are connected to the I/O interface 505: an input part 506 including a keyboard, a mouse, etc.; an output part 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers, etc.; a storage part 508 including a hard disk, etc. ; And a communication section 509 including a network interface card such as a LAN card, a modem, and the like. The communication section 509 performs communication processing via a network such as the Internet.
  • the driver 510 is also connected to the I/O interface 505 as needed.
  • a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as required, so that the computer program read therefrom is installed into the storage portion 508 as required.
  • the parachain consensus method described in any of the above embodiments can be implemented as a computer software program.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly embodied on a machine-readable medium, the computer program including program code for executing a parachain consensus method.
  • the computer program may be downloaded and installed from the network through the communication part 509, and/or installed from the removable medium 511.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be the computer-readable storage medium included in the device of the above-mentioned embodiment;
  • the computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the parachain consensus method described in this application.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units or modules involved in the embodiments described in the present application can be implemented in software or hardware.
  • the described units or modules may also be arranged in the processor.
  • each of the described units may be a software program arranged 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 constitute a limitation on the units or modules themselves under certain circumstances.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Retry When Errors Occur (AREA)
  • Hardware Redundancy (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

本发明提供一种平行链共识方法、设备及存储介质,主链上所配置的用于进行平行链共识的合约和用于更新平行链账户组的合约为同一合约,该方法包括:通过上述合约执行若干笔平行链账户组更新交易以更新第一平行链的平行链授权账户组:更新成功,则根据更新后的平行链授权账户组进行第一平行链的平行链共识。本发明通过将主链上的平行链共识和平行链账户组更新配置在同一合约中,从而可以通过该合约在主链上更新平行链授权账户组后直接触发平行链共识,实现了在重新配置平行链授权账户组后灵活触发平行链共识。

Description

平行链共识方法、设备及存储介质 技术领域
本申请涉及区块链技术领域,具体涉及一种平行链共识方法、设备及存储介质。
背景技术
在申请人所提出的平行链共识机制中,平行链节点从主链同步平行链交易以生成平行链区块,平行链的各授权节点分别根据当前节点的平行链区块执行结果打包(分别在主链和平行链执行的)共识交易并发送至主链节点;
主链节点将各共识交易记录到主链上以进行投票,符合预配置条件(例如,超过2/3的投票一致,等等)则该平行链区块共识成功,从而借助主链共识完成平行链共识;
平行链节点从主链同步到上述各共识交易并打包执行后,在本地进行投票以完成平行链自共识。
在上述平行链共识机制中,当平行链的部分授权节点未正常进行平行链共识,导致平行链共识无法正常完成时,需要重新配置平行链的授权账户组,此时存在平行链授权账户组重新配置后,无法触发对之前共识失败的平行链区块重新进行平行链共识的问题。
发明内容
鉴于现有技术中的上述缺陷或不足,期望提供一种重新配置平行链授权账户组后灵活触发平行链共识的平行链共识方法、设备及存储介质。
第一方面,本发明提供一种适用于主链节点的平行链共识方法,主链上所配置的用于进行平行链共识的合约和用于更新平行链账户组的合约为同一合约,该方法包括:
通过上述合约执行若干笔平行链账户组更新交易以更新第一平行链的平行链授权账户组:
更新成功,则根据更新后的平行链授权账户组进行第一平行链的平行链共识。
第二方面,本发明还提供一种适用于平行链节点的平行链共识方法,平行链上所配置的用于进行平行链自共识的合约和用于更新平行链账户组的合约为同一合约,该方法包括:
通过该合约执行若干笔平行链账户组更新交易以更新当前平行链的平行链授权账户组:
更新成功,则根据更新后的平行链授权账户组进行当前平行链的平行链自共识。
第三方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的平行链共识方法。
第四方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的平行链共识方法。
本发明诸多实施例提供的平行链共识方法、设备及存储介质通过将主链上的平行链共识和平行链账户组更新配置在同一合约中,从而可以通过该合约在主链上更新平行链授权账户组后直接触发平行链共识,实现了在重新配置平行链授权账户组后直接在主链触发平行链共识,而无需由平行链重新触发;
本发明一些实施例提供的平行链共识方法、设备及存储介质进一步通过将触发机制配置为仅在授权账户数量未增多时触发平行链共识,避免在暂时无法共识成功时触发共识,优化了共识机制。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为本发明一实施例提供的一种平行链共识方法的流程图。
图2为图1所示方法的一种优选实施方式的流程图。
图3为图1所示方法的一种优选实施方式的流程图。
图4为图1所示方法的一种优选实施方式的流程图。
图5为本发明一实施例提供的一种设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1为本发明一实施例提供的一种平行链共识方法的流程图。
如图1所示,在本实施例中,本发明提供一种适用于主链节点的平行链共识方法,主链上所配置的用于进行平行链共识的合约和用于更新平行链账户组的合约为同一合约,该方法包括:
S12:通过上述合约执行若干笔平行链账户组更新交易以更新第一平行链的平行链授权账户组:
更新成功,则执行步骤S14:根据更新后的平行链授权账户组进行第一平行链的平行链共识。
以平行链共识成功的条件配置为超过2/3的投票一致,第一平行链Pa的平行链授权账户组配置有6个授权节点a-f,其中授权节点a-d正常运行,在平行链高度h=h 1的平行链区块共识成功后分别向主链发送h=h 1+1的共识交易tx a-(h1+1)-tx d-(h1+1),而授权节点e和f自平行链高度h=h 1起出现异常,导致h=h 1+1的平行链区块无法完成平行链共识为例:
在当前的平行链共识方案中,通过授权账户投票等任一方法使授权节点e和f退出Pa链的授权节点账户组后,授权节点a-d的平行链共识模块无法感知到Pa链的授权节点账户组的变动,与此同时,当主 链上所配置的用于进行平行链共识的合约和用于更新平行链账户组的合约为不同合约时,主链上用于进行平行链共识的合约同样无法感知到Pa链的授权节点账户组的变动,导致无法触发h=h 1+1的平行链区块的平行链共识。
在申请人同期提交的另一件专利申请中,申请人提出了由平行链授权节点通过监测平行链区块共识超时来触发重发共识交易的平行链共识触发方案,此处不具体展开;在本申请中,通过将主链上所配置的用于进行平行链共识的合约和用于更新平行链账户组的合约配置为同一合约,使得该合约可以在感知到平行链的授权节点账户组的变动时触发平行链共识。
在上述示例中,当授权节点a-d分别向主链节点发送授权节点账户组更新交易tx a-tx d,在步骤S12中,主链节点分别广播tx a-tx d、将tx a-tx d打包到若干个主链区块中,并通过上述合约分别执行tx a-tx d,并在执行其中的最后一笔授权节点账户组更新交易(例如tx d)时判断第一平行链Pa的平行链授权账户组是否更新成功:
否,则不触发平行链共识;
是,则执行步骤S14:根据更新后的Pa链的授权节点账户组(例如a-d)进行第一平行链的平行链共识:通过上述合约根据更新后的Pa链的授权节点账户组中的各授权节点a-d此前分别发送至主链的h=h 1+1的各笔共识交易tx a-(h1+1)-tx d-(h1+1)进行平行链共识。
上述实施例通过将主链上的平行链共识和平行链账户组更新配置在同一合约中,从而可以通过该合约在主链上更新平行链授权账户组后直接触发平行链共识,实现了在重新配置平行链授权账户组后直接在主链触发平行链共识,而无需由平行链重新触发。
图2为图1所示方法的一种优选实施方式的流程图。如图2所示,在一优选实施例中,步骤S14包括:
S141:判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
否,则执行步骤S143:根据更新后的平行链授权账户组中各授权账户分别生成、由上述合约执行成功并记录在主链上的第一平行链区 块的各第一共识交易对第一平行链区块进行平行链共识。
具体地,以步骤S12中Pa链的授权节点账户组由a-f变更为a-g为例,由于此时新的授权节点g尚未向主链节点发送h=h 1+1的共识交易,导致此时触发平行链共识仍无法令h=h 1+1的平行链区块共识成功(4/7<2/3),而需要等待授权节点g向主链节点发送h=h 1+1的共识交易tx g-(h1+1)之后,由上述合约执行tx g-(h1+1)并触发h=h 1+1的平行链区块的平行链共识(5/7>2/3)。
在步骤S141中,判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
是,则不触发平行链共识,等待上述合约执行新的授权节点发送的第一平行链区块的共识交易;
否,则执行步骤S143,触发平行链共识。
其中,在步骤S143中,(在授权账户数量减少或不变时)仍有一定概率因为新的授权节点尚未发送第一平行链区块的共识交易,或,原有授权节点异常等原因导致平行链共识失败,此时同样等待上述合约执行新的授权节点发送的第一平行链区块的共识交易,或,等待再次更新平行链授权账户组以再次触发平行链共识。
上述实施例进一步通过将触发机制配置为仅在授权账户数量未增多时触发平行链共识,避免在暂时无法共识成功时触发共识,优化了共识机制。
图3为图1所示方法的一种优选实施方式的流程图。如图3所示,在另一优选实施例中,步骤S14包括:
S142:根据更新后的平行链授权账户组中各授权账户分别生成、由上述合约执行成功并记录在主链上的第一平行链区块的各第一共识交易判断,第一平行链区块是否满足平行链共识成功的条件:
是,则执行步骤S143:根据各第一共识交易对第一平行链区块进行平行链共识。
具体地,在触发平行链共识之前,可以先根据更新后的平行链授权账户组进行判断,主链上当前记录的各笔第一共识交易是否满足平行链共识成功的条件,若不满足则不触发平行链共识。
图4为图1所示方法的一种优选实施方式的流程图。如图4所示,在又一优选实施例中,步骤S14包括:
S141:判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
否,则执行步骤S142:根据更新后的平行链授权账户组中各授权账户分别生成、由上述合约执行成功并记录在主链上的第一平行链区块的各第一共识交易判断,第一平行链区块是否满足平行链共识成功的条件:
是,则执行步骤S143:根据各第一共识交易对第一平行链区块进行平行链共识。
图4所示方法的触发机制可参照图2和图3所示的方法,此处不再赘述。
与图1-4所示的适用于主链节点的平行链共识方法相似地,本申请还提供一组适用于平行链节点的平行链共识方法,由于平行链进行自共识的原理与主链进行平行链共识的原理相同,因此该组方法与图1-4所示方法的区别仅在于,该组方法由平行链节点执行,具体不再一一赘述。
图5为本发明一实施例提供的一种设备的结构示意图。
如图5所示,作为另一方面,本申请还提供了一种设备500,包括一个或多个中央处理单元(CPU)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储部分508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM503中,还存储有设备500操作所需的各种程序和数据。CPU501、ROM502以及RAM503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口 505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。
特别地,根据本公开的实施例,上述任一实施例描述的平行链共识方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行平行链共识方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请的平行链共识方法。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各所述单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (10)

  1. 一种平行链共识方法,其特征在于,主链上所配置的用于进行平行链共识的合约和用于更新平行链账户组的合约为同一合约,所述方法适用于主链节点,所述方法包括:
    通过所述合约执行若干笔平行链账户组更新交易以更新第一平行链的平行链授权账户组:
    更新成功,则根据更新后的平行链授权账户组进行所述第一平行链的平行链共识。
  2. 根据权利要求1所述的方法,其特征在于,所述根据更新后的平行链授权账户组进行所述第一平行链的平行链共识包括:
    判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
    否,则根据更新后的平行链授权账户组中各授权账户分别生成、由所述合约执行成功并记录在主链上的第一平行链区块的各第一共识交易对所述第一平行链区块进行平行链共识。
  3. 根据权利要求1所述的方法,其特征在于,所述根据更新后的平行链授权账户组进行所述第一平行链的平行链共识包括:
    根据更新后的平行链授权账户组中各授权账户分别生成、由所述合约执行成功并记录在主链上的第一平行链区块的各第一共识交易判断,所述第一平行链区块是否满足平行链共识成功的条件:
    是,则根据各所述第一共识交易对所述第一平行链区块进行平行链共识。
  4. 根据权利要求1所述的方法,其特征在于,所述根据更新后的平行链授权账户组进行所述第一平行链的平行链共识包括:
    判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
    否,则根据更新后的平行链授权账户组中各授权账户分别生成、由所述合约执行成功并记录在主链上的第一平行链区块的各第一共识交易判断,所述第一平行链区块是否满足平行链共识成功的条件:
    是,则根据各所述第一共识交易对所述第一平行链区块进行平行链共识。
  5. 一种平行链共识方法,其特征在于,平行链上所配置的用于进行平行链自共识的合约和用于更新平行链账户组的合约为同一合约,所述方法适用于平行链节点,所述方法包括:
    通过所述合约执行若干笔平行链账户组更新交易以更新当前平行链的平行链授权账户组:
    更新成功,则根据更新后的平行链授权账户组进行当前平行链的平行链自共识。
  6. 根据权利要求5所述的方法,其特征在于,所述根据更新后的平行链授权账户组进行当前平行链的平行链自共识包括:
    判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
    否,则根据更新后的平行链授权账户组中各授权账户分别生成、由所述合约执行成功并记录在平行链上的第一平行链区块的各第一共识交易对所述第一平行链区块进行平行链自共识。
  7. 根据权利要求5所述的方法,其特征在于,所述根据更新后的平行链授权账户组进行当前平行链的平行链自共识包括:
    根据更新后的平行链授权账户组中各授权账户分别生成、由所述合约执行成功并记录在平行链上的第一平行链区块的各第一共识交易判断,所述第一平行链区块是否满足平行链自共识成功的条件:
    是,则根据各所述第一共识交易对所述第一平行链区块进行平行链自共识。
  8. 根据权利要求5所述的方法,其特征在于,所述根据更新后的平行链授权账户组进行当前平行链的平行链自共识包括:
    判断更新后的平行链授权账户组中的授权账户数量相较于更新前是否增多:
    否,则根据更新后的平行链授权账户组中各授权账户分别生成、由所述合约执行成功并记录在平行链上的第一平行链区块的各第一共识交易判断,所述第一平行链区块是否满足平行链自共识成功的条件:
    是,则根据各所述第一共识交易对所述第一平行链区块进行平行链自共识。
  9. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-8中任一项所述的方法。
  10. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-8中任一项所述的方法。
PCT/CN2020/106281 2019-09-23 2020-07-31 平行链共识方法、设备及存储介质 WO2021057259A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910900297.XA CN110691122B (zh) 2019-09-23 2019-09-23 平行链共识方法、设备及存储介质
CN201910900297.X 2019-09-23

Publications (1)

Publication Number Publication Date
WO2021057259A1 true WO2021057259A1 (zh) 2021-04-01

Family

ID=69109974

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/106281 WO2021057259A1 (zh) 2019-09-23 2020-07-31 平行链共识方法、设备及存储介质

Country Status (2)

Country Link
CN (1) CN110691122B (zh)
WO (1) WO2021057259A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626531A (zh) * 2021-09-03 2021-11-09 杭州复杂美科技有限公司 交易打包方法、计算机设备和存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110691122B (zh) * 2019-09-23 2022-04-05 杭州复杂美科技有限公司 平行链共识方法、设备及存储介质
CN111260476B (zh) * 2020-02-19 2023-05-30 杭州复杂美科技有限公司 平行链分段自共识方法、设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170243217A1 (en) * 2016-02-22 2017-08-24 Bank Of America Corporation System for routing of process authorizations and settlement to a user in a process data network
US20180025435A1 (en) * 2016-07-22 2018-01-25 Nec Europe Ltd. Method for secure ledger distribution and computer system using secure distributed ledger technology
CN109166037A (zh) * 2018-07-25 2019-01-08 上海魅联信息技术有限公司 区块链的共识方法
CN109359956A (zh) * 2018-09-12 2019-02-19 杭州复杂美科技有限公司 合约配置方法、合约应用方法、设备和存储介质
CN110113409A (zh) * 2019-04-30 2019-08-09 杭州复杂美科技有限公司 平行链授权节点配置方法、设备和存储介质
CN110691122A (zh) * 2019-09-23 2020-01-14 杭州复杂美科技有限公司 平行链共识方法、设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301536B (zh) * 2017-06-12 2019-07-12 腾讯科技(深圳)有限公司 资源转移方法及装置
US20190164157A1 (en) * 2017-11-28 2019-05-30 American Express Travel Related Services Company, Inc. Transaction authorization process using blockchain
CN109558454B (zh) * 2018-11-28 2020-07-10 杭州复杂美科技有限公司 平行链挖矿共识方法、设备和存储介质
RU2731417C1 (ru) * 2018-12-28 2020-09-02 Алибаба Груп Холдинг Лимитед Параллельное выполнение транзакций в сети цепочек блоков на основе белых списков смарт-контрактов
CN110084601B (zh) * 2019-04-30 2021-03-16 杭州复杂美科技有限公司 平行链主链交易状态同步方法、设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170243217A1 (en) * 2016-02-22 2017-08-24 Bank Of America Corporation System for routing of process authorizations and settlement to a user in a process data network
US20180025435A1 (en) * 2016-07-22 2018-01-25 Nec Europe Ltd. Method for secure ledger distribution and computer system using secure distributed ledger technology
CN109166037A (zh) * 2018-07-25 2019-01-08 上海魅联信息技术有限公司 区块链的共识方法
CN109359956A (zh) * 2018-09-12 2019-02-19 杭州复杂美科技有限公司 合约配置方法、合约应用方法、设备和存储介质
CN110113409A (zh) * 2019-04-30 2019-08-09 杭州复杂美科技有限公司 平行链授权节点配置方法、设备和存储介质
CN110691122A (zh) * 2019-09-23 2020-01-14 杭州复杂美科技有限公司 平行链共识方法、设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李芳 等 (LI, FANG ET AL.): "区块链跨链技术进展研究 (Research on the Progress in Cross-chain Technology of Blockchains)", 软件学报 (JOURNAL OF SOFTWARE), vol. 30, no. 6, 30 June 2019 (2019-06-30), XP009520055, DOI: 20201021132444A *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626531A (zh) * 2021-09-03 2021-11-09 杭州复杂美科技有限公司 交易打包方法、计算机设备和存储介质

Also Published As

Publication number Publication date
CN110691122B (zh) 2022-04-05
CN110691122A (zh) 2020-01-14

Similar Documents

Publication Publication Date Title
WO2021057259A1 (zh) 平行链共识方法、设备及存储介质
US10679210B2 (en) Blockchain transaction commitment ordering
US11210185B2 (en) Method and system for data recovery in a data system
US8898109B2 (en) Automatic transaction retry after session failure
US20180270122A1 (en) Automatic microservice problem detection in enterprise applications
US9898376B2 (en) Recovery of a transaction after XA end
KR20040062528A (ko) 시스템 및 기업 이벤트의 근본 원인을 상관시키고결정하는 방법 및 시스템
CN108123851A (zh) 分布式系统中主从节点同步链路的存活检测方法及装置
US20150154274A1 (en) Copy of replication status for synchronization
US10372701B2 (en) Transaction processor
CN110912990B (zh) 一种共识周期的更新方法及相关设备
US8719622B2 (en) Recording and preventing crash in an appliance
US9612921B2 (en) Method and system for load balancing a distributed database providing object-level management and recovery
US20160099999A1 (en) Lightweight framework with dynamic self-organizing coordination capability for clustered applications
US20110320409A1 (en) Guaranteed in-flight sql insert operation support during an rac database failover
CN115687019A (zh) 数据库集群的故障处理方法、智能监控平台、设备和介质
US11500857B2 (en) Asynchronous remote calls with undo data structures
US9860112B2 (en) Techniques for synchronizing operations between regions when a network connection fails
CN112988738B (zh) 用于区块链的数据分片方法和装置
US10083217B2 (en) Method and system for upgrading a set of replicated state machine processes
Ikhsan et al. Application Deployment Strategy Comparison at PT. XYZ
US10949416B2 (en) Workload management across multiple data sites capable of providing active services
JPH02122362A (ja) 分散データ管理システム
JP2001084234A (ja) オンライン処理システム
CN117093134A (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: 20867514

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

Country of ref document: EP

Kind code of ref document: A1