CN114202425B - Oracle multi-main chain cross-chain method, device and storage medium - Google Patents

Oracle multi-main chain cross-chain method, device and storage medium Download PDF

Info

Publication number
CN114202425B
CN114202425B CN202111661946.9A CN202111661946A CN114202425B CN 114202425 B CN114202425 B CN 114202425B CN 202111661946 A CN202111661946 A CN 202111661946A CN 114202425 B CN114202425 B CN 114202425B
Authority
CN
China
Prior art keywords
transaction
transaction information
contract
sequence
transactions
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
CN202111661946.9A
Other languages
Chinese (zh)
Other versions
CN114202425A (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.)
Shenzhen Morning Intellectual Property Operations Co ltd
Original Assignee
Shenzhen Morning Intellectual Property Operations 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 Shenzhen Morning Intellectual Property Operations Co ltd filed Critical Shenzhen Morning Intellectual Property Operations Co ltd
Priority to CN202111661946.9A priority Critical patent/CN114202425B/en
Publication of CN114202425A publication Critical patent/CN114202425A/en
Application granted granted Critical
Publication of CN114202425B publication Critical patent/CN114202425B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a multi-main-chain crossing method, equipment and a storage medium of a predictor, wherein the method comprises the steps of synchronizing first transactions needing to call first contracts in a first main chain block in sequence when the first main chain block is monitored to generate the first main chain block, executing the first transactions to update a first state tree of the first main chain on a two-layer network, generating zero knowledge proof evidence in sequence according to second transaction information of second transactions in response to a trigger settlement condition, generating first proof data according to the second transactions in sequence and the zero knowledge proof evidence, and sending the first proof data to the main chains. The application prevents double flowers on the basis of saving cost.

Description

Prophetic multi-backbone cross-link method, apparatus, and storage medium
Technical Field
The application relates to the technical field of blockchain, in particular to a predictor multi-main-chain cross-chain method, a predictor multi-main-chain cross-chain device and a storage medium.
Background
Current two-tier network-based cross-link schemes are generally one-to-one, with one two-tier network corresponding to one backbone. The applicant hopes to propose a two-layer network corresponding to a plurality of main chains, which is more cost-effective than the prior art, but also has the double-flower problem.
Disclosure of Invention
In view of the foregoing drawbacks or deficiencies of the prior art, it is desirable to provide a predictor multi-backbone cross-link method, apparatus and storage medium that prevents bifluorination on a cost-effective basis.
In a first aspect, the present invention provides a method for a multi-backbone chain crossing of a predictor applicable to a two-layer network node, the two-layer network has state trees corresponding to each backbone chain respectively, initial root hashes of each state tree are the same, each backbone chain is configured with a cross-chain verification contract and a predictor contract, and a zero knowledge proof circuit for verifying transaction information is deployed in the cross-chain verification contract, the method includes:
when the first main chain block is monitored to generate the first main chain block, the first transactions requiring to call a first type contract in the first main chain block are sequentially synchronized, wherein the first type contract comprises a deposit contract and a withdrawal contract, each first transaction is stored in the first main chain block, and the first main chain block is further used for a predictor:
Transmitting the first transaction information of each first transaction in sequence to other main chains so as to enable the main chain nodes of the other main chains to store and verify each first transaction information through a prophetic contract;
Executing each first transaction to update a first state tree of a first backbone on the two-tier network;
Generating zero knowledge proof evidence according to second transaction information of each second transaction in sequence in response to the triggering settlement condition, and generating first proof data according to each second transaction in sequence and the zero knowledge proof evidence;
Transmitting the first attestation data to each backbone for backbone nodes of each backbone:
judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through a cross-chain verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not:
and if the order is correct, inputting the zero knowledge proof evidence into a zero knowledge proof circuit to verify whether each second transaction information is correct or not:
if the verification is correct, ending;
the first transaction information and the second transaction information comprise operation types, user addresses and license quantity.
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 the predictor multi-backbone cross-link method provided in accordance with the embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program, where the computer program causes a computer to execute the multi-backbone chain crossing method of the predictor provided in accordance with the embodiments of the present invention.
According to the multi-main-chain crossing method, equipment and storage medium of the predictor, when the first main chain is monitored to generate the first main chain blocks, first transactions needing to call first contracts in the first main chain blocks are synchronized in sequence, the first transactions are executed to update a first state tree of the first main chain on a two-layer network, zero knowledge proof evidence is generated in sequence according to second transaction information of second transactions in response to a trigger settlement condition, first proof data is generated according to the second transactions in sequence and the zero knowledge proof evidence, and the first proof data is sent to the main chains.
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 accompanying drawings in which:
FIG. 1 is a flowchart of a method for multi-backbone cross-chain of a predictor in accordance with an embodiment of the present invention.
Fig. 2 is a schematic diagram of generating a first tree root according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The 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 application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
The applicant hopes to propose a two-tier network cross-link scheme corresponding to multiple backbones, which is more cost-effective than the prior art, but also has the double-flower problem-if the operator cheats the deposit and exchanges assets with the other link, the other link cannot be verified. For example, assume that there are 3 backbones (A chain, B chain, C chain), an asset AAA is running on the A chain, an asset BBB is running on the B chain, an asset CCC is running on the C chain, the exchange ratio of AAA to BBB and CCC is 1:1:1, and assuming that an operator deposits 100AAA in the two-layer network privately and exchanges with BBB of a certain user in the two-layer network immediately, the 100AAA is out of order, and finally authentication on the A chain fails, but the operator has exchanged 100BBB and submitted to the B chain, causing harm to the B chain.
The above problems can be solved by the embodiments of the present application.
FIG. 1 is a flowchart of a method for multi-backbone cross-chain of a predictor in accordance with an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a method for implementing a multi-backbone chain crossing of a predictor applicable to a two-layer network node, where the two-layer network node has state trees corresponding to each backbone, initial root hashes of each state tree are the same, each backbone is configured with a cross-chain verification contract and a predictor contract, and a zero knowledge proof circuit for verifying transaction information is deployed in the cross-chain verification contract, and the method includes:
S11, when the first main chain is monitored to generate a first main chain block, sequentially synchronizing first transactions needing to call a first type contract in the first main chain block, wherein the first type contract comprises a deposit contract and a withdrawal contract, each first transaction is stored in the first main chain, and the first main chain block is further used for a predictor:
Transmitting the first transaction information of each first transaction in sequence to other main chains so as to enable the main chain nodes of the other main chains to store and verify each first transaction information through a prophetic contract;
S12, executing each first transaction to update a first state tree of a first main chain on the two-layer network;
S13, responding to a trigger settlement condition, sequentially generating zero knowledge proof evidence according to second transaction information of each second transaction, and generating first proof data according to each second transaction and the zero knowledge proof evidence in sequence;
and S14, transmitting the first proving data to each main chain so as to enable the main chain nodes of each main chain to:
judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through a cross-chain verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not:
and if the order is correct, inputting the zero knowledge proof evidence into a zero knowledge proof circuit to verify whether each second transaction information is correct or not:
if the verification is correct, ending;
the first transaction information and the second transaction information comprise operation types, user addresses and license quantity.
Specifically, taking sending the first transaction information of each first transaction in sequence to other backbones for the backbone nodes of the other backbones to store each first transaction information through a forestation contract, which includes "storing the first transaction information of each first transaction in sequence, generating a fourth transaction according to each first transaction information, sending the fourth transaction to other backbones for the backbone nodes of the other backbones to execute the fourth transaction through the forestation contract, and storing each first transaction information when executing the fourth transaction successfully" as an example;
Assuming that 3 main chains (A chain, B chain and C chain) are arranged, wherein an asset AAA is operated on the A chain, an asset BBB is operated on the B chain, an asset CCC is operated on the C chain, the exchange ratio of AAA and BBB to CCC is 1:1:1, state trees treeA and TreeB of the A chain and state tree TreeB of the B chain are arranged on the two-layer network, the initial root hashes of TreeA, treeB and TreeC are the same, the first main chain is the A chain, main chain nodes of the A chain generate a main chain block (100) according to tx 1-tx 10 in sequence, wherein tx1 and tx2 are transactions needing to call first type contracts, tx1 is a user A requesting deposit of 100 AAA, and tx2 is a user B requesting withdrawal of 10 AAA;
The main chain node of the A chain generates a main chain block (100) comprising tx1 and tx2, wherein tx1 and tx2 exist on the A chain;
the method comprises the steps that S11 is executed by a node of a two-layer network, and tx1 and tx2 are synchronized in sequence when a block (100) generated by an A chain is monitored;
When the prophetic machine monitors that the A chain generates a block (100), generating tx3 according to transaction information (potential, addr (A), 100) of tx1 and transaction information (withdraw, addr (B), 10) of tx2, and sending tx3 to the B chain and the C chain;
The main chain nodes of the B chain and the C chain execute tx3 through a prophetic contract, and when tx3 is executed successfully, certificates (position, addr (A), 100) and (widthwart, addr (B), 10) are stored;
the node of the two-layer network executes step S12 to execute tx1 and tx2 to update TreeA on the two-layer network;
Assume that each second transaction in sequence is tx1, tx2, tx11 to tx20;
In response to triggering the settlement condition, the node of the two-layer network executes step S13 to generate zero knowledge proof1 according to the transaction information of tx1, tx2, tx 11-tx 20 and proof data proofchunk1 according to tx1, tx2, tx 11-tx 20 and proof1 in sequence;
Step S14 is executed by the nodes of the two-layer network, and proofchunk is sent to the A chain, the B chain and the C chain;
The main chain nodes of the A chain, the B chain and the C chain judge whether the sequences of tx1, tx2, tx11 to tx20 in proofchunk1 are matched with the transaction information of the stored tx1, tx2, tx11 to tx20 or not through a cross-chain verification contract so as to verify whether the sequences of tx1, tx2, tx11 to tx20 in proofchunk are correct or not:
assuming that the order is correct, the main chain nodes of the A chain, the B chain and the C chain input proof of zero knowledge circuit to verify whether the transaction information of tx1, tx2, tx 11-tx 20 is correct or not:
Assuming that the verification is correct, it ends.
It should be noted that tx1 and tx2 are transactions synchronized from the a-chain, and if tx11 to tx20 are transactions synchronized from the B-chain, then:
For the A chain, the main chain node of each main chain judges whether the sequence of tx1 and tx2 in proofchunk1 is matched with the stored transaction information of tx1 and tx2 so as to verify whether the sequence of each transaction synchronized from the A chain in proofchunk is correct or not;
For the B chain, the main chain node of each main chain judges whether the sequence of tx 11-tx 20 in proofchunk1 is matched with the stored transaction information of tx 11-tx 20 so as to verify whether the sequence of each transaction synchronized from the B chain in proofchunk is correct or not;
Assuming that each transaction in proofchunk1 is tx1, tx11, tx2, tx12 to tx20, as long as the sequence of the transaction information of tx1 and tx2 is tx1 to tx2 and the sequence of the transaction information of tx11 to tx20 is tx11 to tx20 in the transaction information of the main chain node of each main chain, the verification sequence of the main chain node of each main chain is correct;
The embodiment ensures that a common account book is maintained on the two-layer network by a plurality of main chains, saves cost, and can continue normal operation only on the basis of correct transaction sequence and transaction information, thereby preventing double flowers.
Preferably, the method further comprises:
When the sequence is detected to be incorrect or verification is incorrect, rolling back the state tree of each main chain to a state when each second transaction is not executed;
And returning to the step of generating the zero-knowledge proof evidence according to the second transaction information of each second transaction in sequence so as to regenerate the zero-knowledge proof evidence and the first proof data.
When the sequence on the A chain, the B chain and the C chain is detected to be incorrect or verification is incorrect, the nodes of the two-layer network roll back TreeA-TreeC to a state when tx1, tx2 and tx 11-tx 20 are not executed;
The nodes of the two-layer network return to the step of generating zero knowledge proof evidence according to the second transaction information of each second transaction in sequence so as to regenerate proof1 and proofchunk1;
it will be appreciated by those skilled in the art that if tx21 is also performed on the two-tier network, tx21 should be rolled back by means of the result of one or more of tx1, tx2, tx11 to tx20, and then tx21 should be rolled back when rolling back TreeA to TreeC.
Preferably, before generating the zero knowledge proof evidence according to the second transaction information of each second transaction in sequence, the method further comprises:
receiving third transactions which are generated by a plurality of clients and need to call a second class contract, wherein the second class contract comprises a transfer contract and a cross-chain transfer contract;
And executing the third transaction to update a second state tree of the second main chain to be crossed, which is designated by the third transaction, on the two-layer network, and a third state tree of the third main chain to be crossed, which is designated by the third transaction.
Specifically, the backbone node of the present application is configured to receive transactions of a first type of contract generated by a client, while the nodes of the two-tier network are configured to receive transactions of a second type of contract generated by the client.
In connection with the embodiment shown in FIG. 1, it is assumed that tx 11-tx 15 is the third transaction invoking the second type contract, tx 16-tx 20 is the first transaction invoking the first type contract synchronized from the A-chain block (101), it can be seen that the nodes of the two-layer network are synchronized to tx1, tx2 from the A-chain block (100), then receive tx 11-tx 15 in order, and then synchronize to tx 16-tx 20 in order from the A-chain block (101), so that the order of each transaction is tx1, tx2, tx 11-tx 20, and accordingly, the predictors send the transaction information of tx1, tx2, tx 11-tx 20 in order.
And only verifying whether the sequences of tx1, tx2, tx16 to tx20 are correct for the main chain nodes of the tx1, tx2, tx11 to tx20, namely the A chain, the B chain and the C chain.
Those skilled in the art will appreciate that the transaction information for the third transaction invoking the second type of contract should also include the asset type.
Preferably, generating the first proof data from the sequential second transactions, zero knowledge proof evidence comprises:
generating first proof data according to each second transaction, a first tree root and zero knowledge proof evidence in sequence, wherein the first tree root is generated according to the merck tree root of each state tree;
judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through a cross-chain verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not comprises the following steps:
Calculating a third root from each second transaction, the stored second root by the cross-chain validation contract, updating the value of the second root to the value of the first root when the third root is the same as the first root, and
And judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through a cross-chain verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not.
Specifically, proofchunk also includes a first root CHAIN TREE root, fig. 2 is a schematic diagram of generating the first root according to an embodiment of the present invention, as shown in fig. 2, CHAIN TREE root is generated according to merkleroothash (tree A) -merkleroothash (tree C), and the value is assumed to be R1;
The main chain nodes of the A chain, the B chain and the C chain calculate CHAIN TREE root 'according to tx1, tx2, tx 11-tx 20 through a cross-chain verification contract, the stored CHAIN TREE root (namely the last CHAIN TREE root, the value of which is assumed to be R2), the value of CHAIN TREE root' is assumed to be R3, if R1=R3, the stored CHAIN TREE root value is updated from R2 to R1, and
Whether the sequence of tx1, tx2, tx 11-tx 20 in proofchunk1 is correct or not is judged by the cross-link verification contract to be matched with the transaction information of tx1, tx2, tx 11-tx 20 of the stored certificate or not so as to verify whether the sequence of tx1, tx2, tx 11-tx 20 in proofchunk1 is correct or not.
Preferably, the nodes of the two-layer network pay a plurality of deposits on each main chain, and the main chain nodes of each main chain deduct the first number of deposits when the sequence is detected to be incorrect or verification is incorrect.
The above embodiment penalizes the nodes of the two-layer network, further preventing double flowers.
Preferably, the storing of each first transaction information by the foreseeing machine contract includes:
storing each first transaction information into a prophetic contract;
judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through a cross-chain verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not comprises the following steps:
Requesting each second transaction information from the predictive engine contract by cross-chain validation contract;
And judging whether the sequence of each second transaction in the first proving data is matched with each second transaction information of the stored certificate so as to verify whether the sequence of each second transaction in the first proving data is correct.
The above embodiment stores each second transaction information in the predictive engine contract. In further embodiments, the rights of the other contracts to access the second transaction information may also be configured according to actual needs, e.g., a cross-chain validation contract may be used to access the second transaction information while some other contracts are configured as contracts that are not accessible to the second transaction information.
Preferably, generating the first proof data from the sequential second transactions, zero knowledge proof evidence comprises:
Generating first proof data according to each second transaction information and zero knowledge proof evidence;
judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through a cross-chain verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not comprises the following steps:
judging whether the second transaction information in the first proving data is the same as the stored second transaction information or not through a cross-link verification contract so as to verify whether the sequence of the second transaction information in the first proving data is correct or not.
The above-described embodiments reduce the data amount of the first certification data.
Preferably, transmitting the first transaction information of each first transaction in sequence to each other backbone comprises:
And each first transaction information is also used for the predictor to send each first transaction information to the first main chain node when the first main chain node of the initial network access is monitored, so that each first transaction information is stored by the first main chain node through the predictor contract.
The embodiment accelerates the speed of synchronizing the main chain block data of the main chain nodes of the primary network, and improves the accuracy of synchronizing the main chain block data.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 3, as another aspect, the present application also provides an apparatus 300 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 required for the operation of the device 300 are also stored. The CPU301, ROM302, and RAM303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Connected to the I/O interface 305 are an input section 306 including a keyboard, a mouse, and the like, an output section 307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like, 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, and the like. The communication section 309 performs communication processing via a network such as the internet. The 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 installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 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 309, and/or installed from the removable medium 311.
As a further aspect, the present application also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the apparatus of the above embodiment, or may be a computer-readable storage medium that exists alone and 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 involved in the embodiments of the present application may be implemented in software or in 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 above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the application referred to in the present application is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the spirit of the application. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (10)

1. The utility model provides a prophetic machine multi-main chain cross-link method which is characterized in that a two-layer network is provided with state trees respectively corresponding to the main chains, initial root hashes of the state trees are the same, each main chain is configured with a cross-link verification contract and a prophetic machine contract, a zero knowledge proof circuit for verifying transaction information is deployed in the cross-link verification contract, the method is suitable for nodes of the two-layer network, and the method comprises:
When a first main chain block is monitored to generate a first main chain block, sequentially synchronizing first transactions requiring to call a first type contract in the first main chain block, wherein the first type contract comprises a deposit contract and a withdrawal contract, each first transaction is stored in the first main chain block, and the first main chain block is also used for a predictor:
Transmitting first transaction information of each first transaction in sequence to other main chains so that main chain nodes of the other main chains can store and verify each first transaction information through the foresight contract;
executing each of the first transactions to update a first state tree of the first backbone on a two-tier network;
Generating zero knowledge proof evidence according to second transaction information of each second transaction in sequence in response to a trigger settlement condition, and generating first proof data according to each second transaction in sequence and the zero knowledge proof evidence;
Transmitting the first attestation data to each backbone for backbone nodes of each backbone:
judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through the cross-link verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not:
inputting the zero-knowledge proof evidence into the zero-knowledge proof circuit to verify whether each piece of the second transaction information is correct or not:
if the verification is correct, ending;
wherein the first transaction information and the second transaction information comprise operation types, user addresses and license amounts.
2. The method as recited in claim 1, further comprising:
when the sequence is detected to be incorrect or verification is incorrect, rolling back the state tree of each main chain on the two-layer network to a state when each second transaction is not executed;
and returning to the step of generating zero-knowledge proof evidence according to the second transaction information of each second transaction in sequence so as to regenerate the zero-knowledge proof evidence and the first proof data.
3. The method of claim 1, wherein before generating zero-knowledge proof evidence from the second transaction information of each second transaction in sequence, further comprising:
Receiving third transactions generated by a plurality of clients and needing to call a second class of contracts, wherein the second class of contracts comprise transfer contracts and cross-chain transfer contracts;
executing the third transaction to update a second state tree of a second main chain to be crossed, which is designated by the third transaction, on a two-layer network, and a third state tree of a third main chain to be crossed, which is designated by the third transaction;
The determining, by the cross-link validation contract, whether the order of each of the second transactions in the first attestation data matches with each of the second transaction information of the stored attestation to verify whether the order of each of the second transactions in the first attestation data is correct includes:
Judging whether the sequence of the second transaction excluding the third transaction in the first proving data is matched with the second transaction information of the stored certificate or not through the cross-link verification contract so as to verify whether the sequence of the second transaction in the first proving data is correct or not.
4. The method of claim 1, wherein generating the first proof data from the zero-knowledge proof evidence for each of the second transactions in sequence comprises:
Generating first proof data according to the second transaction, the first tree root and the zero knowledge proof evidence in sequence, wherein the first tree root is generated according to the merck tree root of each state tree;
The determining, by the cross-link validation contract, whether the order of each of the second transactions in the first attestation data matches with each of the second transaction information of the stored attestation to verify whether the order of each of the second transactions in the first attestation data is correct includes:
Calculating a third root from each of the second transactions, the stored second roots by the cross-chain validation contract, updating the value of the second root to the value of the first root when the third root is the same as the first root, and
Judging whether the sequence of each second transaction in the first proving data is matched with the stored second transaction information or not through the cross-link verification contract so as to verify whether the sequence of each second transaction in the first proving data is correct or not.
5. The method of claim 1, wherein said sending first transaction information for each of said first transactions in sequence to each other backbone for each other backbone's backbone node to document each of said first transaction information by said predictive engine contract comprises:
And sequentially storing first transaction information of each first transaction, generating a fourth transaction according to each first transaction information, and sending the fourth transaction to other backbones so that the backbone nodes of the other backbones execute the fourth transaction through the foresight contract, and storing each first transaction information when the fourth transaction is executed successfully.
6. The method of claim 5, wherein said authenticating each of said first transaction information by said predictive engine contract comprises:
storing each piece of first transaction information into the foresight machine contract;
The determining, by the cross-link validation contract, whether the order of each of the second transactions in the first attestation data matches with each of the second transaction information of the stored attestation to verify whether the order of each of the second transactions in the first attestation data is correct includes:
Requesting each of the second transaction information from the predictive engine contract via the cross-link validation contract;
Determining whether the order of the second transactions in the first certification data is matched with the second transaction information of the stored certification to verify whether the order of the second transactions in the first certification data is correct.
7. The method of claim 1, wherein generating the first proof data from the zero-knowledge proof evidence for each of the second transactions in sequence comprises:
generating first proof data according to the second transaction information and the zero knowledge proof evidence;
The determining, by the cross-link validation contract, whether the order of each of the second transactions in the first attestation data matches with each of the second transaction information of the stored attestation to verify whether the order of each of the second transactions in the first attestation data is correct includes:
judging whether the second transaction information in the first proving data is identical with the second transaction information of the stored certificate or not through the cross-link verification contract so as to verify whether the sequence of the second transaction information in the first proving data is correct or not.
8. The method of claim 1, wherein said transmitting first transaction information for each of said first transactions in sequence to each other backbone comprises:
And each first transaction information is further used for a prophetic machine to send each first transaction information to the first main chain node when the prophetic machine monitors the first main chain node of the initial network access, so that the first main chain node can store each first transaction information through the prophetic machine contract.
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 of any of claims 1-8.
10. A storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1-8.
CN202111661946.9A 2021-12-31 2021-12-31 Oracle multi-main chain cross-chain method, device and storage medium Active CN114202425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111661946.9A CN114202425B (en) 2021-12-31 2021-12-31 Oracle multi-main chain cross-chain method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111661946.9A CN114202425B (en) 2021-12-31 2021-12-31 Oracle multi-main chain cross-chain method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114202425A CN114202425A (en) 2022-03-18
CN114202425B true CN114202425B (en) 2025-01-24

Family

ID=80657620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111661946.9A Active CN114202425B (en) 2021-12-31 2021-12-31 Oracle multi-main chain cross-chain method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114202425B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115392920A (en) * 2022-09-01 2022-11-25 杭州复杂美科技有限公司 Predictive machine-based authentication method, computer device, and storage medium
CN115392919B (en) * 2022-09-01 2025-11-28 杭州复杂美科技有限公司 Verification method based on third-party prophetic machine, computer equipment and storage medium
CN115567321B (en) * 2022-11-14 2023-03-03 安徽中科晶格技术有限公司 Chain-crossing system and method based on built-in preplan contract

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113139808A (en) * 2021-04-15 2021-07-20 张莹 Cross-chain asset transaction method and device based on prediction machine and storage medium
CN113592475A (en) * 2021-08-02 2021-11-02 杭州复杂美科技有限公司 Cross-chain asset transfer method, computer device, and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554516B (en) * 2019-09-05 2024-12-17 蚂蚁链技术有限公司 Method and device for processing default assets based on blockchain and electronic equipment
CN111476670B (en) * 2020-04-08 2023-05-30 杭州复杂美科技有限公司 Block chain rollback insurance method, apparatus and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113139808A (en) * 2021-04-15 2021-07-20 张莹 Cross-chain asset transaction method and device based on prediction machine and storage medium
CN113592475A (en) * 2021-08-02 2021-11-02 杭州复杂美科技有限公司 Cross-chain asset transfer method, computer device, and storage medium

Also Published As

Publication number Publication date
CN114202425A (en) 2022-03-18

Similar Documents

Publication Publication Date Title
US10678597B2 (en) Event-driven blockchain workflow processing
CN110599177B (en) A transaction verification method and related equipment
CN114266665B (en) Contract multi-main chain crossing method, equipment and storage medium
CN114202425B (en) Oracle multi-main chain cross-chain method, device and storage medium
US20190172026A1 (en) Cross blockchain secure transactions
US20210243032A1 (en) Sending cross-chain authenticatable messages
CN115701078B (en) Cross-chain transaction processing method, device, electronic equipment and storage medium
CN111461723A (en) Data processing system, method and device based on block chain
CN110187831B (en) Block data storage system and method of block chain alliance chain
CN109146490A (en) block generation method, device and system
CN114283010B (en) Multi-main-chain crossing method based on multi-main-chain two-layer network state tree
CN111552991A (en) Block chain transaction method and device
CN110690974B (en) Block chain based data verification method, device, equipment and readable storage medium
CN108921559B (en) Cross-chain transaction verification method, device and storage medium
CN110599175B (en) A block processing method and related equipment
CN111476670A (en) Block chain rollback insurance method, equipment and storage medium
CN109558454A (en) Parallel chain digs mine common recognition method, equipment and storage medium
CN111242614A (en) Wallet account asset retrieving method, collection guarantee method, equipment and storage medium
CN110298757B (en) Consensus method and device relating to DPoS
CN114138903B (en) Multi-main-chain cross-chain method, computer device and storage medium
CN114219646A (en) Multi-main chain two-layer network state tree, multi-main chain cross-chain method
CN115660853A (en) Cross-chain asset transfer method, computer device, and storage medium
CN111290733B (en) Settlement method, apparatus and storage medium
CN111127003B (en) Wallet account payment method, device and storage medium
CN117196615A (en) Cross-blockchain transaction method, device, equipment 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240725

Address after: 518110 Longfa road 428 Huayuan street B24 Huayuan street b23b Longhua Street Longyuan community Longhua Street Longhua District Shenzhen City Guangdong Province

Applicant after: Shenzhen Morning Intellectual Property Operations Co.,Ltd.

Country or region after: China

Address before: 310000 Room 702, 7th Floor, Building 6, East Software Park, No. 90 Wensan Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant before: HANGZHOU FUZAMEI TECHNOLOGY Co.,Ltd.

Country or region before: China

GR01 Patent grant
GR01 Patent grant