CN115701601A - Parallel chain consensus method, computer device, and storage medium - Google Patents

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

Info

Publication number
CN115701601A
CN115701601A CN202110883002.XA CN202110883002A CN115701601A CN 115701601 A CN115701601 A CN 115701601A CN 202110883002 A CN202110883002 A CN 202110883002A CN 115701601 A CN115701601 A CN 115701601A
Authority
CN
China
Prior art keywords
transaction
parallel chain
consensus
chain
parallel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110883002.XA
Other languages
Chinese (zh)
Inventor
林敬
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202110883002.XA priority Critical patent/CN115701601A/en
Publication of CN115701601A publication Critical patent/CN115701601A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a parallel chain consensus method, computer equipment and a storage medium, wherein the method comprises the following steps: receiving the first parallel chain transaction, and broadcasting the first parallel chain transaction to other parallel chain nodes of the current parallel chain; generating a first consensus transaction according to the generated or received first parallel-link block of the first altitude; broadcasting the first parallel chain block to other parallel chain nodes of the current parallel chain; sending the first consensus transaction to the corresponding main chain node; synchronizing the second consensus result from the main chain and judging whether the first consensus result is the same as the first consensus result of the first consensus transaction: if yes, ending; and if not, regenerating the first consensus transaction with the first height, and returning to send the first consensus transaction to the corresponding main chain node. The present application enables data isolation between the main chain and the parallel chains.

Description

Parallel chain consensus method, computer device, and storage medium
Technical Field
The present application relates to the field of parallel chain technologies, and in particular, to a parallel chain consensus method, a computer device, and a storage medium.
Background
In the existing main chain-parallel chain mechanism, the parallel chain transactions of all parallel chains are stored by main chain nodes; although the data between different parallel chains are isolated from each other, the data between the main chain and the parallel chains are not isolated.
Disclosure of Invention
In view of the above-identified deficiencies or inadequacies in the prior art, it would be desirable to provide a consensus method, computer device, and storage medium for data isolation between main and parallel chains.
In a first aspect, the present invention provides a parallel chain consensus method applied to parallel chain nodes, where the parallel chain nodes of the same parallel chain can communicate with each other, the method including:
receiving the first parallel chain transaction, and broadcasting the first parallel chain transaction to other parallel chain nodes of the current parallel chain;
generating a first consensus transaction according to the generated or received first parallel-link block of the first altitude;
broadcasting the first parallel chain block to other parallel chain nodes of the current parallel chain;
the first consensus transaction is sent to the corresponding main chain node, so that the main chain node obtains a second consensus result passing the consensus with the first height according to the first consensus transaction and the plurality of second consensus transactions; the second consensus transaction is a consensus transaction with a first height generated by other parallel chain nodes of the current parallel chain;
synchronizing the second consensus result from the main chain and judging whether the second consensus result is the same as the first consensus result of the first consensus transaction:
if yes, ending;
if not, regenerating the first consensus transaction with the first height, and returning to send the first consensus transaction to the corresponding main chain node;
wherein the second consensus result is also used for other parallel chain nodes:
synchronizing the second consensus result from the master chain and determining whether a third consensus result is the same as the generated third consensus result for the second consensus transaction:
if yes, ending;
and if not, regenerating the second consensus transaction with the first height and sending the second consensus transaction to the corresponding main chain node.
In a second 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 consensus method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program, the computer program causing a computer to execute the parallel chain consensus method provided according to the embodiments of the present invention.
In the parallel chain consensus method, the computer device, and the storage medium provided in the embodiments of the present invention, the first parallel chain transaction is received and broadcast to other parallel chain nodes of the current parallel chain; generating a first consensus transaction according to the generated or received first parallel-link block of the first altitude; broadcasting the first parallel chain block to other parallel chain nodes of the current parallel chain; sending the first consensus transaction to the corresponding main chain node; synchronizing the second consensus result from the main chain and judging whether the first consensus result is the same as the first consensus result of the first consensus transaction: if yes, ending; and if not, regenerating the first consensus transaction with the first height, and returning to a method for sending the first consensus transaction to the corresponding main chain node, so that the main chain is isolated from the data between the parallel chains.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a parallel chain consensus method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a parallel chain 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 consensus method applicable to parallel chain nodes, where the parallel chain nodes of the same parallel chain can communicate with each other, and the method includes:
s11: receiving the first parallel chain transaction, and broadcasting the first parallel chain transaction to other parallel chain nodes of the current parallel chain;
s12: generating a first consensus transaction according to the generated or received first parallel-link block of the first altitude;
s13: broadcasting the first parallel chain block to other parallel chain nodes of the current parallel chain;
s14: sending the first consensus transaction to a corresponding main chain node so that the main chain node can obtain a second consensus result passing through the consensus with the first height according to the first consensus transaction and a plurality of second consensus transactions; the second consensus transaction is a consensus transaction with a first height generated by other parallel chain nodes of the current parallel chain;
s151: synchronizing the second consensus result from the main chain and judging whether the first consensus result is the same as the first consensus result of the first consensus transaction:
if yes, go to step S152: finishing;
otherwise, step S153 is executed: regenerating the first consensus transaction with the first height, and returning to send the first consensus transaction to the corresponding main chain node;
wherein the second consensus result is also used for other parallel chain nodes:
synchronizing the second consensus result from the master chain and determining whether a third consensus result is the same as the generated third consensus result for the second consensus transaction:
if yes, ending;
and if not, regenerating the second consensus transaction with the first height and sending the second consensus transaction to the corresponding main chain node.
Assuming that a main chain mc and parallel chains pc 1-pc 5 are arranged in a block chain; pc1 has parallel chain nodes n 1-n 10; the main chain nodes corresponding to N1-N10 are N1-N10;
taking the current node as n1 as an example;
n1 executes step S11, receives parallel chain transaction tx1, and broadcasts tx1 to n2 to n10;
n1 executing step S12, generating a consensus transaction tx _ consensus _100 \n1 from the generated or received block (100); those skilled in the art will appreciate that the consensus transaction generally comprises block header information, block header (100), and a transaction hash list of block (100), the block header (100) comprising block information of block (100) state hash, block hash, version number, block height, block time, block (99);
n1 executes step S13 to broadcast block (100) to n2 to n10;
n 2-n 10 receive the block (100), and respectively generate consensus transactions tx _ consensus _100 \n2-tx _ consensus _100 \n10 according to the block (100);
n1 executes step S14, and sends tx _ consensus _100_n 1 to N1;
n2 sends consensus _100_n 2 to N2, N3 sends consensus _100 \n3 to N3 … … N10 and consensus _100_n 10 to N10;
as the main chain nodes can communicate with each other, finally N1-N10 all have tx _ consensus _100 \n1-tx _ consensus _100 \n10;
obtaining a consensus result _100 of 100 through consensus according to tx _ consensus _100 _n1-tx _ consensus _100_n10 by the main chain node; it should be understood by those skilled in the art that, according to the prior art, if more than (2f + 1)/(3f + 1) of the execution results of tx _ consensus _100_n1 to tx _ consensus _100_n10 are 1, result _100 is 1; however, the mechanism for obtaining the consensus result through the consensus may be configured according to actual requirements, for example, if the execution results of tx _ consensus _100 \n1 to tx _ consensus _100 \n10 are more than 3/4 of the execution results are 1, result _100 is 1, and is not specifically limited herein;
n1 executes step S151, synchronizes result _100 from the main chain, and determines whether the consensus result _100_ n1 of result _100 and t x _ consensus _100_ n1 are the same:
if yes, n1 executes step S152, and ends;
if the two are different, n1 executes step S153 to regenerate the consensus transaction tx _ c onsenssus _100 \n1' of 100 and returns to S14;
n2 synchronizes result _100 from the main chain and determines whether result _100 \_n 2 of consensus between result _100 and tx _ consensus _100_n 2 is the same:
if the two are the same, ending;
assuming the difference, N2 regenerates the consensus transaction tx _ consensus _100_n 2 'of 100 and sends tx _ consensus _100_n 2' to N2;
n3 to n10 are similar to n2 and will not be described in detail here.
In the above embodiment, no specific parallel chain transaction is recorded on the main chain, so that the data between the main chain and the parallel chain is isolated. And the main chain is provided with the consensus transaction of the parallel chain, so that the malicious parallel chain node can be prevented from tampering the data.
Preferably, the method further comprises:
responding to the downtime of the current node and recovering the service of the block chain, and acquiring a second height of the latest block of the current node;
requesting a third consensus result of a third height from the corresponding backbone node; wherein the third height is the second height plus one;
requesting a fourth consensus result of a third height from the first parallel chain node of the current parallel chain;
and when the third consensus result is the same as the fourth consensus result, sending parallel chain block synchronization request information to the first parallel chain node to synchronize the parallel chain blocks after the second height.
Because the main chain has the consensus transaction of the parallel chain, the malicious parallel chain link nodes can be prevented from tampering data, and the down parallel chain nodes can establish connection with the non-malicious parallel chain nodes by the method shown in the embodiment to request synchronization of the parallel chain blocks.
Further preferably, the requesting the third consensus result of the third height from the corresponding backbone node comprises:
requesting a fifth consensus result of the second height from the corresponding backbone node;
and when the fifth consensus result is the same as the local sixth consensus result of the second height, requesting a third consensus result of a third height from the corresponding main chain node.
Because the main chain has the consensus transaction of the parallel chain, the malicious parallel chain link points can be prevented from tampering data, and the down parallel chain nodes can establish connection with the non-malicious parallel chain link points to request synchronization of the parallel chain blocks through the method shown in the embodiment after identifying that the data of the down parallel chain nodes are correct, so that the synchronization efficiency is improved.
Preferably, the method further comprises:
receiving a first authorized transaction; wherein the first authorized transaction is generated by a first client of the first user, the first authorized transaction includes a second account address of the authorized second user, and a second parallel chain transaction that is authorized to be queried, the second parallel chain transaction being generated by the first client;
when the first authorization transaction is successfully executed, adding the second account address into a query authorization list of the second parallel chain transaction;
receiving first transaction query request information for querying a fourth parallel chain transaction; wherein the first transaction query request information is generated by a third client of a third user;
determining whether a third account address of the third user is in a query authorization list for the fourth parallel chain transaction:
if yes, returning the first transaction information of the fourth parallel chain transaction.
Assuming that user a and user b are both users on pc1, user a has a transaction tx10, and user a allows user b to query tx10;
a client of a user a generates an authorization transaction and sends the authorization transaction to pc1, wherein the authorization transaction comprises addr (b) and tx10;
n 1-n 10 adds addr (b) to the inquiry authorization list of tx10 when the authorization transaction is successfully executed; assume that the query authorization list for tx10 is: addr (b) and addr (c);
the client of the user b generates transaction query request information for querying tx10;
n 1-n 10 determine whether addr (b) is in the query authorization list of tx 10: since so, transaction information for tx10 is returned.
It should be understood by those skilled in the art that "receiving first transaction query request information for querying a fourth parallel chain transaction" may also be configured to "receiving a first transaction query transaction for querying a fourth parallel chain transaction" according to actual requirements, after the blockchain link point executes the first transaction query transaction, specific transaction information of the first transaction query transaction is recorded on or locally in the blockchain, for example, a transaction initiator of the first transaction query transaction, and the specific transaction information may be used for performing data statistics, for example, statistics of which persons query the fourth parallel chain transaction, how many times a certain user queries the fourth parallel chain transaction.
Further preferably, the first authorization transaction further includes a first block deadline, and adding the second account address to the lookup authorization list for the second parallel chain transaction includes:
adding the second account address into a query authorization list of the second parallel chain transaction, and recording the expiration time of the first block;
returning the first transaction information for the fourth parallel chain transaction includes:
determining whether the current block time is not later than a second block deadline at which the fourth parallel chain transaction can be queried:
if yes, returning the first transaction information of the fourth parallel chain transaction.
If the authorization transaction also comprises block deadline T1, adding addr (b) to a query authorization list of tx10 and recording T1 when n 1-n 10 successfully execute the authorization transaction;
n 1-n 10 also need to judge whether the current block time is not later than T1, and when the current block time is not later than T1, returning the transaction information of tx10; when T1 is later than T1, specific steps may be configured according to actual requirements, for example, configured to be no-operation, or configured to return error information, and the present application is not limited specifically.
Preferably, the method further comprises:
receiving second transaction query request information sent by a fifth client of a fifth user; the second transaction query request information comprises a second authorized transaction, the second authorized transaction is generated by a fourth client of a fourth user, the second authorized transaction comprises a fifth account address of an authorized fifth user and a fifth parallel chain transaction which is authorized to be queried, and the second authorized transaction is sent to the fifth client by the fourth client;
judging whether the authorized fifth account address is matched with a sender of the second transaction query request information or not, and judging whether the fifth parallel chain transaction is the transaction of a fourth user or not;
and when the judgment is yes, returning second transaction information of the fifth parallel chain transaction.
Assuming that the user c and the user d are both users on pc1, the user c has a transaction tx15, and the user c allows the user d to inquire the tx15;
the client of user c generates an authorization transaction, which includes addr (d) and tx15; the client of the user c sends the authorization transaction to the client of the user d;
the user d generates transaction inquiry request information comprising the authorized transaction and sends the transaction inquiry request information to the parallel link node of the pc1, and the assumption is n1;
n1, receiving the transaction inquiry request information;
n1, judging whether addr (d) is matched with a transaction sender of the transaction inquiry request information, and judging whether tx15 is the transaction of the user c;
since addr (d) is matched with the transaction sender of the transaction inquiry request message, and tx15 is the transaction of the user c, n1 returns the transaction information of tx 15.
Further preferably, the second authorized transaction further includes a third block deadline, and the determining whether the authorized fifth account address matches with a sender of the second transaction query request message, and the determining whether the fifth parallel chain transaction is a transaction of a fourth user includes:
and judging whether the authorized fifth account address is matched with the sender of the second transaction query request information, judging whether the fifth parallel chain transaction is the transaction of a fourth user, and judging whether the current block time is not later than the third block deadline.
If the authorized transaction further includes a block expiration time T2, n1 further needs to determine whether the current block is not later than T2 at that time; when the transaction information is not later than T2, returning the transaction information of tx15; when T2 is later than T2, specific steps may be configured according to actual requirements, for example, configured as no operation, or configured to return error information, which is not limited in this application.
Preferably, each method of each contract of the main chain and each parallel chain is configured with always success constraints, and the always success constraints configured by each method of each contract of the main chain and each parallel chain are recorded on the main chain, and the method further comprises:
synchronizing a first transaction group from a master; wherein the first transaction group comprises a first transaction of the main chain and a sixth parallel chain transaction of the current parallel chain; wherein the first transaction is before and the sixth parallel chain transaction is after;
when the execution state of the first transaction is successful, executing a sixth parallel chain transaction to execute the first transaction group;
when the execution state of the first transaction is execution failure, executing the first transaction group failure;
wherein the first method of the first contract invoked by the sixth parallel chain exchange recorded on the main chain is used for the main chain node:
judging whether the always success constraint of the first method is true:
if so, a first transaction is executed to execute a first transaction group.
In the prior art, assuming that tx21 and tx22 exist, tx21 is a main chain transaction, tx22 is p c is a parallel chain transaction, tx21 and tx22 cannot be executed in one transaction group because tx21 is executed first and tx22 is executed later, and tx21 needs to be rolled back if tx22 fails to be executed; but tx21 on the main chain has been successfully executed and cannot be rolled back;
in the above embodiment, specifically, the main chain node receives txgroup1 (tx 21, tx 22), and whether the always success constraint of the contracted method called by the main chain node from tx22 recorded on the main chain is true:
for true, the representation tx22 is certain to be able to execute successful transaction (for example, the credentialing method of the credentialing contract, the unfreezing method of the coins contract, etc., all of the always success constraints of which can be configured as true), the backbone node executes tx21 to execute txgroup1;
n1 to n10 synchronize txgroup1 from the main chain;
if the execution state of tx21 is successful, then n 1-n 10 execute tx22;
if the execution state of tx21 is execution failure, then n 1-n 10 execute txgroup1 failure.
The above-described embodiments enable cross-chain transaction groups to be executed simultaneously.
In further embodiments, a transaction group with a preceding parallel chain transaction and a succeeding main chain transaction may also be configured, for example, txgroup2 (tx 25, tx 26), where tx25 is the parallel chain transaction of pc1 and tx26 is the main chain transaction; then txgroup2 generated by the configuration client is received by n 1-n 10, and n 1-n 10 go to the main chain to inquire whether the always success constraint of the method of the contract called by tx26 is tr ue:
true, then n 1-n 10 execute tx25 to execute txgroup2;
n 1-n 10 sends txgroup2 to the main chain;
when the execution state of tx25 is successful, the backbone node executes tx26 to execute txg roup2;
when the execution state of the tx25 execution is the execution failure, the tx group2 execution fails.
Those skilled in the art will understand that the main chain node can query the execution state of tx25 through the interface, or n1 to n10 can send the commonly known execution state of tx25 and txgroup2 to the main chain together for the main chain node to execute tx26, which can achieve the same technical effect.
Fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
As shown in fig. 2, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the computer apparatus are also stored. The CPU301, ROM302, and RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input portion 306 including a keyboard, a mouse, and the like; an output section 307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. A drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 310 as necessary, so that a computer program read out therefrom is mounted into the storage section 308 as necessary.
In particular, according to an embodiment 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 through the communication section 309, and/or installed from the removable medium 311.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart 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 hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A parallel chain consensus method, wherein parallel chain nodes of a same parallel chain can communicate with each other, the method being applicable to the parallel chain nodes, the method comprising:
receiving a first parallel chain transaction, and broadcasting the first parallel chain transaction to other parallel chain nodes of a current parallel chain;
generating a first consensus transaction according to the generated or received first parallel-link block of the first altitude;
broadcasting the first parallel chain block to other parallel chain nodes of a current parallel chain;
sending the first consensus transaction to a corresponding main chain node, so that the main chain node can obtain a second consensus result of the first height through consensus according to the first consensus transaction and a plurality of second consensus transactions; wherein the second consensus transaction is the consensus transaction of the first height generated by other parallel chain nodes of the current parallel chain;
synchronizing the second consensus result from the main chain and judging whether the second consensus result is the same as the first consensus result of the first consensus transaction:
if yes, ending;
if not, regenerating the first consensus transaction of the first height, and returning to the step of sending the first consensus transaction to the corresponding main chain node;
wherein the second consensus result is further used for other parallel chain nodes to:
synchronizing the second consensus result from the master chain and determining whether a third consensus result is the same as the generated third consensus result for the second consensus transaction:
if yes, ending;
and if not, regenerating the second consensus transaction with the first height and sending the second consensus transaction to the corresponding main chain node.
2. The method of claim 1, further comprising:
responding to the downtime of the current node and recovering the block chain service, and acquiring a second height of the latest block of the current node;
requesting a third consensus result for a third height from the corresponding backbone node; wherein the third height is the second height plus one;
requesting a fourth consensus result for the third height from a first parallel chain node of a current parallel chain;
and when the third consensus result is the same as the fourth consensus result, sending parallel chain block synchronization request information to the first parallel chain node to synchronize the parallel chain blocks after the second height.
3. The method of claim 2, wherein requesting a third consensus result of a third height from a corresponding backbone node comprises:
requesting a fifth consensus result for the second height from a corresponding backbone node;
and when the fifth consensus result is the same as the local sixth consensus result of the second height, requesting a third consensus result of a third height from the corresponding main chain node.
4. The method of claim 1, further comprising:
receiving a first authorized transaction; wherein the first authorized transaction is generated by a first client of a first user, the first authorized transaction includes a second account address of an authorized second user, and a second parallel chain transaction that is authorized to be queried, the second parallel chain transaction being generated by the first client;
adding the second account address to a query authorization list of the second parallel chain transaction upon successful execution of the first authorization transaction;
receiving first transaction query request information for querying a fourth parallel chain transaction; wherein the first transaction query request information is generated by a third client of a third user;
determining whether the third account address of the third user is in the query authorization list of the fourth parallel chain transaction:
if yes, returning the first transaction information of the fourth parallel chain transaction.
5. The method of claim 4, wherein the first authorized transaction further comprises a first block expiration time, wherein adding the second account address to the lookup authorization list for the second parallel chain transaction comprises:
adding the second account address to a query authorization list of the second parallel chain transaction, and recording the first block deadline;
the returning of the first transaction information of the fourth parallel chain transaction comprises:
determining whether the current block time is not later than a second block deadline at which the fourth parallel chain transaction can be queried:
if yes, returning the first transaction information of the fourth parallel chain transaction.
6. The method of claim 1, further comprising:
receiving second transaction query request information sent by a fifth client of a fifth user; the second transaction query request information comprises a second authorized transaction, the second authorized transaction is generated by a fourth client of a fourth user, the second authorized transaction comprises a fifth account address of an authorized fifth user and a fifth parallel chain transaction which is authorized to be queried, and the second authorized transaction is sent to the fifth client by the fourth client;
judging whether the authorized fifth account address is matched with a sender of the second transaction query request information, and judging whether the fifth parallel chain transaction is the transaction of the fourth user;
and when the judgment is yes, returning second transaction information of the fifth parallel chain transaction.
7. The method of claim 6, wherein the second authorized transaction further includes a third block deadline, and wherein determining whether the authorized fifth account address matches the sender of the second transaction inquiry request message and determining whether the fifth parallel chain transaction is a transaction of the fourth user comprises:
and judging whether the authorized fifth account address is matched with the sender of the second transaction query request information, judging whether the fifth parallel chain transaction is the transaction of the fourth user, and judging whether the current block time is not later than the third block deadline.
8. The method of claim 1, wherein each method of each contract of the main chain and each parallel chain is configured with an always success constraint, the always success constraint configured by each method of each contract of the main chain and each parallel chain being recorded on the main chain, the method further comprising:
synchronizing a first transaction group from a master; wherein the first transaction group includes a first transaction of the main chain and a sixth parallel chain transaction of the current parallel chain; wherein the first transaction is preceded and the sixth parallel chain transaction is followed;
when the execution state of the first transaction is successful, executing the sixth parallel chain transaction to execute the first transaction group;
when the execution state of the first transaction is execution failure, executing the first transaction group failure;
wherein the first method of the first contract invoked by the sixth parallel chain exchange recorded on the main chain is used for the main chain node:
judging whether the always success constraint of the first method is true:
if so, the first transaction is executed to execute the first transaction group.
9. A computer device, the device 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 recited in any of claims 1-8.
10. 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-8.
CN202110883002.XA 2021-08-02 2021-08-02 Parallel chain consensus method, computer device, and storage medium Pending CN115701601A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110883002.XA CN115701601A (en) 2021-08-02 2021-08-02 Parallel chain consensus method, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110883002.XA CN115701601A (en) 2021-08-02 2021-08-02 Parallel chain consensus method, computer device, and storage medium

Publications (1)

Publication Number Publication Date
CN115701601A true CN115701601A (en) 2023-02-10

Family

ID=85142574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110883002.XA Pending CN115701601A (en) 2021-08-02 2021-08-02 Parallel chain consensus method, computer device, and storage medium

Country Status (1)

Country Link
CN (1) CN115701601A (en)

Similar Documents

Publication Publication Date Title
CN110597907B (en) Cross-block-chain data information synchronization method, device, equipment and medium
CN109831514B (en) Parallel chain consensus method, data exception handling method, device and storage medium
US11336451B2 (en) Cross-blockchain resource transmission
CN110084601B (en) Parallel chain main chain transaction state synchronization method, equipment and storage medium
CN111798316B (en) Parallel chain consensus method, apparatus and storage medium
CN111275438B (en) Consensus method, device, equipment and storage medium of block chain network
CN109981279B (en) Block chain system, communication method, device, equipment and medium
CN110083745B (en) Data query method, device and storage medium
CN111614707A (en) Transaction system and transaction method based on block chain
CN113064764B (en) Method and apparatus for executing blocks in a blockchain system
CN109388481A (en) A kind of transmission method of transaction information, device, calculates equipment and medium at system
CN110445843B (en) Parallel chain block pushing method, device and storage medium
CN111798238A (en) Parallel chain consensus method, device and storage medium
WO2023040453A1 (en) Transaction information processing method and apparatus
CN111611321A (en) Data storage method and device and block chain system
CN111245910A (en) Block chain light node multi-copy deployment method
CN110490734B (en) Transaction group construction and broadcasting method and system, equipment and storage medium
CN110287263B (en) Parallel chain self-consensus method, device and storage medium
CN111259074A (en) Block synchronization method, device and storage medium
CN111064813B (en) Method and device for synchronizing processing messages during block chain consensus processing
CN113157450A (en) Method and apparatus for performing blocks in a blockchain system
CN115701601A (en) Parallel chain consensus method, computer device, and storage medium
CN112258184B (en) Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN113592653A (en) Proxy delayed transaction method, computer device and storage medium
CN111524011B (en) Parallel link consensus validation method, apparatus, 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