Cross-chain transaction verification method, device, electronic device, system and storage medium

By using signature information to verify cross-chain transactions on the destination blockchain node, the security problem of cross-chain transactions is solved, ensuring that the transaction information has not been tampered with, and the secure execution of cross-chain transactions is achieved.

CN114493862BActive Publication Date: 2024-11-22HANGZHOU QULIAN TECHNOLOGY CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202111642216.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2024-11-22
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

In the prior art, the security of cross-chain transactions cannot be guaranteed, especially when cross-chain gateways do evil, they may tamper with the call information of cross-chain transactions, resulting in the modification of transaction parameters, contracts and methods.

Method used

By obtaining cross-chain transaction information carrying signature information on the destination blockchain node, verifying based on the signature information, and determining whether the cross-chain transaction information is executed. This verification process can ensure the legality and validity of signature information by calling a cross-chain management contract and using a multi-signature verification mechanism, thereby ensuring the security of cross-chain transactions.

Benefits of technology

It effectively ensures that cross-chain transaction information has not been tampered with, ensures the security of cross-chain transactions, and prevents cross-chain gateway from maliciously modifying transaction parameters and calling methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114493862B_ABST
    Figure CN114493862B_ABST
Patent Text Reader

Abstract

The present application relates to a verification method, device, electronic device and storage medium for a cross-chain transaction, which is applied to a destination blockchain node. The verification method for the cross-chain transaction includes: obtaining cross-chain transaction information carrying signature information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method and parameters of the cross-chain transaction calling method; verifying the cross-chain transaction information based on the signature information to obtain a verification result; and determining whether to execute the transaction corresponding to the cross-chain transaction information based on the verification result. In the present application, the destination blockchain node verifies the cross-chain transaction information based on the signature information carried in the obtained cross-chain transaction information to ensure that the cross-chain transaction information has not been tampered with and to ensure the security of the cross-chain transaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a method, device, electronic device, system and storage medium for verifying cross-chain transactions. Background Art

[0002] In the current implementation of cross-chain transactions based on the relay chain, after the cross-chain gateway receives the cross-chain transaction sent by the relay chain, it verifies the existence and validity of the cross-chain transaction in the relay chain, and after the verification is passed, it directly assembles the transaction of the corresponding application chain (i.e., the target blockchain) according to the cross-chain call information of the received cross-chain transaction, and submits the transaction to the corresponding application chain. In this implementation, the security and validity of the cross-chain transaction are guaranteed by the cross-chain gateway, that is, the application chain relies on the cross-chain gateway to ensure the security of the cross-chain transaction. If the cross-chain gateway does something malicious, such as tampering with the call information of the cross-chain transaction, to construct any qualified cross-chain transaction and call the application chain. At this time, the transaction parameters, call contracts, call methods, etc. of the cross-chain transaction may be modified, and the security of the cross-chain transaction cannot be guaranteed. Summary of the invention

[0003] The present application provides a cross-chain transaction verification method, device, electronic device, system and storage medium to solve the problem that the security of cross-chain transactions cannot be guaranteed.

[0004] In a first aspect, the present application provides a cross-chain transaction verification method, which is applied to a destination blockchain node, and the method includes:

[0005] Obtain cross-chain transaction information carrying signature information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0006] Verify the cross-chain transaction information based on the signature information to obtain a verification result;

[0007] According to the verification result, determine whether to execute the transaction corresponding to the cross-chain transaction information.

[0008] Optionally, the verifying the cross-chain transaction information based on the signature information to obtain a verification result includes:

[0009] By calling the cross-chain management contract, the cross-chain transaction information is verified based on the signature information to obtain a verification result.

[0010] Optionally, the signature information includes addresses of a preset number of relay nodes and signatures of the preset number of relay nodes, and the preset number is greater than a preset number threshold;

[0011] The verifying the cross-chain transaction information based on the signature information to obtain a verification result includes:

[0012] If the addresses of the preset number of relay nodes all belong to the address set of the locally stored relay nodes, the number of the addresses of the preset number of relay nodes exceeds the preset number threshold, the types of the signatures of the preset number of relay nodes are the preset signature types, and the signatures of the preset number of relay nodes are legal, then it is determined that the verification result is verification passed;

[0013] The locally stored relay node address set includes addresses of relay nodes that have passed verification in the same block.

[0014] Optionally, the method further comprises:

[0015] Obtaining a relay node address update request carrying the signature information;

[0016] The relay node address update request is verified, and if the verification is successful, the address in the locally stored relay node address set is updated.

[0017] In a second aspect, the present application provides a cross-chain transaction verification method, which is applied to a cross-chain gateway. The cross-chain transaction verification method includes:

[0018] Obtain cross-chain transaction information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0019] Verify the cross-chain transaction information, and after the verification is passed, send a signature request to the relay node based on the cross-chain transaction information to obtain signature information;

[0020] The cross-chain transaction information carrying the signature information is sent to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information.

[0021] Optionally, the method further comprises:

[0022] Obtaining a relay node address update request, wherein the update request includes the signature information;

[0023] The relay node address update request is verified. If the verification is successful, the relay node address update request is sent to the destination blockchain node so that the destination blockchain node updates the address in the locally stored relay node address set.

[0024] In a third aspect, the present application provides a cross-chain transaction verification method, which is applied to a relay node, and the method includes:

[0025] Obtain cross-chain transaction information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0026] Verify the cross-chain transaction information, and after verification, send the cross-chain transaction information to the cross-chain gateway;

[0027] In response to the acquired signature request, the signature information is sent to the cross-chain gateway, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information.

[0028] In a fourth aspect, an embodiment of the present application proposes a cross-chain transaction verification system, the system comprising a destination blockchain node, a cross-chain gateway, and a relay node;

[0029] The relay node is used to verify the obtained cross-chain transaction information, and after the verification is passed, send the cross-chain transaction information to the cross-chain gateway; the cross-chain transaction information includes the source blockchain identifier, the destination blockchain identifier, the cross-chain transaction identifier, the cross-chain transaction calling method and the parameters of the cross-chain transaction calling method;

[0030] The cross-chain gateway is used to verify the obtained cross-chain transaction information, and after the verification is passed, send a signature request to the relay node based on the cross-chain transaction information to obtain signature information;

[0031] The relay node is used to send the signature information to the cross-chain gateway in response to the acquired signature request, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information;

[0032] The cross-chain gateway is used to send the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information;

[0033] The destination blockchain node is used to obtain cross-chain transaction information carrying signature information; verify the cross-chain transaction information based on the signature information to obtain a verification result; and determine whether to execute the transaction corresponding to the cross-chain transaction information based on the verification result.

[0034] In a fifth aspect, the present application provides a cross-chain transaction verification device, the device comprising:

[0035] An acquisition module, used to acquire cross-chain transaction information carrying signature information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0036] A verification module, used to verify the cross-chain transaction information based on the signature information to obtain a verification result;

[0037] An execution module is used to determine whether to execute the transaction corresponding to the cross-chain transaction information according to the verification result.

[0038] In a sixth aspect, the present application provides a cross-chain transaction verification device, the device comprising:

[0039] An acquisition module, used to acquire cross-chain transaction information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0040] A verification module, used to verify the cross-chain transaction information and obtain a verification result;

[0041] The acquisition module is further configured to acquire signature information based on the cross-chain transaction information if the verification result is verification passed;

[0042] The sending module is used to send the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information.

[0043] In a seventh aspect, the present application provides a cross-chain transaction verification device, the device comprising:

[0044] An acquisition module, used to acquire cross-chain transaction information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0045] A verification module, used to verify the cross-chain transaction information and obtain a verification result;

[0046] A sending module, configured to send the cross-chain transaction information to the cross-chain gateway if the verification result is passed;

[0047] The sending module is also used to send the signature information to the cross-chain gateway in response to the acquired signature request, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information.

[0048] In an eighth aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0049] Memory, used to store computer programs;

[0050] The processor is used to implement the steps of the cross-chain transaction verification method described in any one of the embodiments of the first aspect to the third aspect when executing the program stored in the memory.

[0051] In the ninth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the cross-chain transaction verification method as described in any one of the embodiments of the first aspect to the third aspect are implemented.

[0052] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0053] The cross-chain transaction verification method provided in the embodiment of the present application is that the destination blockchain node verifies the cross-chain transaction information based on the signature information carried in the obtained cross-chain transaction information to ensure that the cross-chain transaction information has not been tampered with and to ensure the security of the cross-chain transaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0056] Figure 1 A flowchart of a method for verifying a cross-chain transaction in a target blockchain node provided in an embodiment of the present application;

[0057] Figure 2 A flowchart of a verification method for a cross-chain transaction applied to a cross-chain gateway provided in an embodiment of the present application;

[0058] Figure 3 A flowchart of a verification method for cross-chain transactions in a relay node provided in an embodiment of the present application;

[0059] Figure 4 A schematic diagram of a cross-chain transaction verification system provided in an embodiment of the present application Figure 1 ;

[0060] Figure 5 A schematic diagram of a cross-chain transaction verification system provided in an embodiment of the present application Figure 2 ;

[0061] Figure 6 Schematic diagram of a cross-chain transaction verification device provided in an embodiment of the present application Figure 1 ;

[0062] Figure 7 Schematic diagram of a cross-chain transaction verification device provided in an embodiment of the present application Figure 2 ;

[0063] Figure 8 Schematic diagram of a cross-chain transaction verification device provided in an embodiment of the present application Figure 3 ;

[0064] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0066] In order to solve the problem that the security of cross-chain transactions cannot be guaranteed, the embodiment of the present application provides a cross-chain transaction verification method, which is applied to the destination blockchain node, such as Figure 1 As shown, the verification method of the cross-chain transaction includes steps 101 to 103:

[0067] Step 101: Obtain cross-chain transaction information carrying signature information.

[0068] Among them, the cross-chain transaction information (that is, the above-mentioned cross-chain call information) includes the source blockchain identifier, the destination blockchain identifier, the cross-chain transaction identifier, the cross-chain transaction call method and the parameters of the cross-chain transaction call method.

[0069] Optionally, obtain cross-chain transaction information carrying signature information sent by the cross-chain gateway.

[0070] Step 102: Verify the cross-chain transaction information based on the signature information to obtain a verification result.

[0071] In one possible implementation, by calling the cross-chain management contract, the corresponding cross-chain transaction information, i.e., the cross-chain transaction information carrying the signature information, is verified based on the signature information to obtain a verification result.

[0072] Generally, the cross-chain management contract is deployed on the application chain, that is, the destination blockchain node. The above-mentioned call to the cross-chain management contract is to submit a cross-chain transaction to the destination blockchain node. Subsequently, the cross-chain management contract performs signature verification of the cross-chain transaction. When the signature information is multi-signature information, the signature verification is multi-signature verification.

[0073] In a possible implementation, the signature information is multi-signature information. That is, the signature information includes signatures of a preset number of relay nodes. In addition, the signature information also includes the addresses of the preset number of relay nodes corresponding to the signatures of the preset number of relay nodes. The relay node is also the relay chain mentioned above, or it can be said to be a repeater, relay device, etc. In addition, the preset number is greater than or equal to the preset number threshold.

[0074] Exemplarily, the signature information includes the address of relay node 1, the address of relay node 2, the signature of relay node 1 for cross-chain transaction 1, and the signature of relay node 2 for cross-chain transaction 2. Possibly, the signature information also includes the signature of relay node 1 for cross-chain transaction 3, etc.

[0075] At this time, in the process of verifying the cross-chain transaction information based on the signature information and obtaining the verification result, if the addresses of the preset number of relay nodes in the signature information all belong to the address set of the locally stored relay nodes, the signature type of the preset number of relay nodes is the preset signature type, and the signature of the preset number of relay nodes is legal, then the verification result is determined to be passed. Among them, the address set of the locally stored relay nodes includes the addresses of the relay nodes that have passed the verification in the same block.

[0076] In a possible implementation, the legality of the signatures of the preset number of relay nodes means that the signatures of the preset number of relay nodes are consistent with the signatures of the locally stored relay nodes. If the signature of a relay node is inconsistent with the signature of the locally stored relay node, it means that the signature of the relay node is illegal, that is, the signatures of the preset number of relay nodes are illegal.

[0077] Of course, if there is an address that does not belong to the address set of the locally stored relay nodes among the addresses of the preset number of relay nodes in the signature information, the verification result is determined to be unsuccessful. Alternatively, if the signature type of the relay node in the signature information is not the corresponding preset signature type, the verification result is determined to be unsuccessful, or if there is an illegal signature among the signatures of the preset number of relay nodes, the verification result is determined to be unsuccessful.

[0078] It should be noted that the above-mentioned preset quantity threshold and preset signature type can be predetermined or determined according to actual working conditions. Exemplarily, the preset quantity threshold can be determined by different consensus algorithms. In addition, the preset quantity can be predetermined or determined according to actual working conditions.

[0079] In one possible implementation, after the cross-chain management contract is deployed on the destination blockchain node, the address set and other information of the relay nodes stored locally on the destination blockchain node are initialized, and then, based on the received address update request, the address set and other information of the relay nodes stored locally are updated.

[0080] During the update process, the destination blockchain node obtains the relay node address update request carrying the signature information, and verifies the relay node address update request. If the verification is successful, the address in the address set of the locally stored relay node is updated. On the contrary, if the verification fails, it is not updated. The specific verification process, that is, the process of verifying the signature information, can be found in the above content and will not be repeated here.

[0081] In other words, relay nodes are dynamically changing. When the number of relay nodes changes, the target blockchain node updates the relay nodes through the cross-chain management contract. This update process can be verified by the above-mentioned signature information to achieve permission control and ensure the security of updating the address set of relay nodes stored locally in the target blockchain node.

[0082] Specifically, the acquired address update request also includes the address of the updated relay node, that is, the address of the relay node that needs to be added to the address set of relay nodes stored locally, or the address of the relay node that has passed the verification.

[0083] It should be noted that when cross-chain transactions need to call the destination blockchain node, multiple contracts may be involved. The destination blockchain node needs to write corresponding verification logic for each contract called for verification, which is a relatively cumbersome operation. However, unified verification through cross-chain management contracts can effectively reduce verification costs and usage costs and simplify operations.

[0084] Step 103: Determine whether to execute the transaction corresponding to the cross-chain transaction information based on the verification result.

[0085] Optionally, if the verification result is that the verification is passed, the transaction corresponding to the cross-chain transaction information is executed; if the verification result is that the verification is failed, the transaction corresponding to the cross-chain transaction information is not executed.

[0086] It should be noted that, through the above process, the destination blockchain node verifies the cross-chain transaction information based on the signature information carried in the obtained cross-chain transaction information to ensure that the cross-chain transaction information has not been tampered with and to ensure the security of the cross-chain transaction.

[0087] In order to solve the problem that the security of cross-chain transactions cannot be guaranteed, the embodiment of the present application provides a cross-chain transaction verification method, which is applied to the cross-chain gateway, such as Figure 2 As shown, the verification method of the cross-chain transaction includes steps 201 to 203:

[0088] Step 201: Obtain cross-chain transaction information.

[0089] Among them, the cross-chain transaction information includes the source blockchain identifier, the destination blockchain identifier, the cross-chain transaction identifier, the cross-chain transaction calling method, and the parameters of the cross-chain transaction calling method.

[0090] Optionally, obtain cross-chain transaction information sent by the relay node.

[0091] Step 202: Verify the cross-chain transaction information, and after the verification is passed, send a signature request to the relay node based on the cross-chain transaction information to obtain the signature information.

[0092] For the introduction of signature information, please refer to the above content. In addition, the relay node is the relay node that sends the cross-chain transaction information.

[0093] In one possible implementation, the cross-chain gateway requests multi-signatures from the relay node based on the obtained list of identifications of the cross-chain transactions that have passed the check in the same block and the type of the cross-chain transactions.

[0094] Through this step, the cross-chain gateway verifies the validity of the cross-chain transaction information it receives, and after the verification is passed, it determines that the relay node has not maliciously modified the cross-chain transaction information, that is, the transmission link between the relay node and the cross-chain gateway is safe. Subsequently, a signature request is sent to the relay node based on the cross-chain transaction information to obtain the signature information. This validity verification process can be referred to the prior art and will not be described here.

[0095] Step 203: Send the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information.

[0096] In a possible implementation, a relay node address update request is obtained from a relay node, and the update request includes signature information. Subsequently, the relay node address update request is verified, and if the verification is successful, the relay node address update request is sent to the destination blockchain node, so that the destination blockchain node updates the address in the address set of the relay node stored locally.

[0097] In another possible implementation, the relay node address update request is verified, and after the verification is passed, the signature information is obtained from the relay node, and the relay node address update request carrying the signature information is sent to the destination blockchain node.

[0098] It should be noted that, through the above process, the destination blockchain node verifies the cross-chain transaction information based on the signature information carried in the obtained cross-chain transaction information to ensure that the cross-chain transaction information has not been tampered with and to ensure the security of the cross-chain transaction.

[0099] In order to solve the problem that the security of cross-chain transactions cannot be guaranteed, the embodiment of the present application provides a cross-chain transaction verification method, which is applied to relay nodes, such as Figure 3 As shown, the verification method of the cross-chain transaction includes steps 301 to 303:

[0100] Step 301: Obtain cross-chain transaction information.

[0101] Among them, the introduction of cross-chain transaction information can be found in the above content.

[0102] Optionally, cross-chain transaction information sent by the source blockchain node through a cross-chain gateway is obtained, where the cross-chain gateway is a cross-chain gateway between the source blockchain node and the relay node.

[0103] Step 302: Verify the cross-chain transaction information, and after the verification is passed, send the cross-chain transaction information to the cross-chain gateway.

[0104] Among them, the verification is a validity verification, which is used to determine whether the transmission link between the source chain and the relay node is safe, or whether the cross-chain transaction information has been tampered with by the cross-chain gateway between the source chain and the relay node. If the verification is passed, it means that the transmission link between the source chain and the relay node is safe, or that the cross-chain transaction information has not been tampered with by the cross-chain gateway between the source chain and the relay node. This validity verification process can be referred to the prior art and will not be repeated here.

[0105] Step 303: In response to the acquired signature request, the signature information is sent to the cross-chain gateway, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information.

[0106] In a possible implementation, the relay node may also sign the obtained cross-chain transaction information to obtain the signature in the signature information. The content contained in the cross-chain transaction information is the content that needs to be signed and encrypted.

[0107] Exemplarily, the fields that need to be encrypted by the relay node include From: source chain (or source blockchain) identity (identity, ID), To: destination chain (or destination blockchain) identity, Index: cross-chain transaction sequence number (or cross-chain transaction identifier), Func: cross-chain call method, and Args: parameters of the cross-chain call method. Among them, the above fields can be serialized by using the solidity.encodePacked() function. It should be noted that the int type field needs to use big endian byte order.

[0108] It should be noted that the information signed through the relay chain can also be determined according to actual needs.

[0109] In one possible implementation, in order to ensure that multi-signature verification can be performed through the cross-chain management contract, the signature of the cross-chain transaction and the method of verifying the signature need to be defined in advance. In other words, the information that needs to be signed needs to be determined in advance. After the cross-chain management contract is deployed, the corresponding information in the cross-chain transaction is signed according to the predetermined signature rules, that is, what information to sign and how to sign.

[0110] In one possible implementation, a relay node address update request is sent to a destination blockchain node through a cross-chain gateway so that the destination blockchain node updates the address in the locally stored relay node address set.

[0111] It should be noted that, through the above process, the destination blockchain node verifies the cross-chain transaction information based on the signature information carried in the obtained cross-chain transaction information to ensure that the cross-chain transaction information has not been tampered with and to ensure the security of the cross-chain transaction.

[0112] like Figure 4 As shown, an embodiment of the present application provides a cross-chain transaction verification system, which includes a destination blockchain node 401, a cross-chain gateway 402 and a relay node 403.

[0113] The relay node is used to verify the validity of the obtained cross-chain transaction information, and after the verification is passed, the cross-chain transaction information is sent to the cross-chain gateway; the cross-chain transaction information includes the source blockchain identifier, the destination blockchain identifier, the cross-chain transaction identifier, the cross-chain transaction calling method and the parameters of the cross-chain transaction calling method. Among them, the cross-chain transaction information obtained by the relay node is sent by the source blockchain node through the cross-chain gateway, which is the cross-chain gateway between the source blockchain node and the relay node, and the cross-chain gateway that receives the cross-chain transaction information sent by the relay node is the gateway between the relay node and the destination blockchain node.

[0114] Among them, the above-mentioned relay node verifies the validity of the obtained cross-chain transaction information by verifying whether the signature of the cross-chain transaction is correct, so as to determine whether the cross-chain transaction information received by the relay node is the cross-chain transaction information thrown by the source chain.

[0115] The cross-chain gateway is used to verify the obtained cross-chain transaction information, and after the verification is passed, send a signature request to the relay node based on the cross-chain transaction information to obtain the signature information. The cross-chain gateway is a cross-chain gateway between the relay node and the destination blockchain node, and the cross-chain transaction information obtained by the cross-chain gateway is obtained from the relay node.

[0116] Among them, the verification of the obtained cross-chain transaction information by the above-mentioned cross-chain gateway can be to verify whether the signature of the cross-chain transaction is correct, so as to determine whether the cross-chain transaction information received by the cross-chain gateway is the cross-chain transaction information thrown by the relay node.

[0117] The relay node is used to send the signature information to the cross-chain gateway in response to the obtained signature request, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information; wherein the signature request obtained by the relay node is sent by the relay node and the destination blockchain node.

[0118] The cross-chain gateway is used to send the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information;

[0119] The destination blockchain node is used to obtain cross-chain transaction information carrying signature information; verify the cross-chain transaction information based on the signature information to obtain a verification result; and determine whether to execute the transaction corresponding to the cross-chain transaction information based on the verification result.

[0120] For example, Figure 5As shown, the verification system of the cross-chain transaction includes application chain A, application chain B, the first cross-chain gateway, the second cross-chain gateway, and the relay node. Application chain A sends the cross-chain transaction information to the first cross-chain gateway, that is, listens to submit the cross-chain transaction to the first cross-chain gateway. Subsequently, the first cross-chain gateway sends the cross-chain transaction information to the relay node, that is, submits the cross-chain transaction to the relay node. Among them, the relay node includes at least one device, for example, this at least one device includes node 1, node 2 and node 3, and the at least one device communicates through the universal cross-chain transmission protocol IBTP. Subsequently, the relay node synchronously executes the cross-chain transaction, that is, sends the cross-chain transaction information to the second cross-chain gateway, and after the second cross-chain gateway verifies the received cross-chain transaction information, it obtains the multi-signature information corresponding to the cross-chain transaction information from the corresponding relay node through, for example, a relay request, that is, the multi-signature information of the cross-chain transaction corresponding to the cross-chain transaction information is located in the same block. In response to the received signature request, the relay node sends the corresponding multi-signature information to the second cross-chain gateway, so that the second cross-chain gateway sends the cross-chain transaction information carrying the signature information to application chain B, that is, the second cross-chain gateway submits the cross-chain transaction carrying the multi-signature information to application chain B. Finally, application chain B receives the cross-chain transaction information carrying the signature information sent by the second cross-chain gateway, and verifies the cross-chain transaction information based on the signature information, so as to execute the corresponding cross-chain transaction after the verification is passed, such as payment, updating the address set of the locally stored relay node.

[0121] like Figure 6 As shown, an embodiment of the present application provides a verification device for cross-chain transactions, which includes an acquisition module 601, a verification module 602 and an execution module 603.

[0122] Among them, the acquisition module 601 is used to obtain cross-chain transaction information carrying signature information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0123] A verification module 602 is used to verify the cross-chain transaction information based on the signature information to obtain a verification result;

[0124] The execution module 603 is used to determine whether to execute the transaction corresponding to the cross-chain transaction information according to the verification result.

[0125] like Figure 7 As shown, an embodiment of the present application provides a verification device for cross-chain transactions, which includes an acquisition module 701, a verification module 702 and a sending module 703.

[0126] The acquisition module 701 is used to acquire cross-chain transaction information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0127] Verification module 702, used to verify the cross-chain transaction information and obtain a verification result;

[0128] The acquisition module 701 is further configured to acquire signature information based on the cross-chain transaction information if the verification result is verification passed;

[0129] The sending module 703 is used to send the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information.

[0130] like Figure 8 As shown, an embodiment of the present application provides a verification device for cross-chain transactions, which includes an acquisition module 801, a verification module 802 and a sending module 803.

[0131] Among them, the acquisition module 801 is used to obtain cross-chain transaction information; the cross-chain transaction information includes a source blockchain identifier, a destination blockchain identifier, a cross-chain transaction identifier, a cross-chain transaction calling method, and parameters of the cross-chain transaction calling method;

[0132] Verification module 802, used to verify the cross-chain transaction information and obtain a verification result;

[0133] The sending module 803 is used to send the cross-chain transaction information to the cross-chain gateway if the verification result is passed;

[0134] The sending module 803 is also used to send the signature information to the cross-chain gateway in response to the acquired signature request, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information.

[0135] like Fig. 9 As shown, an embodiment of the present application provides an electronic device, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0136] Memory 903, used for storing computer programs;

[0137] In one embodiment of the present application, the processor 901 is used to implement the steps of the cross-chain transaction verification method provided by any of the aforementioned method embodiments when executing the program stored in the memory 903.

[0138] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the cross-chain transaction method provided in any of the aforementioned method embodiments are implemented.

[0139] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0140] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A cross-chain transaction verification method, characterized in that: The method comprises: The relay node verifies the obtained cross-chain transaction information, and after the verification is passed, sends the cross-chain transaction information to the cross-chain gateway; the cross-chain transaction information includes the source blockchain identifier, the destination blockchain identifier, the cross-chain transaction identifier, the cross-chain transaction calling method, and the parameters of the cross-chain transaction calling method; The cross-chain gateway verifies the cross-chain transaction information, and after the verification is passed, sends a signature request to the relay node based on the cross-chain transaction information to obtain signature information; The relay node sends the signature information to the cross-chain gateway in response to the acquired signature request, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information; The cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information; The destination blockchain node obtains cross-chain transaction information carrying signature information; verifies the cross-chain transaction information based on the signature information to obtain a verification result; determines whether to execute the transaction corresponding to the cross-chain transaction information based on the verification result; wherein the signature information includes the addresses of a preset number of relay nodes and the signatures of the preset number of relay nodes, and the preset number is greater than a preset number threshold; verifies the cross-chain transaction information based on the signature information to obtain a verification result, including: when the addresses of the preset number of relay nodes all belong to the address set of locally stored relay nodes, the type of the signatures of the preset number of relay nodes is a preset signature type, and the signatures of the preset number of relay nodes are legal, then the verification result is determined to be passed; wherein the address set of locally stored relay nodes includes the addresses of the relay nodes that have passed the verification in the same block.

2. The cross-chain transaction verification method according to claim 1, characterized in that: The verifying the cross-chain transaction information based on the signature information to obtain a verification result includes: By calling the cross-chain management contract, the cross-chain transaction information is verified based on the signature information to obtain a verification result.

3. The cross-chain transaction verification method according to claim 1 or 2, characterized in that: The method further comprises: The destination blockchain node obtains a relay node address update request carrying the signature information; verifies the relay node address update request, and if the verification passes, updates the address in the locally stored relay node address set.

4. The cross-chain transaction verification method according to claim 1, characterized in that: The method further comprises: The cross-chain gateway obtains a relay node address update request, which includes the signature information; verifies the relay node address update request, and if the verification passes, sends the relay node address update request to the destination blockchain node, so that the destination blockchain node updates the address in the address set of the locally stored relay node.

5. A cross-chain transaction verification system, characterized in that: The system includes a destination blockchain node, a cross-chain gateway, and a relay node; The relay node is used to verify the obtained cross-chain transaction information, and after the verification is passed, send the cross-chain transaction information to the cross-chain gateway; the cross-chain transaction information includes the source blockchain identifier, the destination blockchain identifier, the cross-chain transaction identifier, the cross-chain transaction calling method and the parameters of the cross-chain transaction calling method; The cross-chain gateway is used to verify the obtained cross-chain transaction information, and after the verification is passed, send a signature request to the relay node based on the cross-chain transaction information to obtain signature information; The relay node is used to send the signature information to the cross-chain gateway in response to the acquired signature request, so that the cross-chain gateway sends the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information; The cross-chain gateway is used to send the cross-chain transaction information carrying the signature information to the destination blockchain node corresponding to the cross-chain transaction information, so that the destination blockchain node can verify the cross-chain transaction information carrying the signature information; The destination blockchain node is used to obtain cross-chain transaction information carrying signature information; verify the cross-chain transaction information based on the signature information to obtain a verification result; determine whether to execute the transaction corresponding to the cross-chain transaction information based on the verification result; wherein the signature information includes the addresses of a preset number of relay nodes and the signatures of the preset number of relay nodes, and the preset number is greater than a preset number threshold; the cross-chain transaction information is verified based on the signature information to obtain a verification result, including: when the addresses of the preset number of relay nodes all belong to the address set of locally stored relay nodes, the type of the signatures of the preset number of relay nodes is a preset signature type, and the signatures of the preset number of relay nodes are legal, then the verification result is determined to be passed; wherein the address set of locally stored relay nodes includes the addresses of the relay nodes that have passed the verification in the same block.

6. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, configured to implement the steps of the cross-chain transaction verification method according to any one of claims 1 to 4 when executing a program stored in a memory.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the cross-chain transaction verification method as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Blockchain-based cross-chain interconnection method, device and system

    CN110266655A

  • Cross-chain method and system for blockchain transaction, equipment and storage medium

    CN110751475A

  • Cross-chain transaction verification method of heterogeneous block chain, engine, equipment and storage medium

    CN110766408A

  • Cross-chain transaction method and device based on block chain and computer readable storage medium

    CN112200682A

  • Cross-chain transaction method, system and device, equipment and storage medium

    CN112446785A