A cross-chain system based on relay chains
The relay chain-based cross-chain system enables efficient and secure cross-chain transactions between different blockchains, solving the interoperability problem in blockchain interoperability technology, providing unified protocols and rules, and ensuring the reliability and consistency of cross-chain transactions.
Patent Information
- Application Number
- CN202311370934.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-10-23
AI Technical Summary
Existing blockchain interoperability technologies face interoperability challenges due to differences in underlying architecture, data structure, interface protocols, security mechanisms, and business models. This results in low interoperability and security between blockchains, making it difficult to achieve efficient and secure cross-chain transactions.
A cross-chain system based on a relay chain is adopted, including a cross-chain module, a relay chain, and an access chain. The cross-chain module communicates and connects with the access chain, while the relay chain acts as an intermediate layer to connect different blockchain networks, providing unified protocols and rules to realize the verification, execution, and data transmission of cross-chain transactions.
It enables efficient and secure cross-chain communication and data interaction between different blockchains, providing seamless data transmission and a unified protocol, thus solving the interoperability and security issues in blockchain interoperability technology.
Smart Images

Figure CN117440032B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a cross-chain system based on a relay chain. Background Technology
[0002] With the rapid development of blockchain technology, an increasing number of blockchain networks are being created and applied in various fields. However, interoperability between these blockchain networks remains a challenge. Because each blockchain network has its own rules and protocols, cross-chain data and asset interaction between different blockchains is difficult. To address this issue, relay chain technology has been proposed, aiming to achieve interoperability between multiple blockchains.
[0003] Currently, relatively mature cross-chain mechanisms mainly include notary mechanisms, sidechains / relays, hash locking, and distributed private key control. The following analysis will examine these mechanisms from multiple perspectives. Regarding interoperability, hash locking involves cross-dependencies and has significant shortcomings compared to other cross-chain models. In terms of trust models, the notary mechanism requires multiple trusted third parties as notaries, which can easily lead to centralization, while other cross-chain models do not have this problem. Regarding cross-chain transaction processing, hash locking has significant limitations; it can support cross-chain asset collateral in most cases but does not support cross-chain asset transfers or directly support cross-chain primitive operations, while other cross-chain models can support cross-chain transaction operations quite well. In terms of technical security and performance, the notary model and sidechain / relay model have relatively low security, and transaction speeds need improvement.
[0004] Building upon the four existing mainstream cross-chain technologies, researchers have combined the notary mechanism, which boasts advantages such as simplicity, ease of operation, and bidirectional cross-chain functionality, with sidechains, which offer independence and high efficiency, to propose a hybrid notary + sidechain technology: the relay chain technology. Initially, the relay chain solution was based on an existing chain to establish a central platform for inter-chain communication. Later, to address the issue of centralization, entirely new independent blockchains were built as relay chains, specifically handling operations between different chains. This results in greater transparency and strong compatibility, making it the most promising interoperability solution for heterogeneous chains.
[0005] Existing blockchain interoperability technologies face the following problems and challenges: (1) Different underlying architectures make interoperability difficult: There are already many blockchain platforms in the industry, and these platforms have very different overall architecture designs, including computing, storage, network and other aspects.
[0006] (2) Differences in data structure make mutual recognition difficult: The data structure designs of different blockchain platforms are often different. Different blockchain platforms have different data structures and expected application scenarios, so there are still certain challenges in achieving data mutual recognition.
[0007] (3) Difficulty in interconnection due to different interface protocols: Different blockchain platforms have different architectures and data structures, and their exposed access interfaces vary greatly in terms of functionality and format fields. Due to the incompatibility of interfaces and protocols, it is difficult for heterogeneous blockchain platforms to interconnect and communicate.
[0008] (4) Differences in security mechanisms make mutual trust difficult: When it comes to connecting between chains and between platforms, the mutual trust conditions between platforms may not be established due to the different security mechanisms and the fact that sensitive data crosses security boundaries, such as different consensus member lists, varying degrees of strictness in access mechanisms, and differences in permission configurations.
[0009] (5) Different business models make cross-chain communication difficult: Different blockchain platforms have vastly different application scenarios. To enable cross-chain communication between scenarios, such as to achieve cross-chain communication of relevant filing information between financial blockchain and government blockchain, there will be more complex business logic than traditional digital asset cross-chain communication. Any oversight in any link of the process may lead to anomalies and cause cross-chain failure. Ensuring the integrity and consistency between transactions during the overall connection process will be a huge challenge.
[0010] In summary, existing blockchain interoperability technologies have some technical shortcomings in achieving interoperability between blockchains. Therefore, a new method is urgently needed to solve these problems and improve the efficiency and security of blockchain interoperability. Summary of the Invention
[0011] To address the existing problems, this invention provides a cross-chain system based on a relay chain.
[0012] The present invention adopts the following technical solution: A cross-chain system based on a relay chain includes: a cross-chain module, a relay chain, and an access chain. The cross-chain module corresponds one-to-one with the access chain. The access chain communicates with the relay chain through the corresponding cross-chain module. The cross-chain modules communicate with each other. The first cross-chain module generates and sends a cross-chain contract call request to the first access chain based on the cross-chain transaction request instruction received by the first access chain; the first access chain executes the cross-chain contract call request and returns the execution result to the first cross-chain module. The first cross-chain module submits the cross-chain transaction request instruction to the relay chain; The relay chain verifies the credibility of the cross-chain transaction request instruction. If the verification is successful, the relay chain determines whether the second access chain corresponding to the cross-chain transaction request instruction is in the access chain service list. If so, the relay chain submits the cross-chain transaction request instruction to the second cross-chain module. The second access chain executes the cross-chain transaction request instructions sent by the second cross-chain module.
[0013] Furthermore, the execution result of the first access chain executing the cross-chain contract call request includes: transaction version, transaction hash value, transaction type, and timestamp.
[0014] Furthermore, the relay chain verifies the trustworthiness of the cross-chain transaction request instruction, including: The verification of the credibility of the cross-chain transaction request instruction by the relay chain includes: verifying whether the source and proof of the cross-chain transaction request instruction meet the cross-chain verification rules on the first access chain; if the verification fails, the relay chain will mark the cross-chain transaction request instruction as an illegal cross-chain transaction request and return a failure receipt and error information to the first cross-chain module, and the first access chain will re-initiate the cross-chain transaction request instruction until the relay chain verifies the correct cross-chain transaction request instruction.
[0015] Furthermore, if the relay chain determines that the second access chain corresponding to the cross-chain transaction request instruction is not in the access chain service list, the relay chain will mark the cross-chain transaction request instruction as an invalid cross-chain transaction, return a failure receipt and error information to the first cross-chain module, and the relay chain will notify the first access chain to roll back and end the cross-chain process.
[0016] Furthermore, after the second access chain executes the cross-chain transaction request instruction sent by the second cross-chain module, the second access chain judges the execution result of the cross-chain transaction request instruction; if the execution is successful, the relay chain receives a successful execution receipt from the second access chain, marks the cross-chain transaction as a successful cross-chain transaction, and ends the cross-chain process; if the execution fails, the relay chain receives a failed execution receipt from the second access chain, marks the cross-chain transaction as a failed cross-chain transaction, and ends the cross-chain process.
[0017] Furthermore, after the second access chain judges the execution result of the cross-chain transaction request instruction, the second access chain returns the execution result of the cross-chain transaction to the relay chain. The relay chain verifies the execution result of the cross-chain transaction and sends the result message to the first cross-chain module. Then, the first cross-chain module returns the cross-chain transaction response.
[0018] Furthermore, the cross-chain module includes a network unit, a storage unit, a verification unit, a certificate unit, and a permission unit. The certificate unit is used to generate and maintain identity certificates, the network unit is used to establish cross-chain connections, the storage unit is used to receive and save cross-chain transaction data, the verification unit is used to verify the legality of cross-chain transactions, and the permission unit is used to configure and manage the permissions of different roles and identities.
[0019] Furthermore, the relay chain includes verification nodes and monitoring nodes. The verification nodes are composed of full nodes of the access chain, and the full nodes of the access chain are nodes that contain all the data of the corresponding access chain.
[0020] Furthermore, the cross-chain modules communicate with each other via P2P to build a peer-to-peer network.
[0021] Furthermore, the management operations of the access chain include: registration, update, review, and deregistration; The registration process includes: the access chain provides registration information including validator information, consensus algorithm type, chain type, chain name and description, and cross-chain gateway public key information; after registration, the relay chain administrator reviews and votes; when more than half of the administrators approve the registration, the access chain is allowed to join. The review process includes: after the access chain registration is completed, the relay chain administrator reviews the information of the access chain registration. Each relay chain administrator will vote after review. If more than half of the relay chain administrators approve the review, the access chain will be approved to join. The update process includes: when the access chain adds or replaces a verification node or replaces a new consensus algorithm, the access chain administrator needs to perform an access chain update operation to update the information of the access chain on the relay chain. When the access chain is updated, the relay chain will temporarily not accept cross-chain transactions of the access chain. The cancellation process includes: when the access chain exits the cross-chain system, a cancellation operation is performed, and the system will delete the relevant information of the access chain on the relay chain.
[0022] The beneficial effects of this invention include: the cross-chain system based on a relay chain provided by this invention includes a cross-chain module, a relay chain, and an access chain. Each cross-chain module corresponds one-to-one with an access chain. The access chain communicates with the relay chain through its corresponding cross-chain module, and the cross-chain modules communicate with each other. The relay chain acts as an intermediary layer, connecting different blockchain networks. Through the cross-chain architecture corresponding to this system, collaborative work among the various components is achieved, enabling different blockchains to interoperate and share data and transactions. Furthermore, based on this cross-chain system, this invention also provides a cross-chain process that addresses the shortcomings of existing technologies, enabling efficient and secure blockchain interoperability through cross-chain communication and data interaction between multiple blockchains. It also provides a unified protocol and rules, allowing seamless data transmission between different blockchains. Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below: Figure 1 This is a cross-chain architecture diagram; Figure 2 This is a cross-chain system architecture diagram; Figure 3 This is a diagram of the cross-chain module structure; Figure 4 It is a logical relationship diagram between the various units of the cross-chain module; Figure 5 This is a diagram illustrating cross-link network operations; Figure 6 This is a diagram illustrating the types of relay chain nodes; Figure 7 This is a diagram illustrating the registration process in the access chain management operation; Figure 8 This is a diagram illustrating the verification rules; Figure 9 This is a schematic diagram of a Merkle tree structure; Figure 10 This is a diagram illustrating the cross-chain process. Detailed Implementation
[0024] To illustrate the technical solution described in this application, specific embodiments will be described below.
[0025] This embodiment aims to address the problems and challenges of blockchain interoperability technology, providing a cross-chain system based on a relay chain. This cross-chain system includes several key modules, such as a cross-chain architecture, cross-chain modules, access chains, relay chains, and cross-chain processes. These modules work together to enable different blockchains to interoperate and share data and transactions. The functions and roles of each module will be described in detail below.
[0026] First, we introduce the overall structure of the cross-chain system. The system architecture is divided into three key layers, each responsible for different functions and modules, such as... Figure 1 As shown, the first layer is the foundation layer, which includes the core modules required for a blockchain, including network, storage, consensus, virtual machine, and encryption mechanisms. These modules provide the basic functionality and security of the blockchain. The second layer is the component layer, which mainly contains service modules related to cross-chain operations, providing various components for business process calls. These include components such as access chain management and verification rule management, which support various aspects of cross-chain operations. The third layer is the interface layer, where the relay chain provides external interface services, making it convenient for users to initiate cross-chain requests and query cross-chain transaction content.
[0027] Cross-chain interoperability between blockchains should not be limited to a single blockchain or a specific type of chain, but should be applicable to multiple independent blockchains with different block structures and consensus algorithms to achieve interoperability. The architecture of a cross-chain system based on a relay chain is as follows: Figure 2As shown, the system includes: a cross-chain module, a relay chain, and access chains. Each cross-chain module corresponds one-to-one with an access chain, and the access chain communicates with the relay chain through its corresponding cross-chain module. The cross-chain modules also communicate with each other. The overall logic of the cross-chain system is as follows: the access chain sends cross-chain transactions to the relay chain for verification and processing through the cross-chain module; the relay chain verifies the validity of the cross-chain transactions and broadcasts valid transactions to other access chains; the cross-chain module is responsible for relaying messages between the access chains and the relay chain, ensuring smooth processing and response of cross-chain transactions. Through the collaborative work of these key modules, efficient interoperability between multiple chains and reliable execution of cross-chain transactions are achieved.
[0028] Cross-chain data senders and receivers correspond to different access chain networks. A cross-chain data sender is the role an access chain plays when it needs to transmit its own data or transactions to other chains. Conversely, a cross-chain data receiver is the role an access chain plays when it needs to retrieve data or transactions from other chains. This flexibility ensures bidirectional communication within the system, allowing different chains to act as senders or receivers as needed.
[0029] The cross-chain module plays a crucial role in the entire system, responsible for handling the collection, verification, transmission, and execution of cross-chain transactions. The cross-chain module consists of multiple units that work together to enable cross-chain interaction.
[0030] The core function of the cross-chain module: Due to the high heterogeneity between different blockchain systems, none of them natively support multi-chain interoperability. Therefore, the cross-chain module plays a crucial role here, and its core functional units include: network unit, storage unit, verification unit, certificate unit, and permission unit, such as... Figure 3 As shown.
[0031] The functions and implementation processes of each unit in the cross-chain module are as follows: The functions of the network unit are as follows: The network unit is responsible for communicating with other blockchain systems, establishing cross-chain connections, and transmitting cross-chain transactions. The specific implementation of the network unit includes: Communication Protocol: A customized communication protocol based on message passing in the relay chain is adopted. The protocol includes data exchange formats, encryption, and signature mechanisms to ensure the reliability and security of messages in cross-chain communication. Message passing is relayed through relay chain nodes, which act as message relays, ensuring that all cross-chain interactions pass through the core relay chain; Connection Management: Relay chain nodes maintain a connection pool and monitor all blockchain systems connected to the relay chain. When a connection interruption or node failure is detected, the relay chain node is responsible for automatically reconnecting and re-establishing connections to maintain the connectivity of the entire cross-chain network; Data Encryption: Elliptic Curve Cryptography (ECC) is used to encrypt and sign cross-chain communication messages. Each blockchain system's cross-chain module has its own key pair for encrypting and signing messages to protect data privacy and communication security.
[0032] The storage unit functions as follows: It stores cross-chain transactions and related data, including proof of origin and execution results. The specific implementation of the storage unit includes: Data structure design: A Merkle Tree is used on the relay chain to store the hash value and state root of cross-chain transactions. This ensures that all blockchain systems can verify the integrity of transactions and data, and provides efficient data retrieval capabilities; Data backup: Relay chain nodes periodically back up cross-chain transaction data to external decentralized storage systems, such as IPFS or distributed file systems. This increases data availability and recoverability, ensuring data is not lost even if a relay chain node fails; Data indexing: Storage units on the relay chain are indexed based on key attributes such as the hash and timestamp of cross-chain transactions. This helps improve data retrieval efficiency and ensures that various blockchain systems can quickly access cross-chain data.
[0033] The verification unit's function is as follows: It is responsible for verifying the legality and trustworthiness of cross-chain transactions. It verifies cross-chain transactions according to the cross-chain verification rules on the access chain, including verifying the source of the request and whether the proof meets the rules. The verification unit ensures that only legitimate cross-chain transactions can be submitted to the relay chain for processing. The specific implementation of the verification unit is as follows: Verification Rules: The verification unit on the relay chain defines cross-chain verification rules, including rules for verifying the source of the request, signature verification, and data consistency. These rules are formulated according to the relay chain's consensus mechanism and the needs of the cross-chain process; Digital Signature Verification: The identity authentication and authorization system based on the relay chain is used to verify the validity of the digital signature of cross-chain transactions. Only verified transactions can be accepted by the relay chain and further transmitted to the target blockchain system; Rule Engine: The verification unit on the relay chain uses smart contracts to execute the verification rules. Each step in the cross-chain process triggers the corresponding smart contract, ensuring the efficiency and consistency of the verification.
[0034] The function of the Certificate Unit is to manage and verify identity certificates between blockchain systems. It ensures that cross-chain modules have legitimate identities and verifies the identity certificates of other blockchain systems. The Certificate Unit guarantees the security of cross-chain communication and the reliability of identity authentication. The specific implementation of the Certificate Unit is as follows: Certificate Generation: The Certificate Unit on the relay chain is responsible for generating and maintaining identity certificates for blockchain systems. These certificates include public keys, private keys, and digital signatures, used to ensure the authenticity of the identity and data of the blockchain systems; Certificate Verification: Relay chain nodes verify the identity certificates of other blockchain systems to ensure their validity and trustworthiness. This process is implemented through the certificate management smart contract on the relay chain; Identity Authentication: Identity authentication in the cross-chain process is executed through the identity verification smart contract on the relay chain. This ensures that the cross-chain module has a legitimate identity and can trust the identities of other blockchain systems.
[0035] The functions of the permission unit are as follows: The permission unit manages and controls access permissions for cross-chain transactions. It authorizes and restricts access to cross-chain transactions based on different roles and identities, ensuring that only users with legitimate permissions can initiate and process cross-chain transactions. The specific implementation of the permission unit includes: Permission configuration and verification: defining and managing the permissions of different roles on the relay chain, ensuring that nodes have the legitimate authority to execute cross-chain transactions, and ensuring security through identity verification and permission level verification; Cross-chain transaction authorization: authorizing cross-chain transactions according to relay chain rules, allowing only authorized transactions to enter the relay chain processing flow, enhancing system security; Auditing and monitoring: continuously monitoring permission usage, generating audit reports, promptly detecting potential anomalies, ensuring system compliance and security, and collaborating with regulatory nodes for real-time monitoring.
[0036] The logical relationships between the various units of the cross-chain module are as follows: Figure 4 As shown. The cross-chain module workflow is as follows: (1) Certificate Unit generates and maintains identity certificates: The certificate unit generates identity certificates for the blockchain system, including public and private keys, and issues certificates; the certificate unit is responsible for managing and verifying identity certificates of other blockchain systems to ensure the security of cross-chain communication and the reliability of identity authentication.
[0037] (2) Network Unit establishes secure cross-chain connection: The network unit is responsible for establishing communication connection with other blockchain systems, using custom communication protocols (such as protocols based on TCP / IP or HTTP); the protocol includes data transmission format, message encryption and decryption mechanism and message verification rules to ensure the reliability and security of cross-chain communication.
[0038] (3) The storage unit receives and saves cross-chain transaction data: The storage unit receives cross-chain transaction data, including the source proof of cross-chain transactions, execution results, etc.; the data is organized in an efficient data structure, which may use a database system or a distributed storage system to improve data retrieval efficiency.
[0039] (4) The verification unit uses the storage unit data to verify the legality of cross-chain transactions: The verification unit is responsible for verifying the legality and credibility of cross-chain transactions and uses the data in the storage unit for verification; the verification rules include rules for verifying the source of the request, digital signature verification, data consistency, etc., based on the characteristics and security requirements of the blockchain system.
[0040] (5) Permission unit configures and manages permissions for different roles and identities: The permission unit is used to configure and manage access permissions for cross-chain transactions, including role definition, permission level division and permission allocation; when a transaction is initiated, the permission unit performs permission checks to verify whether the transaction initiator has the legal permission to execute cross-chain transactions.
[0041] (6) The verification unit completes the cross-chain transaction verification: The verification unit completes the verification of the cross-chain transaction to ensure the legality and authenticity of the transaction; the verification unit may refer to the permission unit configuration information to verify the permission of the transaction.
[0042] (7) Cross-chain message passing: When cross-chain transactions need to be passed between the access chain and the relay chain, the network unit is responsible for transmitting cross-chain messages; cross-chain messages include transaction requests, verification rules, identity certificates and other information; these units work together to ensure the security, legality and consistency of cross-chain transactions from certificate generation to cross-chain transaction verification. The permission unit configuration information can be referenced in the verification stage to ensure that only users with legitimate permissions can initiate and process cross-chain transactions.
[0043] Cross-chain modules communicate via peer-to-peer (P2P) communication to build a cross-chain routing network, which is a peer-to-peer network. The cross-chain routing network is a P2P network composed of multiple cross-chain modules, such as... Figure 5 As shown, this peer-to-peer network allows cross-chain modules to exchange data and information, including cross-chain transactions and verification rules, ensuring efficient data transfer and processing across different chains. This communication mechanism is the foundation for achieving multi-chain interoperability.
[0044] Before the relay chain joins the cross-chain network, the cross-chain module is responsible for connecting the relay chain with other cross-chain modules in the network. The cross-chain module represents the identity of the accessing chain within the cross-chain routing network, while administrators of other accessing chains register the verification information of newly joined chains with the relay chain. Through the transmission of network identifiers and verification information, verifiable cross-chain transactions can be conducted quickly and conveniently. In this way, the relay chain can perform trusted cross-chain interactions with other chains in the cross-chain network. The implementation and logical relationships of the cross-chain routing network are described below.
[0045] Connecting the Relay Chain and Cross-Chain Modules: The cross-chain modules are responsible for connecting the relay chain to other access chains before the relay chain joins the cross-chain network. These cross-chain modules represent the identity of the access chain in the cross-chain routing network.
[0046] Information Broadcasting: The cross-chain module broadcasts its own information on behalf of the access chain, including identity and verification information. Administrators of other access chains will register the relevant verification information of newly joined access chains with the relay chain.
[0047] Global Hash Table: The cross-chain module maintains a global hash table to record the list of access chains that have registered with the relay chain. When an access chain joins the routing network, its corresponding cross-chain module broadcasts its information, and other cross-chain modules update the global hash table based on the broadcast information.
[0048] Cross-chain transaction transmission: During cross-chain transaction transmission, relay chain nodes multi-sign the cross-chain transaction and use routing algorithms to find the corresponding cross-chain module of the target access chain. The cross-chain module utilizes the cross-chain routing network to transmit cross-chain transactions.
[0049] Verifying the origin of cross-chain transactions: The target cross-chain module verifies the authenticity of the cross-chain transaction's origin. Once verification is successful, the cross-chain transaction is sent to the corresponding access chain. The relay chain verifies the validity of the cross-chain transaction's origin and returns the execution result to the origin access chain.
[0050] Through the cross-chain network, the relay chain can conduct trusted cross-chain interactions with other chains in the network, ensuring the security and reliability of cross-chain transactions. This network enables logical connections between the relay chain and other access chains, thus facilitating multi-chain interoperability.
[0051] The relay chain, as the core connecting and coordinating various access chains and a crucial component for verifying cross-chain transactions issued by these access chains, plays a vital role. Communication between the cross-chain module and the relay chain is critical to the system, ensuring that data and transactions between different chains can be verified and transmitted on the relay chain. With the assistance of the relay chain, the cross-chain module achieves asynchronous data processing and transmission. This mechanism enables the system to effectively handle cross-chain transactions, ensuring data security and authenticity. Each access chain connects to the relay chain on an equal footing. The relay chain integrates a notary mechanism and a sidechain solution, completing message collection, verification, and forwarding.
[0052] The main responsibilities of the relay chain include access chain management, trusted verification of cross-chain transactions, reliable routing, and transaction rollback.
[0053] (1) Access Chain Management: The relay chain acts as a "notary" for cross-chain transactions, assisting other connected chains in verifying cross-chain transactions. The relay chain includes two types of nodes: verification nodes and regulatory nodes.
[0054] During the verification process, the relay chain's verification nodes need to store blockchain information from all connected chains, which places high demands on node performance. However, as more and more chains join the cross-chain system, the amount of data that verification nodes need to store will increase dramatically, raising the barrier to entry for becoming a verification node and potentially leading to the fixation of relay chain verification nodes, which could trigger centralized security issues.
[0055] To address the aforementioned issues, this embodiment manages the verification nodes of the relay chain. These verification nodes are composed of full nodes from within the access chain, meaning nodes containing all data from the access chain. This embodiment divides the full nodes within the access chain into two parts: one part participates in the consensus process within the access chain, while the other part joins the relay chain to form its verification nodes, assisting in the verification of cross-chain transactions. Figure 6 As shown.
[0056] Verification of cross-chain transactions by verification nodes: When verifying cross-chain transactions of an access chain, the verification nodes of that chain, which have joined the relay chain, check and verify the transactions. Only when all verification nodes related to the cross-chain transaction pass verification and endorse it are the cross-chain transaction considered valid. If any full node fails verification, the transaction is considered invalid. Through this verification method, relay chain verification nodes do not need to store blockchain data from other access chains; they are only responsible for checking and verifying cross-chain transactions related to themselves, lowering the barrier to becoming a relay chain verification node. Furthermore, a dynamic replacement of relay chain verification nodes is adopted to prevent the relay chain verification nodes from becoming fixed, thus reducing the system's decentralization.
[0057] Regulatory Nodes: All verification processes are recorded and saved to blocks on the relay chain for review by regulatory nodes. Regulatory nodes are responsible for storing data from all connected chains and the world state of the entire cross-chain system, synchronizing data from connected chains in real time to comprehensively review the behavior of all verification nodes. Although regulatory nodes themselves do not have the authority to verify cross-chain transactions, by supervising the behavior of verification nodes, they ensure the secure operation of the cross-chain system.
[0058] Therefore, the relay chain acts as a hub connecting and coordinating the various access chains. Verifying nodes, composed of full nodes from the access chains, are responsible for assisting the relay chain in verifying the validity of cross-chain transactions—a crucial step in ensuring the legitimacy of cross-chain transactions. Regulatory nodes, also full nodes of the relay chain, are tasked with monitoring the behavior of the verifying nodes to ensure the system's security and compliance. This two-tiered node structure enhances the system's stability and security.
[0059] Access chain management operations include registration, update, review, and deregistration, providing basic services for the relay chain to manage access chains.
[0060] like Figure 7 As shown, the registration process includes: the access chain needs to provide registration information including validator information, consensus algorithm type, chain type, chain name and description, and cross-chain gateway public key information. After registration, the relay chain administrator reviews and votes. When more than half of the administrators approve the registration, the access chain is allowed to join.
[0061] The review process includes: After the access chain registration is completed, the relay chain administrator reviews the registration information, especially the validator information and public key information. Each relay chain administrator votes after reviewing the information. If a vote fails, a review suggestion is attached for the access chain administrator to see why the registration failed. If more than half of the relay chain administrators approve the application, the access chain is approved to join.
[0062] The update process includes: when an access chain adds or replaces a validator node or changes to a new consensus algorithm, the access chain administrator needs to perform an access chain update operation to update the access chain information on the relay chain. The access chain update operation is basically the same as the registration and review process described above, and will not be repeated here. When an access chain is updated, to ensure the verification of cross-chain transactions (the verification logic of the verification rules may change), the relay chain will temporarily not accept cross-chain transactions from that access chain.
[0063] The cancellation process includes: when the access chain exits the cross-chain system, a cancellation operation is performed, and the system will delete the relevant information of the access chain on the relay chain.
[0064] (2) Verification rule management: Verification rules are the foundation for the relay chain to verify the existence and validity of cross-chain transactions. Implemented through smart contracts and running in a virtual machine, they require deployment, review, updating, and cancellation. Due to different blockchain application scenarios, their underlying principles vary, resulting in heterogeneity between blockchains and consequently, different transaction verification rules. The relay chain cannot provide unified verification rules for accessing chains; therefore, the administrator of the accessing chain must deploy the verification rules to the relay chain when joining. Figure 8 As shown, the process of deploying, registering, and auditing verification rules is illustrated.
[0065] Verification Rule Deployment: Developers of the access chain need to develop corresponding verification rules based on the characteristics of their own blockchain. Since the root hash value of all transactions is recorded in the block header, each transaction has its own unique Merkle path. It is impossible to forge a Merkle path pointing to the root hash for a non-existent transaction. Therefore, verifying the existence of a transaction only requires verifying whether it possesses a valid Merkle path.
[0066] Verification rule registration: The administrator of the access chain deploys the verification rule contract. After successful deployment, the address of the verification rule will be obtained, but the verification rule is not yet usable and needs to be bound to the access chain. The administrator of the access chain needs to register the verification rules for their own chain. When initiating a cross-chain transaction, the verification engine will know which verification rule to use for cross-chain transaction verification. After receiving the verification rule registration request, the relay chain administrator will obtain the specific information of the verification rule for review. Only verification rules that pass the review can be used.
[0067] Verification rule update: When the access chain verification rules change, the access chain administrator needs to update the verification rules. The update steps are similar to the registration steps: first, deployment is performed, then registration and review are conducted, and finally, the approved new verification rules are bound to the access chain.
[0068] (3) Cross-chain transaction verification: During cross-chain transactions, the relay chain needs to verify each transaction to prevent forgery or tampering. This verification process consists of two parts: Relay chain registration verification rules: defining and recording the rules and conditions that allow cross-chain transactions. These rules may include verifying the legality of the transaction, verifying the identities and permissions of the transacting parties, etc.; Relay chain transaction verification: when a cross-chain transaction request arrives at the relay chain, the relay chain needs to verify the transaction to ensure it complies with the registered verification rules. This can be achieved by verifying the transaction's digital signature, verifying the transaction's validity period, and verifying whether the transacting parties have sufficient permissions. Through this verification process, the relay chain can ensure the authenticity and integrity of cross-chain transactions, preventing forgery or tampering.
[0069] (4) Reliable routing: In addition to verifying the legitimacy of cross-chain transactions, the relay chain is also responsible for routing them. The routing objects include two aspects: the cross-chain transaction itself and the cross-chain result receipt with callback functionality. All transactions to be routed in a block are constructed into a Merkle tree, with the root of the Merkle tree being signed by the validating nodes. Figure 9 This is a schematic diagram of a Merkle tree structure.
[0070] (5) Rollback mechanism: The rollback mechanism is divided into two types: failure rollback and timeout rollback. Failure rollback refers to the process where, when a cross-chain transaction fails, the cross-chain module submits a failure receipt to the relay chain. The relay chain verifies the receipt and then requests the originating access chain module to roll back the corresponding request. Timeout rollback occurs when a cross-chain transaction has not responded for an extended period. To ensure consistency between the states of both cross-chain parties, a rollback operation is required.
[0071] When a timeout rollback occurs on the source chain, for example, if the source cross-chain module cannot connect to the relay chain due to network issues, the source cross-chain module will directly roll back the corresponding request. However, when a timeout rollback occurs on the destination access chain, i.e., if the relay chain does not receive a cross-chain result receipt from the destination service within the specified timeout period, the relay chain will set the cross-chain transaction to a rollback state. The source cross-chain module can obtain the cross-chain transactions and proof information that need to be rolled back and roll back the request on the source chain. When the destination cross-chain module submits the receipt of the destination access chain service to the relay chain, the relay chain will return a status information indicating that the transaction has been rolled back. Upon receiving this information, the destination cross-chain module will execute the corresponding rollback operation.
[0072] The aforementioned rollback mechanism ensures the integrity and consistency of cross-chain transactions, preventing data inconsistencies caused by execution failures or timeouts.
[0073] In this embodiment, the cross-chain process involves not only the relay chain, access chain, and cross-chain module, but also the client. The relay chain and access chain are responsible for their own transaction processing, ensuring the data within the system is unforgeable, immutable, and traceable. The cross-chain module is responsible for the transmission of cross-chain transactions, the implementation of the cross-chain transaction model, and the sending and receiving of cross-chain messages. The client generally refers to other information systems that interact with the blockchain. See the cross-chain process details below. Figure 10 .
[0074] Let's define the initiator's access chain, cross-chain module, and client as the first access chain, first cross-chain module, and first client, respectively, and the destination's access chain, cross-chain module, and client as the second access chain, second cross-chain module, and second client, respectively. For ease of explanation, the first access chain, first cross-chain module, and first client will be referred to as Access Chain A, Cross-chain Module A, and Client A, and the second access chain, second cross-chain module, and second client will be referred to as Access Chain B, Cross-chain Module B, and Client B. The detailed steps of the cross-chain process are as follows: Client A initiates a cross-chain transaction by sending a cross-chain transaction request instruction to access chain A. Access chain A receives the cross-chain transaction request instruction, which is used to request to conduct a cross-chain transaction. Chain A returns a cross-chain transaction response to client A; Cross-chain module A generates and sends a cross-chain contract call request to access chain A; access chain A executes the cross-chain contract call request and sends proof of origin to cross-chain module A; Chain A executes a cross-chain contract call request and returns the execution result to cross-chain module A. The execution result includes: transaction version, transaction hash value, transaction type, and timestamp. Cross-chain module A submits the cross-chain transaction request instruction to the relay chain; The relay chain verifies the credibility of cross-chain transaction request instructions. The verification includes: verifying whether the source and proof of the cross-chain transaction request instruction meet the cross-chain verification rules on the access chain A. If the verification fails, the relay chain will mark the cross-chain transaction request instruction as an illegal cross-chain transaction request and return a failure receipt and error information to the cross-chain module A. The access chain A needs to re-initiate the cross-chain transaction request instruction until the relay chain verifies the correct cross-chain transaction request instruction. If the verification passes, the relay chain determines whether the access chain B corresponding to the cross-chain transaction request instruction is in the access chain service list; if the relay chain determines that the access chain B corresponding to the cross-chain transaction request instruction is not in the access chain service list, the relay chain will mark the cross-chain transaction request instruction as an invalid cross-chain transaction, return a failure receipt and error information to the cross-chain module A, and the relay chain will notify the access chain A to roll back and end the cross-chain process. If the relay chain determines that the access chain B corresponding to the cross-chain transaction request instruction is in the access chain service list, then the relay chain will submit the cross-chain transaction request instruction to the cross-chain module B. Access chain B executes the cross-chain transaction request instruction sent by cross-chain module B; The access chain B judges the execution result of the cross-chain transaction request instruction; if the execution is successful, the relay chain receives a successful execution receipt from the access chain B, marks the cross-chain transaction as a successful cross-chain transaction, and ends the cross-chain process; if the execution fails, the relay chain receives a failed execution receipt from the access chain B, marks the cross-chain transaction as a failed cross-chain transaction, and ends the cross-chain process. Access chain B returns the execution result of the cross-chain transaction to the relay chain; The relay chain verifies the execution result of the cross-chain transaction and sends the result message to cross-chain module A; Cross-chain module A returns a response to client A regarding the cross-chain transaction; Client B queries the access chain B for the execution status of cross-chain transactions and obtains the returned results.
[0075] The cross-chain process defines how data and transactions are transmitted throughout the system. It specifies how the cross-chain data sender initiates a cross-chain request, how the relay chain verifies and processes cross-chain transactions, and how the cross-chain data receiver obtains the required data. This process ensures the orderliness and controllability of data transmission, enabling various modules to work collaboratively to meet the data sharing needs between different access chains.
[0076] Through the aforementioned mechanism, cross-chain data senders can asynchronously transmit cross-chain ledger data, while cross-chain data receivers can obtain the necessary data based on the relay chain, meeting the cross-chain needs of low real-time scenarios. Furthermore, through a periodic consensus mechanism, the decentralized implementation of the relay chain improves the security and authenticity of cross-chain data. This system architecture and communication method help address the challenges of blockchain interoperability technology, ensuring the reliable transmission and processing of cross-chain data. The cross-chain process standardizes the data and transaction transmission methods throughout the system, ensuring its orderly operation.
[0077] Therefore, in order to achieve efficient availability, security, trustworthiness, and convenient governance of cross-chain interactions, this embodiment, based on the abstraction of the blockchain system, the architecture of the cross-chain system, and the top-level design of the trusted interaction process, implements the following core cross-chain functions: Cross-chain architecture: Build a flexible and scalable cross-chain architecture that supports interoperability and interaction between multiple blockchain networks. Achieve seamless connectivity between different blockchains by ensuring data consistency and security.
[0078] Cross-chain module: Design a cross-chain module to enable message exchange between the access chain and the relay chain. Simultaneously, by interconnecting multiple cross-chain modules, a cross-chain routing network is formed, enabling broader cross-chain interaction.
[0079] Cross-chain process: Design and optimize the cross-chain interaction process, including initiating cross-chain requests, verifying and confirming the relay chain, and returning and processing cross-chain results. By optimizing the process, ensure the efficiency and reliability of cross-chain interactions.
[0080] By comprehensively applying the above core technologies, the cross-chain system in this embodiment achieves efficient, secure, and reliable cross-chain interaction, providing a convenient governance and interoperability solution for the blockchain ecosystem.
[0081] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A cross-chain system based on a relay chain, characterized in that, include: The system includes a cross-chain module, a relay chain, and an access chain. Each cross-chain module corresponds to an access chain, and the access chain communicates with the relay chain through a corresponding cross-chain module. The cross-chain modules also communicate with each other. The first cross-chain module generates and sends a cross-chain contract call request to the first access chain based on the cross-chain transaction request instruction received by the first access chain. The first access chain executes the cross-chain contract call request and returns the execution result to the first cross-chain module; The first cross-chain module submits the cross-chain transaction request instruction to the relay chain; The relay chain verifies the credibility of the cross-chain transaction request instruction. If the verification is successful, the relay chain determines whether the second access chain corresponding to the cross-chain transaction request instruction is in the access chain service list. If so, the relay chain submits the cross-chain transaction request instruction to the second cross-chain module. The second access chain executes the cross-chain transaction request instructions sent by the second cross-chain module; If the relay chain determines that the second access chain corresponding to the cross-chain transaction request instruction is not in the access chain service list, the relay chain will mark the cross-chain transaction request instruction as an invalid cross-chain transaction, return a failure receipt and error information to the first cross-chain module, and the relay chain will notify the first access chain to roll back and end the cross-chain process. The system supports two types of rollback mechanisms: failure rollback and timeout rollback. Failure rollback means that when a cross-chain transaction fails, the cross-chain module submits a failure receipt to the relay chain. After verifying the receipt, the relay chain requests the source access chain module to roll back the corresponding request. Timeout rollback is required when a cross-chain transaction has not responded for a long time. In order to ensure the consistency of the states of both cross-chain parties, a rollback operation is necessary. The relay chain includes verification nodes and monitoring nodes. The verification nodes are composed of full nodes of the access chain, and the full nodes of the access chain are nodes that contain all the data of the corresponding access chain.
2. The cross-chain system based on a relay chain according to claim 1, characterized in that, The execution result of the first access chain executing the cross-chain contract call request includes: transaction version, transaction hash value, transaction type, and timestamp.
3. The cross-chain system based on a relay chain according to claim 1, characterized in that, The relay chain verifies the credibility of the cross-chain transaction request instruction, including: The verification of the credibility of the cross-chain transaction request instruction by the relay chain includes: verifying whether the source and proof of the cross-chain transaction request instruction meet the cross-chain verification rules on the first access chain; if the verification fails, the relay chain will mark the cross-chain transaction request instruction as an illegal cross-chain transaction request and return a failure receipt and error information to the first cross-chain module, and the first access chain will re-initiate the cross-chain transaction request instruction until the relay chain verifies the correct cross-chain transaction request instruction.
4. The cross-chain system based on a relay chain according to claim 1, characterized in that, After the second access chain executes the cross-chain transaction request instruction sent by the second cross-chain module, the second access chain judges the execution result of the cross-chain transaction request instruction; if the execution is successful, the relay chain receives the successful execution receipt from the second access chain, marks the cross-chain transaction as a successful cross-chain transaction, and ends the cross-chain process; If the execution fails, the relay chain receives a receipt from the second access chain indicating that the cross-chain transaction has failed, marks the cross-chain transaction as a failed cross-chain transaction, and terminates the cross-chain process.
5. The cross-chain system based on a relay chain according to claim 4, characterized in that, After the second access chain judges the execution result of the cross-chain transaction request instruction, it returns the execution result of the cross-chain transaction to the relay chain. The relay chain verifies the execution result of the cross-chain transaction and sends the result message to the first cross-chain module. Then, the first cross-chain module returns the cross-chain transaction response.
6. The cross-chain system based on a relay chain according to claim 1, characterized in that, The cross-chain module includes a network unit, a storage unit, a verification unit, a certificate unit, and a permission unit. The certificate unit is used to generate and maintain identity certificates, the network unit is used to establish cross-chain connections, the storage unit is used to receive and save cross-chain transaction data, the verification unit is used to verify the legality of cross-chain transactions, and the permission unit is used to configure and manage permissions for different roles and identities.
7. The cross-chain system based on a relay chain according to claim 1, characterized in that, The cross-chain modules communicate with each other via P2P to build a peer-to-peer network.
8. The cross-chain system based on a relay chain according to claim 1, characterized in that, The management operations of the access chain include: registration, update, review, and cancellation; The registration process includes: the access chain provides registration information including validator information, consensus algorithm type, chain type, chain name and description, and cross-chain gateway public key information; after registration, the relay chain administrator reviews and votes; when more than half of the administrators approve the registration, the access chain is allowed to join. The review process includes: after the access chain registration is completed, the relay chain administrator reviews the information of the access chain registration. Each relay chain administrator will vote after review. If more than half of the relay chain administrators approve the review, the access chain will be approved to join. The update process includes: when the access chain adds or replaces a verification node or replaces a new consensus algorithm, the access chain administrator needs to perform an access chain update operation to update the information of the access chain on the relay chain. When the access chain is updated, the relay chain will temporarily not accept cross-chain transactions of the access chain. The cancellation process includes: when the access chain exits the cross-chain system, a cancellation operation is performed, and the system will delete the relevant information of the access chain on the relay chain.
Citation Information
Patent Citations
Cross-chain system and method based on trusted execution environment
CN113923044A
