CN114202425A - Method, device and storage medium for predicting multi-main-chain interlinkage of language machine - Google Patents

Method, device and storage medium for predicting multi-main-chain interlinkage of language machine Download PDF

Info

Publication number
CN114202425A
CN114202425A CN202111661946.9A CN202111661946A CN114202425A CN 114202425 A CN114202425 A CN 114202425A CN 202111661946 A CN202111661946 A CN 202111661946A CN 114202425 A CN114202425 A CN 114202425A
Authority
CN
China
Prior art keywords
transaction
transaction information
sequence
contract
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.)
Pending
Application number
CN202111661946.9A
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 CN202111661946.9A priority Critical patent/CN114202425A/en
Publication of CN114202425A publication Critical patent/CN114202425A/en
Pending legal-status Critical Current

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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention provides a prophetic machine multi-main-chain cross-linking method, equipment and a storage medium, wherein the method comprises the following steps: when the first main chain block is detected to be generated by the first main chain, synchronizing first transactions in the first main chain block, which need to call the first type of contracts, in sequence; performing each first transaction to update a first state tree of a first backbone on the two-tier network; responding to a triggered settlement condition, generating zero-knowledge proof evidence according to second transaction information of each second transaction in sequence, and generating first proof data according to each second transaction and the zero-knowledge proof evidence in sequence; first proof data is sent to each backbone. The application prevents double flowers on the basis of saving cost.

Description

Method, device and storage medium for predicting multi-main-chain interlinkage of language machine
Technical Field
The application relates to the technical field of block chains, in particular to a method, equipment and a storage medium for multi-main-chain crossing of a prediction machine.
Background
Current link-crossing schemes based on two-layer networks are generally one-to-one, with one two-layer network corresponding to one backbone. The applicant wishes to propose a cross-link scheme for a two-layer network with multiple backbones, which is more cost-effective than the prior art, but also has the problem of double flowers.
Disclosure of Invention
In view of the above-mentioned deficiencies or inadequacies in the prior art, it would be desirable to provide a predictive multi-master chain cross-link method, apparatus, and storage medium that prevents double blossoming on a cost effective basis.
In a first aspect, the present invention provides a predictive engine multi-main-chain crossing method suitable for a two-layer network node, where a state tree corresponding to each main chain is on the two-layer network, initial root hashes of the state trees are the same, each main chain is configured with a cross-chain verification contract and a predictive engine contract, and a zero-knowledge proof circuit for verifying transaction information is deployed in the cross-chain verification contract, the method including:
when the first main chain block is detected to be generated by the first main chain, synchronizing first transactions in the first main chain block, which need to call the first type of contracts, in sequence; wherein the first type of contract comprises a deposit contract and a withdrawal contract; each first transaction is credited at a first backbone, the first backbone block further for the predictive engine to:
sending the first transaction information of each first transaction in sequence to other main chains so that main chain nodes of other main chains can store and verify the first transaction information through a prompter contract;
performing each first transaction to update a first state tree of a first backbone on the two-tier network;
responding to a triggered settlement condition, generating zero-knowledge proof evidence according to second transaction information of each second transaction in sequence, and generating first proof data according to each second transaction and the zero-knowledge proof evidence in sequence;
sending the first proof data to each backbone for the backbone nodes of each backbone:
judging whether the sequence of each second transaction in the first certification data is matched with the stored second transaction information through the cross-link verification contract so as to verify whether the sequence of each second transaction in the first certification data is correct:
and if the sequence is correct, inputting the zero-knowledge proof evidence into a zero-knowledge proof circuit to verify whether each second transaction message is correct:
if the verification is correct, ending;
the first transaction information and the second transaction information comprise operation types, user addresses and the number of certificates of receipt.
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 predictive multi-chassis cross-chain method provided in accordance with embodiments of the present invention.
In a third aspect, the present invention further provides a storage medium storing a computer program, the computer program enabling a computer to execute the prediction machine multi-main-chain inter-chain method provided according to the embodiments of the present invention.
According to the method, the device and the storage medium for the multi-main-chain cross-linking of the prediction machine, provided by the embodiments of the invention, when the fact that the first main-chain block is generated by the first main-chain is monitored, the first transactions of the first type of contracts, which need to be called, in the first main-chain block are synchronized in sequence; performing each first transaction to update a first state tree of a first backbone on the two-tier network; responding to a triggered settlement condition, generating zero-knowledge proof evidence according to second transaction information of each second transaction in sequence, and generating first proof data according to each second transaction and the zero-knowledge proof evidence in sequence; the method of sending the first certification data to each main chain prevents double blossom on a cost-saving basis.
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 method for predicting inter-chain of multiple main chains of a speaker.
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 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.
The applicant wishes to propose a cross-chaining scheme with a two-tier network corresponding to multiple backbones, which is more cost-effective than the prior art, but also has the problem of double flowers-if the operator cheats the exchange of assets with the other chain after the deposit, the other chain will not be able to verify. For example, assume that there are 3 main chains (A chain, B chain, C chain); an asset AAA runs on the chain A, an asset BBB runs on the chain B, an asset CCC runs on the chain C, and the exchange ratio of the AAA to the BBB to the CCC is 1:1: 1; assuming that the operator privately deposits 100AAA in the two-tier network and immediately exchanges with the BBB of a certain user in the two-tier network, the 100AAA is overflowed by the air and eventually fails authentication on the a chain, but the operator has exchanged 100BBB and submitted to the B chain, causing damage to the B chain.
The above problems can be solved by embodiments of the present application.
Fig. 1 is a flowchart of a method for predicting inter-chain of multiple main chains of a speaker. As shown in fig. 1, in this embodiment, the present invention provides a predictive engine multi-main-chain cross-link method suitable for a two-layer network node, where a two-layer network has state trees corresponding to main chains, initial root hashes of the state trees are the same, each main chain is configured with a cross-chain verification contract and a predictive engine contract, and a zero-knowledge proof circuit for verifying transaction information is deployed in the cross-chain verification contract, where the method includes:
s11: when the first main chain block is detected to be generated by the first main chain, synchronizing first transactions in the first main chain block, which need to call the first type of contracts, in sequence; wherein the first type of contract comprises a deposit contract and a withdrawal contract; each first transaction is credited at a first backbone, the first backbone block further for the predictive engine to:
sending the first transaction information of each first transaction in sequence to other main chains so that main chain nodes of other main chains can store and verify the first transaction information through a prompter contract;
s12: performing each first transaction to update a first state tree of a first backbone on the two-tier network;
s13: responding to a triggered settlement condition, generating zero-knowledge proof evidence according to second transaction information of each second transaction in sequence, and generating first proof data according to each second transaction and the zero-knowledge proof evidence in sequence;
s14: sending the first proof data to each backbone for the backbone nodes of each backbone:
judging whether the sequence of each second transaction in the first certification data is matched with the stored second transaction information through the cross-link verification contract so as to verify whether the sequence of each second transaction in the first certification data is correct:
and if the sequence is correct, inputting the zero-knowledge proof evidence into a zero-knowledge proof circuit to verify whether each second transaction message is correct:
if the verification is correct, ending;
the first transaction information and the second transaction information comprise operation types, user addresses and the number of certificates of receipt.
Specifically, taking as an example that the first transaction information of each first transaction in sequence is sent to each other main chain, so that the main chain nodes of each other main chain can store each first transaction information through a language predictive machine contract to certify each first transaction information, including "the first transaction information of each first transaction is stored in sequence, a fourth transaction is generated according to each first transaction information, the fourth transaction is sent to each other main chain, so that the main chain nodes of each other main chain can execute the fourth transaction through the language predictive machine contract, and each first transaction information is certified when the fourth transaction is executed successfully";
suppose there are 3 main chains (chain A, chain B, chain C); an asset AAA runs on the chain A, an asset BBB runs on the chain B, an asset CCC runs on the chain C, and the exchange ratio of the AAA to the BBB to the CCC is 1:1: 1; the two-layer network is provided with a state tree TreeA of the chain A, a state tree TreeB of the chain B and a state tree TreeC of the chain C, and the initial root hash of TreeA, TreeB and TreeC is the same; the first main chain is an 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 a first type of contract, tx1 requests a user A to deposit 100AAA, and tx2 requests a user B to withdraw 10 AAA;
the main chain node of the A chain generates a main chain block (100) comprising tx1 and tx2, and tx1 and tx2 are verified on the A chain;
the nodes of the two-layer network execute step S11, and synchronize tx1 and tx2 in sequence when detecting that the A chain generates a block (100);
when monitoring that the A chain generates a block (100), the prophetic generates tx3 according to transaction information (default, addr (A),100) of tx1 and transaction information (withdraw, addr (B),10) of tx2, and sends tx3 to the B chain and the C chain; in more embodiments, the transaction information may also be configured according to actual requirements, for example, configured as a user address, an asset type, an asset quantity, an operation type, and the like, so that the same technical effect may be achieved;
main chain nodes of the B chain and the C chain execute tx3 through a presupportion machine contract, and when the tx3 is executed successfully, the memories (dispose, addr (A), (100)) and (withdraw, addr (B), (10)) are stored;
the nodes of the two-layer network execute the step S12, execute tx1, tx2 to update TreeA on the two-layer network;
assume that each second transaction in order is tx1, tx2, tx 11-tx 20;
responding to the triggered settlement condition, executing a step S13 by the nodes of the two-layer network, generating proof of zero knowledge proof1 according to the transaction information of tx1, tx2 and tx11 to tx20 in sequence, and generating proof data proofchunk1 according to tx1, tx2, tx11 to tx20 and proof 1; in further embodiments, the condition for triggering settlement may be configured according to actual requirements, for example, configured to achieve the same technical effect when the time is the first time since the last settlement, or configured to receive the settlement request;
the node of the two-layer network executes the step S14, and sends proofchunk1 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 sequence of tx1, tx2 and tx11 to tx20 in the proofchunk1 is matched with the stored transaction information of tx1, tx2 and tx11 to tx20 through a cross-chain verification contract so as to verify whether the sequence of tx1, tx2 and tx11 to tx20 in the proofchunk1 is correct:
assuming the sequence is correct, the main chain nodes of the A chain, the B chain and the C chain input proof1 into a zero-knowledge proof circuit to verify whether the transaction information of tx1, tx2, tx11 to tx20 is correct:
assuming the verification is correct, the process is ended.
It should be noted that tx1 and tx2 are transactions synchronized from the a chain, and assuming 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 the 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 the proofchunk1 is correct;
for the B chain, the main chain node of each main chain judges whether the sequence of tx11 to tx20 in the proofchunk1 is matched with the stored transaction information of tx11 to tx20 so as to verify whether the sequence of each transaction synchronized from the B chain in the proofchunk1 is correct;
assuming that each transaction in the proofchunk1 is tx1, tx11, tx2, tx12 to tx20, as long as the sequence of the transaction information of tx1 and tx2 is tx1 → tx2 and the sequence of the transaction information of tx11 to tx20 is tx11 → tx20 in the transaction information of the main chain node certificate of each main chain, the main chain node verification sequence of each main chain is also correct;
the embodiment enables a plurality of main chains to maintain a common account book on a two-layer network, thereby saving the cost; and only on the basis of correct transaction sequence and transaction information, the two-layer network can continue to operate normally, so that double flowers are prevented.
Preferably, the method further comprises:
when the monitored sequence is incorrect or the verification is incorrect, rolling back the state tree of each main chain to the 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 the second transactions in sequence so as to regenerate the zero-knowledge proof evidence and the first proof data.
When the sequence of the chain A, the chain B and the chain C is monitored to be incorrect, or the verification is incorrect, the nodes of the two-layer network roll back TreeA-TreeC to the state when tx1, tx2 and tx 11-tx 20 are not executed;
the nodes of the two-layer network return the step of generating zero-knowledge proof evidence according to the second transaction information of the second transactions in sequence so as to regenerate proof1 and proof 1;
it should be understood by those skilled in the art that, assuming tx21 is also executed on the two-tier network, tx21 is executed by means of the execution results of one or more transactions among tx1, tx2, tx11 to tx20, then tx21 should also be rolled back when rolling back TreeA to TreeC.
Preferably, before generating the zero-knowledge proof evidence according to the second transaction information of the second transactions in sequence, the method further includes:
receiving third transactions which are generated by a plurality of clients and need to call the second type of contracts; wherein the second type of contract comprises a transfer contract and a cross-chain transfer contract; each third transaction is also for the predictive engine: storing third transaction information of each third transaction in sequence;
performing the following operations for each third transaction: and executing the third transaction to update a second state tree of a second main chain needing to be bridged and specified by the third transaction on the two-layer network, and a third state tree of a third main chain to be bridged and specified by the third transaction.
Specifically, the backbone nodes of the present application are 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, assume that tx 11-tx 15 are third transactions invoking contracts of a second type, and tx 16-tx 20 are first transactions invoking contracts of a first type synchronized from a block (101) of an A-chain; it can be seen that the nodes of the two-layer network are synchronized to tx1 and tx2 from block (100) of the a chain, then sequentially receive tx11 to tx15, and sequentially synchronize to tx16 to tx20 from block (101) of the a chain; the order of transactions is thus tx1, tx2, tx11 to tx 20; correspondingly, the prediction machine sends the transaction information of tx1, tx2, tx11 to tx20 in sequence.
For tx1, tx2, tx11 to tx 20: the main chain nodes of the A chain, the B chain and the C chain only verify whether the sequence of tx1, tx2, tx16 to tx20 is correct or not.
Those skilled in the art will appreciate that the transaction information for the third transaction that invokes the second type of contract should also include the asset type.
Preferably, generating the first proof data from the sequential second transaction, zero knowledge proof of knowledge proofs comprises:
generating first proof data according to each second transaction, the first tree root and the zero-knowledge proof evidence in sequence; wherein the first tree root is generated according to the Mercker tree root of each state tree;
determining, by the cross-link verification contract, whether the order of the second transactions in the first attestation data matches the second transaction information stored to verify whether the order of the second transactions in the first attestation data is correct comprises:
calculating a third root according to each second transaction and the stored second root through the cross-link verification contract, and 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 the number of the first and second groups,
and judging whether the sequence of each second transaction in the first certification data is matched with the stored second transaction information through the cross-link verification contract so as to verify whether the sequence of each second transaction in the first certification data is correct.
Specifically, the proofchunk1 further includes a first tree root; FIG. 2 is a schematic diagram of generating a first tree root according to an embodiment of the present invention, and as shown in FIG. 2, a chain tree root is generated according to merkleothorash (tree A) -merkleothorash (tree C), and its value is assumed to be R1;
main chain nodes of the A chain, the B chain and the C chain calculate chain tree roots 'according to tx1, tx2 and tx 11-tx 20 through cross-chain verification contracts, wherein the stored chain tree roots (namely the last chain tree root, the value of which is assumed to be R2) and the value of the chain tree root' is assumed to be R3; if R1 ═ R3, the value of the stored chain tree root is updated from R2 to R1; and the number of the first and second groups,
whether the sequence of tx1, tx2 and tx11 to tx20 in the proofchunk1 is matched with the stored transaction information of tx1, tx2 and tx11 to tx20 is judged through a cross-chain verification contract so as to verify whether the sequence of tx1, tx2 and tx11 to tx20 in the proofchunk1 is correct.
Preferably, the nodes of the two-layer network pay a plurality of deposit on each main chain, and the main chain nodes of each main chain deduct a first amount of deposit when monitoring the sequence is incorrect or verification is incorrect.
The embodiment punishs the nodes of the two-layer network, and further prevents double flowers.
Preferably, the validating each first transaction information by the predictive engine contract includes:
storing each first transaction information into a language prediction machine contract;
determining, by the cross-link verification contract, whether the order of the second transactions in the first attestation data matches the second transaction information stored to verify whether the order of the second transactions in the first attestation data is correct comprises:
requesting each second transaction information from the president contract through the cross-link verification contract;
and judging whether the sequence of each second transaction in the first certification data is matched with the stored second transaction information so as to verify whether the sequence of each second transaction in the first certification data is correct.
The above-described embodiments store each second transaction information in a predictive engine contract. In further embodiments, the rights of each other contract to access each second transaction information may also be configured according to actual requirements, e.g., cross-chain validation contracts may be configured to access each second transaction information, while some other contracts are configured as contracts that do not have access to each second transaction information.
Preferably, generating the first proof data from the sequential second transaction, zero knowledge proof of knowledge proofs comprises:
generating first proof data according to the second transaction information and the zero-knowledge proof evidence;
determining, by the cross-link verification contract, whether the order of the second transactions in the first attestation data matches the second transaction information stored to verify whether the order of the second transactions in the first attestation data is correct comprises:
and judging whether the second transaction information in the first certification data is the same as the stored second transaction information through the cross-link verification contract so as to verify whether the sequence of the second transaction information in the first certification data is correct.
The above-described embodiment reduces the data amount of the first certification data.
Preferably, the sending the first transaction information of each first transaction in sequence to each other main chain comprises:
storing the first transaction information of each first transaction in sequence, and sending each first transaction information to other main chains; and each first transaction information is also used for sending each first transaction information to the first main chain node when the predicting machine monitors the first main chain node of the initial network, so that the first main chain node can store and verify each first transaction information through the contract of the predicting machine.
The embodiment accelerates the speed of synchronizing the main chain block data by the main chain node of the initial network and improves the correctness of the synchronizing 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 necessary for the operation of the apparatus 300 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 separate computer readable storage medium not incorporated into the 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 prophetic machine multi-main chain cross-link method is characterized in that a state tree corresponding to each main chain is arranged on a two-layer network, 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 the following steps:
when the first main chain block is detected to be generated by the first main chain, sequentially synchronizing first transactions in the first main chain block, which need to call the first type of contracts; wherein the first type of contract comprises a deposit contract and a withdrawal contract; each of the first transactions is credited at the first backbone, the first backbone block further for a predictive engine:
sending the first transaction information of each first transaction in sequence to other main chains so that main chain nodes of other main chains can store and verify each first transaction information through the prompter contract;
performing each of the first transactions to update a first state tree of the first backbone on a two-tier network;
responding to a triggered settlement condition, generating zero-knowledge proof evidence according to second transaction information of each second transaction in sequence, and generating first proof data according to each second transaction and the zero-knowledge proof evidence in sequence;
sending the first proof data to each backbone for the backbone nodes of each backbone:
determining, by the cross-link verification contract, whether an order of each of the second transactions in the first attestation data matches the stored second transaction information to verify whether the order of each of the second transactions in the first attestation data is correct:
if the sequence is correct, the zero-knowledge proof evidence is input into the zero-knowledge proof circuit to verify whether each second transaction message is correct:
if the verification is correct, ending;
the first transaction information and the second transaction information comprise operation types, user addresses and the number of certificates of receipt.
2. The method of claim 1, further comprising:
when the monitored sequence is incorrect or the verification is incorrect, rolling back the state tree of each main chain on the two-layer network to the 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 the second transactions 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 the zero proof of knowledge proof from the second transaction information of the second transactions in the sequence, further comprising:
receiving third transactions which are generated by a plurality of clients and need to call the second type of contracts; wherein the second type of contract comprises a transfer contract and a cross-chain transfer contract;
performing the following for each of the third transactions: executing the third transaction to update a second state tree of a second main chain needing to be bridged and specified by the third transaction on a two-layer network, and a third state tree of a third main chain needing to be bridged and specified by the third transaction;
the determining, by the cross-chain verification contract, whether the order of each of the second transactions in the first attestation data matches the stored second transaction information to verify whether the order of each of the second transactions in the first attestation data is correct comprises:
and judging whether the sequence of the second transactions except the third transaction in the first certification data is matched with the stored second transaction information through the cross-link verification contract so as to verify whether the sequence of the second transactions in the first certification data is correct.
4. The method of claim 1, wherein generating first proof data from the zero knowledge proof of evidence for each of the second transactions in the sequence comprises:
generating first proof data according to each second transaction, the first tree root and the zero-knowledge proof evidence in sequence; wherein the first tree root is generated from the Mercker tree root of each of the state trees;
the determining, by the cross-chain verification contract, whether the order of each of the second transactions in the first attestation data matches the stored second transaction information to verify whether the order of each of the second transactions in the first attestation data is correct comprises:
calculating a third root from each of the second transactions, the stored second roots, by the cross-chain validation contract, and 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 the number of the first and second groups,
and judging whether the sequence of each second transaction in the first certification data is matched with the stored second transaction information through the cross-link verification contract so as to verify whether the sequence of each second transaction in the first certification data is correct.
5. The method of claim 1, wherein sending the first transaction information for each of the first transactions in sequence to each of the other backbones for a backbone node of each of the other backbones to validate each of the first transaction information via the predictive engine contract comprises:
the first transaction information of each first transaction is stored in sequence, a fourth transaction is generated according to each first transaction information, the fourth transaction is sent to other main chains so that main chain nodes of other main chains can execute the fourth transaction through the prediction machine contract, and each first transaction information is stored when the fourth transaction is executed successfully.
6. The method of claim 5, wherein said validating each of said first transaction information via said predictive engine contract comprises:
storing each first transaction information into the language predictive contract;
the determining, by the cross-chain verification contract, whether the order of each of the second transactions in the first attestation data matches the stored second transaction information to verify whether the order of each of the second transactions in the first attestation data is correct comprises:
requesting, by the cross-chain validation contract, the second transaction information from the president contract;
and judging whether the sequence of each second transaction in the first certification data is matched with the stored second transaction information so as to verify whether the sequence of each second transaction in the first certification data is correct.
7. The method of claim 1, wherein generating first proof data from the zero knowledge proof of evidence for each of the second transactions in the sequence comprises:
generating first proof data according to the second transaction information and the zero-knowledge proof evidence;
the determining, by the cross-chain verification contract, whether the order of each of the second transactions in the first attestation data matches the stored second transaction information to verify whether the order of each of the second transactions in the first attestation data is correct comprises:
and judging whether each second transaction information in the first certification data is the same as each second transaction information stored in the first certification data or not through the cross-link verification contract so as to verify whether the sequence of each second transaction information in the first certification data is correct or not.
8. The method of claim 1, wherein sending first transaction information for each of the first transactions in the sequence to each of the other backbones comprises:
storing first transaction information of each first transaction in sequence, and sending each first transaction information to other main chains; each first transaction information is further used for sending each first transaction information to the first main chain node when the prediction machine monitors the first main chain node of the initial network, so that the first main chain node can store and verify each first transaction information through the prediction 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 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.
CN202111661946.9A 2021-12-31 2021-12-31 Method, device and storage medium for predicting multi-main-chain interlinkage of language machine Pending CN114202425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111661946.9A CN114202425A (en) 2021-12-31 2021-12-31 Method, device and storage medium for predicting multi-main-chain interlinkage of language machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111661946.9A CN114202425A (en) 2021-12-31 2021-12-31 Method, device and storage medium for predicting multi-main-chain interlinkage of language machine

Publications (1)

Publication Number Publication Date
CN114202425A true CN114202425A (en) 2022-03-18

Family

ID=80657620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111661946.9A Pending CN114202425A (en) 2021-12-31 2021-12-31 Method, device and storage medium for predicting multi-main-chain interlinkage of language machine

Country Status (1)

Country Link
CN (1) CN114202425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567321A (en) * 2022-11-14 2023-01-03 安徽中科晶格技术有限公司 Chain-crossing system and method based on built-in preplan contract

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567321A (en) * 2022-11-14 2023-01-03 安徽中科晶格技术有限公司 Chain-crossing system and method based on built-in preplan contract
CN115567321B (en) * 2022-11-14 2023-03-03 安徽中科晶格技术有限公司 Chain-crossing system and method based on built-in preplan contract

Similar Documents

Publication Publication Date Title
CN108848119B (en) Cross-block-chain interaction method, device, system and electronic equipment
CN109242685B (en) Block chain-based consensus and verification method and device
CN111461723B (en) Data processing system, method and device based on block chain
CN110910138A (en) Block chain data supervision method and device
US20220239496A1 (en) Blockchain consensus method, device and system
CN108492108A (en) Across the chain communication means of block chain, system and computer readable storage medium
CN113095827B (en) Anonymous multiple signature method, computer device, and storage medium
CN110083745B (en) Data query method, device and storage medium
CN113657900A (en) Cross-chain transaction verification method and system and cross-chain transaction system
CN110046994B (en) Method and system for accepting block link deposit certificate transaction
CN110187831B (en) Block data storage system and method of block chain alliance chain
CN112184436B (en) Data synchronization method, electronic device and readable storage medium
CN109005208B (en) Method and device for pushing information
CN110766410B (en) Trusted cross-chain event construction and verification method and device based on Merker tree
CN114202425A (en) Method, device and storage medium for predicting multi-main-chain interlinkage of language machine
CN114266665A (en) Contract multi-backbone cross-link method, device and storage medium
CN113656497A (en) Data verification method and device based on block chain
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN116991948A (en) Block data synchronization system and method, electronic device and storage medium
CN111523896A (en) Anti-attack method, device and storage medium
CN107277108B (en) Method, device and system for processing messages at nodes of block chain
CN111524011B (en) Parallel link consensus validation method, apparatus, and storage medium
CN114037449A (en) Cross-chain asset transfer method, computer device, and storage medium
CN114283010A (en) Multi-main-chain cross-chain method based on multi-main-chain two-layer network state tree
CN112181599B (en) Model training 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