WO2023207083A1 - 用于跨区块链交互的系统及方法 - Google Patents

用于跨区块链交互的系统及方法 Download PDF

Info

Publication number
WO2023207083A1
WO2023207083A1 PCT/CN2022/135441 CN2022135441W WO2023207083A1 WO 2023207083 A1 WO2023207083 A1 WO 2023207083A1 CN 2022135441 W CN2022135441 W CN 2022135441W WO 2023207083 A1 WO2023207083 A1 WO 2023207083A1
Authority
WO
WIPO (PCT)
Prior art keywords
blockchain network
routing node
node
layer
cross
Prior art date
Application number
PCT/CN2022/135441
Other languages
English (en)
French (fr)
Inventor
徐文博
孙赫
曾超
焦梦洪
Original Assignee
蚂蚁区块链科技(上海)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 蚂蚁区块链科技(上海)有限公司 filed Critical 蚂蚁区块链科技(上海)有限公司
Publication of WO2023207083A1 publication Critical patent/WO2023207083A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1059Inter-group management mechanisms, e.g. splitting, merging or interconnection of groups
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • One or more embodiments of the present disclosure relate to the field of blockchain technology, and more specifically, to a system, method, apparatus, computing device and storage medium for cross-blockchain interaction.
  • Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • blockchain is usually composed of several blocks. In these blocks, the timestamp corresponding to the creation moment of the block is recorded respectively. All blocks strictly follow the timestamp recorded in the block to form a time-ordered data chain.
  • the node devices in the blockchain will perform consensus processing on the received transactions. , and after reaching a consensus, the node device as the accounting node in the blockchain will package the transaction into a block and make a persistent certificate in the blockchain. Due to the characteristics of blockchain, such as decentralization, non-tamperable information, and autonomy, blockchain has also received more and more attention and applications.
  • An object of one or more embodiments of the present disclosure is to provide a system, method, apparatus, computing device, and storage medium for cross-blockchain interaction.
  • a system for cross-blockchain interaction including: a first blockchain network, the first blockchain network including a first blockchain network communicating with each other. A routing node and a plurality of first consensus nodes; a second blockchain network, the second blockchain network includes a second routing node and a plurality of second consensus nodes that communicate with each other; and the first blockchain network and An upper blockchain network of the second blockchain network, the upper blockchain network is trusted by both the first blockchain network and the second blockchain network, and includes a first upper layer in communication with the first routing node A routing node, a second upper-layer routing node communicating with the second routing node, and a plurality of upper-layer consensus nodes.
  • the first upper-layer routing node, the second upper-layer routing node and the plurality of upper-layer consensus nodes communicate with each other, wherein the upper layer
  • the blockchain network is configured to manage changes to the consensus node of each blockchain network in the first blockchain network and the second blockchain network by uploading and certifying them in the upper-layer blockchain network. Consensus nodes for each blockchain network in the first blockchain network and the second blockchain network.
  • a method for cross-blockchain interaction comprising: obtaining data from a first blockchain through a first routing node of the first blockchain network The network is to perform cross-chain transactions in the second blockchain network and transmit the cross-chain transactions to the first blockchain network and the upper blockchain network of the second blockchain network to communicate with the first routing node.
  • a first upper-layer routing node, the upper-layer blockchain network is trusted by both the first blockchain network and the second blockchain network; through the first upper-layer routing node, the cross-chain transaction received from the first routing node is transmitted to the second upper-layer routing node of the upper-layer blockchain network that communicates with the second routing node of the second blockchain network; through the second upper-layer routing node, the cross-chain transaction received from the first upper-layer routing node is transmitted to the second routing node; and broadcasting the cross-chain transaction received from the second upper-layer routing node in the second blockchain network through the second routing node, so that multiple second consensus nodes of the second blockchain network receive and execute The cross-chain transaction, wherein the upper-layer blockchain network is configured to change the consensus node of each blockchain network in the first blockchain network and the second blockchain network in the upper-layer On-chain certificates are stored in the blockchain network to manage the consensus nodes of each blockchain network in the first blockchain network and the second blockchain network.
  • an apparatus for cross-blockchain interaction comprising: a collection module configured to pass through a first routing node of the first blockchain network Obtaining a cross-chain transaction from the first blockchain network to be executed in the second blockchain network; a transmission module configured to transmit the cross-chain transaction to the first blockchain network and the first routing node through the first routing node
  • the first upper routing node of the upper blockchain network of the second blockchain network that communicates with the first routing node, and the upper blockchain network is trusted by both the first blockchain network and the second blockchain network
  • the cross-chain transaction received from the first routing node is transmitted through the first upper-layer routing node to the second upper-layer routing node of the upper-layer blockchain network that communicates with the second routing node of the second blockchain network.
  • the second upper-layer routing node transmits the cross-chain transaction received from the first upper-layer routing node to the second routing node; and the execution module is configured to broadcast the data from the second upper-layer in the second blockchain network through the second routing node.
  • the cross-chain transaction received by the routing node causes multiple second consensus nodes of the second blockchain network to receive and execute the cross-chain transaction, wherein the upper-layer blockchain network is configured to pass the first block Changes in the consensus nodes of each blockchain network in the chain network and the second blockchain network are certificated on the chain in the upper blockchain network to manage the first blockchain network and the second blockchain network. Consensus node for each blockchain network in .
  • a computing device for cross-blockchain interaction including: one or more processors; and a memory storing computer-executable instructions, The computer-executable instructions, when executed by the one or more processors, cause the one or more processors to perform a method according to any embodiment of the present disclosure.
  • a non-transitory storage medium having computer-executable instructions stored thereon, the computer-executable instructions, when executed by a computer, cause the computer to perform according to the present disclosure.
  • FIG. 1 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 2 is a schematic diagram of a system for cross-blockchain interactions in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 3 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 4 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 5 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 6 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • FIG. 7 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 8 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 9 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure.
  • Figure 10 is a schematic diagram of a system for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 11 is a flowchart of a method for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure
  • Figure 12 is a schematic block diagram of an apparatus for cross-blockchain interaction according to one or more exemplary embodiments of the present disclosure
  • Figure 13 is a schematic block diagram illustrating a computer system on which one or more exemplary embodiments of the present disclosure may be implemented;
  • FIG. 14 is a schematic block diagram of a computing device for cross-blockchain interaction in accordance with one or more exemplary embodiments of the present disclosure.
  • connection is intended to include a physical, electrical, and/or communicative connection of one feature to another feature, with or without intervening features.
  • connection is a communication connection, even if it is mentioned that A and B are "directly connected", it is only intended to emphasize that one or more features emphasized by one or more embodiments of the present disclosure do not exist between the connection of A and B, but it does not It means that A and B are connected without any components.
  • a and B can be connected through cables, routers, gateways, channels, links, networks, etc. It should be noted that in the drawings of one or more embodiments of the present disclosure, whether the direct connection or the indirect connection between A and B is represented by a straight line or other graphic elements connecting A and B.
  • a or B includes “A and B” as well as “A or B” and does not exclusively include only “A” or only “B” unless specifically stated otherwise.
  • the term "exemplary” means “serving as an example, instance, or illustration” rather than as a “model” that will be accurately reproduced. Any implementation illustratively described herein is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, the disclosure one or more embodiments is not to be bound by any expressed or implied theory presented in the above technical field, background, brief summary, or detailed description.
  • the term “substantially” is meant to include any minor variations resulting from design or manufacturing defects, device or component tolerances, environmental effects, and/or other factors.
  • the term “substantially” also allows for differences from the perfect or ideal situation due to parasitics, noise, and other practical considerations that may be present in actual implementations.
  • first”, “second” and similar terms may also be used herein for reference purposes only and are therefore not intended to be limiting.
  • the words “first,” “second,” and other such numerical terms referring to structures or elements do not imply a sequence or order unless clearly indicated by the context.
  • Blockchain network A system in which chained data based on blockchain technology is jointly maintained by multiple participants on a distributed network through consensus rules.
  • Blockchain consensus node A network node in the blockchain network that has a complete copy of the ledger and the ability to participate in blockchain network consensus and ledger maintenance.
  • Blockchain routing node A network node in a blockchain network that has the ability to communicate across blockchains but does not have the ability to participate in blockchain network consensus and ledger maintenance. Sometimes it can be configured to have a complete ledger. copy.
  • Homogeneous blockchain can also be referred to as isomorphic chain in this article: a blockchain built on the same underlying blockchain technology platform, security mechanism, consensus algorithm, network topology, and block generation verification between isomorphic chains The logic is consistent, generally using the same set of protocols, request formats, verification methods, etc.
  • Heterogeneous blockchain can also be referred to as heterogeneous chain in this article: a blockchain built based on different blockchain underlying technology platforms, security mechanisms, consensus algorithms, network topology, and block generation verification between heterogeneous chains
  • the logic is inconsistent and generally uses different protocols, request formats, verification methods, etc.
  • Bitcoin uses the PoW consensus algorithm
  • the alliance chain Fabric uses the traditional deterministic consensus algorithm.
  • the block composition form and deterministic guarantee mechanism of the two are very different.
  • Cross-chain transactions During the execution process, a transaction in one blockchain needs to call a smart contract deployed in another blockchain (which may also be referred to as a contract in this article), or requires the execution result of another blockchain's contract as enter.
  • nodes belonging to different blockchain networks may have cross-blockchain (which may also be referred to as cross-chain in this article) interaction requirements to achieve their business transactions. Since these nodes belong to different blockchain networks, there is a mutual trust issue in cross-chain transactions between them.
  • the present disclosure provides, on the one hand, a system for cross-blockchain interaction, which constructs a multi-layer blockchain network architecture with high scalability, and can enable the Deploy multiple lower-layer blockchain networks to allow cross-chain interactions between lower-layer blockchain networks through a common upper-layer blockchain network, and to allow each lower-layer blockchain network to query other lower-layer blockchain networks in the upper-layer blockchain network
  • the current node members of the blockchain network are used to achieve trust between the underlying blockchain networks.
  • the system 100 for cross-blockchain interaction according to various exemplary embodiments of the present disclosure will be described in detail below with reference to FIGS. 1 to 10 .
  • the system 100 may include a first blockchain network 1110, a second blockchain network 1120, and their upper blockchain network 1100.
  • the first blockchain network 1110 and the second blockchain network 1120 are lower blockchain networks of the upper blockchain network 1100 . Therefore, the first blockchain network 1110, the second blockchain network 1120 and the upper blockchain network 1100 form a two-layer blockchain network architecture.
  • the upper blockchain network 1100 can be a relay chain network, which is the main network of a large-scale blockchain network, and the first blockchain network 1110 and the second blockchain network 1120 can be relay chains. Different sub-networks of the chain network.
  • the upper blockchain network 1100 can be deployed at the relay layer, and the first blockchain network 1110 and the second blockchain network 1120 can be deployed at the network layer below the relay layer.
  • the upper blockchain network 1100, the first blockchain network 1110, and the second blockchain network 1120 are not limited to the above-mentioned relay chain network and its sub-networks, and can also be other two-layer blockchain network architectures.
  • the upper blockchain network and the lower blockchain network can also be deployed at the network layer, and the first blockchain network 1110 and the second blockchain network 1120 can be deployed at the service layer below the network layer.
  • the upper blockchain network 1100, the first blockchain network 1110, and the second blockchain network 1120 can be deployed in any two adjacent layers in the multi-layer blockchain network architecture, as long as the upper blockchain network
  • the network 1100 can be the upper blockchain network common to the first blockchain network 1110 and the second blockchain network 1120.
  • the first blockchain network 1110 may include a first routing node BR11 and a plurality of first consensus nodes X1, X2, X3, and X4 that communicate with each other.
  • the first routing node BR11 can be used to communicate with the first upper routing node BR1 in the upper blockchain network 1100, and is responsible for sending and receiving cross-chain messages. This can be achieved through a communication network dedicated to the blockchain, or through other communication networks such as the Internet.
  • the second blockchain network 1120 may include a second routing node BR21 and a plurality of second consensus nodes Y1, Y2, Y3, Y4 that communicate with each other.
  • the second consensus nodes Y1, Y2, Y3, and Y4 can be used to implement specific services of the second blockchain network 1120, and are responsible for verifying transactions and consensus on the chain.
  • the number of the second consensus nodes Y1, Y2, Y3, and Y4 is illustrated as four, this is only exemplary and not restrictive, and the actual second blockchain network 1120 may include any number of consensus nodes.
  • the second routing node BR21 can be used to communicate with the second upper routing node BR2 in the upper blockchain network 1100, and is responsible for sending and receiving cross-chain messages. This can be achieved through a communication network dedicated to the blockchain, or through other communication networks such as the Internet.
  • the upper layer blockchain network 1100 may include a first upper layer routing node BR1 communicating with the first routing node BR11 and a second upper layer routing node BR2 communicating with the second routing node BR21.
  • the upper-layer blockchain network 1100 may also include multiple upper-layer consensus nodes A1, A2, A3, and A4.
  • the upper-layer consensus nodes A1, A2, A3, and A4 can be used to implement specific services of the upper-layer blockchain network 1100, and are responsible for verifying transactions and consensus on the chain.
  • the number of upper-layer consensus nodes A1, A2, A3, and A4 is illustrated as four, this is only illustrative and not restrictive, and the actual upper-layer blockchain network 1100 may include any number of consensus nodes.
  • the upper routing nodes of the upper blockchain network 1100 (such as the first upper routing node BR1 and the second upper routing node BR2) are the communication bridge between the upper blockchain network 1100 and its lower blockchain network and can be responsible for forwarding the lower blockchain. Cross-chain requests between networks, and responses to requests from the lower blockchain network to the upper blockchain network 1100.
  • Each of the first blockchain network 1110 and the second blockchain network 1120 may register with a corresponding one of the first upper layer routing node BR1 and the second upper layer routing node BR2 when accessing the upper layer blockchain network 1100 , and after the registration is successful, the network identifier allocated by the corresponding one of the first upper layer routing node BR1 and the second upper layer routing node BR2 is obtained. Since both the first blockchain network 1110 and the second blockchain network 1120 are registered under the upper blockchain network 1100, the first blockchain network 1110 and the second blockchain network 1120 are isomorphic.
  • the first byte can represent the node identification of the uppermost (first layer) blockchain network (such as the relay chain network), and subsequent bytes can represent the lower layer network.
  • Node identification for example, the second byte represents the second layer network node identification, the third byte represents the third layer network node identification, and the fourth byte represents the fourth layer network node identification. This identification method ensures the reliability of the network. Scalability.
  • the network identifier of the first blockchain network 1110 registered in the first upper routing node BR1 can be 81000000
  • the network identifier of the second blockchain network 1110 registered in the second upper routing node BR2 The network identifier of the blockchain network 1120 may be 82000000.
  • the first blockchain network 1110 corresponds to blockchain
  • the URI identifier of chain X is 81000000/X
  • the URI identifier of blockchain Y is 82000000/Y.
  • a service can also be represented by a URI (such as network identification/chain identification/service identification) , for example, blockchain Y publishes the URI identifier of contract C service in the upper blockchain network 1100 as 82000000/Y/C, and after the service is released, it is registered in any lower blockchain under the upper blockchain network 1100 Nodes in the network (for example, the first blockchain network 1110 and the second blockchain network 1120) can call the service through the URI identification of the service.
  • URI such as network identification/chain identification/service identification
  • the upper blockchain network 1100 is also configured to change the consensus node of each blockchain network in the first blockchain network 1110 and the second blockchain network 1120 in the upper blockchain network 1100
  • the on-chain certificate is used to manage the consensus nodes of each blockchain network in the first blockchain network 1110 and the second blockchain network 1120 .
  • the upper-layer blockchain network 1100 can manage the node member information of all lower-layer blockchain networks registered under it. Any changes (joining, exit) of nodes in the lower-layer blockchain network must be made in the upper-layer area.
  • the certificate is stored on the chain in the blockchain network 1100.
  • any node of the upper-layer blockchain network 1100 (for example, the first upper-layer routing node BR1, the second upper-layer routing node BR2, the upper-layer consensus nodes A1, A2, A3, and A4) all know that they are registered under the upper-layer blockchain network 1100 Node member information of each lower-layer blockchain network, and therefore can conduct Simple Payment Verification (SPV) verification of transactions in the lower-layer blockchain network by verifying signature sets or aggregating signatures, without the need to maintain the lower layer On-chain data on the blockchain network.
  • SPV Simple Payment Verification
  • each lower-layer blockchain network of the upper-layer blockchain network 1100 for example, for each blockchain in the first blockchain network 1110 and the second blockchain network 1120 in FIG. 1 Network:
  • the new node can be configured to obtain a certificate from the upper blockchain network 1100 and call the deployment in the blockchain network based on the obtained certificate.
  • the first method of the first joining contract in the blockchain network for requesting to join the blockchain network (at this time, the status of the new node can be marked as "pending", which does not count as the A formal consensus node of the blockchain network), the blockchain network may be configured to invoke a second join deployed in the upper blockchain network 1100 in the upper blockchain network 1100 in response to executing the first method. contract to request the upper-layer blockchain network 1100 to add the new node in the blockchain network.
  • the upper-layer blockchain network 1100 may be configured to add the second joining contract to the contract after executing the second joining contract.
  • the execution result is uploaded to the upper blockchain network 1100 and stored as a certificate (at this time, the node is marked as "joined” in the upper blockchain network 1100) and the uploaded certificate is transmitted to the blockchain network, and the area
  • the blockchain network may be configured to call the second method of the first joining contract in the blockchain network for confirming joining the blockchain network based on the on-chain proof to set the new node to Consensus node of the blockchain network (at this time, the status of the new node can be marked as "active" and becomes the official consensus node of the blockchain network).
  • the aforementioned certificate may refer to an identity certificate (for example, it may include the public key information of the node, or other information that can characterize the identity of the node, such as the node identification ID), which may be issued through a root of trust, for example.
  • a new node needs an identity certificate before the blockchain network can recognize it and decide whether to allow it to join.
  • the consensus node of the blockchain network wants to exit the blockchain network, the consensus node can be configured to call the first exit contract deployed in the blockchain network.
  • the blockchain network may be configured to invoke deployment in the upper blockchain network 1100 in response to executing the first exit contract.
  • the second exit contract in the upper blockchain network 1100 requests the upper blockchain network 1100 to cause the consensus node to exit the blockchain network.
  • the upper blockchain network 1100 may be configured to execute the second exit. After the contract, the execution result of the second withdrawal contract is uploaded to the upper blockchain network 1100 and stored as evidence (at this time, the node is marked as "exit" in the upper blockchain network 1100).
  • Both the first blockchain network 1110 and the second blockchain network 1120 trust the upper blockchain network 1100 and do not need to trust one or some upper routing nodes in the upper blockchain network 1100 . That is to say, the first blockchain network 1110 trusts the upper blockchain network 1100 itself without entrusting the first upper routing node BR1 in the upper blockchain network 1100 to communicate with it as its setting in the upper blockchain network 1100 On behalf of trust, the second blockchain network 1120 trusts the upper blockchain network 1100 itself without entrusting the second upper routing node BR2 in the upper blockchain network 1100 to communicate with it as it is set in the upper blockchain network 1100 trusted representatives.
  • the upper blockchain network 1100 does not need to know the on-chain data of each of the first blockchain network 1110 and the second blockchain network 1120 but only needs to manage the first blockchain network 1110 and the second blockchain. Node membership information for each of the networks 1120. Since any upper-layer routing node (for example, the first upper-layer routing node BR1, the second upper-layer routing node BR2) in the upper-layer blockchain network 1100 knows both the node member information of the first blockchain network 1110 and the second area Node member information of the blockchain network 1120, so the cross-chain interaction between the first blockchain network 1110 and the second blockchain network 1120 can be shared by the first blockchain network 1110 and the second blockchain network 1120 The trusted upper blockchain network 1100 endorses and gains trust.
  • One of the first blockchain network 1110 and the second blockchain network 1120 does not need to maintain the on-chain data and node member information of the other of the first blockchain network 1110 and the second blockchain network 1120 , only needing to query the node member information of the other one of the first blockchain network 1110 and the second blockchain network 1120 to the upper blockchain network 1100 to perform cross-chain interaction with each other.
  • trust transfer is achieved between the first blockchain network 1110 and the second blockchain network 1120 via the upper blockchain network 1100 without the need for the first blockchain network 1110 and the second blockchain network. 1120Trust each other.
  • the first routing node BR11 may be configured to obtain data from the first blockchain network 1110 of the cross-chain transaction msg_req to be executed in the second blockchain network 1120 and transmit the cross-chain transaction msg_req to the first upper routing node BR1.
  • the cross-chain transaction may be sent by the first consensus node of the first blockchain network 1110 to the first routing node BR11.
  • the cross-chain transactions in the first blockchain network 1110 can also be collected by the first routing node BR11 itself.
  • the first routing node BR11 itself may also be a full node.
  • the cross-chain request is subject to consensus within this blockchain. After the consensus is completed, cross-chain transactions are generated and packaged into blocks. Therefore, the first routing node BR11 can query the cross-chain transactions in the block by monitoring the block.
  • the first routing node BR11 may also be configured to structure the cross-chain transaction into a specific cross-chain message format to facilitate cross-chain interaction.
  • the first upper-layer routing node BR1 may be configured to transmit the cross-chain transaction msg_req received from the first routing node BR11 to the second upper-layer routing node BR2.
  • the second upper layer routing node BR2 may be configured to transmit the cross-chain transaction msg_req received from the first upper layer routing node BR1 to the second routing node BR21.
  • the second routing node BR21 may be configured to broadcast the cross-chain transaction msg_req received from the second upper-layer routing node BR2 in the second blockchain network 1120, so that the plurality of second consensuses of the second blockchain network 1120 Nodes Y1, Y2, Y3, Y4 receive and execute the cross-chain transaction.
  • the cross-chain transaction may be received and executed by a master node among the plurality of second consensus nodes Y1, Y2, Y3, and Y4 of the second blockchain network 1120, and the master node may be Determined by the specific consensus mechanism of the second blockchain network 1120.
  • the cross-chain transaction requested by the first blockchain network 1110 is executed in the second blockchain network 1120 .
  • neither the first consensus nodes of the first blockchain network 1110 are required to sign nor the passing ones.
  • Each routing node verifies cross-chain transactions and/or adds its own signature.
  • the node can call the smart contract or service in the second blockchain network 1120.
  • the cross-chain transaction may include the network identification of the first blockchain network 1110 as the sender and the network identification of the second blockchain network 1120 as the recipient.
  • the first upper-layer routing node BR1 may be configured to query the second upper-layer route communicating with the second blockchain network 1120 in the upper-layer blockchain network 1100 according to the network identification of the second blockchain network 1120 included in the cross-chain transaction.
  • Node BR2 and transmits cross-chain transactions to the second upper-layer routing node BR2.
  • blockchain Y of the second blockchain network 1120 publishes the URI identifier of the contract C service in the upper blockchain network 1100 as 82000000/Y/C.
  • the network identifier in the URI identifier determines based on the first byte 82 of the network identifier that the upper routing node communicating with the target blockchain network 1120 in the upper blockchain network 1100 is the second upper routing node BR2 , and then the cross-chain transaction can be transmitted to the second upper-layer routing node BR2.
  • the second upper-layer routing node BR2 may also be configured to search for its own locally registered second blockchain network 1120 according to the network identification (for example, subsequent bytes) of the second blockchain network 1120 included in the cross-chain transaction.
  • the second routing node BR21 and transmits the cross-chain transaction to the second routing node BR21.
  • the cross-chain transaction may include the URI identifier of the service that the first blockchain network 1110 wants to call, and the master node of the second blockchain network 1120 may execute the corresponding service based on the service identifier.
  • the execution result of the cross-chain transaction (for example, including but not limited to a receipt message) can also be transmitted from the second blockchain network 1120.
  • Figure 2 depicts an example process of cross-chain interaction from the second blockchain network 1120 to the first blockchain network 1110.
  • the second routing node BR21 may be configured to obtain a message from the second blockchain network 1120 indicating that the cross-chain transaction is executed.
  • the execution result and the uplink proof for the execution result are transmitted to the second upper layer routing node BR2.
  • the on-chain proof may refer to the signature of the second consensus node, which may be, for example, a collection of signatures or an aggregated signature.
  • the execution result and the on-chain proof may be sent to the second routing node BR21 by the second consensus node of the second blockchain network 1120.
  • the execution results and on-chain certificates in the second blockchain network 1120 can also be collected by the second routing node BR21 itself.
  • the second routing node BR21 itself may also be a full node. For example, after a cross-chain transaction is executed in the second blockchain network 1120, the execution result is consensus within this blockchain. After the consensus is completed, the execution results are packaged into blocks and the on-chain proof is generated. Therefore, the second routing node BR21 can query the execution results and on-chain proof by monitoring the block. In some embodiments, the second routing node BR21 may also be configured to construct the execution result into a specific cross-chain message format to facilitate cross-chain interaction.
  • the second routing node BR21 may also be configured to request the plurality of the second blockchain network 1120 after obtaining an execution result from the second blockchain network 1120 indicating that the cross-chain transaction is executed.
  • the second consensus nodes Y1, Y2, Y3, and Y4 sign the execution results, and when the number of received signatures of the second consensus nodes reaches the preset threshold, the execution results and the signatures including the received signatures of the second consensus nodes are The uplink proof is transmitted to the second upper layer routing node BR2.
  • This preset threshold is configurable. In this article, the preset threshold may be any quantity related to quantity, which may be expressed as a numerical value, or may be expressed as a ratio or a percentage, for example.
  • the second routing node BR21 may be required to send the execution results and on-chain certificates after receiving the signatures of all second consensus nodes Y1, Y2, Y3, and Y4 in the second blockchain network 1120. transmitted to the second upper-layer routing node BR2; in other embodiments, the second routing node BR21 may also be required to receive more than a preset proportion (for example, more than two-thirds, more than The execution result and the on-chain certificate will be transmitted to the second upper-layer routing node BR2 only after the signature of the second consensus node (one-half, etc.) is received; in other embodiments, the second routing node BR21 may also be required to receive the signature of the second consensus node.
  • a preset proportion for example, more than two-thirds, more than The execution result and the on-chain certificate will be transmitted to the second upper-layer routing node BR2 only after the signature of the second consensus node (one-half, etc.) is received; in other embodiments, the second routing node
  • the second routing node BR21 can only collect and forward the signatures of the second consensus node without verifying whether these signatures are correct or verifying the execution results.
  • the second routing node BR21 receives the on-chain certificate sign(Y1, Y2, Y3, Y4) including the signatures of all second consensus nodes Y1, Y2, Y3, Y4 and compares it with the execution result msg_resp are transmitted together to the second upper layer routing node BR2.
  • the second upper layer routing node BR2 may be configured to transmit the execution result and the uplink certificate received from the second routing node BR21 to the first upper layer routing node BR1.
  • the first upper layer routing node BR1 may be configured to transmit the execution result and the uplink certificate received from the second upper layer routing node BR2 to the first routing node BR11.
  • the execution result may include the network identification of the second blockchain network 1120 as the sender and the network identification of the first blockchain network 1110 as the recipient, and the second upper routing node BR2 may be configured Query the first upper-layer routing node BR1 that communicates with the first blockchain network 1110 in the upper-layer blockchain network 1100 according to the network identifier of the first blockchain network 1110 included in the execution result, and upload the execution result and the first blockchain network 1110 to the chain. The proof is transmitted to the first upper routing node BR1.
  • blockchain X of the first blockchain network 1110 calls the contract C service, and blockchain Y executes the contract C service in response to this, then its execution result may include the area The URI identifier of block chain
  • the upper routing node in the network 1100 that communicates with the target blockchain network, that is, the first blockchain network 1110, is the first upper routing node BR1, and then the execution result and the uplink certificate can be transmitted to the first upper routing node BR1.
  • the first upper-layer routing node BR1 may also be configured to search for its own locally registered first blockchain network 1110 according to the network identification (for example, subsequent bytes) of the first blockchain network 1110 included in the cross-chain transaction.
  • the first routing node BR11 and transmits the execution result and the uplink certificate to the first routing node BR11.
  • Each of the second upper layer routing node BR2 and the first upper layer routing node BR1 can forward only the execution result and the uplink certificate without verifying any of the execution result and the uplink certificate.
  • the second upper-layer routing node BR2 transmits the execution result msg_resp and the uplink certificate sign(Y1, Y2, Y3, Y4) to the first upper-layer routing node BR1
  • the first upper-layer routing node BR1 transmits the execution result msg_resp and the uplink certificate sign (Y1, Y2, Y3, Y4) are transmitted to the first routing node BR11.
  • the first routing node BR11 may be configured to broadcast the execution result and the on-chain certificate received from the first upper-layer routing node BR1 in the first blockchain network 1110, so that the plurality of first blockchain network 1110 A consensus node X1, X2, X3, X4 receives the execution results and on-chain proof.
  • the first routing node BR11 can only forward the execution result and the uplink certificate without verifying either of the execution result and the uplink certificate.
  • the first consensus node does not maintain the node member information of the second blockchain network 1120, it does not recognize the consensus nodes in the second blockchain network 1120, and is temporarily unable to verify the received on-chain certificate.
  • the first consensus node (for example, the master node among the plurality of first consensus nodes X1)
  • For a query request to query the consensus node public key list of the second blockchain network 1120 verify whether the received on-chain certificate is correct based on the queried consensus node public key list of the second blockchain network 1120, and after the verification passes When trusting the execution results received.
  • the first routing node BR11 may be configured to obtain a query request msg_query from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 and transmit the query request msg_query. To the first upper layer routing node BR1.
  • the first upper-layer routing node BR1 Since the first upper-layer routing node BR1 knows the node member information of the second blockchain network 1120, the first upper-layer routing node BR1 may be configured to respond to receiving the query request from the first routing node BR11 to query the second blockchain network 1120.
  • the consensus node public key list of the network 1120 is read-only queried, and the queried consensus node public key list msg_list of the second blockchain network 1120 is transmitted to the first routing node BR11.
  • the first upper-layer routing node BR1 does not need to upload the read-only query to the upper-layer blockchain network 1100 to store the certificate.
  • the first routing node BR11 may be further configured to broadcast the consensus node public key list msg_list of the second blockchain network 1120 received from the first upper layer routing node BR1 in the first blockchain network 1110, such that the first consensus node The consensus node public key list msg_list of the second blockchain network 1120 is received.
  • the first consensus node may be configured to verify whether the received on-chain proof msg_resp is correct based on the consensus node public key list msg_list of the second blockchain network, and trust the received execution result when the verification is passed. Specific trust policies can be configured to determine what conditions the on-chain proof meets when the verification is passed.
  • the trust policy can require that the verification is passed when all the received signatures are correct, or It may be required that the verification is passed when the correct signatures among the received signatures account for more than a preset proportion (for example, more than two-thirds, more than one-half, etc.), which is not particularly limited here.
  • the first blockchain network 1110 can perform subsequent processing after trusting the execution results, for example, uploading the execution results to the first blockchain network 1110 for certificate storage and/or inputting them into subsequent contract operations.
  • the second blockchain network 1120 returns the execution result and the on-chain certificate to the first blockchain network 1110 (the second routing node BR21 obtains the execution result and the on-chain certificate and transmits it to the second upper routing node BR2) And the first upper layer routing node BR1 executes the query request received from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 from the first routing node BR11 and returns the queried second zone.
  • the node members of the second blockchain network 1120 happen to change, which may cause the first consensus node to fail to verify the on-chain proof. At this time, the first consensus node can go back to the upper level.
  • the blockchain network 1100 sends a query request. Since changes to node members in blockchain networks are usually low-frequency operations, such failures usually occur less frequently and can generally be tolerated. If the re-queried consensus node public key list of the second blockchain network 1120 is indeed inconsistent with the previously queried consensus node public key list of the second blockchain network 1120, the last failure may be due to the second block This is caused by changes in the node members of the chain network 1120, so the re-queried consensus node public key list of the second blockchain network 1120 can be used to verify the on-chain certificate again.
  • the first blockchain network 1110 is provided with one first routing node BR11 , but in other examples, the first blockchain network 1110 may also be provided with multiple first routing nodes.
  • Institution A and Institution B jointly participated in Blockchain X of the first blockchain network 1110.
  • Institution A and Institution B trust each other to a certain extent, they may not trust each other very much.
  • each of the first routing nodes may be configured to independently obtain the transaction from the first blockchain network 1110.
  • the cross-chain transaction is to be executed in the second blockchain network 1120 and the cross-chain transaction is transmitted to the first upper routing node BR1.
  • the first upper-layer routing node BR1 may be further configured to receive cross-chain transactions from each of the first routing nodes, and verify the hash value of the cross-chain transaction received from each of the first routing nodes. Whether they are consistent, and when the verification passes, the deduplicated cross-chain transaction will be transmitted to the second upper-layer routing node BR2.
  • the first upper-layer routing node BR1 may receive the same cross-chain transaction multiple times from multiple first routing nodes, but the first upper-layer routing node BR1 may deduplicate the received cross-chain transaction and convert the deduplicated Cross-chain transactions are transmitted to the second upper routing node BR2.
  • the first upper-layer routing node BR1 may send a request to the first upper-layer routing node BR1.
  • a routing node returns a failure message.
  • each of the first routing nodes may be configured to individually receive the execution result and the on-chain certificate from the first upper-layer routing node BR1, And broadcast the received execution results and on-chain proof in the first blockchain network 1110.
  • the first consensus node may be further configured to separately query the upper blockchain network 1100 for the consensus node public key list of the second blockchain network 1120 via each first routing node.
  • each first routing node may also be configured to independently obtain a query request from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 and transmit the query request to the first routing node.
  • An upper layer routing node BR1 receives the consensus node public key list of the second blockchain network 1120 from the first upper layer routing node BR1 and broadcasts the received second blockchain network in the first blockchain network 1110 1120 consensus node public key list.
  • the first consensus node may be configured to verify the on-chain proof received from each first routing node based on the consensus node public key list of the second blockchain network 1120 received from the first routing node. Whether it is correct, and trust the received execution result when the number of verified first routing nodes among the plurality of first routing nodes reaches a preset threshold.
  • the first consensus node may also be configured to further verify whether the hash value of the execution result received from each first routing node is consistent after verifying that the on-chain certificate is passed, and trust the deduplication process when the verification is passed. execution results.
  • the first consensus node may also be configured to be based on the consensus node public key list of the second blockchain network 1120 received from one of the plurality of first routing nodes. Verify whether the uplink certificate received from another first routing node among the plurality of first routing nodes is correct. This can be considered cross-validation.
  • the first consensus node may be configured to trust the received execution result when the number of first routing nodes that pass cross-validation among the plurality of first routing nodes reaches a preset threshold.
  • the above-mentioned preset threshold is configurable and is not particularly limited here.
  • the first consensus node may further verify whether the hash value of the execution result received from each of the plurality of first routing nodes is consistent, and trust the process when the verification passes. The execution result of deduplication.
  • the first blockchain network 1110 is provided with two first routing nodes BR11 and BR12.
  • the first routing node BR11 and the first routing node BR12 each independently obtain the cross-chain transaction from the first blockchain network 1110 to be executed in the second blockchain network 1120 and transmit the cross-chain transaction to the first upper routing Node BR1, the first upper-layer routing node BR1 transmits the deduplicated cross-chain transaction to the second upper-layer routing node BR2 and then transmits it to the second routing node BR21.
  • the second routing node BR21 broadcasts the received cross-chain transaction in the second blockchain network 1120 so that the cross-chain transaction is executed and uploaded in the second blockchain network 1120 .
  • the second routing node BR21 obtains the execution result indicating that the cross-chain transaction was executed and the on-chain proof for the execution result from the second blockchain network 1120, and the execution result and the on-chain proof are sequentially transmitted to the second routing node BR21.
  • the upper layer routing node BR2, the first upper layer routing node BR1, and the first upper layer routing node BR1 transmit the execution results and the uplink certificate to each of the first routing nodes BR11 and BR12.
  • Each first routing node BR11 and BR12 may broadcast the received execution result and on-chain proof in the first blockchain network 1110 respectively.
  • Each of the first routing nodes BR11 and BR12 can also independently obtain a query request from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 and transmit the query request to the first routing node BR11 and BR12.
  • the upper routing node BR1 separately receives the consensus node public key list of the second blockchain network 1120 from the first upper routing node BR1 and broadcasts the received second blockchain network 1120 in the first blockchain network 1100 List of consensus node public keys. If the second blockchain network 1120 is also provided with multiple second routing nodes, the second upper-layer routing node BR2 can transmit the received cross-chain transaction to and from each second routing node. Receive the execution result and uplink certificate obtained by the second routing node respectively.
  • the second blockchain network 1120 is provided with one second routing node BR21 , but in other examples, the second blockchain network 1120 may also be provided with multiple second routing nodes.
  • institutions C and D jointly participate in blockchain Y of the second blockchain network 1120.
  • institutions C and D trust each other to a certain extent, they may not trust each other very much. Therefore, institutions C and D You can respectively set your own second routing node in the second blockchain network 1120 for communicating with the upper blockchain network 1100. Therefore, in some embodiments, the second blockchain network 1120 may include a plurality of the second routing nodes, and each second routing node may communicate with the second upper-layer routing node BR2.
  • each of the second routing nodes may be configured to individually receive the cross-chain transaction from the second upper routing node BR2. Transact and broadcast the received cross-chain transaction in the second blockchain network 1120.
  • the second consensus node may also be configured to verify whether the hash values of the cross-chain transactions received from each of the second routing nodes are consistent, and execute the deduplicated cross-chain transaction when the verification is passed. .
  • each of the second routing nodes may be configured to independently obtain an indication from the second blockchain network 1120 that the cross-chain transaction is executed.
  • the execution result of the execution and the uplink proof for the execution result are transmitted to the second upper layer routing node BR2.
  • the second upper layer routing node BR2 may be further configured to receive execution results and uplink certificates from each of the second routing nodes, and verify the hash of the execution results received from each of the second routing nodes. Check whether the hash value and the hash value of the uplink certificate are consistent, and when the verification is passed, the deduplicated execution result and the uplink certificate will be transmitted to the first upper routing node BR1.
  • the second upper-layer routing node BR2 may repeatedly receive the same execution result and uplink certificate from multiple second routing nodes, but the second upper-layer routing node BR2 may deduplicate the received execution result and uplink certificate.
  • the second upper layer routing node BR2 may return a failure message to the second routing node.
  • the second blockchain network 1120 is provided with two second routing nodes BR21 and BR22.
  • the first routing node BR1 obtains the cross-chain transaction to be executed in the second blockchain network 1120 from the first blockchain network 1110 and the cross-chain transaction is sequentially transmitted to the first upper-layer routing node BR1 and the second upper-layer routing node BR2.
  • the second upper-layer routing node BR2 transmits the received cross-chain transaction to each of the second routing nodes BR21 and BR22.
  • Each of the second routing nodes BR21 and BR22 respectively broadcasts the received cross-chain transaction in the second blockchain network 1120 so that the cross-chain transaction is executed and uploaded in the second blockchain network 1120 .
  • each second routing node BR21 and BR22 respectively obtains the execution result from the second blockchain network 1120 indicating that the cross-chain transaction is executed and the on-chain proof for the execution result and transmits the execution result and the on-chain proof.
  • the second upper layer routing node BR2 will sequentially transmit the deduplicated execution result and the uplink certificate to the first upper layer routing node BR1 and the first routing node BR11.
  • the first routing node BR11 broadcasts the received execution result and on-chain certificate in the first blockchain network 1110.
  • the first upper layer routing node BR1 can receive the cross-chain transaction obtained by the first routing node from each first routing node and can receive the cross-chain transaction.
  • the execution results and on-chain proof are transmitted to each first routing node.
  • the first blockchain network 1110 communicates with one first upper routing node BR1 in the upper blockchain network 1100 .
  • a first upper-layer routing node may have a single point of failure and is unreliable
  • this problem can be solved by setting up a cluster. That is to say, the first blockchain network 1110 may set up a set of communication nodes in the upper-layer blockchain network 1100.
  • Such a set of communication nodes may include multiple nodes that communicate with the first routing node BR11 of the first blockchain network 1110.
  • the first upper layer routing node may be used to set up.
  • the upper layer blockchain network 1100 may include a plurality of the first upper layer routing nodes communicating with the first routing node BR11.
  • the first routing node BR11 may be configured to transmit the cross-chain transaction to each of the first upper-layer routing nodes.
  • each of the first upper-layer routing nodes may be configured to receive cross-chain transactions from the first routing node BR11 individually.
  • Each of the first upper-layer routing nodes may be configured to transmit the received cross-chain transaction to the second upper-layer routing node BR2.
  • the second upper-layer routing node BR2 may be configured to receive cross-chain transactions from each of the first upper-layer routing nodes, and verify the hash of the cross-chain transactions received from each of the first upper-layer routing nodes. Whether the values are consistent, and when the verification is passed, the deduplicated cross-chain transaction will be transmitted to the second routing node BR21.
  • the second upper routing node BR2 may be configured to receive the execution result from the second routing node BR21 and the execution result for the execution result.
  • the uplink certificate is transmitted to each of the first upper-layer routing nodes, that is, each of the first upper-layer routing nodes is configured to receive the execution result and the uplink certificate individually from the second upper-layer routing node BR2.
  • Each of the first upper-layer routing nodes may be configured to transmit the execution result and the uplink certificate to the first routing node.
  • the first routing node BR11 may be configured to broadcast the execution results and the on-chain proof received from each of the first upper-layer routing nodes in the first blockchain network 1110, so that the first blockchain The plurality of first consensus nodes of the network receive execution results and on-chain proofs from each of the first upper-layer routing nodes.
  • the first consensus node may be configured to send a query request to the upper blockchain network 1100 for querying the consensus node public key list of the second blockchain network 1120, based on the queried second blockchain network 1120.
  • the consensus node public key list of the network 1120 verifies whether the uplink certificate received from each of the first upper layer routing nodes is correct, and the first upper layer that passes the verification among the plurality of first upper layer routing nodes Trust the execution results received when the number of routing nodes reaches a preset threshold.
  • the preset threshold is configurable and is not particularly limited here.
  • the first routing node BR11 may also be configured to obtain a query request from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 and transmit the query request to each of the a first upper-layer routing node, and respectively receives the consensus node public key list of the second blockchain network 1120 from each of the first upper-layer routing nodes and broadcasts the list of consensus nodes from each of the first blockchain network 1110 in the first blockchain network 1110 The consensus node public key list of the second blockchain network 1120 received by the upper routing node.
  • the first consensus node may be configured to verify the on-chain proof from each of the first upper-layer routing nodes based on a list of consensus node public keys from the second blockchain network 1120 of the first upper-layer routing node. Whether it is correct, and trust the received execution result when the number of verified first upper-layer routing nodes among the plurality of first upper-layer routing nodes reaches a preset threshold. Further, for example, the first consensus node may also be configured to further verify whether the hash values of the execution results from each of the first upper-layer routing nodes are consistent after verifying that the on-chain certificate is passed, and trust the process when the verification is passed. Heavy execution results.
  • hash verification and deduplication of the execution results may be performed in advance by the first routing node BR11.
  • the first consensus node may also be configured to be based on the consensus node public key list of the second blockchain network 1120 from one of the plurality of first upper routing nodes. Verify whether the uplink certificate from another first upper-layer routing node among the plurality of first upper-layer routing nodes is correct. This can be considered cross-validation.
  • the first consensus node may be configured to trust the received execution result when the number of first upper-layer routing nodes that pass cross-validation among the plurality of first upper-layer routing nodes reaches a preset threshold.
  • the upper blockchain network 1100 may include two first upper routing nodes BR1 and BR1' that communicate with the first routing node BR11, and the first routing node BR11 may transmit cross-chain transactions to each first routing node BR11.
  • Upper layer routing nodes BR1, BR1', each first upper layer routing node BR1, BR1' can transmit the received cross-chain transaction to the second upper layer routing node BR2, and the second upper layer routing node BR2 can transfer the deduplicated cross-chain transaction.
  • the chain transaction is sent to the second routing node BR21.
  • the second routing node B21 can transmit the execution result and the on-chain proof to the second upper-layer routing node BR2 and then to each first upper-layer routing node BR1 and BR1', each first upper-layer routing node BR1 and BR1' respectively transmits the execution result and the uplink certificate received from the second upper-layer routing node BR2 to the first routing node BR11.
  • each of the first upper layer routing nodes BR1 and BR1' may also respond to a query request received from the first routing node BR11 for querying the consensus node public key list of the second blockchain network 1120.
  • the consensus node public key list of the blockchain network 1120 is read-only queried, and the queried consensus node public key list of the second blockchain network 1120 is transmitted to the first routing node BR11.
  • each first upper layer routing node may not be required to independently perform both querying and sending and receiving of data.
  • one or more first upper-layer routing nodes may be made to perform data transmission and reception, and another one or more first upper-layer routing nodes may be made to perform data query. This can prevent unreliable single points of failure and save computing resources.
  • the plurality of first upper layer routing nodes communicating with the first routing node BR11 may include a first first upper layer routing node and a second first upper layer routing node.
  • the first routing node BR11 may be configured to transmit the cross-chain transaction to the first upper-layer routing node, that is, The first upper-layer routing node may be configured to receive cross-chain transactions from the first routing node BR11 and transmit the received cross-chain transactions to the second upper-layer routing node BR2.
  • the second upper-layer routing node BR2 may be configured to transmit the execution result and the on-chain proof for the execution result to the first first upper-layer routing
  • the node, that is, the first upper-layer routing node may be configured to receive the execution result and the uplink certificate from the second upper-layer routing node BR2 and transmit the received execution result and the uplink certificate to the first routing node.
  • the first routing node BR11 may be further configured to broadcast the execution result and the on-chain certificate received from the first upper-layer routing node in the first blockchain network 1110, so that the multiple nodes of the first blockchain network 1110
  • the first consensus nodes X1, X2, X3, and X4 receive the execution results and on-chain certificates.
  • the first upper-layer routing node may be configured to receive a query request from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 from the first routing node BR11 and transmit the query request to the second upper-layer routing node.
  • the second first upper-layer routing node may be configured to respond to receiving the query request from the first first upper-layer routing node to the second blockchain network.
  • the consensus node public key list of 1120 is read-only queried, and the queried consensus node public key list of the second blockchain network 1120 is transmitted to the first first upper layer routing node, and the first first upper layer routing node can also Configured to transmit the consensus node public key list of the second blockchain network 1120 received from the second first upper-layer routing node to the first routing node BR11.
  • the first routing node BR11 may be configured to broadcast the consensus node public key list of the second blockchain network 1120 received from the first first upper-layer routing node in the first blockchain network 1110, so that the first blockchain The plurality of first consensus nodes X1, X2, X3, and Verify whether the received on-chain proof is correct, and trust the received execution results when the verification passes.
  • the upper blockchain network 1100 includes a first first upper routing node BR1 and a second first upper routing node BR1' communicating with the first routing node BR11.
  • the first routing node BR11 can transmit the cross-chain transaction to the first first upper-layer routing node BR1
  • the first first upper-layer routing node BR1 can transmit the cross-chain transaction to the second upper-layer routing node BR2 and then to the second routing node BR21. to broadcast in the second blockchain network 1120 and perform up-chaining.
  • the second routing node BR21 can transmit the execution result and the uplink certificate to the second upper layer routing node BR2 and then transmit it to the first upper layer routing node BR1 and the first routing node BR11 for broadcast in the first blockchain network 1110.
  • the first first upper layer routing node BR1 may transmit the query request from the first consensus node for querying the consensus node public key list of the second blockchain network 1120 received from the first routing node BR11 to the second upper layer. Routing node BR1'.
  • the second first upper-layer routing node BR1' may perform a read-only query on the consensus node public key list of the second blockchain network 1120 in response to receiving the query request from the first first upper-layer routing node BR1, and query the The consensus node public key list of the second blockchain network 1120 is transmitted to the first upper layer routing node BR1.
  • the first first upper layer routing node BR1 may further transmit the consensus node public key list of the second blockchain network 1120 received from the second first upper layer routing node BR1' to the first routing node BR11.
  • the first routing node BR11 may broadcast the consensus node public key list of the second blockchain network 1120 received from the first upper-layer routing node BR1 in the first blockchain network 1110, so that the first blockchain network 1110
  • the public key list of the consensus node verifies whether the received on-chain certificate is correct, and trusts the received execution result when the verification passes.
  • the set of communication nodes deployed by the first blockchain network 1110 in the upper-layer blockchain network 1100 may also include one or more groups of upper-layer routing nodes that communicate with the first blockchain network 1110 , each group including a or multiple sending and receiving routing nodes responsible for data sending and receiving and one or more query routing nodes responsible for data query.
  • the query request from the first routing node BR11 will be transmitted to one or more transceiver routing nodes in each group, and then each transceiver routing node in each group will separately transmit the query request to the group.
  • Each query routing node in the group performs a query.
  • Each query routing node in the group transmits the query results to each transceiver routing node in the group. Then each transceiver routing node in each group transmits the query results to the first routing node.
  • BR11 the query request from the first routing node BR11
  • each transceiver routing node in each group can directly transmit data from the first routing node BR11 or the second upper-layer routing node BR2 to the second upper-layer routing node BR2 or the first routing node BR11.
  • the first consensus node may receive execution of one or more first upper-layer routing nodes (for example, the first first upper-layer routing node BR1) among the plurality of first upper-layer routing nodes.
  • the other one or more first upper layer routing nodes for example, the second first upper layer routing node BR1'
  • Send the query request directly and based on the query request received directly from the other one or more first upper routing nodes (for example, the second first upper routing node BR1') among the plurality of first upper routing nodes
  • the consensus node public key list of the second blockchain network 1120 is verified from the one or more first upper routing nodes (for example, the first first upper routing node BR1 ) among the plurality of first upper routing nodes.
  • first upper-layer routing nodes for example, the first first upper-layer routing node
  • the second blockchain network 1120 communicates with one second upper routing node BR2 in the upper blockchain network 1100 .
  • a second upper-layer routing node may have a single point of failure and is unreliable
  • this problem can be solved by setting up a cluster. That is to say, the second blockchain network 1120 can set up a communication node set in the upper blockchain network 1100.
  • Such a communication node set can include a plurality of nodes that communicate with the second routing node BR21 of the second blockchain network 1120.
  • the second upper layer routing node can be used to set up.
  • the upper layer blockchain network 1100 may include a plurality of the second upper layer routing nodes communicating with the second routing node BR21.
  • the first upper-layer routing node BR1 may be configured to transmit the cross-chain transaction to each of the second upper-layer routing nodes.
  • the nodes, that is, each of the second upper-layer routing nodes may be configured to receive cross-chain transactions individually from the first upper-layer routing node BR1.
  • Each of the second upper-layer routing nodes may be configured to transmit the received cross-chain transaction to the second routing node BR21.
  • the second routing node BR2 may be configured to broadcast cross-chain transactions received from each of the second upper-layer routing nodes in the second blockchain network 1120, and the second consensus node may be configured to verify Whether the hash values of the cross-chain transactions from each of the second upper-layer routing nodes are consistent, and when the verification is passed, the deduplicated cross-chain transactions are executed.
  • hash verification and deduplication of cross-chain transactions can be performed in advance by the second routing node BR21.
  • the second routing node BR21 may be configured to transmit the obtained execution result and the on-chain proof for the execution result to each The second upper layer routing node, that is, each of the second upper layer routing nodes is configured to receive the execution result and the uplink certificate individually from the second routing node BR21.
  • Each of the second upper-layer routing nodes may be configured to transmit the received execution results and the uplink certificate to the first upper-layer routing node BR1.
  • the first upper-layer routing node BR1 may be configured to verify whether the hash value of the execution result received from each of the second upper-layer routing nodes and the hash value of the uplink certificate are consistent, and if the verification passes The deduplicated execution result and uplink certificate are then transmitted to the first routing node BR11.
  • the first upper-layer routing node BR1 may repeatedly receive the same execution result and uplink certificate from multiple second upper-layer routing nodes, but the first upper-layer routing node BR1 may modify the received execution result and uplink certificate.
  • the deduplicated execution result and the deduplicated uplink certificate are re-transmitted to the first routing node BR11.
  • the first upper-layer routing node BR1 may return a failure message to the second upper-layer routing node.
  • the upper blockchain network 1100 may include two second upper routing nodes BR2 and BR2' that communicate with the second routing node BR21, and the first routing node BR11 may transmit cross-chain transactions to the first upper routing node.
  • the node BR1 then transmits it to each second upper-layer routing node BR2 and BR2', and each second upper-layer routing node BR2 and BR2' can transmit the received cross-chain transaction to the second routing node BR21 to be processed in the second blockchain. Broadcast in network 1120 and perform uplinking.
  • the second routing node B21 may transmit the execution result and the on-chain proof to each of the second upper-layer routing nodes BR2 and BR2'.
  • Each second upper-layer routing node BR2 and BR2' can respectively transmit the execution result and the uplink certificate to the first upper-layer routing node BR1.
  • the first upper-layer routing node BR1 can transmit the deduplicated execution result and the deduplicated uplink certificate.
  • the proof is transmitted to the first routing node BR11 and then broadcast in the first blockchain network 1110.
  • each second upper layer routing node may not be required to independently perform both querying and sending and receiving of data.
  • one or more second upper-layer routing nodes may be made to perform data transmission and reception, and another one or more second upper-layer routing nodes may be made to perform data query. This can prevent unreliable single points of failure and save computing resources.
  • the plurality of second upper-layer routing nodes communicating with the second routing node BR21 may include a first second upper-layer routing node and a second second upper-layer routing node.
  • the first upper-layer routing node BR1 may be configured to transmit the cross-chain transaction to the first and second upper-layer routing nodes, That is, the first and second upper-layer routing nodes may be configured to receive cross-chain transactions from the first upper-layer routing node BR1 and transmit the received cross-chain transactions to the second routing node BR21.
  • the second routing node BR21 may be configured to transmit the execution result and the on-chain proof for the execution result to the first second upper layer routing node , that is, the first and second upper-layer routing nodes are configured to receive the execution results and uplink certificates from the second routing node BR21 and transmit the received execution results and uplink certificates to the first upper-layer routing node BR1.
  • the upper blockchain network 1100 includes a first second upper routing node BR2 and a second second upper routing node BR2' that communicate with the second routing node BR21.
  • the first routing node BR11 can transmit the cross-chain transaction to the first upper-layer routing node BR1
  • the first upper-layer routing node BR1 can transmit the cross-chain transaction to the first and second upper-layer routing node BR2 and then transmit it to the second routing node BR21 for further processing.
  • the second blockchain network 1120 broadcasts and performs uplinking.
  • the second routing node BR21 may transmit the execution result and the uplink certificate to the first second upper layer routing node BR2 and then to the first upper layer routing node BR1 and the first routing node BR11 for broadcast in the first blockchain network 1110 .
  • the first and second upper-layer routing node BR2 may be responsible for sending and receiving data
  • the second and second upper-layer routing node BR2' may be responsible for data query. For example, when the second blockchain network 1120 initiates a query in the first blockchain network 1110 During cross-chain transactions, the second upper-layer routing node BR2' may receive and execute the consensus node public key list from the second routing node BR21 for querying the first blockchain network 1110 via the first second upper-layer routing node BR2.
  • the query request and transmit the queried consensus node public key list of the first blockchain network 1110 to the second routing node BR21 via the first and second upper layer routing node BR2 for broadcast in the second blockchain network 1120, For the second consensus node to verify the on-chain certificate from the first blockchain network 1110 and trust the execution result from the first blockchain network 1110 when the verification passes.
  • the set of communication nodes deployed by the second blockchain network 1120 in the upper-layer blockchain network 1100 may also include one or more groups of upper-layer routing nodes that communicate with the second blockchain network 1120 , each group including a or multiple sending and receiving routing nodes responsible for data sending and receiving and one or more query routing nodes responsible for data query.
  • the query request from the second routing node BR21 will be transmitted to one or more transceiver routing nodes in each group, and then each transceiver routing node in each group will transmit the query request to the group individually.
  • Each query routing node in the group performs a query.
  • Each query routing node in the group transmits the query results to each transceiver routing node in the group. Then each transceiver routing node in each group transmits the query results to the second routing node. BR21.
  • each transceiver routing node in each group can directly transmit data from the second routing node BR21 or the first upper-layer routing node BR1 to the first upper-layer routing node BR1 or the second routing node BR21.
  • the second consensus node may receive After the execution results and uplink certification to one or more second upper routing nodes (for example, the first and second upper layer routing nodes BR2) among the plurality of second upper layer routing nodes, via the second routing node BR21 Directly sending the query request to one or more other second upper routing nodes (for example, the second second upper routing node BR2') among the plurality of second upper routing nodes, and based on the query request directly from the plurality of second upper routing nodes
  • the consensus node public key list of the first blockchain network 1110 received by the other one or more second upper-layer routing nodes (for example, the second upper-layer routing node BR2') among the second upper-layer routing nodes Verify whether the uplink certificate received from the one or more second upper-layer routing nodes (for example, the first and second upper-layer routing nodes BR2) among the plurality of
  • the number of the first routing node, the first upper layer routing node, the second upper layer routing node, and the second routing node is illustrated as one or two in the examples of FIGS. 1 to 8 , this is only exemplary.
  • the system 100 may include any suitable number of first routing nodes, first upper layer routing nodes, second upper layer routing nodes, and second routing nodes, and one or more of the foregoing embodiments may be arbitrarily combined accordingly, To achieve various alternative cross-chain interaction processes.
  • system 100 is illustrated as including two lower blockchain networks 1110 and 1120 under the same upper blockchain network 1100 in the examples of FIGS. 1 to 8 , this is only illustrative and not limiting.
  • system 100 is horizontally scalable and can register two or more lower blockchain networks under the same upper blockchain network 1100, and any two of these lower blockchain networks Cross-chain interaction can be achieved through the aforementioned process.
  • the system 100 is illustrated as a two-layer blockchain network architecture in the examples of FIGS. 1 to 8 , this is only illustrative and not limiting.
  • the system 100 is vertically scalable, and the system 100 can be deployed It is a two-layer or more-layer blockchain network architecture.
  • each of the first blockchain network 1110 and the second blockchain network 1120 can serve as an upper-layer blockchain for one or more other blockchain networks.
  • network, and any two lower blockchain networks (not necessarily on the same layer) of the upper blockchain network 1100 can similarly achieve cross-chain interaction through the aforementioned process.
  • system 100 is illustrated for cross-chain interaction between homogeneous chains in the examples of FIGS. 1 to 8 , this is only illustrative and not limiting, and the system 100 may be further configured for Used for cross-chain interactions between heterogeneous chains.
  • the system 100 for cross-heterogeneous chain interaction will be exemplarily described below with reference to FIGS. 9 and 10 .
  • the second blockchain network 1120 has been omitted, so that Figure 9 focuses on describing the cross-connection between the first blockchain network 1110 and the heterogeneous blockchain network. chain interaction.
  • the system 100 may also include a first transfer bridge network 1130 and a first heterogeneous blockchain network 1131.
  • the first transfer bridge network 1130 may be deployed at a lower layer of the upper blockchain network 1100, that is, on the same layer as the first blockchain network 1110 and the second blockchain network 1120.
  • the first transfer bridge network 1130 may include a first transfer bridge routing node BR31 and a plurality of first transfer bridge consensus nodes I1, I2, I3, I4 that communicate with each other.
  • the first transfer bridge network 1130 can trust the upper layer blockchain network 1100, and the first transfer bridge routing node BR31 can communicate with the third upper layer routing node BR3 in the upper layer blockchain network 1100.
  • the first transfer bridge network 1130 can register with the third upper layer routing node BR3 when accessing the upper layer blockchain network 1100, and obtain the network identity assigned by the third upper layer routing node BR3 after successful registration.
  • the first transfer bridge network 1130, the upper blockchain network 1100, the first blockchain network 1110, and the second blockchain network 1120 are all isomorphic.
  • first bridge network 1130 may be a blockchain network.
  • the first transfer bridge network 1130 may not form a blockchain network, but only perform signature voting.
  • a blockchain or blockchain network that is isomorphic with the upper blockchain network 1100 can be described as a homogeneous chain or a isomorphic chain network, and will be heterogeneous with the upper blockchain network 1100
  • the blockchain or blockchain network is described as a heterogeneous chain or heterogeneous chain network. Therefore, relative to the upper-layer blockchain network 1100, the first transfer bridge network 1130, the first blockchain network 1110, and the second blockchain network 1120 may be homogeneous chain networks.
  • the first heterogeneous blockchain network 1131 may be deployed at a lower layer of the first transfer bridge network 1130 and include a plurality of first heterogeneous consensus nodes P1, P2, P3, P4.
  • the first heterogeneous consensus nodes P1, P2, P3, and P4 can be used to implement specific services of the first heterogeneous blockchain network 1131, and are responsible for verifying transactions and consensus on the chain.
  • the number of first heterogeneous consensus nodes P1, P2, P3, and P4 is illustrated as 4, this is only illustrative and not limiting, and the actual first heterogeneous blockchain network 1131 may include any number. consensus node.
  • the first heterogeneous blockchain network 1131 is heterogeneous with the upper blockchain network 1100, the first blockchain network 1110 and the second blockchain network 1120. Therefore, relative to the upper blockchain network 1100, the A heterogeneous blockchain network 1131 may be a heterogeneous chain network.
  • the plurality of first heterogeneous consensus nodes P1, P2, P3, P4 of the first heterogeneous blockchain network 1131 communicate with the first transfer bridge consensus nodes I1, I2, I3, I4.
  • the different first transfer bridge consensus nodes I1, I2, I3, and I4 may be different lower-layer areas of the upper-layer blockchain network 1100 that need to conduct cross-chain transactions with the first heterogeneous blockchain network 1131.
  • the blockchain network is set up in the first transfer bridge network 1130.
  • the first transfer bridge consensus node I1 can be set up in the first transfer bridge network 1130 by the first blockchain network 1110 and the first transfer bridge network 1130 is set up in the first transfer bridge network 1130.
  • the bridge consensus node I2 may be provided by the second blockchain network 1120 in the first transfer bridge network 1130.
  • first heterogeneous blockchain network 1131 accesses the first transfer bridge network 1130, it can submit a registration request to the first transfer bridge consensus node to obtain the network identity, or alternatively, the first transfer bridge network 1130 can The network identity assigned in advance is provided to the first heterogeneous blockchain network 1131, and then the first heterogeneous blockchain network 1131 can use the obtained network identity to perform binding registration.
  • Each first transfer bridge consensus node among the plurality of first transfer bridge consensus nodes I1, I2, I3, I4 of the first transfer bridge network 1130 may be configured to have Simple Payment Verification (SPV) capability, To monitor and verify block behavior in the first heterogeneous blockchain network 1131.
  • SPV Simple Payment Verification
  • each first transfer bridge consensus node may be regarded as an upper layer routing node of the first heterogeneous blockchain network 1131.
  • the cross-chain transaction can be packaged into blocks, and then the first transfer bridge consensus node can collect the blocks in the first heterogeneous blockchain network 1131 , verify the block in the first heterogeneous blockchain network 1131 and the signature of the first heterogeneous consensus node.
  • the upper blockchain network 1100 can be configured to change the consensus node of the first transfer bridge network 1130 in the upper blockchain network 1100
  • the certificate is stored in the middle and upper chain to manage the consensus node of the first transfer bridge network 1130. That is to say, any node in the upper blockchain network 1100 (such as the first upper routing node BR1, the second upper routing node BR2, and the third upper routing node BR3) knows the node member information of the first transfer bridge network 1130, There is no need to maintain other data of the first transfer bridge network 1130, let alone maintain the on-chain data and node member information of the first heterogeneous blockchain network 1131.
  • the first routing node BR11 may be configured to obtain data from the first block.
  • the cross-chain transaction of the chain network 1110 is to be executed in the first heterogeneous blockchain network 1131 and the cross-chain transaction is transmitted to the first upper routing node BR1.
  • the first upper layer routing node BR1 may be configured to transmit the cross-chain transaction received from the first routing node BR11 to the third upper layer routing node BR3.
  • the third upper layer routing node BR3 may be configured to transmit the cross-chain transaction received from the first upper layer routing node BR1 to the first transfer bridge routing node BR31.
  • the first transfer bridge routing node BR31 may be configured to broadcast the cross-chain transaction received from the third upper layer routing node BR3 in the first transfer bridge network 1130, so that the plurality of first transfer bridge network 1130
  • a transfer bridge consensus node I1, I2, I3, I4 (for example, one of the master nodes, which can be determined by the specific consensus mechanism) receives and converts the cross-chain transaction into a first heterogeneous blockchain network with adaptation 1131 format, and transmit the converted cross-chain transaction to the first heterogeneous blockchain network 1131, so that the plurality of first heterogeneous consensus nodes P1, P2, and P3 of the first heterogeneous blockchain network 1131 , P4 (for example, the master node therein, which can be determined by the specific consensus mechanism) receives and executes the converted cross-chain transaction.
  • the plurality of first transfer bridge consensus nodes I1, I2, I3, and I4 of the first transfer bridge network 1130 may also be configured to transfer the received cross-chain transactions to the first transfer bridge.
  • the certificate is uploaded to the network 1130 for future inquiry.
  • the plurality of first transfer bridge consensus nodes I1, I2 of the first transfer bridge network 1130 , I3 and I4 may be configured to obtain the execution result of the converted cross-chain transaction and upload the execution result to the first transfer bridge network 1130 for certificate storage.
  • the first transfer bridge consensus node may be configured to monitor and verify blocks in the first heterogeneous blockchain network 1131 to collect information about converted cross-chain transactions in the first heterogeneous blockchain network 1131 execution results.
  • the first transfer bridge routing node BR31 may be configured to obtain an uplink certificate for the execution result and transmit the uplink certificate to the third upper layer routing node BR3.
  • the third upper layer routing node BR3 may be configured to transmit the uplink certificate received from the first transfer bridge routing node BR31 to the first upper layer routing node BR1.
  • the first upper layer routing node BR1 may be configured to transmit the uplink certificate received from the third upper layer routing node BR3 to the first routing node BR11.
  • the first routing node BR11 may be configured to broadcast the on-chain proof received from the first upper-layer routing node BR1 in the first blockchain network, so that the plurality of first consensus nodes X1, X2, X3, and X3 receive on-chain certificates.
  • the first consensus node may be configured to send a query request to the upper blockchain network 1100 for querying the consensus node public key list of the first transfer bridge network 1130, based on the queried consensus node of the first transfer bridge network 1130.
  • the public key list verifies whether the received on-chain proof is correct, and trusts the received on-chain proof when the verification is passed.
  • the first routing node BR11 may be configured to obtain a query request from the first consensus node for querying the consensus node public key list of the first transfer bridge network 1130 and transmit the query request to the first upper routing node BR1. Since the first upper layer routing node BR1 knows the node member information of the first transit bridge network 1130, the first upper layer routing node BR1 may be configured to respond to receiving the query request from the first routing node BR11 to the first transit bridge.
  • the consensus node public key list of the network 1130 is read-only queried, and the queried consensus node public key list of the first transfer bridge network 1130 is transmitted to the first routing node BR11.
  • the first upper-layer routing node BR1 does not need to upload the read-only query to the upper-layer blockchain network 1100 to store the certificate.
  • the first routing node BR11 may be further configured to broadcast the consensus node public key list of the first transfer bridge network 1130 received from the first upper layer routing node BR1 in the first blockchain network 1110, so that the first consensus node receives A list of consensus node public keys to the first transit bridge network 1130 .
  • the first consensus node may be configured to verify whether the received on-chain certificate is correct based on the consensus node public key list of the first transfer bridge network 1130, and trust the received execution result when the verification is passed. Specific trust policies can be configured to determine what conditions the on-chain proof meets when the verification is passed.
  • the plurality of first consensus nodes X1, X2, X3, and X4 of the first blockchain network 1110 cannot be viewed. Understand the execution results of cross-chain transactions generated in the first heterogeneous blockchain network 1131. Because the plurality of first consensus nodes X1, X2, X3, and The consensus node public key list of the bridge network 1130 verifies and trusts the on-chain proof of the first transfer bridge network 1130, thereby believing that the cross-chain transaction initiated by it was successfully executed in the first heterogeneous blockchain network 1131.
  • the first blockchain network 1110 does not need to query the first heterogeneous blockchain network 1131, but performs trust endorsement through the first transfer bridge network 1130. Then, the first blockchain network 1110 can perform subsequent processing after trusting the received on-chain proof, such as uploading the received on-chain proof to the first blockchain network 1110 for certificate storage, or for Subsequent contract operations.
  • the process of the first heterogeneous blockchain network 1131 initiating cross-chain transactions in the first blockchain network 1110 is similar to the above and will not be described again.
  • the first heterogeneous blockchain network 1131 and the second blockchain network 1120 or other lower blockchain networks of the upper blockchain network 1100 (not limited to which layer below the upper blockchain network 1100 )'s cross-chain interaction is similar.
  • FIG 10 describes an example situation of accessing two heterogeneous blockchain networks in the system 100.
  • the first blockchain network 1110 and the second blockchain network 1120 have been omitted, so that Figure 10 focuses on describing the first heterogeneous blockchain network 1131 and the second heterogeneous blockchain network 1131.
  • the second heterogeneous blockchain network 1141 can also be connected with the first blockchain network 1110, the second blockchain network 1120 or other lower-layer blockchain networks (not the upper-layer blockchain network 1100) as described above. Limited to the layer below the upper blockchain network 1100) for cross-chain interaction.
  • the system 100 may also include a second transfer bridge network 1140 and a second heterogeneous blockchain network 1141.
  • the second transfer bridge network 1140 may be deployed at the lower layer of the upper blockchain network 1100, that is, on the same layer as the first blockchain network 1110, the second blockchain network 1120, and the first transfer bridge network 1130.
  • the second transfer bridge network 1140 may include a second transfer bridge routing node BR41 and a plurality of second transfer bridge consensus nodes J1, J2, J3, J4 that communicate with each other.
  • the second transfer bridge network 1140 may trust the upper layer blockchain network 1100, and the second transfer bridge routing node BR41 may communicate with the fourth upper layer routing node BR4 in the upper layer blockchain network 1100.
  • the second transfer bridge network 1140 can register with the fourth upper-layer routing node BR4 when accessing the upper-layer blockchain network 1100, and obtain the network identifier assigned by the fourth upper-layer routing node BR4 after successful registration.
  • the second transfer bridge network 1140, the upper blockchain network 1100, the first blockchain network 1110, the second blockchain network 1120, and the first transfer bridge network 1130 are all isomorphic.
  • the second bridge network 1140 may be a blockchain network.
  • the second transfer bridge network 1140 may not form a blockchain network, but only perform signature voting.
  • the second heterogeneous blockchain network 1141 may be deployed at a lower layer of the second transfer bridge network 1140 and include a plurality of second heterogeneous consensus nodes Q1, Q2, Q3, Q4.
  • the second heterogeneous consensus nodes Q1, Q2, Q3, and Q4 can be used to implement specific services of the second heterogeneous blockchain network 1141, and are responsible for verifying transactions and consensus on the chain.
  • the number of second heterogeneous consensus nodes Q1, Q2, Q3, and Q4 is illustrated as four, this is only illustrative and not limiting, and the actual second heterogeneous blockchain network 1141 may include any number. consensus node.
  • the second heterogeneous blockchain network 1141 is heterogeneous with the upper blockchain network 1100, the first blockchain network 1110 and the second blockchain network 1120.
  • the second heterogeneous blockchain network 1141 is heterogeneous with the first heterogeneous blockchain network 1131 .
  • the second heterogeneous blockchain network 1141 and the first heterogeneous blockchain network 1131 may be homogeneous, but in this case, it may be more preferable to make the second heterogeneous blockchain network 1131 homogeneous.
  • the blockchain network 1141 and the first heterogeneous blockchain network 1131 interact across homogeneous chains via their common upper blockchain network, for example, using the process described above in conjunction with Figures 1 to 8 .
  • the second heterogeneous blockchain network 1141 and the first heterogeneous blockchain network 1131 are heterogeneous to each other as an example.
  • the plurality of second heterogeneous consensus nodes Q1, Q2, Q3, Q4 of the second heterogeneous blockchain network 1141 communicate with the second transfer bridge consensus nodes J1, J2, J3, J4. It can be understood that in Figure 10, in order to keep the illustration simple, only the communication between the second heterogeneous consensus node Q1 and the second transfer bridge consensus node J1, J2, J3, J4 is depicted, but in fact, although not shown, The other second heterogeneous consensus nodes Q2, Q3, and Q4 also communicate with the second transfer bridge consensus nodes J1, J2, J3, and J4 respectively.
  • the different second transfer bridge consensus nodes J1, J2, J3, and J4 may be different lower-layer areas of the upper-layer blockchain network 1100 that need to conduct cross-chain transactions with the second heterogeneous blockchain network 1141.
  • the blockchain network is set in the second transfer bridge network 1140.
  • the second transfer bridge consensus node J1 can be set by the first blockchain network 1110 in the second transfer bridge network 1140.
  • the second transfer bridge The bridge consensus node J2 may be set in the second transfer bridge network 1140 by the second blockchain network 1120, and the third transfer bridge consensus node J3 may be set in the first heterogeneous blockchain network 1131.
  • Two transit bridges in network 1140 This is because different underlying blockchain networks (often behind them, for example, different institutions) may not trust each other, so it is expected to configure the second transfer bridge consensus node in the second transfer bridge network 1140 by itself.
  • the second heterogeneous blockchain network 1141 accesses the second transfer bridge network 1140, it can submit a registration request to the second transfer bridge consensus node to obtain the network identity, or alternatively, the second transfer bridge network 1140 can The network identity assigned in advance is provided to the second heterogeneous blockchain network 1141, and then the second heterogeneous blockchain network 1141 can use the obtained network identity to perform binding registration.
  • Each second transfer bridge consensus node among the plurality of second transfer bridge consensus nodes J1, J2, J3, J4 of the second transfer bridge network 1140 may be configured to have Simple Payment Verification (SPV) capability, To monitor and verify block behavior in the second heterogeneous blockchain network 1141.
  • SPV Simple Payment Verification
  • each second transfer bridge consensus node may be regarded as an upper layer routing node of the second heterogeneous blockchain network 1141.
  • the cross-chain transaction can be packaged into blocks, and then the second transfer bridge consensus node can collect the blocks in the second heterogeneous blockchain network 1141 , verify the block in the second heterogeneous blockchain network 1141 and the signature of the second heterogeneous consensus node.
  • the upper blockchain network 1100 can be configured by connecting the consensus nodes of the second transfer bridge network 1140 to Change the consensus node of the second transfer bridge network 1140 by uploading the certificate in the upper blockchain network 1100 to manage it.
  • any node of the upper layer blockchain network 1100 (such as the first upper layer routing node BR1, the second upper layer routing node BR2, the third upper layer routing node BR3, the fourth upper layer routing node BR4) all knows the second transfer bridge
  • the node member information of the network 1140 does not need to maintain other data of the second transfer bridge network 1140, let alone the on-chain data and node member information of the second heterogeneous blockchain network 1141.
  • the first transfer bridge consensus node may be configured to obtain the first A cross-chain transaction to be executed by one heterogeneous blockchain network 1131 in the second heterogeneous blockchain network 1141.
  • the first transfer bridge consensus node may be configured to monitor and verify the blocks in the first heterogeneous blockchain network 1131 to collect the information that the first heterogeneous blockchain network 1131 wants in the second heterogeneous blockchain.
  • the first transfer bridge routing node BR31 may be configured to transmit cross-chain transactions from the first heterogeneous blockchain network 1131 to be executed in the second heterogeneous blockchain network 1141 to the third upper routing node BR3,
  • the cross-chain transaction has been verified by the plurality of first transfer bridge consensus nodes I1, I2, I3, I4 of the first transfer bridge network 1130 and converted into a format adapted to the upper blockchain network 1100.
  • the third upper layer routing node BR3 may be configured to transmit the cross-chain transaction received from the first transfer bridge routing node BR31 to the fourth upper layer routing node BR4.
  • the fourth upper-layer routing node BR4 may be configured to transmit the cross-chain transaction received from the third upper-layer routing node BR3 to the second transfer bridge routing node BR41.
  • the second transfer bridge routing node BR41 may be configured to broadcast the cross-chain transaction received from the fourth upper layer routing node BR4 in the second transfer bridge network 1140, so that the plurality of second transfer bridge network 1140
  • the two transfer bridge consensus nodes J1, J2, J3, J4 (for example, the master node among them, which can be determined by the specific consensus mechanism) receive and convert the cross-chain transaction into a second heterogeneous blockchain network with adaptation 1141 format, and transmit the converted cross-chain transaction to the second heterogeneous blockchain network 1141, so that the plurality of second heterogeneous consensus nodes Q1, Q2, Q3 of the second heterogeneous blockchain network 1141 , Q4 (for example, the master node therein, which can be determined by the specific consensus mechanism) receives and executes the converted cross-chain transaction.
  • the second transfer bridge network 1140 may also be configured to upload the cross-chain transaction to the second transfer bridge network 1140 and store it as a certificate for future query.
  • the plurality of second transfer bridge consensus nodes J1, J2, J3 and J4 can be configured to obtain the execution result of the converted cross-chain transaction and upload the execution result to the second transfer bridge network 1140 for certificate storage.
  • the second transfer bridge consensus node may be configured to monitor and verify blocks in the second heterogeneous blockchain network 1141 to collect information about converted cross-chain transactions in the second heterogeneous blockchain network 1141 execution results.
  • the second transfer bridge routing node BR41 may be configured to obtain an uplink certificate for the execution result and transmit the uplink certificate to the fourth upper layer routing node BR4.
  • the fourth upper layer routing node BR4 may be configured to transmit the uplink certificate received from the second transfer bridge routing node BR41 to the third upper layer routing node BR3.
  • the third upper layer routing node BR3 may be configured to transmit the uplink certificate received from the fourth upper layer routing node BR4 to the first transit bridge routing node BR31.
  • the first transfer bridge routing node BR31 may be configured to broadcast the uplink certificate received from the third upper layer routing node BR3 in the first transfer bridge network 1130, so that the plurality of first transfer bridge network 1130 A transfer bridge consensus node I1, I2, I3, I4 receives the on-chain certificate.
  • the first transfer bridge consensus node may also be configured to send a query request to the upper blockchain network 1100 for querying the consensus node public key list of the second transfer bridge network 1140, based on the queried second transfer bridge network 1140
  • the consensus node public key list of 1140 verifies whether the received on-chain certificate is correct, and trusts the received on-chain certificate when the verification passes.
  • the first transfer bridge routing node BR31 may be configured to obtain a query request from the first transfer bridge consensus node for querying the consensus node public key list of the second transfer bridge network 1140 and transmit the query request to the second transfer bridge network 1140.
  • the consensus node public key list of the transfer bridge network 1140 is read-only queried, and the queried consensus node public key list of the second transfer bridge network 1140 is transmitted to the first transfer bridge routing node BR31.
  • the third upper-layer routing node BR3 does not need to upload the read-only query to the upper-layer blockchain network 1100 to store the certificate.
  • the first transfer bridge routing node BR31 may be further configured to broadcast the consensus node public key list of the second transfer bridge network 1140 received from the third upper layer routing node BR3 in the first transfer bridge network 1130, such that the first The transfer bridge consensus node receives the consensus node public key list of the second transfer bridge network 1140 .
  • the first transfer bridge consensus node may be configured to verify whether the received on-chain certificate is correct based on the consensus node public key list of the second transfer bridge network 1140, and trust the received execution result when the verification is passed. Specific trust policies can be configured to determine what conditions the on-chain proof meets when the verification is passed.
  • the first transfer bridge consensus node may also be configured to convert the on-chain proof into a format adapted to the first heterogeneous blockchain network 1131 after trusting the received on-chain proof, and convert the converted on-chain proof Transmitted to the first heterogeneous blockchain network 1131.
  • first heterogeneous blockchain network 1131 and the second heterogeneous blockchain network 1141 are heterogeneous, the plurality of first heterogeneous consensus nodes P1, P2, P3 and P4 cannot understand the execution results of cross-chain transactions generated in the second heterogeneous blockchain network 1141.
  • the consensus node public key list of the second transfer bridge network 1140 queried by the blockchain network 1100 verifies and trusts the on-chain proof of the second transfer bridge network 1140, thereby believing that the cross-chain transaction initiated by it is in the second heterogeneous Successfully executed in blockchain network 1141. Therefore, the first heterogeneous blockchain network 1131 does not need to query the second heterogeneous blockchain network 1141, but performs trust endorsement through the second transfer bridge network 1140.
  • the first heterogeneous blockchain network 1131 can perform subsequent processing on the received on-chain certificate converted by the first transfer bridge network 1130 after trusting it, for example, the received on-chain certificate is stored in the first heterogeneous blockchain network 1131 .
  • the certificate can be stored in the blockchain network 1131 or used for subsequent contract operations.
  • the process of the second heterogeneous blockchain network 1141 initiating cross-chain transactions in the first heterogeneous blockchain network 1131 is similar to the above, and will not be described again here.
  • the system for cross-blockchain interaction can be easily expanded horizontally and vertically, and can achieve cross-chain information isolation and alleviate the node's problems while solving the trust problem of cross-chain interaction.
  • the present disclosure provides a method 200 for cross-blockchain interaction.
  • the method 200 may include: at step S202, obtaining a cross-chain transaction from the first blockchain network to be executed in the second blockchain network through the first routing node of the first blockchain network and transferring the cross-chain transaction to the second blockchain network.
  • the first upper-layer routing node communicating with the first routing node of the upper-layer blockchain network transmitted to the first blockchain network and the second blockchain network, the upper-layer blockchain network being connected by the first blockchain network and the second blockchain network
  • the second blockchain network trusts the two; at step S204, the cross-chain transaction received from the first routing node is transmitted to the upper-layer blockchain network and the second blockchain network through the first upper-layer routing node.
  • the second upper-layer routing node communicates with the second routing node; at step S206, transmit the cross-chain transaction received from the first upper-layer routing node to the second routing node through the second upper-layer routing node; and at step S208, broadcast the cross-chain transaction received from the second upper-layer routing node in the second blockchain network through the second routing node, so that multiple second consensus nodes of the second blockchain network receive and execute the cross-chain transaction,
  • the upper-layer blockchain network is configured to update the consensus node of each blockchain network in the first blockchain network and the second blockchain network in the upper-layer blockchain network.
  • Chain storage certificates are used to manage the consensus nodes of each blockchain network in the first blockchain network and the second blockchain network.
  • the embodiment of the method 200 is basically similar to the aforementioned embodiment of the system for cross-blockchain interaction, so it will not be described again here. For relevant details, please refer to the description in the system embodiment section.
  • Apparatus 300 may include a collection module 302, a transmission module 304, and an execution module 306.
  • the collection module 302 may be configured to obtain cross-chain transactions from the first blockchain network to be executed in the second blockchain network through the first routing node of the first blockchain network.
  • the transmission module 304 may be configured to: transmit cross-chain transactions through the first routing node to the first upper layer of the upper blockchain network of the first blockchain network and the second blockchain network that communicates with the first routing node.
  • the upper-layer blockchain network is trusted by both the first blockchain network and the second blockchain network; the cross-chain transaction received from the first routing node is transmitted to the first upper-layer routing node through the first upper-layer routing node A second upper-layer routing node of the upper-layer blockchain network that communicates with the second routing node of the second blockchain network; transmits the cross-chain transaction received from the first upper-layer routing node to the second route through the second upper-layer routing node node.
  • the execution module 306 may be configured to broadcast the cross-chain transaction received from the second upper-layer routing node in the second blockchain network through the second routing node, so that multiple second consensus nodes of the second blockchain network receive and execute said cross-chain transactions.
  • the upper-layer blockchain network is configured to store changes in the consensus nodes of each blockchain network in the first blockchain network and the second blockchain network in the upper-layer blockchain network.
  • the certificate is used to manage the consensus nodes of each blockchain network in the first blockchain network and the second blockchain network.
  • the embodiments of the device 300 are basically similar to the aforementioned embodiments of the system and method for cross-blockchain interaction, so they will not be described again here. For relevant details, please refer to the descriptions in the system embodiments and method embodiments.
  • Computer system 600 includes a bus 602 or other communication mechanism for communicating information, and a processing device 604 coupled with bus 602 for processing information.
  • Computer system 600 also includes memory 606 coupled to bus 602 for storing instructions to be executed by processing device 604.
  • Memory 606 may be random access memory (RAM) or other dynamic storage device.
  • RAM random access memory
  • Memory 606 may also be used to store temporary variables or other intermediate information during execution of instructions to be executed by processing device 604 .
  • Computer system 600 also includes a read-only memory (ROM) 608 or other static storage device coupled to bus 602 for storing static information and instructions for processing device 604 .
  • ROM read-only memory
  • a storage device 610 such as a magnetic or optical disk, is provided and coupled to bus 602 for storing information and instructions.
  • Computer system 600 may be coupled via bus 602 to an output device 612 for providing output to a user, such as, but not limited to, a display (such as a cathode ray tube (CRT) or liquid crystal display (LCD)), speakers, and the like.
  • Input devices 614 such as a keyboard, mouse, microphone, etc., are coupled to bus 602 for communicating information and command selections to processing device 604 .
  • Computer system 600 can execute embodiments of the present disclosure.
  • results are provided by computer system 600 in response to processing device 604 executing one or more sequences of one or more instructions contained in memory 606 .
  • Such instructions may be read into memory 606 from another computer-readable medium, such as storage device 610 .
  • Execution of the sequences of instructions contained in memory 606 causes processing device 604 to perform the methods described herein.
  • hardwired circuitry may be used in place of or in combination with software instructions to implement the present teachings. Therefore, implementations of the present disclosure are not limited to any specific combination of hardware circuitry and software.
  • computer system 600 may be connected across a network to one or more other computer systems like computer system 600 via network interface 616 to form a networked system.
  • the network may include a private network or a public network such as the Internet.
  • one or more computer systems can store data and provide data to other computer systems.
  • the term "computer-readable medium” as used herein refers to any medium that participates in providing instructions to processing device 604 for execution. This media can take many forms, including, but not limited to, nonvolatile media, volatile media, and transmission media.
  • Non-volatile media include, for example, optical or magnetic disks such as storage device 610 .
  • Volatile media includes dynamic memory such as memory 606.
  • Transmission media include coaxial cable, copper wire, and fiber optics, including the wiring that includes bus 602.
  • Computer-readable media or computer program products include, for example, floppy disks, flexible disks, hard drives, magnetic tape, or any other magnetic media, CD-ROMs, digital video disks (DVDs), Blu-ray disks, any other optical media, thumb drives, Memory cards, RAM, PROM and EPROM, flash EPROM, any other memory chip or cartridge, or any other tangible medium from which a computer can read.
  • Various forms of computer-readable media may be involved in carrying one or more sequences of one or more instructions to processing device 604 for execution.
  • the instructions may be initially carried on the remote computer's disk.
  • the remote computer can load the instructions into its dynamic memory and use a modem to send the instructions over the phone line.
  • a modem local to computer system 600 can receive the data on the telephone line and use an infrared transmitter to convert the data into an infrared signal.
  • An infrared detector coupled to bus 602 can receive the data carried in the infrared signal and place the data on bus 602 .
  • Bus 602 carries data to memory 606, from which processing device 604 retrieves and executes the instructions. Alternatively, instructions received by memory 606 may be stored on storage device 610 before or after execution by processing device 604 .
  • instructions configured to be executed by a processing device to perform a method are stored on a computer-readable medium.
  • Computer-readable media may be devices that store digital information.
  • computer-readable media include compact disk read-only memory (CD-ROM) as is known in the art for storing software.
  • CD-ROM compact disk read-only memory
  • the computer-readable medium is accessed by a processor suitable for executing instructions configured to be executed.
  • the present disclosure may also provide a computing device that may include one or more processors and a memory storing computer-executable instructions that, when executed by the one or more processors, cause one or more A processor executes the method according to any of the preceding embodiments of the present disclosure.
  • computing device 700 may include processor(s) 701 and memory 702 storing computer-executable instructions that, when executed by processor(s) 701, cause (a (or more) processor 701 executes the method according to any of the foregoing embodiments of the present disclosure.
  • Processor(s) 701 may be, for example, a central processing unit (CPU) of computing device 700 .
  • Processor(s) 701 may be any type of general purpose processor, or may be a processor specifically designed for interaction across a blockchain, such as an application specific integrated circuit ("ASIC").
  • Memory 702 may include various computer-readable media accessible by processor(s) 701 .
  • memory 702 described herein may include volatile and nonvolatile media, removable and non-removable media.
  • memory 702 may include any combination of random access memory (“RAM”), dynamic RAM (“DRAM”), static RAM (“SRAM”), read-only memory (“ROM”), flash memory, cache memory and/or any other type of non-transitory computer-readable medium.
  • the memory 702 may store information that when executed by the processor 701 causes the processor 701 to perform a method according to any of the preceding embodiments of the present disclosure.
  • the present disclosure may also provide a non-transitory storage medium having computer-executable instructions stored thereon.
  • the computer-executable instructions when executed by a computer, cause the computer to perform the method according to any of the foregoing embodiments of the disclosure.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. , logic gates, switches, Application Specific Integrated Circuit (ASIC), programmable logic controllers and embedded microcontrollers.
  • controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, For Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller in addition to implementing the controller in the form of pure computer-readable program code, the controller can be completely programmed with logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded logic by logically programming the method steps. Microcontroller, etc. to achieve the same function. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as structures within hardware components as well as software modules implementing the methods.
  • the systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions.
  • a typical implementation device is a server system.
  • the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, or a personal digital assistant. , media player, navigation device, email device, game console, tablet, wearable device, or a combination of any of these devices.
  • the functions are divided into various modules and described separately.
  • the functions of each module can be implemented in the same or multiple software and/or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. .
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer-readable media, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media includes both persistent and non-volatile, removable and non-removable media that can be implemented by any method or technology for storage of information.
  • Information may be computer-readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, tape magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission medium can be used to store information that can be accessed by a computing device.
  • computer-readable media does not include transient computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, one or more embodiments of the present description may employ a computer program implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. Product form.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • program modules may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Technology Law (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开涉及用于跨区块链交互的系统及方法。该系统包括第一区块链网络、第二区块链网络及其上层区块链网络,其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。

Description

用于跨区块链交互的系统及方法
本公开要求于2022年4月29日提交中国专利局、申请号为202210466076.8、发明名称为“用于跨区块链交互的系统及方法”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开一个或多个实施例涉及区块链技术领域,并且更具体地,涉及一种用于跨区块链交互的系统、方法、装置、计算设备和存储介质。
背景技术
区块链(Blockchain)是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。基于区块链的基本特性,区块链通常是由若干个区块构成。在这些区块中分别记录有与该区块的创建时刻对应的时间戳,所有的区块严格按照区块中记录的时间戳,构成一条在时间上有序的数据链条。对于物理世界产生的真实数据,可以将其构建成区块链所支持的标准的交易(transaction)格式,然后发布至区块链,由区块链中的节点设备对收到的交易进行共识处理,并在达成共识后,由区块链中作为记账节点的节点设备,将这笔交易打包进区块,在区块链中进行持久化存证。由于区块链具有去中心化、信息不可篡改、自治性等特性,区块链也受到人们越来越多的重视和应用。
随着区块链技术的高速发展,区块链技术被应用在金融、物流、供应链、医疗、司法、资产管理等诸多领域中。可以构建不同的区块链网络来处理不同类型的业务。在很多应用场景下,需要在不同的区块链网络之间进行交互来实现一些复杂的业务。
发明内容
本公开的一个或多个实施例的一个目的是提供一种用于跨区块链交互的系统、方法、装置、计算设备和存储介质。
根据本公开的一个或多个实施例的一个方面,提供了一种用于跨区块链交互的系统,包括:第一区块链网络,所述第一区块链网络包括相互通信的第一路由节点和多个第一共识节点;第二区块链网络,所述第二区块链网络包括相互通信的第二路由节点和多个第二共识节点;以及第一区块链网络和第二区块链网络的上层区块链网络,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任,并且包括与第一路由节点通信的第一上层路由节点、与第二路由节点通信的第二上层路由节点、以及多个上层共识节点,第一上层路由节点、第二上层路由节点与所述多个上层共识节点相互通信,其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。
根据本公开的一个或多个实施例的另一个方面,提供了一种用于跨区块链交互的方法,包括:通过第一区块链网络的第一路由节点获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易并将跨链交易传输至第一区块链网络和第二区块链网络的上层区块链网络的与第一路由节点通信的第一上层路由节点,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任;通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第二区块链网络的第二路由节点通信的第二上层路由节点;通过第二上层路由节点将从第一上层路由节点接收到的跨链交易传输至第二路由节点;以及通过第二路由节点在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的多个第二共识节点接收并执行所述跨链交易,其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。
根据本公开的一个或多个实施例的另一个方面,提供了一种用于跨区块链交互的装置,包括:收集模块,被配置用于通过第一区块链网络的第一路由节点获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易;传输模块,被配置用于通过第一路由节点将跨链交易传输至第一区块链网络和第二区块链网络的上层区块链网络的与第一路由节点通信的第一上层路由节点,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任,通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第二区块链网络的第二路由节点通信的第二上层路由节点,通过第二上层路由节点将从第一上层路由节点接收到的跨链交易传输至第二路由节点;以及执行模块,被配置用于通过第二路由节点在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的多个第二共识节点接收并执行所述跨链交易,其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。
根据本公开的一个或多个实施例的又一个方面,提供了一种用于跨区块链交互的计算设备,包括:一个或多个处理器;以及存储计算机可执行指令的存储器,所述计算机可执行指令在被所述一个或多个处理器执行时使得所述一个或多个处理器执行根据本公开的任一实施例所述的方法。
根据本公开的一个或多个实施例的又一个方面,提供了一种其上存储有计算机可执行指令的非瞬态存储介质,所述计算机可执行指令在被计算机执行时使得计算机执行根据本公开的任一实施例所述的方法。
通过以下参照附图对本公开的示例性实施例的详细描述,本公开的其它特征及其优点将会变得清楚。
附图说明
构成说明书的一部分的附图描述了本公开的一个或多个实施例,并且连同说明书一起用于解释本公开一个或多个实施例的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本公开一个或多个实施例,其中:
图1是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图2是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图3是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图4是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图5是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图6是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图7是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图8是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图9是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图10是根据本公开的一个或多个示例性实施例的用于跨区块链交互的系统的示意图;
图11是根据本公开的一个或多个示例性实施例的用于跨区块链交互的方法的流程图;
图12是根据本公开的一个或多个示例性实施例的用于跨区块链交互的装置的示意性框图;
图13是图示可以在其上实现本公开的一个或多个示例性实施例的计算机系统的示意性框图;
图14是根据本公开的一个或多个示例性实施例的用于跨区块链交互的计算设备的示意性框图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。然而应当理解的是,本公开一个或多个实施例可以以多种不同的方式呈现出来,并不局限于下文描述的实施例。还应当理解的是,本公开一个或多个实施例能够以各种方式进行组合,从而提供更多额外的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。
应当理解的是,在所有附图中,相同的附图标记表示相同的元件。在附图中,为清楚起见,某些特征的尺寸可以进行变形。
应当理解的是,本文中的用语仅用于描述特定的实施例,并不旨在限定。本文使用的所有术语(包括技术术语和科学术语)除非另外定义,均具有本领域技术人员通常理解的含义。为简明和/或清楚起见,公知的功能或结构可以不再详细说明。
在本文中,用语“连接”意图包含一个特征与另一个特征的物理、电性、和/或通信连接,并且这一个特征与另一个特征之间可以存在也可以不存在中间特征。当连接为通信连接时,即使提及A与B“直接连接”,只是意图强调A与B的连接之间不存在本公开一个或多个实施例所强调的一个或多个特征,但并不代表限制A与B之间不经过任何元件而连接,本领域技术人员应理解,A与B之间可以通过线缆、路由器、网关、信道、链路、网络等相连接。需要说明的是,在本公开一个或多个实施例的附图中,A与B之间的无论是直接连接还是间接连接都通过连接在A与B之间的直线或其他图形元素来表示。
在本文中,用语“A或B”包括“A和B”以及“A或B”,而不是排他地仅包括“A”或者仅包括“B”,除非另有特别说明。
在本文中,用语“示例性的”意指“用作示例、实例或说明”,而不是作为将被精确复制的“模型”。在此示例性描述的任意实现方式并不一定要被解释为比其它实现方式优选的或有利的。而且,本公开一个或多个实施例不受在上述技术领域、背景技术、发明内容或具体实施方式中所给出的任何所表述的或所暗示的理论所限定。
在本文中,用语“基本上”意指包含由设计或制造的缺陷、器件或元件的容差、环境影响和/或其它因素所致的任意微小的变化。用语“基本上”还允许由寄生效应、噪声以及可能存在于实际的实现方式中的其它实际考虑因素所致的与完美的或理想的情形之间的差异。
另外,仅仅为了参考的目的,还可以在本文中使用“第一”、“第二”等类似术语,并且因而并非意图限定。例如,除非上下文明确指出,否则涉及结构或元件的词语“第一”、“第二”和其它此类数字词语并没有暗示顺序或次序。
还应理解,“包括/包含”一词在本文中使用时,说明存在所指出的特征、整体、步骤、操作、单元和/或组件,但是并不排除存在或增加一个或多个其它特征、整体、步骤、操作、单元和/或组件以及/或者它们的组合。
为便于理解,下面对本公开中涉及的一些术语进行说明。
区块链网络:由分布式网络上的多个参与者通过共识规则共同维护基于区块链技术的链式数据的系统。
区块链共识节点:区块链网络中的网络节点,具有一份完整的账本拷贝,并且具有参与区块链网络共识和账本维护的能力。
区块链路由节点:区块链网络中的网络节点,具有跨区块链通信的能力但不具有参与区块链网络共识和账本维护的能力,有时可以被配置为具有一份完整的账本拷贝。
同构区块链(在本文中也可简称为同构链):基于相同区块链底层技术平台构建的区块链,同构链之间安全机制、共识算法、网络拓扑、区块生成验证逻辑都一致,一般采用同一套协议、请求格式、验证方式等。
异构区块链(在本文中也可简称为异构链):基于不同区块链底层技术平台构建的区块链,异构链之间安全机制、共识算法、网络拓扑、区块生成验证逻辑不一致,一般采用不同的协议、请求格式、验证方式等。比如比特币采用工作量证明PoW共识算法而联盟链Fabric采用传统确定性共识算法,二者的区块组成形式和确定性保证机制等均有很大不同。
跨链交易:一个区块链的交易在执行过程中需要调用部署在另一区块链中的智能合约(在本文中也可简称为合约),或者需要另一区块链的合约执行结果作为输入。
上链存证:经过各共识节点的共识确认后成功地被各共识节点执行(也就是“共识上链”或“上链”),执行结果可供日后查询。此术语在本文中可与“共识上链”可互换地使用。
随着区块链规模的日益扩大,加入到区块链网络中的节点的数量越来越多,并且涉及的业务的类型也越来越多,使得单一链的结构很难保持较高的性能。另外,从业务角度来看,一些松耦合的业务并没有必要运行在同一条链上,而且一些节点可能存在实现小范围交易的需求而不期望其它节点获得这些小范围交易及相关数据。因此,可以构建不同的区块链网络来处理不同类型的业务。在很多应用场景下,属于不同区块链网络的节点之间可能具有跨区块链(在本文中也可简称为跨链)交互的需求,以实现其业务往来。由于这些节点分属于不同区块链网络,因此它们之间的跨链交易存在相互信任问题。
为此,本公开在一方面提供了一种用于跨区块链交互的系统,其构建了具有高可扩展性的多层区块链网络架构,能够通过在同一上层区块链网络之下部署多个下层区块链网络来允许下层区块链网络之间通过共同的上层区块链网络进行跨链交互,并且能够通过允许各个下层区块链网络在上层区块链网络中查询其它下层区块链网络的当前节点成员情况来实现下层区块链网络之间的信任。下面将结合图1至图10细描述根据本公开的各种示例性实施例的用于跨区块链交互的系统100。
如图1所示,系统100可以包括第一区块链网络1110、第二区块链网络1120以及它们的上层区块链网络1100。换言之,第一区块链网络1110和第二区块链网络1120是上层区块链网络1100的下层区块链网络。由此,第一区块链网络1110、第二区块链网络1120与上层区块链网络1100构成二层区块链网络架构。例如,上层区块链网络1100可以是中继链网络,中继链网络是大规模区块链网络的主网络,而第一区块链网络1110、第二区块链网络1120可以是中继链网络的不同子网络。上层区块链网络1100可以部署在中继层,而第一区块链网络1110、第二区块链网络1120可以部署在位于中继层之下的网络层。当然,上层区块链网络1100以及第一区块链网络1110、第二区块链网络1120不限于是上述中继链网络及其子网络,也可以是其它二层区块链网络架构中的上层区块链网络及下层区块链网络。例如,上层区块链网络1100也可以部署在网络层,而第一区块链网络1110、第二区块链网络1120可以部署在位于网络层之下的服务层。可以理解,上层区块链网络1100以及第一区块链网络1110、第二区块链网络1120可以分别部署在多层区块链网络架构中的任意相邻两层中,只要上层区块链网络1100是第一区块链网络1110、第二区块链网络1120共同的上层区块链网络即可。
第一区块链网络1110可以包括相互通信的第一路由节点BR11和多个第一共识节点X1、X2、X3、X4。第一共识节点X1、X2、X3、X4可以用于实现第一区块链网络1110的具体业务,负责对交易进行验证和共识上链。虽然第一共识节点X1、X2、X3、X4的数量被图示为4个,但这仅仅是示例性而非限制性的,实际的第一区块链网络1110可以包括任何数量的共识节点。第一路由节点BR11可以用于与上层区块链网络1100中的第一上层路由节点BR1通信,负责发送和接收跨链消息。这可以通过专用于区块链的通信网络来实现,也可以通过互联网等其它通信网络来实现。
第二区块链网络1120可以包括相互通信的第二路由节点BR21和多个第二共识节点Y1、Y2、Y3、Y4。第二共识节点Y1、Y2、Y3、Y4可以用于实现第二区块链网络1120的具体业务,负责对交易进行验证和共识上链。虽然第二共识节点Y1、Y2、Y3、Y4的数量被图示为4个,但这仅仅是示例性而非限制性的,实际的第二区块链网络1120可以包括任何数量的共识节点。第二路由节点BR21可以用于与上层区块链网络1100中的第二上层路由节点BR2通信,负责发送和接收跨链消息。这可以通过专用于区块链的通信网络来实现,也可以通过互联网等其它通信网络来实现。
如前面已经提到的,上层区块链网络1100可以包括与第一路由节点BR11通信的第一上层路由节点BR1以及与第二路由节点BR21通信的第二上层路由节点BR2。另外,上层区块链网络1100还可以包括多个上层共识节点A1、A2、A3、A4。上层共识节点A1、A2、A3、A4可以用于实现上层区块链网络1100的具体业务,负责对交易进行验证和共识上链。虽然上层共识节点A1、A2、A3、A4的数量被图示为4个,但这仅仅是示例性而非限制性的,实际的上层区块链网络1100可以包括任何数量的共识节点。第一上层路由节点BR1、第二上层路由节点BR2与上层共识节点A1、A2、A3、A4相互通信。这可以通过专用于区块链的通信网络来实现,也可以通过互联网等其它通信网络来实现。上层区块链网络1100的上层路由节点(例如第一上层路由节点BR1、第二上层路由节点BR2)是上层区块链网络1100与其下层区块链网络通信的桥梁,可以负责转发下层区块链网络之间的跨链请求,以及响应下层区块链网络对上层区块链网络1100的请求。
第一区块链网络1110和第二区块链网络1120中的每一个在接入上层区块链网络1100时可以向第一上层路由节点BR1和第二上层路由节点BR2中的相应一个进行注册,并在注册成功后获得由第一上层路由节点BR1和第二上层路由节点BR2中的所述相应一个分配的网络标识。由于第一区块链网络1110和第二区块链网络1120都注册在上层区块链网络1100之下,因此第一区块链网络1110和第二区块链网络1120是同构的。作为非限制性示例,可以采用四字节来表示网络标识,其中首字节可以表示最上层(第一层)区块链网络(例如中继链网络)节点标识,后续字节可以表示下层网络节点标识(例如第二字节表示第二层网络节点标识,第三字节表示第三层网络节点标识,第四字节表示第四层网络节点标识),这种标识方式保证了网络的可扩展性。假设BR1的标识为81,BR2的标识为82,则注册在第一上层路由节点BR1中的第一区块链网络1110的网络标识可以是81000000,注册在第二上层路由节点BR2中的第二区块链网络1120的网络标识可以是82000000。假设第一区块链网络1110对应区块链X,第二区块链网络1120对应区块链Y,则可以通过URI的方式(比如网络标识/链标识)表示一个区块链,例如区块链X的URI标识为81000000/X,区块链Y的URI标识为82000000/Y。如果第一区块链网络1110或第二区块链网络1120要在上层区块链网络1100中发布一个服务,则也可以通过URI的方式(比如网络标识/链标识/服务标识)表示一个服务,例如区块链Y在上层区块链网络1100中发布合约C服务的URI标识为82000000/Y/C,并且在服务发布后,注册在上层区块链网络1100之下的任何下层区块链网络(例如,第一区块链网络1110和第二区块链网络1120)中的节点都可以通过该服务的URI标识调用该服务。
另外,上层区块链网络1100还被配置为通过将第一区块链网络1110和第二区块链网络1120中的每个区块链网络的共识节点的变更在上层区块链网络1100中上链存证来管理第一区块链网络1110和第二区块链网络1120中的每个区块链网络的共识节点。也就是说,上层区块链网络1100可以对注册在其下的所有下层区块链网络的节点成员信息进行管理,下层区块链网络的节点的任何变更(加入、退出)都必须在上层区块链网络1100中上链存证。这样,上层区块链网络1100的任意节点(例如,第一上层路由节点BR1,第二上层路由节点BR2,上层共识节点A1、A2、A3、A4)都知道注册在上层区块链网络1100下的各个下层区块链网络的节点成员信息,并因此能够通过验证签名集合或聚合签名的方式对下层区块链网络的交易进行简单支付确认(Simplified Payment Verification,SPV)验证,而不需要维护下层区块链网络的链上数据。
在一些实施例中,对于上层区块链网络1100的每个下层区块链网络,例如在图1中对于第一区块链网络1110和第二区块链网络1120中的每个区块链网络:当新节点要加入该区块链网络作为共识节点时,所述新节点可以被配置为从上层区块链网络1100获取证书并基于所获取的证书在该区块链网络中调用部署在该区块链网络中的第一加入合约的用于请求加入区块链网络的第一方法(此时,所述新节点的状态可以被标记为“待决(pending)”,并不算该区块链网络的正式共识节点),该区块链网络可以被配置为响应于执行所述第一方法而在上层区块链网络1100中调用部署在上层区块链网络1100中的第二加入合约来向上层区块链网络1100请求在该区块链网络中加入所述新节点,上层区块链网络1100可以被配置为在执行所述第二加入合约后将所述第二加入合约的执行结果在上层区块链网络1100中上链存证(此时,该节点在上层区块链网络1100中被标记为“加入”)并将上链证明传输至该区块链网络,该区块链网络可以被配置为基于所述上链证明在该区块链网络中调用所述第一加入合约的用于确认加入区块链网络的第二方法,以将所述新节点设置为该区块链网络的共识节点(此时,所述新节点的状态可以被标记为“有效(active)”,成为该区块链网络的正式共识节点)。前述证书可以是指身份证书(例如可以包括节点的公钥信息,或节点标识ID等其它能表征节点身份的信息),其例如可以通过信任根下发。新节点需要先有身份证书,才能让区块链网络认识它从而决定是否允许它加入。另外,在一些实施例中,对于上层区块链网络1100的每个下层区块链网络,例如在图1中对于第一区块链网络1110和第二区块链网络1120中的每个区块链网络:当该区块链网络的共识节点要退出该区块链网络时,该共识节点可以被配置为在该区块链网络中调用部署在该区块链网络中的第一退出合约以退出该区块链网络(此时,该节点可立刻不再参与共识),该区块链网络可以被配置为响应于执行所述第一退出合约而在上层区块链网络1100中调用部署在上层区块链网络1100中的第二退出合约来向上层区块链网络1100请求使该共识节点退出该区块链网络,上层区块链网络1100可以被配置为在执行所述第二退出合约后将所述第二退出合约的执行结果在上层区块链网络1100中上链存证(此时,该节点在上层区块链网络1100中被标记为“退出”)。
第一区块链网络1110和第二区块链网络1120都信任上层区块链网络1100,无须信任上层区块链网络1100中的某个或某些上层路由节点。也就是说,第一区块链网络1110信任上层区块链网络1100本身而无须委托上层区块链网络1100中与它通信的第一上层路由节点BR1作为它在上层区块链网络1100中设置的信任代表,第二区块链网络1120信任上层区块链网络1100本身而无须委托上层区块链网络1100中与它通信的第二上层路由节点BR2作为它在上层区块链网络1100中设置的信任代表。上层区块链网络1100不需要知道第一区块链网络1110和第二区块链网络1120中的每一者的链上数据而只需要管理第一区块链网络1110和第二区块链网络1120中的每一者的节点成员信息。由于上层区块链网络1100中的任一上层路由节点(例如,第一上层路由节点BR1、第二上层路由节点BR2)都既知道第一区块链网络1110的节点成员信息也知道第二区块链网络1120的节点成员信息,所以在第一区块链网络1110和第二区块链网络1120之间的跨链交互可以通过第一区块链网络1110和第二区块链网络1120共同信任的上层区块链网络1100进行背书从而得到信任。第一区块链网络1110和第二区块链网络1120中的一者不需要维护第一区块链网络1110和第二区块链网络1120中的另一者的链上数据和节点成员信息,只需要向上层区块链网络1100查询第一区块链网络1110和第二区块链网络1120中的另一者的节点成员信息就能彼此进行跨链交互。由此,在第一区块链网络1110和第二区块链网络1120之间经由上层区块链网络1100实现了信任传递,而不需要第一区块链网络1110和第二区块链网络1120彼此信任。这样,既能够促进第一区块链网络1110和第二区块链网络1120之间的跨链交互,又能够保证第一区块链网络1110和第二区块链网络1120之间的信息隔离,使得对方只需知道执行所请求的跨链交易所需的信息而不会知道自己的其它信息,还能够减轻上层区块链网络1100、第一区块链网络1110和第二区块链网络1120的各个节点的数据维护负担。
接下来继续参考图1,描述从第一区块链网络1110到第二区块链网络1120的跨链交互的示例过程。如图1所示,当第一区块链网络1110发起要在第二区块链网络1120中执行的跨链交易时:第一路由节点BR11可以被配置为获得来自第一区块链网络1110的要在第二区块链网络1120中执行的跨链交易msg_req并将跨链交易msg_req传输至第一上层路由节点BR1。在一些实施例中,跨链交易可以由第一区块链网络1110的第一共识节点发送给第一路由节点BR11。在一些实施例中,也可以由第一路由节点BR11自己收集第一区块链网络1110中的跨链交易。在一些示例中,第一路由节点BR11自己也可以是全节点。例如,在第一区块链网络1110中产生跨链请求后,该跨链请求在本区块链内进行共识。在共识完成后,生成跨链交易打包出块。于是第一路由节点BR11可以通过监视区块来查询区块中的跨链交易。在一些实施例中,第一路由节点BR11还可以被配置为将跨链交易构造为特定的跨链消息格式,以便进行跨链交互。接下来,第一上层路由节点BR1可以被配置为将从第一路由节点BR11接收到的跨链交易msg_req传输至第二上层路由节点BR2。第二上层路由节点BR2可以被配置为将从第一上层路由节点BR1接收到的跨链交易msg_req传输至第二路由节点BR21。第二路由节点BR21可以被配置为在第二区块链网络1120中广播从第二上层路由节点BR2接收到的跨链交易msg_req,使得第二区块链网络1120的所 述多个第二共识节点Y1、Y2、Y3、Y4接收并执行所述跨链交易。在一些实施例中,可以由第二区块链网络1120的所述多个第二共识节点Y1、Y2、Y3、Y4中的主节点接收并执行所述跨链交易,该主节点是可以由第二区块链网络1120的具体共识机制决定的。由此,由第一区块链网络1110请求的跨链交易在第二区块链网络1120中被执行。
在将跨链交易从第一区块链网络1110传递到第二区块链网络1120的过程中,既不需要第一区块链网络1110的各个第一共识节点进行签名,也不需要途经的各个路由节点对跨链交易进行验证和/或加签自己的签名。实际上,只要产生跨链交易的请求的节点在上层区块链网络1100的网络架构中具有合法身份,该节点就可以调用第二区块链网络1120中的智能合约或者说服务。
例如,跨链交易可以包括作为发送方的第一区块链网络1110的网络标识和作为接收方的第二区块链网络1120的网络标识。第一上层路由节点BR1可以被配置为根据跨链交易中包括的第二区块链网络1120的网络标识查询在上层区块链网络1100中与第二区块链网络1120通信的第二上层路由节点BR2,并将跨链交易传输至第二上层路由节点BR2。例如,在前面提到的示例中,第二区块链网络1120的区块链Y在上层区块链网络1100中发布合约C服务的URI标识为82000000/Y/C,假设第一区块链网络1110的区块链X想要调用合约C服务,则其跨链交易中包括合约C服务的URI标识为82000000/Y/C,那么第一上层路由节点BR1可以检查目标服务即合约C服务的URI标识中的网络标识,根据网络标识的首字节82确定在上层区块链网络1100中与目标区块链网络即第二区块链网络1120通信的上层路由节点是第二上层路由节点BR2,然后可以将跨链交易传输至第二上层路由节点BR2。接下来,第二上层路由节点BR2还可以被配置为根据跨链交易中包括的第二区块链网络1120的网络标识(例如,后续字节)查找自己本地注册的第二区块链网络1120的第二路由节点BR21,并将跨链交易传输至第二路由节点BR21。跨链交易可以包括第一区块链网络1110想要调用的服务的URI标识,第二区块链网络1120的主节点可以根据服务标识执行相应的服务。
在一些实施例中,当跨链交易在第二区块链网络1120中被执行后,还可以将跨链交易的执行结果(例如包括但不限于回执消息)从第二区块链网络1120传输到第一区块链网络1110。图2描述了从第二区块链网络1120到第一区块链网络1110的跨链交互的示例过程。
如图2所示,在所述跨链交易在第二区块链网络中被执行后,第二路由节点BR21可以被配置为获得来自第二区块链网络1120的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点BR2。上链证明可以指第二共识节点的签名,其例如可以采用签名的集合或聚合签名的方式。在一些实施例中,执行结果和上链证明可以由第二区块链网络1120的第二共识节点发送给第二路由节点BR21。在一些实施例中,也可以由第二路由节点BR21自己收集第二区块链网络1120中的执行结果和上链证明。在一些示例中,第二路由节点BR21自己也可以是全节点。例如,在第二区块链网络1120中执行跨链交易后,该执行结果在本区块链内进行共识。在共识完成后,将执行结果打包出块并产生上链证明。于是第二路由节点BR21可以通过监视区块来查询执行结果和上链证明。在一些实施例中,第二路由节点BR21还可以被配置为将执行结果构造为特定的跨链消息格式,以便进行跨链交互。
在一些实施例中,第二路由节点BR21也可以被配置为在获得来自第二区块链网络1120的指示跨链交易被执行的执行结果后请求第二区块链网络1120的所述多个第二共识节点Y1、Y2、Y3、Y4对执行结果进行签名,并在接收到的第二共识节点的签名的数量达到预设阈值时将执行结果和包括接收到的第二共识节点的签名的上链证明传输至第二上层路由节点BR2。该预设阈值是可配置的。在本文中,预设阈值可以是任何与数量有关的量,其例如可以表现为数值,或者可以表现为比例或百分比。例如,在一些实施例中,可以要求第二路由节点BR21在接收到第二区块链网络1120中的所有第二共识节点Y1、Y2、Y3、Y4的签名后才将执行结果和上链证明传输至第二上层路由节点BR2;在另一些实施例中,也可以要求第二路由节点BR21在接收到第二区块链网络1120中的预设比例以上(例如,超过三分之二、超过二分之一等等)的第二共识节点的签名后才将执行结果和上链证明传输至第二上层路由节点BR2;在另一些实施例中,也可以要求第二路由节点BR21只要接收到第二区块链网络1120中的预设个数以上(例如,超过两个、超过三个、超过五个等等)的第二共识节点的签名后就将执行结果和上链证明传输至第二上层路由节点BR2。第二路由节点BR21可以只对第二共识节点的签名进行收集和转发,而不验证这些签名是否正确,也无需验证执行结果。在图2的示例中,第二路由节点BR21接收到了包括所有第二共识节点Y1、Y2、Y3、Y4的签名的上链证明sign(Y1,Y2,Y3,Y4)并将其与执行结果msg_resp一起传输至第二上层路由节点BR2。
接下来,第二上层路由节点BR2可以被配置为将从第二路由节点BR21接收到的执行结果和上链证明传输至第一上层路由节点BR1。第一上层路由节点BR1可以被配置为将从第二上层路由节点BR2接收到的执行结果和上链证明传输至第一路由节点BR11。在一些实施例中,执行结果可以包括作为发送方的第二区块链网络1120的网络标识和作为接收方的第一区块链网络1110的网络标识,并且第二上层路由节点BR2可以被配置为根据执行结果中包括的第一区块链网络1110的网络标识查询在上层区块链网络1100中与第一区块链网络1110通信的第一上层路由节点BR1,并将执行结果和上链证明传输至第一上层路由节点BR1。例如,在前面提到的示例中,第一区块链网络1110的区块链X调用了合约C服务,并且区块链Y响应于此而执行了合约C服务,则其执行结果可以包括区块链X的URI标识81000000/X,那么第二上层路由节点BR2可以检查目标区块链即区块链X的URI标识中的网络标识,根据网络标识的首字节81确定在上层区块链网络1100中与目标区块链网络即第一区块链网络1110通信的上层路由节点是第一上层路由节点BR1,然后可以将执行结果和上链证明传输至第一上层路由节点BR1。接下来,第一上层路由节点BR1还可以被配置为根据跨链交易中包括的第一区块链网络1110的网络标识(例如,后续字节)查找自己本地注册的第一区块链网络1110的第一路由节点BR11,并将执行结果和上链证明传输至第一路由节点BR11。第二上层路由节点BR2和第一上层路由节点BR1中的每一者可以只对执行结 果和上链证明进行转发,而无需对执行结果和上链证明中的任何一者进行验证。在图2的示例中,第二上层路由节点BR2将执行结果msg_resp和上链证明sign(Y1,Y2,Y3,Y4)传输至第一上层路由节点BR1,第一上层路由节点BR1将执行结果msg_resp和上链证明sign(Y1,Y2,Y3,Y4)传输至第一路由节点BR11。
第一路由节点BR11可以被配置为在第一区块链网络1110中广播从第一上层路由节点BR1接收到的执行结果和上链证明,使得第一区块链网络1110的所述多个第一共识节点X1、X2、X3、X4接收执行结果和上链证明。第一路由节点BR11可以只对执行结果和上链证明进行转发,而无需对执行结果和上链证明中的任何一者进行验证。此时,第一共识节点由于不维护第二区块链网络1120的节点成员信息,因此不认识第二区块链网络1120中的共识节点,进而暂时无法验证接收到的上链证明。因此,第一共识节点(例如,所述多个第一共识节点X1、X2、X3、X4中的主节点,这可以由具体共识机制决定)可以被配置为向上层区块链网络1100发送用于查询第二区块链网络1120的共识节点公钥列表的查询请求,基于查询到的第二区块链网络1120的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的执行结果。例如,如图2所示,第一路由节点BR11可以被配置为获得来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求msg_query并将查询请求msg_query传输至第一上层路由节点BR1。由于第一上层路由节点BR1知道第二区块链网络1120的节点成员信息,因此第一上层路由节点BR1可以被配置为响应于从第一路由节点BR11接收到查询请求而对第二区块链网络1120的共识节点公钥列表进行只读查询,并将查询到的第二区块链网络1120的共识节点公钥列表msg_list传输至第一路由节点BR11。第一上层路由节点BR1无需在上层区块链网络1100中将该只读查询上链存证。第一路由节点BR11可以被进一步配置为在第一区块链网络1110中广播从第一上层路由节点BR1接收到的第二区块链网络1120的共识节点公钥列表msg_list,使得第一共识节点接收到第二区块链网络1120的共识节点公钥列表msg_list。第一共识节点可以被配置为基于第二区块链网络的共识节点公钥列表msg_list验证接收到的上链证明msg_resp是否正确,并在验证通过时信任接收到的执行结果。可以配置具体的信任策略来确定在上链证明满足什么样的条件时验证通过。例如,当上链证明sign(Y1,Y2,Y3,Y4)是第二共识节点Y1、Y2、Y3、Y4的签名的集合时,信任策略可以要求在接收到的签名全部正确时验证通过,也可以要求接收到的签名中的正确签名占预设比例以上(例如,超过三分之二、超过二分之一等等)时验证通过,在此不对其作特别限制。第一区块链网络1110可以在信任执行结果后对其进行后续处理,例如将执行结果在第一区块链网络1110中上链存证和/或输入到后续合约操作中。
如果在第二区块链网络1120向第一区块链网络1110返回执行结果和上链证明(第二路由节点BR21获得执行结果和上链证明并将其传输至第二上层路由节点BR2)之后并且在第一上层路由节点BR1执行从第一路由节点BR11接收到来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求并返回查询到的第二区块链网络1120的共识节点公钥列表之前,第二区块链网络1120的节点成员恰好发生了变更,则可能导致第一共识节点验证上链证明失败,此时第一共识节点可以重新向上层区块链网络1100发送查询请求。由于区块链网络的节点成员变更通常是低频操作的,因此这种失败的发生频率通常较低,一般是可以容忍的。如果重新查询到的第二区块链网络1120的共识节点公钥列表确实与之前查询到的第二区块链网络1120的共识节点公钥列表不一致,则上次失败可能是由于第二区块链网络1120的节点成员变更导致的,因而可以用重新查询到的第二区块链网络1120的共识节点公钥列表再次验证上链证明。
在图1的示例中,第一区块链网络1110设置有一个第一路由节点BR11,但是在其它一些示例中,第一区块链网络1110也可以设置有多个第一路由节点。例如,A机构和B机构共同参与了第一区块链网络1110的区块链X,但是A机构和B机构虽然在一定程度上相互信任但是可能也没有非常信任对方,因此A机构和B机构可以分别在第一区块链网络1110中设置自己的第一路由节点以用于与上层区块链网络1100通信。因此,在一些实施例中,第一区块链网络1110可以包括多个所述第一路由节点,每个第一路由节点可以与第一上层路由节点BR1通信。当第一区块链网络1100发起要在第二区块链网络1120中执行的跨链交易时,每个所述第一路由节点可以被配置为单独地获得来自第一区块链网络1110的要在第二区块链网络1120中执行的跨链交易并将跨链交易传输至第一上层路由节点BR1。在一些示例中,第一上层路由节点BR1可以进一步被配置为从每个所述第一路由节点接收跨链交易,验证从每个所述第一路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时将经过去重的跨链交易传输至第二上层路由节点BR2。换言之,第一上层路由节点BR1可能从多个第一路由节点重复多次接收到相同跨链交易,但第一上层路由节点BR1可以对接收到的跨链交易进行去重并把去重后的跨链交易传输至第二上层路由节点BR2。在一些示例中,当第一上层路由节点BR1验证从每个第一路由节点接收到的跨链交易的哈希值不一致(即哈希验证不通过)时,第一上层路由节点BR1可以向第一路由节点返回失败消息。另外,在所述跨链交易在第二区块链网络1120中被执行后,每个所述第一路由节点可以被配置为单独地从第一上层路由节点BR1接收执行结果和上链证明,并在第一区块链网络1110中广播接收到的执行结果和上链证明。在一些示例中,第一共识节点还可以被配置为经由每个第一路由节点分别向上层区块链网络1100查询第二区块链网络1120的共识节点公钥列表。例如,每个第一路由节点还可以被配置为单独地获得来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求并将所述查询请求传输至第一上层路由节点BR1,以及单独地从第一上层路由节点BR1接收第二区块链网络1120的共识节点公钥列表并在第一区块链网络1110中广播接收到的第二区块链网络1120的共识节点公钥列表。在一些示例中,第一共识节点可以被配置为基于从每个第一路由节点接收到的第二区块链网络1120的共识节点公钥列表验证从该第一路由节点接收到的上链证明是否正确,并在所述多个所述第一路由节点中的通过验证的第一路由节点的数量达到预设阈值时信任接收到的执行结果。进一步地,第一共识节点例如还可以被配置为在验证上链证明通过后进一步验证从每个第一路由节点接收到的执行结果的哈希值是否一致,并在验证通过时信任经过去重的执行结果。在另一些示例中,第一共识节点也可以被配 置为基于从所述多个所述第一路由节点中的一个第一路由节点接收到的第二区块链网络1120的共识节点公钥列表验证从所述多个所述第一路由节点中的另一个第一路由节点接收到的上链证明是否正确。这可以被视为交叉验证。第一共识节点可以被配置为在所述多个所述第一路由节点中的通过交叉验证的第一路由节点的数量达到预设阈值时信任接收到的执行结果。同样,上述预设阈值是可配置的,在此不受特别限制。在一些示例中,第一共识节点可以进一步验证从所述多个所述第一路由节点中的每个第一路由节点接收到的执行结果的哈希值是否一致,并在验证通过时信任经过去重的执行结果。
例如,参考图3,第一区块链网络1110设置有两个第一路由节点BR11和BR12。第一路由节点BR11和第一路由节点BR12各自单独地获得来自第一区块链网络1110的要在第二区块链网络1120中执行的跨链交易并将跨链交易传输至第一上层路由节点BR1,第一上层路由节点BR1将经过去重的跨链交易传输至第二上层路由节点BR2进而传输至第二路由节点BR21。第二路由节点BR21在第二区块链网络1120中广播接收到的跨链交易使得该跨链交易在第二区块链网络1120中被执行上链。然后,第二路由节点BR21获得来自第二区块链网络1120的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明,并且执行结果和上链证明被依次传输至第二上层路由节点BR2、第一上层路由节点BR1,第一上层路由节点BR1将执行结果和上链证明传输至每个第一路由节点BR11和BR12。每个第一路由节点BR11和BR12可以分别在第一区块链网络1110中广播接收到的执行结果和上链证明。每个第一路由节点BR11和BR12还可以各自单独地获得来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求并将所述查询请求传输至第一上层路由节点BR1,以及单独地从第一上层路由节点BR1接收第二区块链网络1120的共识节点公钥列表并在第一区块链网络1100中广播接收到的第二区块链网络1120的共识节点公钥列表。如果第二区块链网络1120也设置有多个第二路由节点,则第二上层路由节点BR2可以将接收到的跨链交易传输至每个第二路由节点以及可以从每个第二路由节点分别接收该第二路由节点所获得的执行结果和上链证明。
在图1的示例中,第二区块链网络1120设置有一个第二路由节点BR21,但是在其它一些示例中,第二区块链网络1120也可以设置有多个第二路由节点。例如,C机构和D机构共同参与了第二区块链网络1120的区块链Y,但是C机构和D机构虽然在一定程度上相互信任但是可能也没有非常信任对方,因此C机构和D机构可以分别在第二区块链网络1120中设置自己的第二路由节点以用于与上层区块链网络1100通信。因此,在一些实施例中,第二区块链网络1120可以包括多个所述第二路由节点,每个第二路由节点可以与第二上层路由节点BR2通信。当第一区块链网络1100发起要在第二区块链网络1120中执行的跨链交易时,每个所述第二路由节点可以被配置为单独地从第二上层路由节点BR2接收跨链交易并在第二区块链网络1120中广播接收到的跨链交易。在一些示例中,第二共识节点还可以被配置为验证从每个所述第二路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时执行经过去重的跨链交易。另外,在所述跨链交易在第二区块链网络1120中被执行后,每个所述第二路由节点可以被配置为单独地获得来自第二区块链网络1120的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点BR2。在一些示例中,第二上层路由节点BR2可以进一步被配置为从每个所述第二路由节点接收执行结果和上链证明,验证从每个所述第二路由节点接收到的执行结果的哈希值以及上链证明的哈希值是否一致,并在验证通过时将经过去重的执行结果和上链证明传输至第一上层路由节点BR1。换言之,第二上层路由节点BR2可能从多个第二路由节点重复多次接收到相同执行结果和上链证明,但第二上层路由节点BR2可以对接收到的执行结果和上链证明进行去重并把去重后的执行结果和去重后的上链证明传输至第一上层路由节点BR1。在一些示例中,当第二上层路由节点BR2验证从每个第二路由节点接收到的执行结果的哈希值和/或上链证明的哈希值不一致(即哈希验证不通过)时,第二上层路由节点BR2可以向第二路由节点返回失败消息。
例如,参考图4,第二区块链网络1120设置有两个第二路由节点BR21和BR22。第一路由节点BR1获得来自第一区块链网络1110的要在第二区块链网络1120中执行的跨链交易并且跨链交易被依次传输至第一上层路由节点BR1和第二上层路由节点BR2。第二上层路由节点BR2将接收到的跨链交易传输至每个第二路由节点BR21和BR22。每个第二路由节点BR21和BR22各自在第二区块链网络1120中广播接收到的跨链交易使得该跨链交易在第二区块链网络1120中被执行上链。然后,每个第二路由节点BR21和BR22分别获得来自第二区块链网络1120的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点BR2,第二上层路由节点BR2将经过去重的执行结果和上链证明依次传输至第一上层路由节点BR1、第一路由节点BR11。第一路由节点BR11在第一区块链网络1110中广播接收到的执行结果和上链证明。如果第一区块链网络1110也设置有多个第一路由节点,则第一上层路由节点BR1可以从每个第一路由节点分别接收该第一路由节点所获得的跨链交易以及可以将接收到的执行结果和上链证明传输至每个第一路由节点。
另外,在图1的示例中,第一区块链网络1110与上层区块链网络1100中的一个第一上层路由节点BR1通信。考虑到一个第一上层路由节点可能存在单点故障不可靠的问题,因此可以通过设置集群来解决这个问题。也就是说,第一区块链网络1110可以在上层区块链网络1100中设置通信节点集合,这样的通信节点集合可以包括多个与第一区块链网络1110的第一路由节点BR11通信的第一上层路由节点。
在一些实施例中,上层区块链网络1100可以包括与第一路由节点BR11通信的多个所述第一上层路由节点。当第一区块链网络1110发起要在第二区块链网络1120中执行的跨链交易时,第一路由节点BR11可以被配置为将跨链交易传输至每个所述第一上层路由节点,即每个所述第一上层路由节点可以被配置为单独地从第一路由节点BR11接收跨链交易。每个所述第一上层路由节点可以被配置为将接收到的跨链交易传输至第二上层路由节点BR2。在一些示例中,第二上层路由节点BR2可以被配置为从每个所述第一上层路由节点接收跨链交易,验证从每个所述第一上层路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时将经过去重的跨链交易传输至第二路由节点BR21。另外,在所述跨链交易在第二区块链网络1120中被执行后,第二上层路由节点BR2可以被配置为将从第二路由节点BR21接收到的执行 结果以及针对所述执行结果的上链证明传输至每个所述第一上层路由节点,即每个所述第一上层路由节点被配置为单独地从第二上层路由节点BR2接收执行结果和上链证明。每个所述第一上层路由节点可以被配置为将执行结果和上链证明传输至第一路由节点。在一些示例中,第一路由节点BR11可以被配置为在第一区块链网络1110中广播从每个所述第一上层路由节点接收到的执行结果和上链证明,使得第一区块链网络的所述多个第一共识节点接收来自每个所述第一上层路由节点的执行结果和上链证明。在一些示例中,第一共识节点可以被配置为向上层区块链网络1100发送用于查询第二区块链网络1120的共识节点公钥列表的查询请求,基于查询到的第二区块链网络1120的共识节点公钥列表验证接收到的来自每个所述第一上层路由节点的上链证明是否正确,并在所述多个所述第一上层路由节点中的通过验证的第一上层路由节点的数量达到预设阈值时信任接收到的执行结果。同样,该预设阈值是可配置的,在此不受特别限制。例如,第一路由节点BR11还可以被配置为获得来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求并将所述查询请求传输至每个所述第一上层路由节点,以及分别从每个所述第一上层路由节点接收第二区块链网络1120的共识节点公钥列表并在第一区块链网络1110中广播从每个所述第一上层路由节点接收到的第二区块链网络1120的共识节点公钥列表。在一些示例中,第一共识节点可以被配置为基于来自每个所述第一上层路由节点的第二区块链网络1120的共识节点公钥列表验证来自该第一上层路由节点的上链证明是否正确,并在所述多个所述第一上层路由节点中的通过验证的第一上层路由节点的数量达到预设阈值时信任接收到的执行结果。进一步地,第一共识节点例如还可以被配置为在验证上链证明通过后进一步验证来自每个所述第一上层路由节点的执行结果的哈希值是否一致,并在验证通过时信任经过去重的执行结果。替代地,对执行结果的哈希验证与去重可以由第一路由节点BR11提前执行。在另一些示例中,第一共识节点也可以被配置为基于来自所述多个所述第一上层路由节点中的一个第一上层路由节点的第二区块链网络1120的共识节点公钥列表验证来自所述多个所述第一上层路由节点中的另一个第一上层路由节点的上链证明是否正确。这可以被视为交叉验证。第一共识节点可以被配置为在所述多个所述第一上层路由节点中的通过交叉验证的第一上层路由节点的数量达到预设阈值时信任接收到的执行结果。
例如,参考图5,上层区块链网络1100可以包括与第一路由节点BR11通信的两个第一上层路由节点BR1和BR1’,第一路由节点BR11可以将跨链交易传输至每个第一上层路由节点BR1、BR1’,每个第一上层路由节点BR1、BR1’可以将接收到的跨链交易传输至第二上层路由节点BR2,并且第二上层路由节点BR2可以将经过去重的跨链交易至第二路由节点BR21。在跨链交易在第二区块链网络1120中被执行后,第二路由节点B21可以将执行结果和上链证明传输至第二上层路由节点BR2进而传输至每个第一上层路由节点BR1和BR1’,每个第一上层路由节点BR1和BR1’分别将从第二上层路由节点BR2接收到的执行结果和上链证明传输至第一路由节点BR11。另外,每个第一上层路由节点BR1和BR1’还可以分别响应于从第一路由节点BR11接收到用于查询第二区块链网络1120的共识节点公钥列表的查询请求而对第二区块链网络1120的共识节点公钥列表进行只读查询,并将查询到的第二区块链网络1120的共识节点公钥列表传输至第一路由节点BR11。
替代地,当上层区块链网络1100包括与第一路由节点BR11通信的多个第一上层路由节点时,也可以不使每个第一上层路由节点都单独地执行数据的查询与收发二者,而是可以使其中一个或多个第一上层路由节点执行数据的收发并且使另外一个或多个第一上层路由节点执行数据的查询。这样既可以防止单点故障不可靠,又可以节省计算资源。具体地,在一些实施例中,与第一路由节点BR11通信的多个第一上层路由节点可以包括第一第一上层路由节点和第二第一上层路由节点。当第一区块链网络1110发起要在第二区块链网络1120中执行的跨链交易时,第一路由节点BR11可以被配置为将跨链交易传输至第一第一上层路由节点,即第一第一上层路由节点可以被配置为从第一路由节点BR11接收跨链交易并将接收到的跨链交易传输至第二上层路由节点BR2。在所述跨链交易在第二区块链网络1120中被执行后,第二上层路由节点BR2可以被配置为将执行结果以及针对所述执行结果的上链证明传输至第一第一上层路由节点,即第一第一上层路由节点可以被配置为从第二上层路由节点BR2接收执行结果和上链证明并将接收到的执行结果和上链证明传输至第一路由节点。第一路由节点BR11可以进一步被配置为在第一区块链网络1110中广播从第一第一上层路由节点接收到的执行结果和上链证明,使得第一区块链网络1110的所述多个第一共识节点X1、X2、X3、X4接收执行结果和上链证明。第一共识节点X1、X2、X3、X4(例如,其中的主节点)可以被配置为向上层区块链网络1100发送用于查询第二区块链网络1120的共识节点公钥列表的查询请求。如此,在一些示例中,第一第一上层路由节点可以被配置为从第一路由节点BR11接收来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求并将所述查询请求传输至第二一上层路由节点,第二第一上层路由节点可以被配置为响应于从第一第一上层路由节点接收到所述查询请求而对第二区块链网络1120的共识节点公钥列表进行只读查询,并将查询到的第二区块链网络1120的共识节点公钥列表传输至第一第一上层路由节点,并且第一第一上层路由节点还可以被配置为将从第二第一上层路由节点接收到的第二区块链网络1120的共识节点公钥列表传输至第一路由节点BR11。第一路由节点BR11可以被配置为在第一区块链网络1110中广播从第一第一上层路由节点接收到的第二区块链网络1120的共识节点公钥列表,使得第一区块链网络1110的所述多个第一共识节点X1、X2、X3、X4接收第二区块链网络1120的共识节点公钥列表、基于接收到的第二区块链网络1120的共识节点公钥列表验证接收到的上链证明是否正确、并在验证通过时信任接收到的执行结果。
例如,参考图6,上层区块链网络1100包括与第一路由节点BR11通信的第一第一上层路由节点BR1和第二第一上层路由节点BR1’。第一路由节点BR11可以将跨链交易传输至第一第一上层路由节点BR1,第一第一上层路由节点BR1可以将跨链交易传输至第二上层路由节点BR2进而传输至第二路由节点BR21以在第二区块链网络1120中广播并执行上链。第二路由节点BR21可以将执行结果和上链证明传输至第二上层路由节点BR2进而传输至第一第一上层路由节点BR1、第一路由节点BR11以在第一区块 链网络1110中广播。第一共识节点X1、X2、X3、X4(例如,其中的主节点)可以经由第一路由节点BR11向上层区块链网络1100的第一第一上层路由节点BR1发送用于查询第二区块链网络1120的共识节点公钥列表的查询请求。第一第一上层路由节点BR1可以将从第一路由节点BR11接收到的来自第一共识节点的用于查询第二区块链网络1120的共识节点公钥列表的查询请求传输至第二一上层路由节点BR1’。第二第一上层路由节点BR1’可以响应于从第一第一上层路由节点BR1接收到所述查询请求而对第二区块链网络1120的共识节点公钥列表进行只读查询,并将查询到的第二区块链网络1120的共识节点公钥列表传输至第一第一上层路由节点BR1。第一第一上层路由节点BR1可以进一步将从第二第一上层路由节点BR1’接收到的第二区块链网络1120的共识节点公钥列表传输至第一路由节点BR11。第一路由节点BR11可以在第一区块链网络1110中广播从第一第一上层路由节点BR1接收到的第二区块链网络1120的共识节点公钥列表,使得第一区块链网络1110的所述多个第一共识节点X1、X2、X3、X4(例如,其中的主节点)接收第二区块链网络1120的共识节点公钥列表、基于接收到的第二区块链网络1120的共识节点公钥列表验证接收到的上链证明是否正确、并在验证通过时信任接收到的执行结果。
虽然以上只描述了第一区块链网络1110在上层区块链网络1100中部署的通信节点集合中的一个上层路由节点负责数据收发并且另一个上层路由节点负责数据查询,但这仅仅是示例性的而非限制性的。例如,还可以使第一区块链网络1110在上层区块链网络1100中部署的通信节点集合包括与第一区块链网络1110通信的上层路由节点的一个或多个组,每组包括一个或多个负责数据收发的收发路由节点以及一个或多个负责数据查询的查询路由节点。如果需要进行查询,则来自第一路由节点BR11的查询请求会传输至每组中的一个或多个收发路由节点,然后每组中的各个收发路由节点会单独地将查询请求传输至该组中的每个查询路由节点进行查询,该组中的各个查询路由节点将查询结果传输至该组中的每个收发路由节点,之后每组中的各个收发路由节点将查询结果传输至第一路由节点BR11。如果不需要进行查询,则每组中的各个收发路由节点可以直接将来自第一路由节点BR11或第二上层路由节点BR2的数据传输至第二上层路由节点BR2或第一路由节点BR11。
在另一些示例中,第一共识节点可以在接收到所述多个所述第一上层路由节点中的一个或多个第一上层路由节点(例如,第一第一上层路由节点BR1)的执行结果和上链证明后,经由第一路由节点BR11向所述多个所述第一上层路由节点中的其它一个或多个第一上层路由节点(例如,第二第一上层路由节点BR1’)直接发送查询请求,并且基于直接从所述多个所述第一上层路由节点中的所述其它一个或多个第一上层路由节点(例如,第二第一上层路由节点BR1’)接收到的第二区块链网络1120的共识节点公钥列表验证从所述多个所述第一上层路由节点中的所述一个或多个第一上层路由节点(例如,第一第一上层路由节点BR1)接收到的上链证明是否正确,并在验证通过时信任从所述多个所述第一上层路由节点中的所述一个或多个第一上层路由节点(例如,第一第一上层路由节点BR1)接收到的执行结果。
另外,在图1的示例中,第二区块链网络1120与上层区块链网络1100中的一个第二上层路由节点BR2通信。考虑到一个第二上层路由节点可能存在单点故障不可靠的问题,因此可以通过设置集群来解决这个问题。也就是说,第二区块链网络1120可以在上层区块链网络1100中设置通信节点集合,这样的通信节点集合可以包括多个与第二区块链网络1120的第二路由节点BR21通信的第二上层路由节点。
在一些实施例中,上层区块链网络1100可以包括与第二路由节点BR21通信的多个所述第二上层路由节点。当第一区块链网络1110发起要在第二区块链网络1120中执行的跨链交易时,第一上层路由节点BR1可以被配置为将跨链交易传输至每个所述第二上层路由节点,即每个所述第二上层路由节点可以被配置为单独地从第一上层路由节点BR1接收跨链交易。每个所述第二上层路由节点可以被配置为将接收到的跨链交易传输至第二路由节点BR21。在一些示例中,第二路由节点BR2可以被配置为在第二区块链网络1120中广播从每个所述第二上层路由节点接收到的跨链交易,第二共识节点可以被配置为验证来自每个所述第二上层路由节点的跨链交易的哈希值是否一致,并在验证通过时执行经过去重的跨链交易。替代地,对跨链交易的哈希验证与去重可以由第二路由节点BR21提前执行。另外,在所述跨链交易在第二区块链网络1120中被执行后,第二路由节点BR21可以被配置为将所获得的执行结果以及针对所述执行结果的上链证明传输至每个所述第二上层路由节点,即每个所述第二上层路由节点被配置为单独地从第二路由节点BR21接收执行结果和上链证明。每个所述第二上层路由节点可以被配置为将接收到的执行结果和上链证明传输至第一上层路由节点BR1。在一些示例中,第一上层路由节点BR1可以被配置为验证从每个所述第二上层路由节点接收到的执行结果的哈希值以及上链证明的哈希值是否一致,并在验证通过时将经过去重的执行结果和上链证明传输至第一路由节点BR11。换言之,第一上层路由节点BR1可能从多个第二上层路由节点重复多次接收到相同执行结果和上链证明,但第一上层路由节点BR1可以对接收到的执行结果和上链证明进行去重并把去重后的执行结果和去重后的上链证明传输至第一路由节点BR11。在一些示例中,当第一上层路由节点BR1验证从每个第二上层路由节点接收到的执行结果的哈希值和/或上链证明的哈希值不一致(即哈希验证不通过)时,第一上层路由节点BR1可以向第二上层路由节点返回失败消息。
例如,参考图7,上层区块链网络1100可以包括与第二路由节点BR21通信的两个第二上层路由节点BR2和BR2’,第一路由节点BR11可以将跨链交易传输至第一上层路由节点BR1进而传输至每个第二上层路由节点BR2和BR2’,每个第二上层路由节点BR2和BR2’可以将接收到的跨链交易传输至第二路由节点BR21以在第二区块链网络1120中广播并执行上链。在跨链交易在第二区块链网络1120中被执行后,第二路由节点B21可以将执行结果和上链证明传输至每个第二上层路由节点BR2和BR2’。每个第二上层路由节点BR2和BR2’可以分别将执行结果和上链证明传输至第一上层路由节点BR1,第一上层路由节点BR1可以将经过去重的执行结果和经过去重的上链证明传输至第一路由节点BR11进而在第一区块链网络1110中广播。
替代地,当上层区块链网络1100包括与第二路由节点BR21通信的多个第二上层路由节点时,也可以不使每个第二上层路由节点都单独地执行数据的查询与收发二者,而是可以使其中一个或多个第二上 层路由节点执行数据的收发并且使另外一个或多个第二上层路由节点执行数据的查询。这样既可以防止单点故障不可靠,又可以节省计算资源。具体地,在一些实施例中,与第二路由节点BR21通信的多个第二上层路由节点可以包括第一第二上层路由节点和第二第二上层路由节点。当第一区块链网络1110发起要在第二区块链网络1120中执行的跨链交易时,第一上层路由节点BR1可以被配置为将跨链交易传输至第一第二上层路由节点,即第一第二上层路由节点可以被配置为从第一上层路由节点BR1接收跨链交易并将接收到的跨链交易传输至第二路由节点BR21。在所述跨链交易在第二区块链网络1120中被执行后,第二路由节点BR21可以被配置为将执行结果以及针对所述执行结果的上链证明传输至第一第二上层路由节点,即第一第二上层路由节点被配置为从第二路由节点BR21接收执行结果和上链证明并将接收到的执行结果和上链证明传输至第一上层路由节点BR1。
例如,参考图8,上层区块链网络1100包括与第二路由节点BR21通信的第一第二上层路由节点BR2和第二第二上层路由节点BR2’。第一路由节点BR11可以将跨链交易传输至第一上层路由节点BR1,第一上层路由节点BR1可以将跨链交易传输至第一第二上层路由节点BR2进而传输至第二路由节点BR21以在第二区块链网络1120中广播并执行上链。第二路由节点BR21可以将执行结果和上链证明传输至第一第二上层路由节点BR2进而传输至第一上层路由节点BR1、第一路由节点BR11以在第一区块链网络1110中广播。第一第二上层路由节点BR2可以负责数据的收发,第二第二上层路由节点BR2’可以负责数据的查询,例如当第二区块链网络1120发起要在第一区块链网络1110中的跨链交易时,第二第二上层路由节点BR2’可以经由第一第二上层路由节点BR2接收并执行来自第二路由节点BR21的用于查询第一区块链网络1110的共识节点公钥列表的查询请求,并将查询到的第一区块链网络1110的共识节点公钥列表经由第一第二上层路由节点BR2传输至第二路由节点BR21以在第二区块链网络1120中广播,以供第二共识节点验证来自第一区块链网络1110的上链证明并在验证通过时信任来自第一区块链网络1110的执行结果。
虽然以上只描述了第二区块链网络1120在上层区块链网络1100中部署的通信节点集合中的一个上层路由节点负责数据收发并且另一个上层路由节点负责数据查询,但这仅仅是示例性的而非限制性的。例如,还可以使第二区块链网络1120在上层区块链网络1100中部署的通信节点集合包括与第二区块链网络1120通信的上层路由节点的一个或多个组,每组包括一个或多个负责数据收发的收发路由节点以及一个或多个负责数据查询的查询路由节点。如果需要进行查询,则来自第二路由节点BR21的查询请求会传输至每组中的一个或多个收发路由节点,然后每组中的各个收发路由节点会单独地将查询请求传输至该组中的每个查询路由节点进行查询,该组中的各个查询路由节点将查询结果传输至该组中的每个收发路由节点,之后每组中的各个收发路由节点将查询结果传输至第二路由节点BR21。如果不需要进行查询,则每组中的各个收发路由节点可以直接将来自第二路由节点BR21或第一上层路由节点BR1的数据传输至第一上层路由节点BR1或第二路由节点BR21。
在另一些示例中,当第二区块链网络1120发起的要在第一区块链网络1110中的跨链交易在第一区块链网络1110中被执行后,第二共识节点可以在接收到所述多个所述第二上层路由节点中的一个或多个第二上层路由节点(例如,第一第二上层路由节点BR2)的执行结果和上链证明后,经由第二路由节点BR21向所述多个所述第二上层路由节点中的其它一个或多个第二上层路由节点(例如,第二第二上层路由节点BR2’)直接发送查询请求,并且基于直接从所述多个所述第二上层路由节点中的所述其它一个或多个第二上层路由节点(例如,第二第二上层路由节点BR2’)接收到的第一区块链网络1110的共识节点公钥列表验证从所述多个所述第二上层路由节点中的所述一个或多个第二上层路由节点(例如,第一第二上层路由节点BR2)接收到的上链证明是否正确,并在验证通过时信任从所述多个所述第二上层路由节点中的所述一个或多个第二上层路由节点(例如,第一第二上层路由节点BR2)接收到的执行结果。
虽然在图1至图8的示例中将第一路由节点、第一上层路由节点、第二上层路由节点和第二路由节点的数量图示为一个或两个,但这仅仅是示例性的而非限制性的,系统100可以包括任何合适数量的第一路由节点、第一上层路由节点、第二上层路由节点和第二路由节点,并且可以相应地将前述一个或多个实施例任意组合,以实现各种替代的跨链交互过程。
虽然在图1至图8的示例中将系统100图示为在同一上层区块链网络1100之下包括两个下层区块链网络1110和1120,但是这仅仅是示例性的而非限制性的,系统100是可横向扩展的,可以在同一上层区块链网络1100之下注册两个或更多个下层区块链网络,并且这些下层区块链网络中的任何两个下层区块链网络都可以通过前述过程实现跨链交互。
虽然在图1至图8的示例中将系统100图示为二层区块链网络架构,但是这仅仅是示例性的而非限制性的,系统100是可纵向扩展的,可以将系统100部署为二层或更多层区块链网络架构,例如第一区块链网络1110和第二区块链网络1120中的每一个都可以作为其它一个或多个区块链网络的上层区块链网络,并且上层区块链网络1100的任何两个下层区块链网络(不必在同一层)都可以通过前述过程类似地实现跨链交互。
虽然在图1至图8的示例中将系统100图示为用于在同构链之间进行跨链交互,但是这仅仅是示例性的而非限制性的,系统100也可以进一步被配置用于在异构链之间进行跨链交互。下面将结合图9和图10示例性地描述用于跨异构链交互的系统100。
在图9中,为了使图示简洁,第二区块链网络1120已被省略,使得图9着重描述在第一区块链网络1110和与之异构的区块链网络之间进行的跨链交互。具体地,如图9所示,系统100还可以包括第一转接桥网络1130和第一异构区块链网络1131。
第一转接桥网络1130可以部署在上层区块链网络1100的下层,即与第一区块链网络1110和第二区块链网络1120同层。第一转接桥网络1130可以包括相互通信的第一转接桥路由节点BR31和多个第一转接桥共识节点I1、I2、I3、I4。第一转接桥网络1130可以信任上层区块链网络1100,并且第一转 接桥路由节点BR31可以与上层区块链网络1100中的第三上层路由节点BR3通信。第一转接桥网络1130在接入上层区块链网络1100时可以向第三上层路由节点BR3进行注册,并在注册成功后获得由第三上层路由节点BR3分配的网络标识。第一转接桥网络1130和上层区块链网络1100、第一区块链网络1110、第二区块链网络1120都是同构的。在一些实施例中,第一转接桥网络1130可以是区块链网络。在一些实施例中,第一转接桥网络1130也可以不形成区块链网络,而仅仅是进行签名投票。在本文中,为了描述简单,可以将与上层区块链网络1100同构的区块链或区块链网络描述为同构链或同构链网络,并将与上层区块链网络1100异构的区块链或区块链网络描述为异构链或异构链网络。因此,相对于上层区块链网络1100而言,第一转接桥网络1130、第一区块链网络1110、第二区块链网络1120可以是同构链网络。
第一异构区块链网络1131可以部署在第一转接桥网络1130的下层并且包括多个第一异构共识节点P1、P2、P3、P4。第一异构共识节点P1、P2、P3、P4可以用于实现第一异构区块链网络1131的具体业务,负责对交易进行验证和共识上链。虽然第一异构共识节点P1、P2、P3、P4的数量被图示为4个,但这仅仅是示例性而非限制性的,实际的第一异构区块链网络1131可以包括任何数量的共识节点。
第一异构区块链网络1131与上层区块链网络1100、第一区块链网络1110和第二区块链网络1120是异构的,因此相对于上层区块链网络1100而言,第一异构区块链网络1131可以是异构链网络。第一异构区块链网络1131的所述多个第一异构共识节点P1、P2、P3、P4与第一转接桥共识节点I1、I2、I3、I4通信。可以理解,在图9(以及稍后描述的图10)中,为了使图示简洁,仅描绘了第一异构共识节点P1与第一转接桥共识节点I1、I2、I3、I4通信,但实际上,尽管未图示,其它各个第一异构共识节点P2、P3、P4也同样分别与第一转接桥共识节点I1、I2、I3、I4通信。虽然第一转接桥共识节点I1、I2、I3、I4的数量被图示为4个,但这仅仅是示例性而非限制性的。在一些示例中,不同的第一转接桥共识节点I1、I2、I3、I4可以是由上层区块链网络1100的需要与第一异构区块链网络1131进行跨链交易的不同下层区块链网络设置在第一转接桥网络1130中的,比如第一转接桥共识节点I1可以是由第一区块链网络1110设置在第一转接桥网络1130中的而第一转接桥共识节点I2可以是由第二区块链网络1120设置在第一转接桥网络1130中的。这是因为不同下层区块链网络(其背后往往例如是不同机构)彼此可能相互不信任,所以期望在第一转接桥网络1130中自己配置第一转接桥共识节点。第一异构区块链网络1131在接入第一转接桥网络1130时可以向第一转接桥共识节点提交注册请求从而获得网络标识,也可以替代地由第一转接桥网络1130将提前分配好的网络标识提供给第一异构区块链网络1131,然后第一异构区块链网络1131可以使用得到的网络标识进行绑定注册。即使第一转接桥网络1130中存在多个第一转接桥共识节点导致第一异构区块链网络1131进行多次注册,也不会导致问题,因为这至多使得多个网络标识对应于第一异构区块链网络1131,并不会导致无法寻址到第一异构区块链网络1131。
第一转接桥网络1130的所述多个第一转接桥共识节点I1、I2、I3、I4中的每个第一转接桥共识节点可以被配置为具有简单支付确认(SPV)能力,以监视和验证第一异构区块链网络1131中的区块行为。为了便于理解,每个第一转接桥共识节点可以被视为第一异构区块链网络1131的上层路由节点。当第一异构区块链网络1131需要发起跨链交易时,可以将该跨链交易打包出块,然后第一转接桥共识节点可以收集第一异构区块链网络1131中的区块、验证第一异构区块链网络1131中的区块以及第一异构共识节点的签名。
与第一区块链网络1110、第二区块链网络1120类似的,上层区块链网络1100可以被配置为通过将第一转接桥网络1130的共识节点的变更在上层区块链网络1100中上链存证来管理第一转接桥网络1130的共识节点。也就是说,上层区块链网络1100的任意节点(例如第一上层路由节点BR1、第二上层路由节点BR2、第三上层路由节点BR3)都知道第一转接桥网络1130的节点成员信息,而不用维护第一转接桥网络1130的其它数据,更不用维护第一异构区块链网络1131的链上数据和节点成员信息。
接下来继续参考图9,描述从第一区块链网络1110到第一异构区块链网络1131的示例跨链交互过程。在图9的示例中,当第一区块链网络1110发起要在第一异构区块链网络1131中执行的跨链交易时,第一路由节点BR11可以被配置为获得来自第一区块链网络1110的要在第一异构区块链网络1131中执行的跨链交易并将跨链交易传输至第一上层路由节点BR1。第一上层路由节点BR1可以被配置为将从第一路由节点BR11接收到的跨链交易传输至第三上层路由节点BR3。第三上层路由节点BR3可以被配置为将从第一上层路由节点BR1接收到的跨链交易传输至第一转接桥路由节点BR31。第一转接桥路由节点BR31可以被配置为在第一转接桥网络1130中广播从第三上层路由节点BR3接收到的跨链交易,使得第一转接桥网络1130的所述多个第一转接桥共识节点I1、I2、I3、I4(例如,其中的主节点,这可以由具体共识机制决定)接收并将所述跨链交易转换为具有适配第一异构区块链网络1131的格式,并将转换后的跨链交易传输至第一异构区块链网络1131,使得第一异构区块链网络1131的所述多个第一异构共识节点P1、P2、P3、P4(例如,其中的主节点,这可以由具体共识机制决定)接收并执行转换后的跨链交易。在一些实施例中,第一转接桥网络1130的所述多个第一转接桥共识节点I1、I2、I3、I4还可以被配置为将接收到的跨链交易在第一转接桥网络1130中上链存证,以供日后查询。在一些实施例中,在转换后的跨链交易在第一异构区块链网络1131中被执行后,第一转接桥网络1130的所述多个第一转接桥共识节点I1、I2、I3、I4可以被配置为获得转换后的跨链交易的执行结果并将执行结果在第一转接桥网络1130中上链存证。例如,第一转接桥共识节点可以被配置为监视并验证第一异构区块链网络1131中的区块从而收集到第一异构区块链网络1131中的关于转换后的跨链交易的执行结果。第一转接桥路由节点BR31可以被配置为获得针对所述执行结果的上链证明并将上链证明传输至第三上层路由节点BR3。第三上层路由节点BR3可以被配置为将从第一转接桥路由节点BR31接收到的上链证明传输至第一上层路由节点BR1。第一上层路由节点BR1可以被配置为将从第三上层路由节点BR3接收到的上链证明传输至第一路由节点BR11。第一路由节点BR11可以被配置为在第一区块链网络中广播从第一上层路 由节点BR1接收到的上链证明,使得第一区块链网络的所述多个第一共识节点X1、X2、X3、X3接收上链证明。第一共识节点可以被配置为向上层区块链网络1100发送用于查询第一转接桥网络1130的共识节点公钥列表的查询请求,基于查询到的第一转接桥网络1130的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的上链证明。例如,第一路由节点BR11可以被配置为获得来自第一共识节点的用于查询第一转接桥网络1130的共识节点公钥列表的查询请求并将查询请求传输至第一上层路由节点BR1。由于第一上层路由节点BR1知道第一转接桥网络1130的节点成员信息,因此第一上层路由节点BR1可以被配置为响应于从第一路由节点BR11接收到查询请求而对第一转接桥网络1130的共识节点公钥列表进行只读查询,并将查询到的第一转接桥网络1130的共识节点公钥列表传输至第一路由节点BR11。第一上层路由节点BR1无需在上层区块链网络1100中将该只读查询上链存证。第一路由节点BR11可以被进一步配置为在第一区块链网络1110中广播从第一上层路由节点BR1接收到的第一转接桥网络1130的共识节点公钥列表,使得第一共识节点接收到第一转接桥网络1130的共识节点公钥列表。第一共识节点可以被配置为基于第一转接桥网络1130的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的执行结果。可以配置具体的信任策略来确定在上链证明满足什么样的条件时验证通过。
这里,由于第一区块链网络1110与第一异构区块链网络1131异构,所以第一区块链网络1110的所述多个第一共识节点X1、X2、X3、X4是看不懂第一异构区块链网络1131中产生的关于跨链交易的执行结果的。由于第一区块链网络1110的所述多个第一共识节点X1、X2、X3、X4通过基于从第一区块链网络1110所信任的上层区块链网络1100查询到的第一转接桥网络1130的共识节点公钥列表验证并信任第一转接桥网络1130的上链证明,由此相信它所发起的跨链交易在第一异构区块链网络1131中被成功执行。因此,第一区块链网络1110不需要查询第一异构区块链网络1131,而是通过第一转接桥网络1130进行信任背书。然后,第一区块链网络1110可以在信任接收到的上链证明后对其进行后续处理,例如将接收到的上链证明在第一区块链网络1110中上链存证,或用于后续合约操作。第一异构区块链网络1131发起在第一区块链网络1110中的跨链交易的过程与以上是类似的,在此不再赘述。另外,第一异构区块链网络1131与第二区块链网络1120或上层区块链网络1100的其它下层区块链网络(不限于在上层区块链网络1100之下的哪一层中)的跨链交互也是类似的。
当要在系统100中接入多个异构区块链网络时,可以相应地构建多个转接桥网络。图10描述了系统100中接入两个异构区块链网络的示例情况。在图10中,为了使图示简洁,第一区块链网络1110和第二区块链网络1120已被省略,使得图10着重描述在第一异构区块链网络1131和第二异构区块链网络1141之间进行的跨链交互。可以理解,第二异构区块链网络1141也可以如上所述那样与第一区块链网络1110、第二区块链网络1120或上层区块链网络1100的其它下层区块链网络(不限于在上层区块链网络1100之下的哪一层中)进行跨链交互。具体地,如图10所示,系统100还可以包括第二转接桥网络1140和第二异构区块链网络1141。
第二转接桥网络1140可以部署在上层区块链网络1100的下层,即与第一区块链网络1110、第二区块链网络1120、第一转接桥网络1130同层。第二转接桥网络1140可以包括相互通信的第二转接桥路由节点BR41和多个第二转接桥共识节点J1、J2、J3、J4。第二转接桥网络1140可以信任上层区块链网络1100,并且第二转接桥路由节点BR41可以与上层区块链网络1100中的第四上层路由节点BR4通信。第二转接桥网络1140在接入上层区块链网络1100时可以向第四上层路由节点BR4进行注册,并在注册成功后获得由第四上层路由节点BR4分配的网络标识。第二转接桥网络1140和上层区块链网络1100、第一区块链网络1110、第二区块链网络1120、第一转接桥网络1130都是同构的。在一些实施例中,第二转接桥网络1140可以是区块链网络。在一些实施例中,第二转接桥网络1140也可以不形成区块链网络,而仅仅是进行签名投票。
第二异构区块链网络1141可以部署在第二转接桥网络1140的下层并且包括多个第二异构共识节点Q1、Q2、Q3、Q4。第二异构共识节点Q1、Q2、Q3、Q4可以用于实现第二异构区块链网络1141的具体业务,负责对交易进行验证和共识上链。虽然第二异构共识节点Q1、Q2、Q3、Q4的数量被图示为4个,但这仅仅是示例性而非限制性的,实际的第二异构区块链网络1141可以包括任何数量的共识节点。
第二异构区块链网络1141与上层区块链网络1100、第一区块链网络1110和第二区块链网络1120是异构的。在一些实施例中,第二异构区块链网络1141与第一异构区块链网络1131异构。在另一些实施例中,第二异构区块链网络1141与第一异构区块链网络1131可以是同构的,但是在这种情况下,可能更优选的是使第二异构区块链网络1141与第一异构区块链网络1131经由它们的共同上层区块链网络进行跨同构链交互,例如采用以上结合图1至图8所述的过程。因此在下文中,可以以第二异构区块链网络1141与第一异构区块链网络1131彼此异构为例进行描述。第二异构区块链网络1141的所述多个第二异构共识节点Q1、Q2、Q3、Q4与第二转接桥共识节点J1、J2、J3、J4通信。可以理解,在图10中,为了使图示简洁,仅描绘了第二异构共识节点Q1与第二转接桥共识节点J1、J2、J3、J4通信,但实际上,尽管未图示,其它各个第二异构共识节点Q2、Q3、Q4也同样分别与第二转接桥共识节点J1、J2、J3、J4通信。虽然第二转接桥共识节点J1、J2、J3、J4的数量被图示为4个,但这仅仅是示例性而非限制性的。在一些示例中,不同的第二转接桥共识节点J1、J2、J3、J4可以是由上层区块链网络1100的需要与第二异构区块链网络1141进行跨链交易的不同下层区块链网络设置在第二转接桥网络1140中的,比如第二转接桥共识节点J1可以是由第一区块链网络1110设置在第二转接桥网络1140中的,第二转接桥共识节点J2可以是由第二区块链网络1120设置在第二转接桥网络1140中的,而第三转接桥共识节点J3可以是由第一异构区块链网络1131设置在第二转接桥网络1140中的。这是因为不同下层区块链网络(其背后往往例如是不同机构)彼此可能相互不信任,所以期望在第二转接桥网络1140中自己配置第二转接桥共识节点。第二异构区块链网络1141在接入第二转接桥网络1140时可以向第二转接桥共识节点提交注册请求从而获得网络标识,也可以替代地由第二转接桥网络1140将提前分配好的 网络标识提供给第二异构区块链网络1141,然后第二异构区块链网络1141可以使用得到的网络标识进行绑定注册。即使第二转接桥网络1140中存在多个第二转接桥共识节点导致第二异构区块链网络1141进行多次注册,也不会导致问题,因为这至多使得多个网络标识对应于第二异构区块链网络1141,并不会导致无法寻址到第二异构区块链网络1141。
第二转接桥网络1140的所述多个第二转接桥共识节点J1、J2、J3、J4中的每个第二转接桥共识节点可以被配置为具有简单支付确认(SPV)能力,以监视和验证第二异构区块链网络1141中的区块行为。为了便于理解,每个第二转接桥共识节点可以被视为第二异构区块链网络1141的上层路由节点。当第二异构区块链网络1141需要发起跨链交易时,可以将该跨链交易打包出块,然后第二转接桥共识节点可以收集第二异构区块链网络1141中的区块、验证第二异构区块链网络1141中的区块以及第二异构共识节点的签名。
与第一区块链网络1110、第二区块链网络1120、第一转接桥网络1130类似的,上层区块链网络1100可以被配置为通过将第二转接桥网络1140的共识节点的变更在上层区块链网络1100中上链存证来管理第二转接桥网络1140的共识节点。也就是说,上层区块链网络1100的任意节点(例如第一上层路由节点BR1、第二上层路由节点BR2、第三上层路由节点BR3、第四上层路由节点BR4)都知道第二转接桥网络1140的节点成员信息,而不用维护第二转接桥网络1140的其它数据,更不用维护第二异构区块链网络1141的链上数据和节点成员信息。
接下来继续参考图10,描述从第一异构区块链网络1131到第二异构区块链网络1141的示例跨链交互过程。在图10的示例中,当第一异构区块链网络1131发起要在第二异构区块链网络1141中执行的跨链交易时,第一转接桥共识节点可以被配置为获得第一异构区块链网络1131要在第二异构区块链网络1141中执行的跨链交易。例如,第一转接桥共识节点可以被配置为监视并验证第一异构区块链网络1131中的区块从而收集到第一异构区块链网络1131要在第二异构区块链网络1141中执行的跨链交易。第一转接桥路由节点BR31可以被配置为将来自第一异构区块链网络1131的要在第二异构区块链网络1141中执行的跨链交易传输至第三上层路由节点BR3,所述跨链交易已被第一转接桥网络1130的所述多个第一转接桥共识节点I1、I2、I3、I4验证并转换为具有适配上层区块链网络1100的格式。第三上层路由节点BR3可以被配置为将从第一转接桥路由节点BR31接收到的跨链交易传输至第四上层路由节点BR4。第四上层路由节点BR4可以被配置为将从第三上层路由节点BR3接收到的跨链交易传输至第二转接桥路由节点BR41。第二转接桥路由节点BR41可以被配置为在第二转接桥网络1140中广播从第四上层路由节点BR4接收到的跨链交易,使得第二转接桥网络1140的所述多个第二转接桥共识节点J1、J2、J3、J4(例如,其中的主节点,这可以由具体共识机制决定)接收并将所述跨链交易转换为具有适配第二异构区块链网络1141的格式,并将转换后的跨链交易传输至第二异构区块链网络1141,使得第二异构区块链网络1141的所述多个第二异构共识节点Q1、Q2、Q3、Q4(例如,其中的主节点,这可以由具体共识机制决定)接收并执行转换后的跨链交易。在一些实施例中,第二转接桥网络1140还可以被配置为将所述跨链交易在第二转接桥网络1140中上链存证,以供日后查询。在一些实施例中,在转换后的跨链交易在第二异构区块链网络1141被执行后,第二转接桥网络1140的所述多个第二转接桥共识节点J1、J2、J3、J4可以被配置为获得转换后的跨链交易的执行结果并将执行结果在第二转接桥网络1140中上链存证。例如,第二转接桥共识节点可以被配置为监视并验证第二异构区块链网络1141中的区块从而收集到第二异构区块链网络1141中的关于转换后的跨链交易的执行结果。第二转接桥路由节点BR41可以被配置为获得针对所述执行结果的上链证明并将上链证明传输至第四上层路由节点BR4。第四上层路由节点BR4可以被配置为将从第二转接桥路由节点BR41接收到的上链证明传输至第三上层路由节点BR3。第三上层路由节点BR3可以被配置为将从第四上层路由节点BR4接收到的上链证明传输至第一转接桥路由节点BR31。第一转接桥路由节点BR31可以被配置为在第一转接桥网络1130中广播从第三上层路由节点BR3接收到的上链证明,使得第一转接桥网络1130的所述多个第一转接桥共识节点I1、I2、I3、I4接收上链证明。第一转接桥共识节点还可以被配置为向上层区块链网络1100发送用于查询第二转接桥网络1140的共识节点公钥列表的查询请求,基于查询到的第二转接桥网络1140的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的上链证明。例如,第一转接桥路由节点BR31可以被配置为获得来自第一转接桥共识节点的用于查询第二转接桥网络1140的共识节点公钥列表的查询请求并将查询请求传输至第三上层路由节点BR3。由于第三上层路由节点BR3知道第二转接桥网络1140的节点成员信息,因此第三上层路由节点BR3可以被配置为响应于从第一转接桥路由节点BR31接收到查询请求而对第二转接桥网络1140的共识节点公钥列表进行只读查询,并将查询到的第二转接桥网络1140的共识节点公钥列表传输至第一转接桥路由节点BR31。第三上层路由节点BR3无需在上层区块链网络1100中将该只读查询上链存证。第一转接桥路由节点BR31可以被进一步配置为在第一转接桥网络1130中广播从第三上层路由节点BR3接收到的第二转接桥网络1140的共识节点公钥列表,使得第一转接桥共识节点接收到第二转接桥网络1140的共识节点公钥列表。第一转接桥共识节点可以被配置为基于第二转接桥网络1140的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的执行结果。可以配置具体的信任策略来确定在上链证明满足什么样的条件时验证通过。第一转接桥共识节点还可以被配置为在信任接收到的上链证明之后将上链证明转换为具有适配第一异构区块链网络1131的格式,并将转换后的上链证明传输至第一异构区块链网络1131。这里,由于第一异构区块链网络1131与第二异构区块链网络1141异构,所以第一异构区块链网络1131的所述多个第一异构共识节点P1、P2、P3、P4是看不懂第二异构区块链网络1141中产生的关于跨链交易的执行结果的。由于第一异构区块链网络1131的所述多个第一异构共识节点P1、P2、P3、P4通过第一转接桥共识节点基于从第二转接桥网络1130所信任的上层区块链网络1100查询到的第二转接桥网络1140的共识节点公钥列表验证并信任第二转接桥网络1140的上链证明,由此相信它所发起的跨链交易在第二异构区块链网络1141中被成功执行。因此,第一异构区块链网络1131不需要查询第二异构区块链网络 1141,而是通过第二转接桥网络1140进行信任背书。然后,第一异构区块链网络1131可以在信任接收到的经第一转接桥网络1130转换的上链证明后对其进行后续处理,例如将接收到的上链证明在第一异构区块链网络1131中上链存证,或用于后续合约操作。第二异构区块链网络1141发起在第一异构区块链网络1131中的跨链交易的过程与以上是类似的,在此不再赘述。
根据本公开的各种实施例的用于跨区块链交互的系统可以容易地在横向和纵向进行扩展,并且能够在解决跨链交互的信任问题的同时,实现跨链信息隔离并减轻节点的数据维护负担,在大规模网络下高效地实现跨同构链交互和跨异构链交互。
参考图11,本公开还在另一方面提供了一种用于跨区块链交互的方法200。方法200可以包括:在步骤S202处,通过第一区块链网络的第一路由节点获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易并将跨链交易传输至第一区块链网络和第二区块链网络的上层区块链网络的与第一路由节点通信的第一上层路由节点,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任;在步骤S204处,通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第二区块链网络的第二路由节点通信的第二上层路由节点;在步骤S206处,通过第二上层路由节点将从第一上层路由节点接收到的跨链交易传输至第二路由节点;以及在步骤S208处,通过第二路由节点在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的多个第二共识节点接收并执行所述跨链交易,其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。方法200的实施例基本类似于前述用于跨区块链交互的系统的实施例,因此在此不再赘述,相关之处可参见系统实施例部分的说明。
参考图12,本公开还在另一方面提供了一种用于跨区块链交互的装置300。装置300可以包括收集模块302、传输模块304和执行模块306。收集模块302可以被配置用于通过第一区块链网络的第一路由节点获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易。传输模块304可以被配置用于:通过第一路由节点将跨链交易传输至第一区块链网络和第二区块链网络的上层区块链网络的与第一路由节点通信的第一上层路由节点,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任;通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第二区块链网络的第二路由节点通信的第二上层路由节点;通过第二上层路由节点将从第一上层路由节点接收到的跨链交易传输至第二路由节点。执行模块306可以被配置用于通过第二路由节点在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的多个第二共识节点接收并执行所述跨链交易。所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。装置300的实施例基本类似于前述用于跨区块链交互的系统和方法的实施例,因此在此不再赘述,相关之处可参见系统实施例和方法实施例部分的说明。
图13是图示了可以在其上实现本公开的一个或多个示例性实施例的计算机系统600的示意性框图。计算机系统600包括总线602或用于传送信息的其它通信机构,以及与总线602耦合的用于处理信息的处理装置604。计算机系统600还包括与总线602耦合的用于存储要由处理装置604执行的指令的存储器606,存储器606可以是随机存取存储器(RAM)或其它动态存储设备。存储器606还可以被用于在要由处理装置604执行的指令的执行期间存储临时变量或其它中间信息。计算机系统600还包括耦合到总线602的用于为处理装置604存储静态信息和指令的只读存储器(ROM)608或其它静态存储设备。诸如磁盘或光盘之类的存储装置610被提供并且被耦合到总线602以用于存储信息和指令。计算机系统600可以经由总线602耦合到用于向用户提供输出的输出设备612,例如但不限于显示器(诸如阴极射线管(CRT)或液晶显示器(LCD))、扬声器等。诸如键盘、鼠标、麦克风等之类的输入设备614被耦合到总线602,以用于将信息和命令选择传送给处理装置604。计算机系统600可以执行本公开的实施例。与本公开的某些实现方式一致,由计算机系统600响应于处理装置604执行存储器606中所包含的一个或多个指令的一个或多个序列来提供结果。可以将这种指令从诸如存储装置610之类的另一计算机可读介质读取到存储器606中。存储器606中所包含的指令序列的执行使处理装置604执行本文描述的方法。可替代地,可以使用硬连线电路系统取代软件指令或者结合软件指令来实现本教导。因此,本公开的实现方式不限于硬件电路系统与软件的任何特定组合。在各种实施例中,计算机系统600可以经由网络接口616跨网络连接到如计算机系统600一样的一个或多个其它计算机系统,以形成联网系统。该网络可以包括专用网络或诸如互联网之类的公共网络。在联网系统中,一个或多个计算机系统可以存储数据并且将数据供应给其它计算机系统。如本文使用的术语“计算机可读介质”是指参与向处理装置604提供指令以供执行的任何介质。这种介质可以采用许多形式,包括但不限于非易失性介质、易失性介质和传输介质。非易失性介质包括例如诸如存储装置610之类的光盘或磁盘。易失性介质包括诸如存储器606之类的动态存储器。传输介质包括同轴电缆、铜线和光纤,包括包含总线602的布线。常见形式的计算机可读介质或计算机程序产品包括例如软盘、柔性盘、硬盘、磁带、或任何其它磁性介质、CD-ROM、数字视频盘(DVD)、蓝光盘、任何其它光学介质、拇指驱动器、存储器卡、RAM、PROM和EPROM、快速EPROM、任何其它存储器芯片或盒、或计算机可以从中读取的任何其它有形介质。在将一个或多个指令的一个或多个序列携带到处理装置604以供执行时可以涉及各种形式的计算机可读介质。例如,指令最初可以被携带在远程计算机的磁盘上。远程计算机可以将指令加载到其动态存储器中并且使用调制解调器通过电话线发送指令。计算机系统600本地的调制解调器可以在电话线上接收数据,并且使用红外发射器将数据转换成红外信号。耦合到总线602的红外检测器可以接收在红外信号中携带的数据,并且将数据置于总线602上。总线602将数据携带到存储器606,处理装置604从存储器606中检索指令并执行指令。可选地,由存储器606接收到的指令可以在由处理装置604执行之前或之后被存储在存储装置610上。
根据各种实施例,被配置为由处理装置执行以执行方法的指令被存储在计算机可读介质上。计算机可读介质可以是存储数字信息的设备。例如,计算机可读介质包括如本领域中已知用于存储软件的致密盘只读存储器(CD-ROM)。计算机可读介质由适合于执行被配置为被执行的指令的处理器访问。
例如,本公开还可以提供一种计算设备,该计算装置可以包括一个或多个处理器以及存储计算机可执行指令的存储器,计算机可执行指令在被一个或多个处理器执行时使得一个或多个处理器执行根据本公开的前述任一实施例所述的方法。如图14所示,计算设备700可以包括(一个或多个)处理器701以及存储计算机可执行指令的存储器702,计算机可执行指令在被(一个或多个)处理器701执行时使得(一个或多个)处理器701执行根据本公开的前述任一实施例所述的方法。(一个或多个)处理器701例如可以是计算装置700的中央处理单元(CPU)。(一个或多个)处理器701可以是任何类型的通用处理器,或者可以是专门设计用于跨区块链交互的处理器,诸如专用集成电路(“ASIC”)。存储器702可以包括可由(一个或多个)处理器701访问的各种计算机可读介质。在各种实施例中,本文描述的存储器702可以包括易失性和非易失性介质、可移除和不可移除介质。例如,存储器702可以包括以下的任何组合:随机存取存储器(“RAM”)、动态RAM(“DRAM”)、静态RAM(“SRAM”)、只读存储器(“ROM”)、闪存、高速缓冲存储器和/或任何其它类型的非瞬态计算机可读介质。存储器702可以存储在被处理器701执行时使得处理器701执行根据本公开的前述任一实施例所述的方法。
另外,本公开还可以提供一种其上存储有计算机可执行指令的非瞬态存储介质,计算机可执行指令在被计算机执行时使得计算机执行根据本公开的前述任一实施例所述的方法。
上述对本公开一个或多个示例性实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为服务器系统。当然,本申请不排除随着未来计算机技术的发展,实现上述实施例功能的计算机例如可以为个人计算机、膝上型计算机、车载人机交互设备、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
虽然本说明书一个或多个实施例提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的手段可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或终端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境,甚至为分布式数据处理环境)。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、产品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、产品或者设备所固有的要素。在没有更多限制的情况下,并不排除在包括所述要素的过程、方法、产品或者设备中还存在另外的相同或等同要素。例如若使用到第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书一个或多 个时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
本发明是参照根据本发明实施例的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储、石墨烯存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
本领域技术人员应明白,本说明书一个或多个实施例可提供为方法、系统或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本本说明书一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本说明书的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
以上所述仅为本说明书一个或多个实施例的实施例而已,并不用于限制本本说明书一个或多个实施例。对于本领域技术人员来说,本说明书一个或多个实施例可以有各种更改和变化。凡在本说明书的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在权利要求范围之内。

Claims (53)

  1. 一种用于跨区块链交互的系统,包括:
    第一区块链网络,所述第一区块链网络包括相互通信的第一路由节点和多个第一共识节点;
    第二区块链网络,所述第二区块链网络包括相互通信的第二路由节点和多个第二共识节点;以及
    第一区块链网络和第二区块链网络的上层区块链网络,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任,并且包括与第一路由节点通信的第一上层路由节点、与第二路由节点通信的第二上层路由节点、以及多个上层共识节点,第一上层路由节点、第二上层路由节点与所述多个上层共识节点相互通信,
    其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。
  2. 根据权利要求1所述的系统,其中,对于第一区块链网络和第二区块链网络中的每个区块链网络:
    当新节点要加入该区块链网络作为共识节点时,所述新节点被配置为从所述上层区块链网络获取证书并基于所获取的证书在该区块链网络中调用部署在该区块链网络中的第一加入合约的用于请求加入区块链网络的第一方法,该区块链网络被配置为响应于执行所述第一方法而在所述上层区块链网络中调用部署在所述上层区块链网络中的第二加入合约来向所述上层区块链网络请求在该区块链网络中加入所述新节点,所述上层区块链网络被配置为在执行所述第二加入合约后将所述第二加入合约的执行结果在所述上层区块链网络中上链存证并将上链证明传输至该区块链网络,该区块链网络被配置为基于所述上链证明在该区块链网络中调用所述第一加入合约的用于确认加入区块链网络的第二方法,以将所述新节点设置为该区块链网络的共识节点。
  3. 根据权利要求1所述的系统,其中,对于第一区块链网络和第二区块链网络中的每个区块链网络:
    当该区块链网络的共识节点要退出该区块链网络时,该共识节点被配置为在该区块链网络中调用部署在该区块链网络中的第一退出合约以退出该区块链网络,该区块链网络被配置为响应于执行所述第一退出合约而在所述上层区块链网络中调用部署在所述上层区块链网络中的第二退出合约来向所述上层区块链网络请求使该共识节点退出该区块链网络,所述上层区块链网络被配置为在执行所述第二退出合约后将所述第二退出合约的执行结果在所述上层区块链网络中上链存证。
  4. 根据权利要求1所述的系统,其中,当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    第一路由节点被配置为获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易并将跨链交易传输至第一上层路由节点;
    第一上层路由节点被配置为将从第一路由节点接收到的跨链交易传输至第二上层路由节点;
    第二上层路由节点被配置为将从第一上层路由节点接收到的跨链交易传输至第二路由节点;以及
    第二路由节点被配置为在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的所述多个第二共识节点接收并执行所述跨链交易。
  5. 根据权利要求4所述的系统,其中,在所述跨链交易在第二区块链网络中被执行后:
    第二路由节点被配置为获得来自第二区块链网络的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点;
    第二上层路由节点被配置为将从第二路由节点接收到的执行结果和上链证明传输至第一上层路由节点;
    第一上层路由节点被配置为将从第二上层路由节点接收到的执行结果和上链证明传输至第一路由节点;
    第一路由节点被配置为在第一区块链网络中广播从第一上层路由节点接收到的执行结果和上链证明,使得第一区块链网络的所述多个第一共识节点接收执行结果和上链证明;以及
    第一共识节点被配置为向所述上层区块链网络发送用于查询第二区块链网络的共识节点公钥列表的查询请求,基于查询到的第二区块链网络的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的执行结果。
  6. 根据权利要求5所述的系统,其中,第一区块链网络包括多个所述第一路由节点,每个所述第一路由节点与第一上层路由节点通信,并且其中,
    当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    每个所述第一路由节点被配置为单独地获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易并将跨链交易传输至第一上层路由节点;
    在所述跨链交易在第二区块链网络中被执行后:
    每个所述第一路由节点被配置为单独地从第一上层路由节点接收执行结果和上链证明,并在第一区块链网络中广播接收到的执行结果和上链证明。
  7. 根据权利要求6所述的系统,其中,当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:第一上层路由节点被配置为从每个所述第一路由节点接收跨链交易,验证从每个所述第一路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时将经过去重的跨链交易传输至第二上层路由节点。
  8. 根据权利要求6所述的系统,其中,在所述跨链交易在第二区块链网络中被执行后,每个所述第一路由节点还被配置为单独地获得来自第一共识节点的用于查询第二区块链网络的共识节点公钥列表的查询请求并将所述查询请求传输至第一上层路由节点,以及单独地从第一上层路由节点接收第二区 块链网络的共识节点公钥列表并在第一区块链网络中广播接收到的第二区块链网络的共识节点公钥列表。
  9. 根据权利要求5所述的系统,其中,第二区块链网络包括多个所述第二路由节点,每个所述第二路由节点与第二上层路由节点通信,并且其中,
    当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    每个所述第二路由节点被配置为单独地从第二上层路由节点接收跨链交易并在第二区块链网络中广播接收到的跨链交易;
    在所述跨链交易在第二区块链网络中被执行后:
    每个所述第二路由节点被配置为单独地获得来自第二区块链网络的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点。
  10. 根据权利要求9所述的系统,其中,在所述跨链交易在第二区块链网络中被执行后:第二上层路由节点被配置为从每个所述第二路由节点接收执行结果和上链证明,验证从每个所述第二路由节点接收到的执行结果的哈希值以及上链证明的哈希值是否一致,并在验证通过时将经过去重的执行结果和上链证明传输至第一上层路由节点。
  11. 根据权利要求5所述的系统,其中,所述上层区块链网络包括与第一路由节点通信的多个所述第一上层路由节点。
  12. 根据权利要求11所述的系统,其中,
    当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    每个所述第一上层路由节点被配置为单独地从第一路由节点接收跨链交易并将接收到的跨链交易传输至第二上层路由节点;
    在所述跨链交易在第二区块链网络中被执行后:
    每个所述第一上层路由节点被配置为单独地从第二上层路由节点接收执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第一路由节点。
  13. 根据权利要求12所述的系统,其中,当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:第二上层路由节点被配置为从每个所述第一上层路由节点接收跨链交易,验证从每个所述第一上层路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时将经过去重的跨链交易传输至第二路由节点。
  14. 根据权利要求12所述的系统,其中,在所述跨链交易在第二区块链网络中被执行后:
    第一路由节点被配置为在第一区块链网络中广播从每个所述第一上层路由节点接收到的执行结果和上链证明,使得第一区块链网络的所述多个第一共识节点接收来自每个所述第一上层路由节点的执行结果和上链证明;以及
    第一共识节点被配置为向所述上层区块链网络发送用于查询第二区块链网络的共识节点公钥列表的查询请求,基于查询到的第二区块链网络的共识节点公钥列表验证接收到的来自每个所述第一上层路由节点的上链证明是否正确,并在所述多个所述第一上层路由节点中的通过验证的第一上层路由节点的数量达到预设阈值时信任接收到的执行结果。
  15. 根据权利要求11所述的系统,其中,所述多个所述第一上层路由节点包括第一第一上层路由节点和第二第一上层路由节点,并且其中,
    当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    第一第一上层路由节点被配置为从第一路由节点接收跨链交易并将接收到的跨链交易传输至第二上层路由节点;
    在所述跨链交易在第二区块链网络中被执行后:
    第一第一上层路由节点被配置为从第二上层路由节点接收执行结果以及针对所述执行结果的上链证明并将接收到的执行结果和上链证明传输至第一路由节点。
  16. 根据权利要求15所述的系统,其中,在所述跨链交易在第二区块链网络中被执行后:
    第一第一上层路由节点被配置为从第一路由节点接收来自第一共识节点的用于查询第二区块链网络的共识节点公钥列表的查询请求并将所述查询请求传输至第二一上层路由节点;
    第二第一上层路由节点被配置为响应于从第一第一上层路由节点接收到所述查询请求而对第二区块链网络的共识节点公钥列表进行只读查询,并将查询到的第二区块链网络的共识节点公钥列表传输至第一第一上层路由节点;
    第一第一上层路由节点还被配置为将从第二第一上层路由节点接收到的第二区块链网络的共识节点公钥列表传输至第一路由节点。
  17. 根据权利要求5所述的系统,其中,所述上层区块链网络包括与第二路由节点通信的多个所述第二上层路由节点。
  18. 根据权利要求17所述的系统,其中,
    当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    每个所述第二上层路由节点被配置为单独地从第一上层路由节点接收跨链交易并将接收到的跨链交易传输至第二路由节点;
    在所述跨链交易在第二区块链网络中被执行后:
    每个所述第二上层路由节点被配置为单独地从第二路由节点接收执行结果以及针对所述执行结果的上链证明,并将接收到的执行结果和上链证明传输至第一上层路由节点。
  19. 根据权利要求18所述的系统,其中,在所述跨链交易在第二区块链网络中被执行后:第一上层路由节点还被配置为验证从每个所述第二上层路由节点接收到的执行结果的哈希值以及上链证明的 哈希值是否一致,并在验证通过时将经过去重的执行结果和上链证明传输至第一路由节点。
  20. 根据权利要求17所述的系统,其中,所述多个所述第二上层路由节点包括第一第二上层路由节点和第二第二上层路由节点,并且其中,
    当第一区块链网络发起要在第二区块链网络中执行的跨链交易时:
    第一第二上层路由节点被配置为从第一上层路由节点接收跨链交易并将接收到的跨链交易传输至第二路由节点;
    在所述跨链交易在第二区块链网络中被执行后:
    第一第二上层路由节点被配置为从第二路由节点接收执行结果以及针对所述执行结果的上链证明并将接收到的执行结果和上链证明传输至第一上层路由节点。
  21. 根据权利要求1所述的系统,还包括:
    第一转接桥网络,部署在所述上层区块链网络的下层并且信任所述上层区块链网络,所述第一转接桥网络包括相互通信的第一转接桥路由节点和多个第一转接桥共识节点,第一转接桥路由节点与所述上层区块链网络中的第三上层路由节点通信;以及
    第一异构区块链网络,部署在所述第一转接桥网络的下层并且包括多个第一异构共识节点,所述多个第一异构共识节点与第一转接桥共识节点通信,
    其中,所述第一转接桥网络与所述上层区块链网络、第一区块链网络和第二区块链网络同构,并且所述第一异构区块链网络与所述上层区块链网络、第一区块链网络和第二区块链网络异构,
    其中,所述多个第一转接桥共识节点中的每个第一转接桥共识节点被配置为具有简单支付确认能力,以监视和验证第一异构区块链网络中的区块行为,
    并且其中,所述上层区块链网络被配置为通过将第一转接桥网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一转接桥网络的共识节点。
  22. 根据权利要求21所述的系统,其中,第一转接桥网络是区块链网络。
  23. 根据权利要求21所述的系统,其中,当第一区块链网络发起要在第一异构区块链网络中执行的跨链交易时:
    第一路由节点被配置为获得来自第一区块链网络的要在第一异构区块链网络中执行的跨链交易并将跨链交易传输至第一上层路由节点;
    第一上层路由节点被配置为将从第一路由节点接收到的跨链交易传输至第三上层路由节点;
    第三上层路由节点被配置为将从第一上层路由节点接收到的跨链交易传输至第一转接桥路由节点;以及
    第一转接桥路由节点被配置为在第一转接桥网络中广播从第三上层路由节点接收到的跨链交易,使得第一转接桥网络的所述多个第一转接桥共识节点接收并将所述跨链交易转换为具有适配第一异构区块链网络的格式,并将转换后的跨链交易传输至第一异构区块链网络,使得第一异构区块链网络的所述多个第一异构共识节点接收并执行转换后的跨链交易。
  24. 根据权利要求23所述的系统,其中,当第一区块链网络发起要在第一异构区块链网络中执行的跨链交易时:第一转接桥网络的所述多个第一转接桥共识节点还被配置为将接收到的跨链交易在第一转接桥网络中上链存证。
  25. 根据权利要求23所述的系统,其中,在转换后的跨链交易在第一异构区块链网络中被执行后:
    第一转接桥网络的所述多个第一转接桥共识节点被配置为获得转换后的跨链交易的执行结果并将执行结果在第一转接桥网络中上链存证;
    第一转接桥路由节点被配置为获得针对所述执行结果的上链证明并将上链证明传输至第三上层路由节点;
    第三上层路由节点被配置为将从第一转接桥路由节点接收到的上链证明传输至第一上层路由节点;
    第一上层路由节点被配置为将从第三上层路由节点接收到的上链证明传输至第一路由节点;
    第一路由节点被配置为在第一区块链网络中广播从第一上层路由节点接收到的上链证明,使得第一区块链网络的所述多个第一共识节点接收上链证明;以及
    第一共识节点被配置为向所述上层区块链网络发送用于查询第一转接桥网络的共识节点公钥列表的查询请求,基于查询到的第一转接桥网络的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的上链证明。
  26. 根据权利要求21所述的系统,还包括:
    第二转接桥网络,部署在所述上层区块链网络的下层并且信任所述上层区块链网络,所述第二转接桥网络包括相互通信的第二转接桥路由节点和多个第二转接桥共识节点,第二转接桥路由节点与所述上层区块链网络中的第四上层路由节点通信;以及
    第二异构区块链网络,部署在所述第二转接桥网络的下层并且包括多个第二异构共识节点,所述多个第二异构共识节点与第二转接桥共识节点通信,
    其中,所述第二转接桥网络与所述上层区块链网络、第一区块链网络、第二区块链网络和第一转接桥网络同构,并且所述第二异构区块链网络与所述上层区块链网络、第一区块链网络、第二区块链网络和第一异构区块链网络异构,
    其中,所述多个第二转接桥共识节点中的每个第二转接桥共识节点被配置为具有简单支付确认能力,以监视和验证第二异构区块链网络中的区块行为,
    并且其中,所述上层区块链网络被配置为通过将第二转接桥网络的共识节点的变更在所述上层区块链网络中上链存证来管理第二转接桥网络的共识节点。
  27. 一种用于跨区块链交互的方法,包括:
    通过第一区块链网络的第一路由节点获得来自第一区块链网络的要在第二区块链网络中执行的跨 链交易并将跨链交易传输至第一区块链网络和第二区块链网络的上层区块链网络的与第一路由节点通信的第一上层路由节点,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任;
    通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第二区块链网络的第二路由节点通信的第二上层路由节点;
    通过第二上层路由节点将从第一上层路由节点接收到的跨链交易传输至第二路由节点;以及
    通过第二路由节点在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的多个第二共识节点接收并执行所述跨链交易,
    其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。
  28. 根据权利要求27所述的方法,其中,对于第一区块链网络和第二区块链网络中的每个区块链网络,当新节点要加入该区块链网络作为共识节点时,所述方法包括:
    通过所述新节点从所述上层区块链网络获取证书并基于所获取的证书在该区块链网络中调用部署在该区块链网络中的第一加入合约的用于请求加入区块链网络的第一方法;
    通过该区块链网络响应于执行所述第一方法而在所述上层区块链网络中调用部署在所述上层区块链网络中的第二加入合约来向所述上层区块链网络请求在该区块链网络中加入所述新节点;
    通过所述上层区块链网络在执行所述第二加入合约后将所述第二加入合约的执行结果在所述上层区块链网络中上链存证并将上链证明传输至该区块链网络;以及
    通过该区块链网络基于所述上链证明在该区块链网络中调用所述第一加入合约的用于确认加入区块链网络的第二方法,以将所述新节点设置为该区块链网络的共识节点。
  29. 根据权利要求27所述的方法,其中,对于第一区块链网络和第二区块链网络中的每个区块链网络,当该区块链网络的共识节点要退出该区块链网络时:
    通过该共识节点在该区块链网络中调用部署在该区块链网络中的第一退出合约以退出该区块链网络;
    通过该区块链网络响应于执行所述第一退出合约而在所述上层区块链网络中调用部署在所述上层区块链网络中的第二退出合约来向所述上层区块链网络请求使该共识节点退出该区块链网络;以及
    通过所述上层区块链网络在执行所述第二退出合约后将所述第二退出合约的执行结果在所述上层区块链网络中上链存证。
  30. 根据权利要求27所述的方法,还包括:
    通过第二路由节点获得来自第二区块链网络的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点;
    通过第二上层路由节点将从第二路由节点接收到的执行结果和上链证明传输至第一上层路由节点;
    通过第一上层路由节点将从第二上层路由节点接收到的执行结果和上链证明传输至第一路由节点;
    通过第一路由节点在第一区块链网络中广播从第一上层路由节点接收到的执行结果和上链证明,使得第一区块链网络的多个第一共识节点接收执行结果和上链证明;以及
    通过第一共识节点向所述上层区块链网络发送用于查询第二区块链网络的共识节点公钥列表的查询请求,基于查询到的第二区块链网络的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的执行结果。
  31. 根据权利要求30所述的方法,其中,第一区块链网络包括多个所述第一路由节点,每个所述第一路由节点与第一上层路由节点通信,并且其中,所述方法包括:
    通过每个所述第一路由节点单独地获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易并将跨链交易传输至第一上层路由节点;
    通过每个所述第一路由节点单独地从第一上层路由节点接收执行结果和上链证明,并在第一区块链网络中广播接收到的执行结果和上链证明。
  32. 根据权利要求31所述的方法,还包括:在通过每个所述第一路由节点单独地将跨链交易传输至第一上层路由节点之后,通过第一上层路由节点验证从每个所述第一路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时将经过去重的跨链交易传输至第二上层路由节点。
  33. 根据权利要求31所述的方法,还包括:
    通过每个所述第一路由节点单独地获得来自第一共识节点的用于查询第二区块链网络的共识节点公钥列表的查询请求并将所述查询请求传输至第一上层路由节点;以及
    通过每个所述第一路由节点单独地从第一上层路由节点接收第二区块链网络的共识节点公钥列表并在第一区块链网络中广播接收到的第二区块链网络的共识节点公钥列表。
  34. 根据权利要求30所述的方法,其中,第二区块链网络包括多个所述第二路由节点,每个所述第二路由节点与第二上层路由节点通信,并且其中,所述方法包括:
    通过每个所述第二路由节点单独地从第二上层路由节点接收跨链交易并在第二区块链网络中广播接收到的跨链交易;
    通过每个所述第二路由节点单独地获得来自第二区块链网络的指示跨链交易被执行的执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第二上层路由节点。
  35. 根据权利要求34所述的方法,还包括:在通过每个所述第二路由节点单独地将执行结果和上链证明传输至第二上层路由节点之后,通过第二上层路由节点验证从每个所述第二路由节点接收到的执行结果的哈希值以及上链证明的哈希值是否一致,并在验证通过时将经过去重的执行结果和上链证明传输至第一上层路由节点。
  36. 根据权利要求30所述的方法,其中,所述上层区块链网络包括与第一路由节点通信的多个所 述第一上层路由节点。
  37. 根据权利要求36所述的方法,包括:
    通过每个所述第一上层路由节点单独地从第一路由节点接收跨链交易并将接收到的跨链交易传输至第二上层路由节点;
    通过每个所述第一上层路由节点单独地从第二上层路由节点接收执行结果以及针对所述执行结果的上链证明并将执行结果和上链证明传输至第一路由节点。
  38. 根据权利要求37所述的方法,还包括:在通过每个所述第一上层路由节点将跨链交易至第二上层路由节点之后,通过第二上层路由节点验证从每个所述第一上层路由节点接收到的跨链交易的哈希值是否一致,并在验证通过时将经过去重的跨链交易传输至第二路由节点。
  39. 根据权利要求37所述的方法,还包括:
    通过第一路由节点在第一区块链网络中广播从每个所述第一上层路由节点接收到的执行结果和上链证明,使得第一区块链网络的所述多个第一共识节点接收来自每个所述第一上层路由节点的执行结果和上链证明;以及
    通过第一共识节点向所述上层区块链网络发送用于查询第二区块链网络的共识节点公钥列表的查询请求,基于查询到的第二区块链网络的共识节点公钥列表验证接收到的来自每个所述第一上层路由节点的上链证明是否正确,并在所述多个所述第一上层路由节点中的通过验证的第一上层路由节点的数量达到预设阈值时信任接收到的执行结果。
  40. 根据权利要求36所述的方法,其中,所述多个所述第一上层路由节点包括第一第一上层路由节点和第二第一上层路由节点,并且其中,所述方法包括:
    通过第一第一上层路由节点从第一路由节点接收跨链交易并将接收到的跨链交易传输至第二上层路由节点;
    通过第一第一上层路由节点从第二上层路由节点接收执行结果以及针对所述执行结果的上链证明并将接收到的执行结果和上链证明传输至第一路由节点。
  41. 根据权利要求40所述的方法,还包括:
    通过第一第一上层路由节点从第一路由节点接收来自第一共识节点的用于查询第二区块链网络的共识节点公钥列表的查询请求并将所述查询请求传输至第二一上层路由节点;
    通过第二第一上层路由节点响应于从第一第一上层路由节点接收到所述查询请求而对第二区块链网络的共识节点公钥列表进行只读查询,并将查询到的第二区块链网络的共识节点公钥列表传输至第一第一上层路由节点;
    通过第一第一上层路由节点将从第二第一上层路由节点接收到的第二区块链网络的共识节点公钥列表传输至第一路由节点。
  42. 根据权利要求30所述的方法,其中,所述上层区块链网络包括与第二路由节点通信的多个所述第二上层路由节点。
  43. 根据权利要求42所述的方法,还包括:
    通过每个所述第二上层路由节点单独地从第一上层路由节点接收跨链交易并将接收到的跨链交易传输至第二路由节点;
    通过每个所述第二上层路由节点单独地从第二路由节点接收执行结果以及针对所述执行结果的上链证明,并将接收到的执行结果和上链证明传输至第一上层路由节点。
  44. 根据权利要求43所述的方法,还包括:通过第一上层路由节点验证从每个所述第二上层路由节点接收到的执行结果的哈希值以及上链证明的哈希值是否一致,并在验证通过时将经过去重的执行结果和上链证明传输至第一路由节点。
  45. 根据权利要求42所述的方法,其中,所述多个所述第二上层路由节点包括第一第二上层路由节点和第二第二上层路由节点,并且其中,所述方法包括:
    通过第一第二上层路由节点从第一上层路由节点接收跨链交易并将接收到的跨链交易传输至第二路由节点;
    通过第一第二上层路由节点从第二路由节点接收执行结果以及针对所述执行结果的上链证明并将接收到的执行结果和上链证明传输至第一上层路由节点。
  46. 根据权利要求27所述的方法,还包括:
    通过第一路由节点获得来自第一区块链网络的要在第一异构区块链网络中执行的跨链交易并将跨链交易传输至第一上层路由节点;
    通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第一转接桥网络的第一转接桥路由节点通信的第三上层路由节点,所述第一转接桥网络部署在所述上层区块链网络的下层并且部署在第一异构区块链网络的上层,所述第一转接桥网络信任所述上层区块链网络;
    通过第三上层路由节点将从第一上层路由节点接收到的跨链交易传输至第一转接桥路由节点;以及
    通过第一转接桥路由节点在第一转接桥网络中广播从第三上层路由节点接收到的跨链交易,使得第一转接桥网络的多个第一转接桥共识节点接收并将所述跨链交易转换为具有适配第一异构区块链网络的格式,并将转换后的跨链交易传输至第一异构区块链网络,使得第一异构区块链网络的多个第一异构共识节点接收并执行转换后的跨链交易,
    其中,所述第一转接桥网络与所述上层区块链网络、第一区块链网络和第二区块链网络同构,并且所述第一异构区块链网络与所述上层区块链网络、第一区块链网络和第二区块链网络异构,
    其中,所述多个第一转接桥共识节点中的每个第一转接桥共识节点被配置为具有简单支付确认能力,以监视和验证第一异构区块链网络中的区块行为,
    并且其中,所述上层区块链网络被配置为通过将第一转接桥网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一转接桥网络的共识节点。
  47. 根据权利要求46所述的方法,其中,第一转接桥网络是区块链网络。
  48. 根据权利要求46所述的方法,还包括:通过第一转接桥网络的所述多个第一转接桥共识节点将接收到的跨链交易在第一转接桥网络中上链存证。
  49. 根据权利要求46所述的方法,还包括:
    通过第一转接桥网络的所述多个第一转接桥共识节点获得转换后的跨链交易的执行结果并将执行结果在第一转接桥网络中上链存证;
    通过第一转接桥路由节点获得针对所述执行结果的上链证明并将上链证明传输至第三上层路由节点;
    通过第三上层路由节点将从第一转接桥路由节点接收到的上链证明传输至第一上层路由节点;
    通过第一上层路由节点将从第三上层路由节点接收到的上链证明传输至第一路由节点;
    通过第一路由节点在第一区块链网络中广播从第一上层路由节点接收到的上链证明,使得第一区块链网络的多个第一共识节点接收上链证明;以及
    通过第一共识节点向所述上层区块链网络发送用于查询第一转接桥网络的共识节点公钥列表的查询请求,基于查询到的第一转接桥网络的共识节点公钥列表验证接收到的上链证明是否正确,并在验证通过时信任接收到的上链证明。
  50. 根据权利要求46所述的方法,还包括:
    通过第一转接桥网络的第一转接桥路由节点将来自第一异构区块链网络的要在第二异构区块链网络中执行的跨链交易传输至第三上层路由节点,所述跨链交易已被第一转接桥网络的所述多个第一转接桥共识节点验证并转换为具有适配所述上层区块链网络的格式;
    通过第三上层路由节点将从第一转接桥路由节点接收到的跨链交易传输至所述上层区块链网络的与第二转接桥网络的第二转接桥路由节点通信的第四上层路由节点,所述第二转接桥网络部署在所述上层区块链网络的下层并且部署在第二异构区块链网络的上层,所述第二转接桥网络信任所述上层区块链网络;
    通过第四上层路由节点将从第三上层路由节点接收到的跨链交易传输至第二转接桥路由节点;以及
    通过第二转接桥路由节点在第二转接桥网络中广播从第四上层路由节点接收到的跨链交易,使得第二转接桥网络的多个第二转接桥共识节点接收并将所述跨链交易转换为具有适配第二异构区块链网络的格式,并将转换后的跨链交易传输至第二异构区块链网络,使得第二异构区块链网络的多个第二异构共识节点接收并执行转换后的跨链交易,
    其中,所述第二转接桥网络与所述上层区块链网络、第一区块链网络、第二区块链网络和第一转接桥网络同构,并且所述第二异构区块链网络与所述上层区块链网络、第一区块链网络、第二区块链网络和第一异构区块链网络异构,
    其中,所述多个第二转接桥共识节点中的每个第二转接桥共识节点被配置为具有简单支付确认能力,以监视和验证第二异构区块链网络中的区块行为,
    并且其中,所述上层区块链网络被配置为通过将第二转接桥网络的共识节点的变更在所述上层区块链网络中上链存证来管理第二转接桥网络的共识节点。
  51. 一种用于跨区块链交互的装置,包括:
    收集模块,被配置用于通过第一区块链网络的第一路由节点获得来自第一区块链网络的要在第二区块链网络中执行的跨链交易;
    传输模块,被配置用于:
    通过第一路由节点将跨链交易传输至第一区块链网络和第二区块链网络的上层区块链网络的与第一路由节点通信的第一上层路由节点,所述上层区块链网络被第一区块链网络和第二区块链网络二者信任;
    通过第一上层路由节点将从第一路由节点接收到的跨链交易传输至所述上层区块链网络的与第二区块链网络的第二路由节点通信的第二上层路由节点;
    通过第二上层路由节点将从第一上层路由节点接收到的跨链交易传输至第二路由节点;以及
    执行模块,被配置用于通过第二路由节点在第二区块链网络中广播从第二上层路由节点接收到的跨链交易,使得第二区块链网络的多个第二共识节点接收并执行所述跨链交易,
    其中,所述上层区块链网络被配置为通过将第一区块链网络和第二区块链网络中的每个区块链网络的共识节点的变更在所述上层区块链网络中上链存证来管理第一区块链网络和第二区块链网络中的每个区块链网络的共识节点。
  52. 一种用于跨区块链交互的计算设备,包括:
    一个或多个处理器;以及
    存储计算机可执行指令的存储器,所述计算机可执行指令在被所述一个或多个处理器执行时使得所述一个或多个处理器执行根据权利要求27至50中任一项所述的方法。
  53. 一种其上存储有计算机可执行指令的非瞬态存储介质,所述计算机可执行指令在被计算机执行时使得计算机执行根据权利要求27至50中任一项所述的方法。
PCT/CN2022/135441 2022-04-29 2022-11-30 用于跨区块链交互的系统及方法 WO2023207083A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210466076.8A CN114785804B (zh) 2022-04-29 2022-04-29 用于跨区块链交互的系统及方法
CN202210466076.8 2022-04-29

Publications (1)

Publication Number Publication Date
WO2023207083A1 true WO2023207083A1 (zh) 2023-11-02

Family

ID=82436027

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135441 WO2023207083A1 (zh) 2022-04-29 2022-11-30 用于跨区块链交互的系统及方法

Country Status (2)

Country Link
CN (1) CN114785804B (zh)
WO (1) WO2023207083A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114793235B (zh) * 2022-04-29 2024-03-29 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法
CN114785804B (zh) * 2022-04-29 2024-03-29 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109088881A (zh) * 2018-09-12 2018-12-25 杭州趣链科技有限公司 一种实现跨平台数据交换的共享链平台及数据交换方法
US20190340267A1 (en) * 2018-05-01 2019-11-07 International Business Machines Corporation Blockchain implementing cross-chain transactions
CN114221972A (zh) * 2020-09-03 2022-03-22 中国电信股份有限公司 中继区块链系统以及跨链交易方法
CN114785804A (zh) * 2022-04-29 2022-07-22 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法
CN114793235A (zh) * 2022-04-29 2022-07-26 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法
CN114844904A (zh) * 2022-04-29 2022-08-02 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112005264A (zh) * 2018-05-01 2020-11-27 国际商业机器公司 实施跨链事务的区块链
AU2018348320B2 (en) * 2018-11-16 2020-01-16 Advanced New Technologies Co., Ltd. A domain name scheme for cross-chain interactions in blockchain systems
CN111181968B (zh) * 2019-12-30 2021-09-21 北京金山云网络技术有限公司 跨区块链通信方法、装置、跨链服务系统及跨链交易系统
CN111741114B (zh) * 2020-06-24 2023-05-16 陈鹏 基于区块链的可监管跨链交互系统、方法及设备
CN114255031A (zh) * 2020-09-23 2022-03-29 华为技术有限公司 用于执行交易的跨区块链的系统、跨链交易方法及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190340267A1 (en) * 2018-05-01 2019-11-07 International Business Machines Corporation Blockchain implementing cross-chain transactions
CN109088881A (zh) * 2018-09-12 2018-12-25 杭州趣链科技有限公司 一种实现跨平台数据交换的共享链平台及数据交换方法
CN114221972A (zh) * 2020-09-03 2022-03-22 中国电信股份有限公司 中继区块链系统以及跨链交易方法
CN114785804A (zh) * 2022-04-29 2022-07-22 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法
CN114793235A (zh) * 2022-04-29 2022-07-26 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法
CN114844904A (zh) * 2022-04-29 2022-08-02 蚂蚁区块链科技(上海)有限公司 用于跨区块链交互的系统及方法

Also Published As

Publication number Publication date
CN114785804A (zh) 2022-07-22
CN114785804B (zh) 2024-03-29

Similar Documents

Publication Publication Date Title
WO2023207085A1 (zh) 用于跨区块链交互的系统及方法
WO2023207083A1 (zh) 用于跨区块链交互的系统及方法
TWI700600B (zh) 一種基於區塊鏈的版權事件代理存證方法及系統
CN111541784B (zh) 一种基于区块链一体机的交易处理方法及装置
WO2020029755A1 (zh) 交易校验方法、装置、存储介质及电子设备
WO2022121538A1 (zh) 基于区块链的数据同步方法、系统及相关设备
CN113438219B (zh) 一种基于区块链一体机的重放交易识别方法及装置
CN111541783B (zh) 一种基于区块链一体机的交易转发方法及装置
JP2024505692A (ja) ブロックチェーンネットワークに基づくデータ処理方法、装置及びコンピュータ機器
WO2023124744A1 (zh) 跨子网交互
CN111541789A (zh) 一种基于区块链一体机的数据同步方法及装置
CN111539829A (zh) 一种基于区块链一体机的待过滤交易识别方法及装置
WO2024001022A1 (zh) 跨子网调用
WO2023160089A1 (zh) 用于区块链网络的消息广播方法、区块链节点和区块链系统
WO2023207080A1 (zh) 一种区块链中的数据处理方法及区块链节点
WO2023231337A1 (zh) 在区块链中执行交易的方法、区块链的主节点和从节点
WO2023124746A1 (zh) 跨子网交互的权限控制
JP2023525973A (ja) マルチレイヤ通信ネットワーク
CN114844904B (zh) 用于跨区块链交互的系统及方法
WO2023056713A1 (zh) 物联网卡的云平台绑定方法、系统、设备及介质
WO2023246187A1 (zh) 一种区块链网络的管理方法及相关设备
WO2023231343A1 (zh) 一种运行联盟链网络的方法、联盟链网络和用于联盟链网络的节点设备
CN114363335B (zh) 跨链交互方法及装置
CN115766038A (zh) 区块链中的交易发送方法和区块链节点
CN114844905B (zh) 用于跨区块链交互的系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22939897

Country of ref document: EP

Kind code of ref document: A1