CN112184227B - Parallel chain supervision consensus method, device and storage medium - Google Patents

Parallel chain supervision consensus method, device and storage medium Download PDF

Info

Publication number
CN112184227B
CN112184227B CN202011062200.1A CN202011062200A CN112184227B CN 112184227 B CN112184227 B CN 112184227B CN 202011062200 A CN202011062200 A CN 202011062200A CN 112184227 B CN112184227 B CN 112184227B
Authority
CN
China
Prior art keywords
consensus
execution result
height
transaction
parallel 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.)
Active
Application number
CN202011062200.1A
Other languages
Chinese (zh)
Other versions
CN112184227A (en
Inventor
马登极
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202011062200.1A priority Critical patent/CN112184227B/en
Publication of CN112184227A publication Critical patent/CN112184227A/en
Priority to PCT/CN2021/111856 priority patent/WO2022068410A1/en
Application granted granted Critical
Publication of CN112184227B publication Critical patent/CN112184227B/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/382Payment protocols; Details thereof insuring higher security of transaction

Abstract

The invention provides a parallel chain supervision consensus method, equipment and a storage medium, wherein the method comprises the following steps: executing each consensus transaction of a first height of the first parallel chain to obtain a first execution result by the consensus; performing each supervised transaction at a first elevation of the first parallel chain to obtain a second execution result with consensus; judging whether the first execution result is the same as the second execution result: if yes, updating the consensus height of the first parallel chain to a first height on the main chain; if not, waiting; and executing a plurality of regenerated first-height consensus transactions and/or supervision transactions, and after acquiring the first execution result and/or the second execution result which pass through the consensus again, returning to judge whether the first execution result is the same as the second execution result. The present application ensures that parallel chain consensus grows correctly.

Description

Parallel chain supervision consensus method, device and storage medium
Technical Field
The application relates to the technical field of parallel chains, in particular to a parallel chain supervision consensus method, equipment and a storage medium.
Background
In the existing parallel chain technology, it is assumed that parallel chain consensus nodes N1-N7 exist on a parallel chain paralichain 1; assuming that N1-N5 are cheating on the generated block (100), even if N6, N7 find that N1-N5 are cheating, N6, N7 cannot change the parallel chain consensus contribution of the block (100) according to the consensus transaction generated by the generated block (100). That is, the execution result of the joint cheating is different from the execution result of N6 and N7, and N6 and N7 can only be passively received, and the final consensus result cannot be corrected, which may cause asset loss.
Disclosure of Invention
In view of the foregoing drawbacks or deficiencies of the prior art, it is desirable to provide a parallel chain supervision consensus method, apparatus and storage medium that ensures a correct growth of parallel chain consensus.
In a first aspect, the present invention provides a parallel chain supervision consensus method for a main chain node, the parallel chain being configured with one or more supervision nodes, the method comprising:
executing each consensus transaction of a first height of the first parallel chain to obtain a first execution result by the consensus;
performing each supervised transaction at a first elevation of the first parallel chain to obtain a second execution result with consensus; wherein the supervising transaction is generated by the supervising node of the first parallel chain from the first parallel chain block of the first height;
judging whether the first execution result is the same as the second execution result:
if yes, updating the consensus height of the first parallel chain to a first height on the main chain;
if not, waiting; the method comprises the steps of,
executing a plurality of regenerated first-height consensus transactions and/or supervision transactions, and after obtaining a first execution result and/or a second execution result which pass through the consensus again, returning to judge whether the first execution result is the same as the second execution result; wherein the regenerated first-height consensus transaction is generated by the consensus node of the first parallel chain when detecting the last generated consensus transaction error, and the regenerated first-height supervision transaction is generated by the supervision node of the first parallel chain when detecting the last generated supervision transaction error;
wherein, each consensus transaction is further used for obtaining and executing parallel link points of the first parallel chain to obtain a first execution result passing through the consensus, each supervision transaction is further used for obtaining and executing parallel link points of the first parallel chain to obtain a second execution result passing through the consensus, and the first execution result and the second execution result are further used for judging whether the first execution result is identical with the second execution result or not by parallel link nodes of the first parallel chain: if yes, updating the common height of the first parallel chain to be the first height on the first parallel chain; the regenerated first-height consensus transaction is further used for acquiring and executing parallel link points of the first parallel chain to acquire and execute the first execution result of the re-passing consensus, the regenerated first-height supervision transaction is further used for acquiring and executing the parallel link points of the first parallel chain to acquire the second execution result of the re-passing consensus, and the first execution result of the re-passing consensus and the second execution result of the re-passing consensus are further used for returning by parallel chain nodes of the first parallel chain to judge whether the first execution result is identical with the second execution result.
In a second aspect, the present invention provides a parallel chain supervision consensus method for supervision nodes, the parallel chain being configured with one or more supervision nodes, the method comprising:
generating a first supervision transaction according to a first parallel chain block with a first height, and sending the first supervision transaction to a corresponding main chain node so that each main chain node can execute each supervision transaction with the first height of the current parallel chain and comprising the first supervision transaction to obtain a second execution result through consensus; wherein each consensus transaction of the first height of the current parallel chain is further used for each main chain node to execute so as to obtain a first execution result passing through the consensus; the first execution result and the second execution result are further used for each main chain node to judge whether the first execution result is the same as the second execution result or not: if yes, updating the common height of the current parallel chain to a first height on the main chain; if not, waiting;
acquiring and executing each consensus transaction from the main chain to obtain a first execution result passing through the consensus;
acquiring and executing each supervision transaction from the main chain to obtain a second execution result through consensus;
judging whether the first execution result is the same as the second execution result:
if yes, updating the common height to a first height on the current parallel chain;
if not, checking whether the last generated first supervised transaction is wrong:
if yes, regenerating a first supervision transaction and sending the first supervision transaction to a corresponding main chain node so that each main chain node can execute a plurality of regenerated supervision transactions and/or consensus transactions with a first height, and returning to judge whether the first execution result is the same as the second execution result after acquiring a second execution result and/or the first execution result which pass through the consensus again; wherein, the regenerated first-height consensus transaction is generated by the consensus node of the current parallel chain when the last generated consensus transaction error is checked; the regenerated first-level supervision transaction is generated by the supervision node of the current parallel chain when detecting the supervision transaction error generated last time;
and acquiring and executing each regenerated first-height consensus transaction and/or supervision transaction from the main chain, and returning to judge whether the first execution result is identical with the second execution result after acquiring the first execution result and/or the second execution result which pass through the consensus again.
In a third aspect, the present invention provides a parallel chain supervision consensus method for a consensus node, the parallel chain being configured with one or more supervision nodes, the method comprising:
acquiring and executing each consensus transaction from the main chain to obtain a first execution result passing through the consensus;
acquiring and executing each supervision transaction from the main chain to obtain a second execution result through consensus; wherein the supervising transaction is generated by the supervising node of the current parallel chain according to a first parallel chain block of a first height; each consensus transaction is further used for being executed by each main chain node to obtain a first execution result passing through the consensus; each supervision transaction is further used for being executed by each main chain node to obtain a second execution result through consensus, and the first execution result and the second execution result are further used for each main chain node to judge whether the first execution result is identical to the second execution result or not: if yes, updating the common height of the current parallel chain to a first height on the main chain; if not, waiting;
judging whether the first execution result is the same as the second execution result:
if yes, updating the common height to a first height on the current parallel chain;
if not, checking whether the last generated first-degree consensus transaction is wrong:
if yes, regenerating the first-height consensus transaction, sending the first-height consensus transaction to the corresponding main chain nodes, so that each main chain node executes a plurality of regenerated first-height supervision transactions and/or the first-height consensus transactions, and after obtaining a second execution result and/or a first execution result which pass through the consensus again, returning to judge whether the first execution result is identical with the second execution result; wherein the regenerated first-height consensus transaction is generated by the consensus node of the current parallel chain when the last generated first-height consensus transaction error is checked; the regenerated first-level supervision transaction is generated by the supervision node of the current parallel chain when detecting the last generated first-level supervision transaction error;
and acquiring and executing each regenerated first-height consensus transaction and/or supervision transaction from the main chain, and returning to judge whether the first execution result is identical with the second execution result after acquiring the first execution result and/or the second execution result which pass through the consensus again.
In a fourth aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a parallel chain supervised consensus method provided in accordance with embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program for causing a computer to execute the parallel chain supervision consensus method provided according to the embodiments of the present invention.
The parallel chain supervision consensus method, the device and the storage medium provided by the embodiments of the invention obtain a first execution result through consensus by executing each consensus transaction of a first height of a first parallel chain; performing each supervised transaction at a first elevation of the first parallel chain to obtain a second execution result with consensus; judging whether the first execution result is the same as the second execution result: if yes, updating the consensus height of the first parallel chain to a first height on the main chain; if not, waiting; and executing a plurality of regenerated first-height consensus transactions and/or supervision transactions, and returning a method for judging whether the first execution result is the same as the second execution result after acquiring the first execution result and/or the second execution result which pass through the consensus again, so as to ensure that the parallel link consensus is correctly increased.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
fig. 1 is a flowchart of a parallel chain supervision consensus method according to an embodiment of the present invention.
Fig. 2 is a flowchart of another parallel chain supervision consensus method according to an embodiment of the present invention.
Fig. 3 is a flowchart of another parallel chain supervision consensus method according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a flowchart of a parallel chain supervision consensus method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a parallel chain supervision consensus method applicable to a main chain node, where a parallel chain is configured with one or more supervision nodes, the method includes:
s11: executing each consensus transaction of a first height of the first parallel chain to obtain a first execution result by the consensus;
s12: performing each supervised transaction at a first elevation of the first parallel chain to obtain a second execution result with consensus; wherein the supervising transaction is generated by the supervising node of the first parallel chain from the first parallel chain block of the first height;
s131: judging whether the first execution result is the same as the second execution result:
if yes, step S132 is executed: updating the consensus height of the first parallel chain to a first height on the backbone;
if not, go to step S1331: waiting; the method comprises the steps of,
s1332: executing a plurality of regenerated first-height consensus transactions and/or supervision transactions, and after obtaining a first execution result and/or a second execution result which pass through the consensus again, returning to judge whether the first execution result is the same as the second execution result; wherein the regenerated first-height consensus transaction is generated by the consensus node of the first parallel chain when detecting the last generated consensus transaction error, and the regenerated first-height supervision transaction is generated by the supervision node of the first parallel chain when detecting the last generated supervision transaction error;
wherein, each consensus transaction is further used for obtaining and executing parallel link points of the first parallel chain to obtain a first execution result passing through the consensus, each supervision transaction is further used for obtaining and executing parallel link points of the first parallel chain to obtain a second execution result passing through the consensus, and the first execution result and the second execution result are further used for judging whether the first execution result is identical with the second execution result or not by parallel link nodes of the first parallel chain: if yes, updating the common height of the first parallel chain to be the first height on the first parallel chain; the regenerated first-height consensus transaction is further used for acquiring and executing parallel link points of the first parallel chain to acquire and execute the first execution result of the re-passing consensus, the regenerated first-height supervision transaction is further used for acquiring and executing the parallel link points of the first parallel chain to acquire the second execution result of the re-passing consensus, and the first execution result of the re-passing consensus and the second execution result of the re-passing consensus are further used for returning by parallel chain nodes of the first parallel chain to judge whether the first execution result is identical with the second execution result.
Specifically, it is assumed that 10 parallel chain nodes N1 to N10 are arranged on a parallel chain1, wherein N1 to N4 are consensus nodes, N5 to N7 are supervision nodes, and N8 to N10 are common parallel chain nodes; the first height is 100; n1 to N10 generate blocks (100); N1-N4 also respectively generate consensus transactions tx 1-tx 4 of the block (100), and N5-N7 also respectively generate consensus transactions tx 5-tx 7 of the block (100); the execution result of tx1, tx2 and tx3 is R1, and the execution result of tx4 is R2; the execution results of tx5 to tx7 are all R2; when N1-N7 check errors, only N1 and N2 check the last generated consensus transaction errors, and the execution result of the regenerated consensus transaction is R2;
each main chain node executes step S11 to execute tx1 to tx4 to obtain a first execution result through consensus, and since the execution result of tx1, tx2, tx3 is R1 and the execution result of tx4 is R2, the first execution result is R1;
step S12 is executed by each main chain node, tx5 to tx7 are executed to obtain a second execution result through consensus, and the second execution result is R2 because the execution results of tx5 to tx7 are all R2;
each main chain node executes step S131 to determine whether the first execution result is the same as the second execution result:
since R1 is different from R2, each backbone node performs step S1331: waiting;
n1 to N10 obtain tx1 to tx7 from the main chain;
executing tx1 to tx4 by N1 to N10 to obtain a first execution result passing through the consensus, wherein the first execution result is R1; executing tx5 to tx7 by N1 to N10 to obtain a second execution result of R2 through consensus;
n1 to N4 check whether tx1 to tx4 generated last time are wrong or not, respectively: n1 detects the error of tx1 generated last time, N2 detects the error of tx2 generated last time, N1 regenerates tx1 according to the block (100), N2 regenerates tx2 according to the block (100), and the execution result of regenerated tx1 and regenerated tx2 is R2; n3 does not check for errors due to failure or other reasons, tx3 is not regenerated, N4 does not check for errors, and tx4 is not regenerated;
n5 to N7 check whether tx5 to tx7 generated last time are wrong or not, respectively: n5 does not check for errors, and tx5 is not regenerated; n6 does not check for errors, tx6 is not regenerated, N7 does not check for errors, tx7 is not regenerated;
each main chain node executes step S1332 to execute regenerated tx1 and tx2, and since the execution result of regenerated tx1 and regenerated tx2 is R2 and the execution result of tx4 is R2, the first execution result of re-passing through the consensus is R2;
each main chain node executes step S131 to determine whether the first execution result is the same as the second execution result:
since R2 is the same as R2, the main chain node performs step S132 to update the consensus height of paramchain 1 to 100 on the main chain;
n1 to N10 acquire regenerated tx1 and tx2 from the main chain;
N1-N10 execute regenerated tx1 and tx2, and the first execution result of re-passing the consensus is R2 as the execution result of regenerated tx1 and regenerated tx2 is R2 and the execution result of tx4 is R2;
N1-N10 judges whether the first execution result is the same as the second execution result:
since R2 is the same as R2, N1 to N10 update the consensus height of Parachain1 to 100 on Parachain 1.
In the embodiment, 10 parallel chain nodes N1-N10 are assumed to be arranged on the parallel chain1, wherein N1-N4 are common nodes, N5-N7 are monitoring nodes, and N8-N10 are common parallel chain nodes; the first height is 100; n1 to N10 generate blocks (100); N1-N4 also respectively generate consensus transactions tx 1-tx 4 of the block (100), and N5-N7 also respectively generate consensus transactions tx 5-tx 7 of the block (100); the execution result of tx1, tx2 and tx3 is R1, and the execution result of tx4 is R2; the execution results of tx5 to tx7 are all R2; when N1-N7 check errors, only N1 and N2 check the last generated consensus transaction errors, and the regenerated consensus transaction execution result is R2, which is taken as an example, the parallel chain supervision consensus principle of the application is exemplarily described.
In more embodiments, the configuration of the common node, the supervision node and the common parallel link point on the parallel chain is not limited to the above example, and may be configured according to actual requirements, so that the same technical effects may be achieved.
It should be noted that, as will be understood by those skilled in the art, the supervising transaction may be a consensus transaction generated by the supervising node, i.e., the transaction structure of the supervising transaction is identical to the transaction structure of the consensus transaction; the transaction structure of the supervision transaction can be configured according to actual requirements, and only the main chain node and the parallel chain node can still obtain corresponding execution results when the supervision transaction is executed.
It should be noted that, those skilled in the art will understand that there are many scenarios in which the consensus node and the supervising node detect the last generated consensus transaction/supervising transaction error, including, but not limited to, that the consensus node and the supervising node do not upgrade version information in time, that the consensus node jointly cheats, and so on.
It should be noted that those skilled in the art should associate that the supervisory node may be arranged by a role that the operator of paramchain 1 can trust. Further, the supervising node needs to pay a certain deposit when deployed.
It should be noted that, a person skilled in the art should associate that several punishment measures may be configured according to actual requirements, for example, if the first execution result is determined to be different from the second execution result for the first time, and the difference is caused by joint cheating of the consensus node, part of the assets of the consensus node should be transferred to the supervising node. Further, the portion of the asset may be configured according to actual needs, for example, as a frozen deposit, or as a mining incentive that should be obtained by the consensus node generating the first parallel chain block of the first height.
It should be noted that those skilled in the art should associate that the supervising node and the consensus node equally share the consensus mining rewards.
In this embodiment, the supervising node and the consensus node participate in the consensus together, and when the consensus diverges, the consensus is suspended until any party corrects the consensus result to reach the consensus again, and then the consensus is continued. It is more reasonable to suspend the consensus before generating the wrong consensus result instead of managing the consensus by adopting a random spot check post penalty method. The above embodiment ensures that the parallel link consensus grows correctly.
Preferably, the parallel chain is further configured with an administrator node, and the method further comprises:
executing a third consensus transaction generated by an administrator node of the first parallel chain; wherein the third consensus transaction is generated by the manager node according to the first parallel chain block when the second duration has elapsed and the consensus height of the first parallel chain on the backbone is not updated to the first height;
updating the common height of the first parallel chain to the first height on the backbone for each parallel chain node of the first parallel chain:
acquiring and executing a third consensus transaction;
the common height of the first parallel chain is updated to the first height on the first parallel chain.
In the embodiment shown in fig. 1, the consensus node and the supervising node may fail to check the last generated consensus transaction/supervising transaction error in time due to the failure, resulting in the first parallel chain block of the first height not being directly consensus. The above-described problems can be solved using the method of the present embodiment.
Fig. 2 is a flowchart of another parallel chain supervision consensus method according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention provides a parallel chain supervision consensus method applicable to supervision nodes, where a parallel chain is configured with one or more supervision nodes, the method includes:
s21: generating a first supervision transaction according to a first parallel chain block with a first height, and sending the first supervision transaction to a corresponding main chain node so that each main chain node can execute each supervision transaction with the first height of the current parallel chain and comprising the first supervision transaction to obtain a second execution result through consensus; wherein each consensus transaction of the first height of the current parallel chain is further used for each main chain node to execute so as to obtain a first execution result passing through the consensus; the first execution result and the second execution result are further used for each main chain node to judge whether the first execution result is the same as the second execution result or not: if yes, updating the common height of the current parallel chain to a first height on the main chain; if not, waiting;
s22: acquiring and executing each consensus transaction from the main chain to obtain a first execution result passing through the consensus;
s23: acquiring and executing each supervision transaction from the main chain to obtain a second execution result through consensus;
s241: judging whether the first execution result is the same as the second execution result:
if yes, step S242 is executed: updating the consensus height to a first height on the current parallel chain;
if not, then step S2431 is performed: checking whether the last generated first supervised transaction is incorrect:
if yes, go to step S2432: regenerating a first supervision transaction and sending the first supervision transaction to a corresponding main chain node so that each main chain node executes a plurality of regenerated supervision transactions and/or consensus transactions at a first height, and returning to judge whether the first execution result is identical with the second execution result after acquiring a second execution result and/or the first execution result which pass through the consensus again; wherein, the regenerated first-height consensus transaction is generated by the consensus node of the current parallel chain when the last generated consensus transaction error is checked; the regenerated first-level supervision transaction is generated by the supervision node of the current parallel chain when detecting the supervision transaction error generated last time;
s25: and acquiring and executing each regenerated first-height consensus transaction and/or supervision transaction from the main chain, and returning to judge whether the first execution result is identical with the second execution result after acquiring the first execution result and/or the second execution result which pass through the consensus again.
The parallel chain supervision consensus principle of the above embodiment may refer to the method shown in fig. 1, and will not be described herein.
Preferably, the parallel chain is further provided with an administrator node, and the method further comprises:
acquiring and executing a third consensus transaction generated by an administrator node of the current parallel chain; the third consensus transaction is generated according to the first parallel chain block when the manager node passes through the second time period and the consensus height of the first parallel chain on the main chain is not updated to the first height, and the third consensus transaction is executed by each main chain node and the consensus height of the first parallel chain is updated to the first height on the main chain by each main chain node;
acquiring and executing a third consensus transaction;
the consensus height is updated to the first height on the current parallel chain.
The parallel chain supervision consensus principle of the above embodiment may refer to a method of a preferred embodiment shown in fig. 1, and will not be described herein.
Fig. 3 is a flowchart of another parallel chain supervision 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 supervision consensus method applicable to consensus nodes, where a parallel chain is configured with one or more supervision nodes, the method includes:
s31: acquiring and executing each consensus transaction from the main chain to obtain a first execution result passing through the consensus;
s32: acquiring and executing each supervision transaction from the main chain to obtain a second execution result through consensus; wherein the supervising transaction is generated by the supervising node of the current parallel chain according to a first parallel chain block of a first height; each consensus transaction is further used for being executed by each main chain node to obtain a first execution result passing through the consensus; each supervision transaction is further used for being executed by each main chain node to obtain a second execution result through consensus, and the first execution result and the second execution result are further used for each main chain node to judge whether the first execution result is identical to the second execution result or not: if yes, updating the common height of the current parallel chain to a first height on the main chain; if not, waiting;
s331: judging whether the first execution result is the same as the second execution result:
if yes, step S332 is executed: updating the consensus height to a first height on the current parallel chain;
no, step S3331 is performed: checking whether the last generated first-degree consensus transaction is wrong:
if yes, step S3332 is executed: regenerating a first-height consensus transaction and sending the first-height consensus transaction to a corresponding main chain node so that each main chain node can execute a plurality of regenerated first-height supervision transactions and/or the first-height consensus transactions, and after a second execution result and/or a first execution result which pass through the consensus again are obtained, returning to judge whether the first execution result is identical with the second execution result; wherein the regenerated first-height consensus transaction is generated by the consensus node of the current parallel chain when the last generated first-height consensus transaction error is checked; the regenerated first-level supervision transaction is generated by the supervision node of the current parallel chain when detecting the last generated first-level supervision transaction error;
s34: and acquiring and executing each regenerated first-height consensus transaction and/or supervision transaction from the main chain, and returning to judge whether the first execution result is identical with the second execution result after acquiring the first execution result and/or the second execution result which pass through the consensus again.
The parallel chain supervision consensus principle of the above embodiment may refer to the method shown in fig. 1, and will not be described herein.
Preferably, the parallel chain is further provided with an administrator node, and the method further comprises:
acquiring and executing a third consensus transaction generated by an administrator node of the current parallel chain; the third consensus transaction is generated according to the first parallel chain block when the manager node passes through the second time period and the consensus height of the first parallel chain on the main chain is not updated to the first height, and the third consensus transaction is executed by each main chain node and the consensus height of the first parallel chain is updated to the first height on the main chain by each main chain node;
acquiring and executing a third consensus transaction;
the consensus height is updated to the first height on the current parallel chain.
The parallel chain supervision consensus principle of the above embodiment may refer to a method of a preferred embodiment shown in fig. 1, and will not be described herein.
Fig. 4 is a schematic structural diagram of an apparatus according to an embodiment of the present invention. As shown in fig. 4, as another aspect, the present application also provides an apparatus including one or more Central Processing Units (CPUs) 401, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data required for the operation of the device 400 are also stored. The CPU401, ROM402, and RAM403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 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 like, and a speaker, and the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 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, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the apparatus of the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer readable storage medium stores one or more programs for use by one or more processors to perform the methods described herein.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, for example, each of the units may be a software program provided in a computer or a mobile smart device, or may be separately configured hardware devices. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or their equivalents without departing from the spirit of the application. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (8)

1. A parallel chain supervision consensus method characterized in that a parallel chain is configured with one or more supervision nodes, the method being applicable to a backbone node, the method comprising:
executing each consensus transaction of a first height of the first parallel chain to obtain a first execution result by the consensus;
executing each supervised transaction of the first height of the first parallel chain to obtain a second execution result through consensus; wherein the supervising transaction is generated by a supervising node of the first parallel chain from a first parallel chain block of the first height;
judging whether the first execution result is identical to the second execution result:
if so, updating the consensus height of the first parallel chain to the first height on the main chain;
if not, waiting; the method comprises the steps of,
executing a plurality of regenerated consensus transactions and/or supervision transactions at the first height, and returning to judge whether the first execution result is identical with the second execution result after acquiring a first execution result and/or a second execution result which pass through the consensus again; wherein the regenerated first-height consensus transaction is generated by the consensus node of the first parallel chain when detecting a last generated consensus transaction error, and the regenerated first-height supervising transaction is generated by the supervising node of the first parallel chain when detecting a last generated supervising transaction error;
wherein each consensus transaction is further used for obtaining and executing parallel link points of the first parallel chain to obtain a first execution result passing through the consensus, each supervision transaction is further used for obtaining and executing parallel link points of the first parallel chain to obtain a second execution result passing through the consensus, and the first execution result and the second execution result are further used for judging whether the first execution result is identical to the second execution result or not by parallel link nodes of the first parallel chain: if yes, updating the consensus height of the first parallel chain to the first height on the first parallel chain; the regenerated first-height consensus transaction is further used for acquiring and executing parallel link points of the first parallel chain to obtain a first execution result of the re-passing consensus, the regenerated first-height supervision transaction is further used for acquiring and executing parallel link points of the first parallel chain to obtain a second execution result of the re-passing consensus, and the first execution result of the re-passing consensus and the second execution result of the re-passing consensus are further used for returning parallel chain nodes of the first parallel chain to judge whether the first execution result is identical with the second execution result or not.
2. The method of claim 1, wherein the parallel chain is further configured with an administrator node, the method further comprising:
executing a third consensus transaction generated by an administrator node of the first parallel chain; wherein the third consensus transaction is generated by the manager node from the first parallel chain block when a second duration has elapsed and a consensus height of the first parallel chain on the backbone is not updated to the first height;
updating the common height of the first parallel chain to the first height on the main chain for each parallel chain node of the first parallel chain:
acquiring and executing the third consensus transaction;
updating the common height of the first parallel chain to the first height on the first parallel chain.
3. A parallel chain supervision consensus method, characterized in that a parallel chain is configured with one or more supervision nodes, the method being adapted for a supervision node, the method comprising:
generating a first supervision transaction according to a first parallel chain block with a first height, and sending the first supervision transaction to a corresponding main chain node so that each main chain node can execute each supervision transaction with the first height, including the first supervision transaction, of a current parallel chain to obtain a second execution result through consensus; wherein each consensus transaction of the first height of the current parallel chain is further used for each main chain node to execute so as to obtain a first execution result passing through the consensus; the first execution result and the second execution result are further used for each main chain node to judge whether the first execution result and the second execution result are the same or not: if yes, updating the common height of the current parallel chain to the first height on the main chain; if not, waiting;
acquiring and executing each consensus transaction from the main chain to obtain a first execution result passing through consensus;
acquiring and executing each supervision transaction from the main chain to obtain a second execution result through consensus;
judging whether the first execution result is identical to the second execution result:
if yes, updating the common height to the first height on the current parallel chain;
if not, checking whether the first supervision transaction generated last time is wrong:
if yes, regenerating the first supervision transaction and sending the first supervision transaction to a corresponding main chain node so that each main chain node can execute a plurality of regenerated supervision transactions and/or consensus transactions at the first height, and returning the judgment whether the first execution result is identical with the second execution result after obtaining a second execution result and/or a first execution result which pass through consensus again; wherein the regenerated consensus transaction of the first height is generated by the consensus node of the current parallel chain when the last generated consensus transaction error is checked; the regenerated supervision transaction of the first height is generated by the supervision node of the current parallel chain when the supervision transaction error generated last time is detected;
and acquiring and executing each regenerated consensus transaction and/or supervision transaction at the first height from the main chain, and returning to judge whether the first execution result and the second execution result are the same after acquiring the first execution result and/or the second execution result which pass through the consensus again.
4. A method according to claim 3, wherein an administrator node is further configured on the parallel chain, the method further comprising:
acquiring and executing a third consensus transaction generated by an administrator node of the current parallel chain; wherein the third consensus transaction is generated by the manager node according to the first parallel chain block when a second period of time passes and the consensus height of the first parallel chain on the main chain is not updated to the first height, the third consensus transaction is performed by each main chain node and the consensus height of the first parallel chain is updated to the first height on the main chain by each main chain node;
acquiring and executing the third consensus transaction;
the consensus height is updated to the first height on the current parallel chain.
5. A parallel-link supervision consensus method, wherein one or more supervision nodes are configured on a parallel link, the method being adapted for consensus nodes, the method comprising:
acquiring and executing each consensus transaction from the main chain to obtain a first execution result passing through the consensus;
acquiring and executing each supervision transaction from the main chain to obtain a second execution result through consensus; wherein the supervising transaction is generated by a supervising node of the current parallel chain according to a first parallel chain block of a first height; each consensus transaction is further used for being executed by each main chain node to obtain a first execution result passing through the consensus; each of the supervised transactions is further used for each of the main chain nodes to execute so as to obtain a second execution result through consensus, and the first execution result and the second execution result are further used for each of the main chain nodes to judge whether the first execution result and the second execution result are the same or not: if yes, updating the common height of the current parallel chain to the first height on the main chain; if not, waiting;
judging whether the first execution result is identical to the second execution result:
if yes, updating the common height to the first height on the current parallel chain;
if not, checking whether the last generated consensus transaction of the first height is wrong:
if yes, regenerating the first-height consensus transaction, and sending the first-height consensus transaction to a corresponding main chain node so that each main chain node can execute a plurality of regenerated first-height supervision transactions and/or the first-height consensus transactions, and returning the judgment whether the first execution result is identical with the second execution result after obtaining a second execution result and/or the first execution result which pass through the consensus again; wherein the regenerated consensus transaction of the first height is generated by the consensus node of the current parallel chain when the last generated consensus transaction error of the first height is checked; the regenerated supervision transaction of the first height is generated by the supervision node of the current parallel chain when the supervision transaction error of the first height generated last time is checked;
and acquiring and executing each regenerated consensus transaction and/or supervision transaction at the first height from the main chain, and returning to judge whether the first execution result and the second execution result are the same after acquiring the first execution result and/or the second execution result which pass through the consensus again.
6. The method of claim 5, wherein an administrator node is further configured on the parallel chain, the method further comprising:
acquiring and executing a third consensus transaction generated by an administrator node of the current parallel chain; wherein the third consensus transaction is generated by the manager node according to the first parallel chain block when a second period of time passes and the consensus height of the first parallel chain on the main chain is not updated to the first height, the third consensus transaction is performed by each main chain node and the consensus height of the first parallel chain is updated to the first height on the main chain by each main chain node;
acquiring and executing the third consensus transaction;
the consensus height is updated to the first height on the current parallel chain.
7. An apparatus, the apparatus comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
8. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-6.
CN202011062200.1A 2020-09-30 2020-09-30 Parallel chain supervision consensus method, device and storage medium Active CN112184227B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011062200.1A CN112184227B (en) 2020-09-30 2020-09-30 Parallel chain supervision consensus method, device and storage medium
PCT/CN2021/111856 WO2022068410A1 (en) 2020-09-30 2021-08-10 Parachain supervision consensus method, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011062200.1A CN112184227B (en) 2020-09-30 2020-09-30 Parallel chain supervision consensus method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112184227A CN112184227A (en) 2021-01-05
CN112184227B true CN112184227B (en) 2023-05-30

Family

ID=73947658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011062200.1A Active CN112184227B (en) 2020-09-30 2020-09-30 Parallel chain supervision consensus method, device and storage medium

Country Status (2)

Country Link
CN (1) CN112184227B (en)
WO (1) WO2022068410A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112184227B (en) * 2020-09-30 2023-05-30 杭州复杂美科技有限公司 Parallel chain supervision consensus method, device and storage medium
CN112733202B (en) * 2021-01-11 2022-09-13 杭州复杂美科技有限公司 Parallel chain supervision consensus method, computer device and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287263A (en) * 2019-06-28 2019-09-27 杭州复杂美科技有限公司 Parallel chain is from knowing together method, equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11146380B2 (en) * 2017-08-03 2021-10-12 Parity Technologies Ltd. Methods and systems for a heterogeneous multi-chain framework
CN107909369A (en) * 2017-10-13 2018-04-13 布比(北京)网络技术有限公司 Based on the common recognition method, apparatus merchandised across chain and storage medium
US20200013027A1 (en) * 2018-07-06 2020-01-09 Decentralized Finance Labs, Inc. Hybrid proof of work and proof of stake consensus to reduce circulating tokens in a blockchain system
CN109410045B (en) * 2018-08-30 2020-08-14 杭州复杂美科技有限公司 Parallel chain consensus method, equipment and storage medium
CN111510285B (en) * 2020-03-09 2021-07-23 上海能链众合科技有限公司 Intelligent block chain consensus method based on random number
CN112184227B (en) * 2020-09-30 2023-05-30 杭州复杂美科技有限公司 Parallel chain supervision consensus method, device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110287263A (en) * 2019-06-28 2019-09-27 杭州复杂美科技有限公司 Parallel chain is from knowing together method, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
白杰 ; 杨鹏飞 ; 孙鲜艳 ; 庞玉燕 ; 逯楠 ; .基于CNWW3区块链体系标准建立的数字版权应用.信息技术与网络安全.2020,(第07期),全文. *

Also Published As

Publication number Publication date
WO2022068410A1 (en) 2022-04-07
CN112184227A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN112184227B (en) Parallel chain supervision consensus method, device and storage medium
CN109831514B (en) Parallel chain consensus method, data exception handling method, device and storage medium
CN107908494B (en) Abnormal event processing method and device, electronic equipment and storage medium
US6820221B2 (en) System and method for detecting process and network failures in a distributed system
CN110221905B (en) Timed task monitoring method, device, system, equipment and storage medium
WO2017031922A1 (en) Fault detection method and apparatus
CN111913824B (en) Method for determining data link fault cause and related equipment
CN114327804B (en) Block chain based distributed transaction processing method, device, equipment and medium
CN114357495A (en) Prediction machine under-chain aggregation method, device, equipment and medium based on block chain
CN109995585B (en) Exception handling method, device and storage medium
CN109299124B (en) Method and apparatus for updating a model
Testa et al. Static verification of wireless sensor networks with formal methods
CN112734574A (en) Transaction execution method, computer device, and storage medium
Staron et al. Industrial experiences from evolving measurement systems into self‐healing systems for improved availability
CN112598418B (en) Parallel chain supervision consensus method, device and storage medium
CN112733202B (en) Parallel chain supervision consensus method, computer device and storage medium
US20180309698A1 (en) Control device
CN114691241B (en) Task execution method, device, electronic equipment and storage medium
CN107229487B (en) Code processing method and device
CN115311764A (en) Door lock safety evaluation method and related equipment
CN114003500A (en) Software testing method and device
CN112199281A (en) Data processing method and device, terminal equipment and readable storage medium
US7107313B2 (en) Adding and removing processes in a single view
CN113626532B (en) Illegal node identification method, anti-cheating method, computer device and storage medium
CN111260476B (en) Parallel chain segment self-consensus method, 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