CN114612101A - Reliable inter-link route cross-link method and system for connection - Google Patents

Reliable inter-link route cross-link method and system for connection Download PDF

Info

Publication number
CN114612101A
CN114612101A CN202210264255.3A CN202210264255A CN114612101A CN 114612101 A CN114612101 A CN 114612101A CN 202210264255 A CN202210264255 A CN 202210264255A CN 114612101 A CN114612101 A CN 114612101A
Authority
CN
China
Prior art keywords
transaction
chain
cross
module
link
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
CN202210264255.3A
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.)
Shanghai Wanxiang Blockchain Inc
Original Assignee
Shanghai Wanxiang Blockchain Inc
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 Shanghai Wanxiang Blockchain Inc filed Critical Shanghai Wanxiang Blockchain Inc
Priority to CN202210264255.3A priority Critical patent/CN114612101A/en
Publication of CN114612101A publication Critical patent/CN114612101A/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Abstract

The invention provides a reliable inter-link route cross-link method and a system facing connection, which comprises the following steps: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B; the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, signing and sending the BDCP to a block knocking module; the block typing module checks the signature of the cross-chain transaction, judges whether the current cross-chain transaction is confirmed according to whether the block is typed or not, and sends the confirmed cross-chain transaction to the transaction routing module; the transaction routing module carries out signature verification on the received cross-chain transaction, and when the signature verification is passed, the current cross-chain transaction is sent to the transaction verification module; the transaction verification module verifies the cross-chain transaction, and when the verification is successful, the cross-chain transaction is sent to the chain B, and the chain B waits for a receipt executed by the chain B; and after the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback.

Description

Reliable inter-link route cross-link method and system for connection
Technical Field
The invention relates to the technical field of block chains, in particular to a reliable inter-chain route cross-chain method and a reliable inter-chain route cross-chain system for connection.
Background
In a traditional block chain cross-chain system, two systems are usually required to be separately communicated, and the problems of high data communication complexity and difficult data format unification exist. In order to solve the problems, in the improved reliable inter-chain route cross-chain method and system facing the connection, all cross-chain systems only need to perform reliable transmission connection with a transaction routing module, the complexity of communication is reduced from O (n ^2) to O (n), and cross-chain data transmission is decoupled from chains. Meanwhile, in order to solve the problem of inconsistent Data Communication formats among heterogeneous chains, the system designs a Blockchain Data Communication Protocol (BDCP), and the Protocol can solve the problem of inconsistent Data caused by different consensus algorithms and different encryption algorithms used among the heterogeneous chains.
Patent document CN110019103A (application number: 201811199663.5) discloses a block chain-based inter-chain system and an inter-chain implementation method, wherein the inter-chain system comprises a spanned chain, a guarantee chain and an inter-chain; the spanned chain, the guarantee chain and the spanned chain form a parallel framework chain; the cross-chain implementation method comprises the following steps: the signal receiving template receives transaction information sent by a client, inquires routing rules of a transfer account and a transfer account, and sends the received transaction information to a guarantee chain, the guarantee chain determines a spanned chain according to the routing rules of the transfer account, the spanned chain executes transaction operation according to the transaction information and returns to the guarantee chain after the execution is successful, the guarantee chain feeds back the execution success information to the spanned chain, and the spanned chain finally feeds back the execution success information to the signal receiving template of the client.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a reliable inter-link route cross-link method and system for connection.
The invention provides a reliable inter-link route cross-link method facing connection, which comprises the following steps:
step S1: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B;
step S2: the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, and the BDCP is signed and sent to a block knocking module;
step S3: the block typing module checks the signature of the cross-chain transaction, judges whether the current cross-chain transaction is confirmed according to whether the block is typed or not, and sends the confirmed cross-chain transaction to the transaction routing module;
step S4: the transaction routing module carries out signature verification on the received cross-chain transaction, and when the signature verification is passed, the current cross-chain transaction is sent to the transaction verification module; when the signature verification fails, the current cross-link transaction is regarded as an invalid transaction and directly discarded;
step S5: the transaction verification module verifies the cross-chain transaction, and when the verification is successful, the cross-chain transaction is sent to the chain B, and the chain B waits for a receipt executed by the chain B; and after the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback.
Preferably, the BDCP achieves the problem of data inconsistency caused by different consensus algorithms and different encryption algorithms used among heterogeneous chains by crossing chain contracts.
Preferably, the block typing module employs: calculating the determinacy of the blocks in the cross-chain system by using a GRANDPA consensus algorithm, wherein the blocks with the obtained determinacy cannot be forked; and when the certainty reaches a preset value, confirming the current chain-crossing transaction.
Preferably, in the transaction routing module: and maintaining the IP addresses corresponding to the heterogeneous chains, and searching a destination chain B to be forwarded in the current transaction by the transaction routing module according to the destination chain ID in the BDCP data format.
Preferably, in the transaction routing module, a list of execution results of each transaction is maintained, and whether each transaction is executed successfully on the corresponding chain is recorded; when the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
Preferably, in the transaction verification module, a signature of the cross-link transaction is verified, a proof field generated by the cross-link transaction is generated in an SPV manner to verify the validity of the cross-link transaction, and finally, whether the current cross-link transaction is confirmed is verified, and the transaction after transaction verification is routed to the destination of the cross-link transaction.
Preferably, in the rollback/callback module, when the cross-chain transaction is executed with an error on the chain B, and the transaction routing module acquires a failure result or the waiting time is exceeded, the cross-chain transaction is sent to the rollback/callback module, and the rollback operation of the transaction is executed, so that the atomicity of the data is ensured.
The invention provides a connection-oriented reliable inter-link routing cross-link system, which comprises:
module M1: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B;
module M2: the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, signing and sending the BDCP to a block knocking module;
block finalizing module: checking the signature of the cross-chain transaction, judging whether the current cross-chain transaction is confirmed according to whether the block is finalized, and sending the confirmed cross-chain transaction to a transaction routing module;
a transaction routing module: carrying out signature verification on the received cross-link transaction, and sending the current cross-link transaction to a transaction verification module after the signature verification is passed; when the signature verification fails, the current cross-link transaction is regarded as an invalid transaction and directly discarded;
a transaction verification module: verifying the cross-chain transaction, and after the verification is successful, sending the cross-chain transaction to a chain B, and waiting for a receipt executed by the chain B; after the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback;
the BDCP realizes the problem of data inconsistency caused by different consensus algorithms and different encryption algorithms used among heterogeneous chains through cross-chain contract.
Preferably, the block typing module employs: calculating the determinacy of the blocks in the cross-chain system by using a GRANDPA consensus algorithm, wherein the blocks with the obtained determinacy cannot be forked; when the certainty reaches a preset value, the current chain-crossing transaction is confirmed;
in the transaction routing module: maintaining IP addresses corresponding to the heterogeneous chains, and searching a destination chain B to be forwarded in the current transaction by the transaction routing module according to a destination chain ID in a BDCP data format;
in the transaction routing module, maintaining a list of execution results of each transaction, and recording whether each transaction is successfully executed on a corresponding chain; when the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
Preferably, in the transaction verification module, a signature of the cross-link transaction is verified, a proof field generated by the cross-link transaction is generated in an SPV manner to verify the validity of the cross-link transaction, and finally, whether the current cross-link transaction is confirmed is verified, and the transaction after transaction verification is routed to the destination of the cross-link transaction;
in the rollback/callback module, when the cross-chain transaction is executed with an error on the chain B, and the transaction routing module acquires a failure result or the waiting time is out of date, the cross-chain transaction is sent to the rollback/callback module, the rollback operation of the transaction is executed, and the atomicity of the data is ensured.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention reduces the complexity of original cross-link communication from O (n ^2) to O (n);
2. the block finalizing module and the rollback/callback module guarantee the atomicity of data;
3. the block chain Data Communication Protocol (BDCP) solves the problem of inconsistent Data caused by different consensus algorithms and different encryption algorithms used among heterogeneous chains;
4. the block finalization module may determine a final state of the transaction;
5. the transaction verification module can be used for proving the effectiveness of the transaction, and the safety of a cross-chain system is improved;
6. the method can be applied to heterogeneous cross-chain scenes; for example: the cross-chain transfer from the Ether to Venachain, cross-chain contract calling and the like can be realized; the problem of data isolated island existing in the multi-chain at present can be solved.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
FIG. 1 is a schematic diagram of a reliable inter-link route cross-link system oriented to connection.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that it would be obvious to those skilled in the art that various changes and modifications can be made without departing from the spirit of the invention. All falling within the scope of the invention.
Example 1
The invention provides a reliable inter-link route cross-link method facing connection, which comprises the following steps:
step S1: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B;
step S2: the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, and the BDCP is signed and sent to a block knocking module;
step S3: the block finalizing module checks the signature of the cross-chain transaction, judges whether the current cross-chain transaction is confirmed according to whether the block is finalized or not, and sends the confirmed cross-chain transaction to the transaction routing module;
specifically, the block finalizing module employs: calculating the determinacy of the blocks in the cross-chain system by using a GRANDPA consensus algorithm, wherein the blocks with the obtained determinacy cannot be forked; when the certainty reaches a preset value, the current cross-chain transaction is confirmed.
The certainty means that this block is not finally forked, i.e. tampered. When a block is finalized, it gets a certainty.
Step S4: the transaction routing module carries out signature verification on the received cross-link transaction, and when the signature verification is passed, the current cross-link transaction is sent to the transaction verification module; when the signature verification fails, the current cross-link transaction is regarded as an invalid transaction and directly discarded;
specifically, in the transaction routing module: and maintaining the IP addresses corresponding to the heterogeneous chains, and searching a destination chain B to be forwarded in the current transaction by the transaction routing module according to the destination chain ID in the BDCP data format.
More specifically, in the transaction routing module, maintaining a list of execution results of each transaction, and recording whether each transaction is successfully executed on a corresponding chain; when the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
Step S5: the transaction verification module verifies the cross-chain transaction, and when the verification is successful, the cross-chain transaction is sent to the chain B, and the chain B waits for a receipt executed by the chain B; when the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback;
specifically, in the transaction verification module, a signature of the cross-chain transaction is verified, a certification field generated by the cross-chain transaction is generated in an spv (simplified Payment verification) manner to verify the validity of the cross-chain transaction, and finally, whether the current cross-chain transaction is confirmed is verified, and the transaction after transaction verification is routed and forwarded to a destination of the cross-chain transaction. The SPV belongs to one of payment verification systems in a block chain, is a verification means for adapting to simple and quick payment, does not need to download all data of a new block, and only needs to store the head data of the block, wherein the data are stored in the Mercker tree.
Specifically, in the rollback/callback module, when the cross-chain transaction is executed incorrectly on the chain B, and the transaction routing module acquires a failure result or the waiting time is out of date, the cross-chain transaction is sent to the rollback/callback module, the rollback operation of the transaction is executed, and the atomicity of the data is ensured.
The BDCP realizes the problem of data inconsistency caused by different consensus algorithms and different encryption algorithms used among heterogeneous chains through cross-chain contract.
The invention provides a connection-oriented reliable inter-link routing cross-link system, which comprises:
module M1: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B;
module M2: the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, signing and sending the BDCP to a block knocking module;
module M3: the block typing module checks the signature of the cross-chain transaction, judges whether the current cross-chain transaction is confirmed according to whether the block is typed or not, and sends the confirmed cross-chain transaction to the transaction routing module;
specifically, the block finalizing module employs: calculating the determinacy of the blocks in the cross-chain system by using a GRANDPA consensus algorithm, wherein the blocks with the obtained determinacy cannot be forked; and when the certainty reaches a preset value, confirming the current chain-crossing transaction.
The certainty means that this block is not finally forked, i.e. tampered. When a block is finalized, it gets a certainty.
Module M4: the transaction routing module carries out signature verification on the received cross-chain transaction, and when the signature verification is passed, the current cross-chain transaction is sent to the transaction verification module; when the signature verification fails, the current cross-link transaction is regarded as an invalid transaction and directly discarded;
specifically, in the transaction routing module: and maintaining the IP addresses corresponding to the heterogeneous chains, and searching a destination chain B to be forwarded in the current transaction by the transaction routing module according to the destination chain ID in the BDCP data format.
More specifically, in the transaction routing module, maintaining each transaction execution result list, and recording whether each transaction is successfully executed on a corresponding chain; when the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
Module M5: the transaction verification module verifies the cross-chain transaction, and when the verification is successful, the cross-chain transaction is sent to the chain B, and the chain B waits for a receipt executed by the chain B; after the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback;
specifically, in the transaction verification module, a signature of the cross-chain transaction is verified, a certification field generated by the cross-chain transaction is generated in an spv (simplified Payment verification) manner to verify the validity of the cross-chain transaction, and finally, whether the current cross-chain transaction is confirmed is verified, and the transaction after transaction verification is routed and forwarded to a destination of the cross-chain transaction. The SPV belongs to one of payment verification systems in a block chain, is a verification means for adapting to simple and quick payment, does not need to download all data of a new block, and only needs to store the head data of the block, wherein the data are stored in the Mercker tree.
Specifically, in the rollback/callback module, when the cross-chain transaction is executed with an error on the chain B, and the transaction routing module acquires a failure result or the waiting time is exceeded, the cross-chain transaction is sent to the rollback/callback module, and the rollback operation of the transaction is executed, so that the atomicity of data is ensured.
The BDCP realizes the problem of data inconsistency caused by different consensus algorithms and different encryption algorithms used among heterogeneous chains through cross-chain contract.
Example 2
Example 2 is a preferred example of example 1
The invention provides a reliable inter-chain route cross-chain method and system for connection, which are based on a traditional reliable communication protocol TCP protocol for connection and aim at the problems of reliability, atomicity, safety and the like in heterogeneous cross-chains. The invention comprises a transaction routing module, a block finalizing module, a rollback/callback module and a transaction verification module. The system is characterized in that the system is applied to a heterogeneous cross-chain system, communication between every two systems is not required to be carried out independently, all cross-chain systems only need to carry out reliable transmission connection with a transaction routing module, the communication complexity is reduced from O (n ^2) to O (n), and cross-chain data transmission is decoupled from chains. After handshaking with the transaction routing module, all cross-chain transactions can be forwarded through the routing module, and atomicity of transaction execution is guaranteed through the block finalization module and the rollback/callback module. Finally, in order to solve the problem of inconsistent Data Communication formats among heterogeneous chains, the system designs a Blockchain Data Communication Protocol (BDCP), and by using the BDCP, the problem of inconsistent Data caused by different consensus algorithms and different encryption algorithms among heterogeneous chains can be solved.
The block finalize module is a specific module designed for probabilistic consensus used in heterogeneous cross-chain systems. In a heterogeneous cross-chain system, since different blockchain systems use different consensus protocols, such as the endorsement consensus mechanism used by HyperLeger Fabric, the blocky consensus endorsement node is a deterministic consensus mechanism because it finalizes the transaction and is not modified once finalized. But IBFT consensus as used by Venachain, RBFT consensus as used by fun chains, PoW consensus mechanism as used by the inherently smart blockchain network, etc., are all probabilistic consensus in cases where byzantine nodes are allowed to exist. Even if the block is successful at that time, there is eventually a slight probability that the block is forked.
Based on this, the system designs a block finalization module, uses the GRANDPA consensus algorithm to reach the consistency with each heterogeneous chain added into the system, as long as the certainty of the block reaches a certain threshold value, a fine flag bit can be given to the block, which indicates that the block is finalized and will not be forked later.
The module has the characteristics that all common knowledge conditions in a cross-link system are considered, the transaction taking the financial flag bit is a transaction in a definite state, and the rollback and callback operation after the transaction is facilitated.
The rollback/callback module is a coordinated transaction execution method, once a transaction is sent to another chain, an error is executed on the other chain, the transaction is forwarded to the rollback/callback module after the routing module acquires a failure result or the waiting time is overtime, the rollback operation of the transaction is executed, the atomicity of data is guaranteed, and cross-chain transactions on two chains are either successful at the same time or failed at the same time.
The module has the characteristics that the work of rollback and callback is decoupled from the transaction, a rollback method is not required to be included in the transaction, and the complexity of transaction data is reduced. The rollback method is decoupled from the transaction and placed in the rollback/callback module. Meanwhile, similar transaction calling methods can call the same rollback/callback function, so that the reusability of the module is greatly improved.
The transaction routing module is a core module in the system. The cross-chain transaction issued via chain a is first assembled into a BDCP data format (as shown in table 1) and sent to the transaction routing module. In the module, an IP address corresponding To each heterogeneous chain is maintained, and the transaction routing module searches for a destination chain B To which the transaction needs To be forwarded according To the To field in the BDCP sent from the transaction routing module, and waits for a receipt after the transaction is successfully sent. Meanwhile, a list of the execution results of each transaction is maintained in the module, and whether each transaction is executed successfully on the corresponding chain is recorded. If the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
The module is characterized in that the transaction forwarding process is decoupled from chain to multi-chain and route, the complexity of cross-chain is greatly reduced, the communication complexity is reduced from O (n ^2) to O (n), and meanwhile, the cross-chain data transmission is decoupled from chain to chain. After handshaking with the transaction routing module, all cross-chain transactions may be forwarded through the routing module. And all forwarded transactions are reliably forwarded in a connection mode, pass through the signature of the sender and are a reliable transmission mode facing the connection.
TABLE 1 BDCP data Format
Parameter(s) Description of the invention
From Chain of sourcesID
To Destination chain ID
Txhash Hash value of a transaction
Timestamp Time stamp of cross-chain transaction occurrence
Payload Encoding of cross-chain call content
Proof Proof generated for cross-chain transactions
Finality Knock-out mark
Signed Signature of sender
The transaction verification module firstly verifies the signature of the transmitted transaction, then verifies the validity of the transaction in an SPV mode according to the generated proof field, and finally verifies whether the transaction contains a financial flag bit, namely whether the transaction is finalized. The transaction validated is routed to the destination of the cross-chain transaction. The module has the characteristics that the correctness of the transaction can be ensured and the transaction cannot be tampered through three rounds of verification of signature, proof and finance, and meanwhile, the chain safety is guaranteed to a certain extent.
The execution flow chart of the system is shown in fig. 1. The system mainly aims at heterogeneous cross-chain transaction, firstly, a chain A and a chain B are two heterogeneous chains which use different consensus algorithms and have two different encryption standards, and the chain A initiates a cross-chain transaction related to the chain B, for example, a method for calling a certain contract in the chain B, and then the chain A moves to a flow 1 and initiates the cross-chain transaction. The cross-link transaction requires a cross-link contract to be called, the original transaction is converted into a BDCP data format, and the BDCP data format is signed and sent to the block finalization module.
The block finalization module first checks the signature of the transaction and determines whether the transaction will be finalized based on the transaction sent in 2, according to a threshold. For example, in a PBFT-like consensus, if the transaction has received 3/4 commit and passed 12 block consensus, proving that the block has a probability of being close to 1 that can be finalized, the tile finalization module will fill 1 in the fidelity field in the BDCP data structure and re-sign the data structure. And finally, sending the transaction to a transaction routing module.
And the transaction routing module firstly carries out signature verification on the transaction sent by the module 3, then verifies whether the financial field is true, and if the signature passes and the financial field is true, the transaction is sent to the transaction verification module for verification proof. If the verification fails, the transaction is an invalid transaction and is directly discarded.
The transaction verification module verifies the transaction forwarded by the 4 routes by using an SPV simple payment verification method, if the verification is successful, the transaction verification module executes 5.1 to directly forward the transaction to the chain B, waits for the receipt executed by the chain B, and if the verification is failed, the transaction verification module executes 5.2 to forward the transaction to the rollback/callback module for 8 rollback.
Finally, if the transaction is successfully executed on the chain B, the chain B records the execution result of the cross-chain transaction in a result table maintained by the transaction routing module. Only if the cross-chain transaction is successfully executed in both chains, the cross-chain transaction is executed successfully. The transaction routing module can open the subscribed interface at the same time, and the node can monitor the execution result of the cross-chain transaction in real time.
Further, in the transaction routing module, when the receipt of the chain B transaction is acquired, the execution result of the related cross-chain transaction is queried in a manner of monitoring the relevant event receipt in the block header of the chain B. However, with snooping, there may be instances where a missing block is signaled. In order to solve the problem, the transaction routing module may actively want to link B to obtain the transaction receipt at intervals, which can ensure that the transaction will not be lost. Meanwhile, an overtime waiting time is set, and if the transaction receipt is not received in the overtime waiting time, the transaction execution is judged to be failed.
In addition, when the transaction is converted into the BDCP format, the transaction is carried out by calling a cross-chain contract by the nodes, the contract calling mode has the advantages that the method for converting the data can be uniformly abstracted and can be applied to each transaction, and the conversion process and the signature are recorded on the chain. At the same time, however, the use of the contract calls in a manner that also increases the complexity of the system, on the basis of which the contract can be converted into a module, each call for a cross-chain transaction but the node executes this format conversion module after initiating the transaction, converting the transaction into BDCP format.
Those skilled in the art will appreciate that, in addition to implementing the systems, apparatus, and various modules thereof provided by the present invention in purely computer readable program code, the same procedures can be implemented entirely by logically programming method steps such that the systems, apparatus, and various modules thereof are provided in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Therefore, the system, the device and the modules thereof provided by the present invention can be considered as a hardware component, and the modules included in the system, the device and the modules thereof for implementing various programs can also be considered as structures in the hardware component; modules for performing various functions may also be considered to be both software programs for performing the methods and structures within hardware components.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.

Claims (10)

1. A reliable inter-link route cross-link method for connection, comprising:
step S1: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B;
step S2: the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, and the BDCP is signed and sent to a block knocking module;
step S3: the block typing module checks the signature of the cross-chain transaction, judges whether the current cross-chain transaction is confirmed according to whether the block is typed or not, and sends the confirmed cross-chain transaction to the transaction routing module;
step S4: the transaction routing module carries out signature verification on the received cross-chain transaction, and when the signature verification is passed, the current cross-chain transaction is sent to the transaction verification module; when the signature verification fails, the current cross-link transaction is regarded as an invalid transaction and directly discarded;
step S5: the transaction verification module verifies the cross-chain transaction, and when the verification is successful, the cross-chain transaction is sent to the chain B, and the chain B waits for a receipt executed by the chain B; and after the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback.
2. The connection-oriented reliable inter-chain routing cross-chain method according to claim 1, wherein the blockchain data communication protocol BDCP achieves the problem of data inconsistency caused by different consensus algorithms and different encryption algorithms used between heterogeneous chains through cross-chain contract.
3. The connection-oriented reliable inter-chain routing cross-chain method of claim 1, wherein the block finalize module employs: calculating the determinacy of the blocks in the cross-chain system by using a GRANDPA consensus algorithm, wherein the blocks with the obtained determinacy cannot be forked; and when the certainty reaches a preset value, confirming the current chain-crossing transaction.
4. The connection-oriented reliable inter-link routing cross-link method of claim 1, wherein in the transaction routing module: and maintaining the IP addresses corresponding to the heterogeneous chains, and searching a destination chain B to be forwarded in the current transaction by the transaction routing module according to the destination chain ID in the BDCP data format.
5. The connection-oriented reliable inter-chain routing cross-chain method according to claim 1, wherein in the transaction routing module, a list of execution results of each transaction is maintained, and whether each transaction is executed successfully on the corresponding chain is recorded; when the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
6. The connection-oriented reliable inter-link routing and cross-link method according to claim 1, wherein in the transaction verification module, a signature of a cross-link transaction is verified, a proof field generated by the cross-link transaction is generated in an SPV manner to verify validity of the cross-link transaction, and finally, whether the current cross-link transaction is confirmed is verified, and the transaction after transaction verification is routed to a destination of the cross-link transaction.
7. The connection-oriented reliable inter-chain routing chain-crossing method according to claim 1, wherein in the rollback/callback module, when a chain-crossing transaction is executed incorrectly on a chain B, and a transaction routing module obtains a failed result or a waiting time is exceeded, the chain-crossing transaction is sent to the rollback/callback module, a rollback operation of the transaction is executed, and atomicity of data is guaranteed.
8. A connection-oriented reliable inter-link routing cross-link system, comprising:
module M1: when the transaction execution of the chain A is successful, initiating a cross-chain transaction related to the chain B;
module M2: the cross-link transaction is converted into a BDCP data format by calling a cross-link contract and utilizing a BDCP, and the BDCP is signed and sent to a block knocking module;
block finalizing module: checking the signature of the cross-chain transaction, judging whether the current cross-chain transaction is confirmed according to whether the block is finalized, and sending the confirmed cross-chain transaction to a transaction routing module;
a transaction routing module: carrying out signature verification on the received cross-link transaction, and sending the current cross-link transaction to a transaction verification module after the signature verification is passed; when the signature verification fails, the current cross-link transaction is regarded as an invalid transaction and directly discarded;
a transaction verification module: verifying the cross-chain transaction, and after the verification is successful, sending the cross-chain transaction to a chain B, and waiting for a receipt executed by the chain B; after the verification fails, forwarding the cross-chain transaction to a rollback/callback module for rollback or callback;
the BDCP realizes the problem of data inconsistency caused by different consensus algorithms and different encryption algorithms used among heterogeneous chains through cross-chain contract.
9. The connection-oriented reliable inter-chain routing cross-chain system of claim 8, wherein the block finalization module employs: calculating determinism of blocks in the cross-chain system by using a GRANDPA consensus algorithm, wherein the blocks with the obtained determinism can not be forked; when the certainty reaches a preset value, the current chain-crossing transaction is confirmed;
in the transaction routing module: maintaining IP addresses corresponding to the heterogeneous chains, and searching a destination chain B to be forwarded in the current transaction by the transaction routing module according to a destination chain ID in a BDCP data format;
in the transaction routing module, maintaining a list of execution results of each transaction, and recording whether each transaction is successfully executed on a corresponding chain; when the cross-chain transaction is successfully executed on both chains, the cross-chain transaction is finally successfully executed.
10. The connection-oriented reliable inter-link routing and cross-link system according to claim 8, wherein in the transaction verification module, a signature of a cross-link transaction is verified, a proof field generated by the cross-link transaction is generated in an SPV manner to verify the validity of the cross-link transaction, and finally, whether the current cross-link transaction is confirmed is verified, and the transaction after transaction verification is routed to the destination of the cross-link transaction;
in the rollback/callback module, when the cross-chain transaction is executed with an error on the chain B, and the transaction routing module acquires a failure result or the waiting time is out of date, the cross-chain transaction is sent to the rollback/callback module, the rollback operation of the transaction is executed, and the atomicity of the data is ensured.
CN202210264255.3A 2022-03-17 2022-03-17 Reliable inter-link route cross-link method and system for connection Pending CN114612101A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210264255.3A CN114612101A (en) 2022-03-17 2022-03-17 Reliable inter-link route cross-link method and system for connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210264255.3A CN114612101A (en) 2022-03-17 2022-03-17 Reliable inter-link route cross-link method and system for connection

Publications (1)

Publication Number Publication Date
CN114612101A true CN114612101A (en) 2022-06-10

Family

ID=81865066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210264255.3A Pending CN114612101A (en) 2022-03-17 2022-03-17 Reliable inter-link route cross-link method and system for connection

Country Status (1)

Country Link
CN (1) CN114612101A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835531A (en) * 2021-02-25 2021-05-25 平安银行股份有限公司 Data pushing method, device, equipment and storage medium
CN115334172A (en) * 2022-07-20 2022-11-11 林郁芳 Block chain protocol processing system and processing method thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835531A (en) * 2021-02-25 2021-05-25 平安银行股份有限公司 Data pushing method, device, equipment and storage medium
CN115334172A (en) * 2022-07-20 2022-11-11 林郁芳 Block chain protocol processing system and processing method thereof
CN115334172B (en) * 2022-07-20 2024-04-19 新疆丝路智汇信息科技有限公司 Block chain protocol processing system and processing method thereof

Similar Documents

Publication Publication Date Title
CN112685796B (en) Block chain-based block consensus method and related equipment
CN114612101A (en) Reliable inter-link route cross-link method and system for connection
CN111010376B (en) Master-slave chain-based Internet of things authentication system and method
CN109101664B (en) Data transmission method, device, equipment and medium for lightweight node
CN109194493B (en) Information management system, method and device
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN112055088B (en) Optical shutter-based file reliable transmission system and method thereof
CN110968899B (en) Data blocking confirmation method, device, equipment and medium based on block chain
WO2023168993A1 (en) Blockchain-based data processing method, apparatus, and device, medium, and product
CN116955355A (en) Block data processing method and device and electronic equipment
WO2022227472A1 (en) Communication method and apparatus based on dual channel and rssp-i, and electronic device and storage medium
CN114244537B (en) Information processing system based on cross-link communication and multi-link fusion
CN111932326B (en) Data processing method based on block chain network and related equipment
CN108933681B (en) Configuration updating method of cloud computing system, control center and cloud computing node
CN111756548A (en) Node consensus mechanism optimization method, system, device and storage medium
CN115633044B (en) Message processing method and device, electronic equipment and storage medium
US11405827B2 (en) Storage method of digital files carried out by a determinist avionic network with predetermined routing, and associated avionic communication system
CN117971834A (en) Collaborative storage method and system based on blockchain
CN117032998B (en) Block chain-based data processing method and device and readable storage medium
CN115766037B (en) Cross-chain transaction method based on block chain
CN113609532B (en) Data integrity checking method and device, computer equipment and storage medium
CN112600874B (en) Node joining method and device, electronic equipment and readable storage medium
CN116361282A (en) Data processing method, device, related equipment and storage medium
JP3164207B2 (en) Network operation information management method
CN115601168A (en) Cross-link asset transaction method, system and equipment based on relay link

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