Method and apparatus for establishing communication between blockchain networks
阅读说明:本技术 在区块链网络之间建立通信的方法和设备 (Method and apparatus for establishing communication between blockchain networks ) 是由 李艳鹏 于 2019-04-19 设计创作,主要内容包括:本文公开了用于在第一区块链网络与第二区块链网络之间建立通信的方法、设备和装置,包括存储在计算机可读介质上的计算机程序。所述方法之一包括:将第一库嵌入进程中;执行所述第一库以在所述进程内创建第一边界节点,其中,所述第一边界节点在所述第一区块链网络中操作;将第二库嵌入所述进程中;执行所述第二库以在所述进程内创建第二边界节点,其中,所述第二边界节点在所述第二区块链网络中操作;以及在所述进程内建立通信接口,以允许所述第一边界节点与所述第二边界节点彼此通信。(Methods, apparatus, and devices, including computer programs stored on computer readable media, for establishing communication between a first blockchain network and a second blockchain network are disclosed. One of the methods comprises: embedding a first library into a process; executing the first library to create a first border node within the process, wherein the first border node operates in the first blockchain network; embedding a second library in the process; executing the second library to create a second border node within the process, wherein the second border node operates in the second blockchain network; and establishing a communication interface within the process to allow the first border node and the second border node to communicate with each other.)
1. A computer-implemented method for establishing communication between a first blockchain network and a second blockchain network, comprising:
embedding a first library into a process;
executing the first library to create a first border node within the process, wherein the first border node operates in the first blockchain network;
embedding a second library in the process;
executing the second library to create a second border node within the process, wherein the second border node operates in the second blockchain network; and
establishing a communication interface within the process to allow the first border node and the second border node to communicate with each other.
2. The method of claim 1, further comprising:
obtaining the first library and the second library, the first library comprising binary code of the first border node and the second library comprising binary code of the second border node.
3. A method as claimed in any preceding claim, wherein the first library further comprises data representing that a first blockchain is to be managed by the first border node.
4. A method as claimed in any preceding claim, wherein the second repository further comprises data representing that a second blockchain is to be managed by the second border node.
5. A method as claimed in any preceding claim, wherein the process is implemented as a Java process.
6. The method of claim 5, wherein the Java process embeds and executes the first and second libraries using a Java Native Interface (JNI).
7. The method of any preceding claim, wherein the first border node and the second border node communicate with each other using one or more function calls.
8. The method of any preceding claim, wherein the process causes a processor to allocate a separate memory region to each of the first and second border nodes using a hardware level processing unit instruction.
9. A method as claimed in any preceding claim, wherein the process causes a processor to assign a trusted execution environment to the communication interface.
10. The method of claim 9, wherein the processor provides hardware-enforced protection for the trusted execution environment assigned to the communication interface using cryptography.
11. The method of any preceding claim, further comprising:
embedding a third library in the process;
executing the third library to create a third border node within the process, wherein the third border node operates in a third block chain network; and
establishing a communication interface within the process to allow the first border node, the second border node, and the third border node to communicate with one another.
12. An apparatus for establishing communication between a first blockchain network and a second blockchain network, comprising:
one or more processors; and
one or more computer-readable memories coupled to the one or more processors and having instructions stored thereon that are executable by the one or more processors to perform the method of any of claims 1-11.
13. An apparatus for establishing communication between a first blockchain network and a second blockchain network, the apparatus comprising a plurality of modules for performing the method of any of claims 1 to 11.
14. A non-transitory computer readable medium having stored therein instructions that, when executed by a processor of a device, cause the device to perform the method of any of claims 1-11.
Technical Field
This document relates generally to computer technology and, more particularly, to methods and apparatus for establishing communications between blockchain networks.
Background
The blockchain system, also known as a Distributed Ledger System (DLS) or consensus system, can enable participating entities to securely and tamperproof store data. The blockchain system may include any DLS without reference to any particular use case, and may be used for public, private, and federated blockchain networks. The public blockchain network opens access to the system for all entities and participates in the consensus process. The private blockchain network is provided for a specific entity which centrally controls read and write permissions. The federated blockchain network is provided for a selected group of entities that control the consensus process and includes an access control layer.
The blockchain system maintains one or more blockchains. Blockchains are data structures used to store data, such as transactions, that can prevent the data from being tampered with and manipulated by a malicious party.
The blockchain system is implemented using a peer-to-peer (P2P) network in which nodes communicate directly with each other, e.g., without the need for a fixed central server. Each node in the P2P network may initiate communication with another node in the P2P network.
Although a node may communicate with other nodes in the same blockchain network, the ability of a node to communicate with nodes in different blockchain networks may be limited. As the number of blockchain networks increases, the need to provide cross-chain communication between blockchain networks also increases.
Disclosure of Invention
In one embodiment, a computer-implemented method for establishing communication between a first blockchain network and a second blockchain network, includes: embedding a first library into a process; executing the first library to create a first border node within the process, wherein the first border node operates in the first blockchain network; embedding a second library in the process; executing the second library to create a second border node within the process, wherein the second border node operates in the second blockchain network; and establishing a communication interface within the process to allow the first border node and the second border node to communicate with each other.
In another embodiment, an apparatus for establishing communication between a first blockchain network and a second blockchain network, comprises: one or more processors; and one or more computer-readable memories coupled to the one or more processors and having instructions stored thereon, wherein the instructions are executable by the one or more processors to: embedding a first library into a process; executing the first library to create a first border node within the process, wherein the first border node operates in the first blockchain network; embedding a second library in the process; executing the second library to create a second border node within the process, wherein the second border node operates in the second blockchain network; and establishing a communication interface within the process to allow the first border node and the second border node to communicate with each other.
In another embodiment, a non-transitory computer readable medium having stored therein instructions that, when executed by a processor of a device, cause the device to perform a method for establishing communication between a first blockchain network and a second blockchain network. The method comprises the following steps: embedding a first library into a process; executing the first library to create a first border node within the process, wherein the first border node operates in the first blockchain network; embedding a second library in the process; executing the second library to create a second border node within the process, wherein the second border node operates in the second blockchain network; and establishing a communication interface within the process to allow the first border node and the second border node to communicate with each other.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments. In the following description with reference to the drawings, the same reference numerals in different drawings denote the same or similar elements, unless otherwise specified.
Fig. 1 is a schematic diagram of a blockchain system according to an embodiment.
Fig. 2 is a schematic diagram of a computing device for implementing nodes in a blockchain network, according to an embodiment.
Fig. 3 is a schematic diagram of a blockchain system supporting cross-chain communication between a first blockchain network and a second blockchain network, according to an embodiment.
Fig. 4 is a schematic diagram of a blockchain system supporting cross-chain communication between a first blockchain network, a second blockchain network, and a third blockchain network, according to an embodiment.
Fig. 5 is a schematic diagram of a blockchain system supporting cross-chain communication between a first blockchain network, a second blockchain network, and a third blockchain network, according to an embodiment.
Fig. 6 is a flow diagram of a method for establishing cross-chain communication between different blockchain networks, according to an embodiment.
Fig. 7 is a block diagram of an apparatus for establishing cross-chain communication between different blockchain networks according to an embodiment.
Detailed Description
Embodiments herein provide methods and apparatus for establishing communications between blockchain networks. The method and apparatus provide a blockchain network capability to establish border nodes. Each established boundary node may be embedded in a process executing on the computing device, such as a single Java process. When two or more blockchain networks embed their respective border nodes in the same process, the respective border nodes are allowed to communicate with each other using function calls and establish cross-chain communication between their respective blockchain networks.
The embodiments disclosed herein have one or more technical effects. In some embodiments, the methods and apparatus provide a node in one blockchain network with the ability to communicate with nodes in a different blockchain network. This allows multiple blockchain networks to establish cross-chain communication. In other embodiments, the methods and devices need only utilize a single process (e.g., a single Java process) executing on a single computing device to establish communication between two blockchain networks. This eliminates the need for building side chains in the blockchain network, thereby reducing the hardware cost of implementing cross-chain communications. In other embodiments, the methods and apparatus allow blockchain networks to embed their respective border nodes in the same single process and also allow the border nodes to communicate with each other using function calls, thereby increasing communication flexibility and providing the ability to support cross-chain communication between two or more blockchain networks. In other embodiments, the methods and apparatus utilize hardware-level processing unit instructions to assign separate private memory regions to border nodes, thereby providing additional security and protection for the border nodes.
The following description provides details of embodiments. In an embodiment, the blockchain is a data structure that stores data (e.g., transactions) in a manner that is not tamperproof by the transaction and subsequently verified. A block chain includes one or more blocks. Each block is linked to the immediately preceding block in the chain of blocks by a cryptographic hash value (cryptographical hash) that includes the block immediately preceding the preceding block. Each tile may also include a timestamp, its own cryptographic hash value, and one or more transactions. Transactions that have typically been verified by nodes of the blockchain system may be hashed and programmed into a data structure such as a Merkle tree. In a Merkle tree, data at leaf nodes of the tree is hashed, and all hash values in each branch of the tree are concatenated at the root of the branch (concatenated). This process continues down the tree until the root of the entire tree, where hash values representing all of the data in the tree are stored. The hash value of a transaction purported to be stored in the tree can be quickly verified by determining whether the hash value is consistent with the structure of the tree.
The blockchain system includes a network of computing nodes for managing, updating, and maintaining one or more blockchains. The network may be a public blockchain network, a private blockchain network, or a federated blockchain network. For example, many entities, such as hundreds, thousands, or even millions of entities, may operate in a public blockchain network, and each entity operates at least one node in the public blockchain network. Thus, a public blockchain network may be considered a public network with respect to participating entities. Sometimes, most entities (nodes) must sign each chunk in order for the chunk to be valid and added to the blockchain of the blockchain network. Examples of public blockchain networks include point-to-point payment networks that utilize a distributed ledger (referred to as a blockchain).
Typically, public blockchain networks may support open transactions. The open transaction is shared by all nodes within the public blockchain network and stored in the global blockchain. A global blockchain is a blockchain that is replicated across all nodes, and all nodes are in a fully-consensus state with respect to the global blockchain. To achieve consensus (e.g., agree to add blocks to a blockchain), a consensus protocol is implemented within the public blockchain network. Examples of consensus protocols include proof of work (POW) (e.g., implemented in some cryptocurrency networks), proof of rights (POS), and proof of authority (POA).
Typically, a private blockchain network may be provided for a particular entity that centrally controls read and write permissions. The entity controls which nodes can participate in the blockchain network. Thus, private blockchain networks are often referred to as licensed networks, which limit who is allowed to participate in the network and their level of participation (e.g., only in certain transactions). Various types of access control mechanisms may be used (e.g., existing participants vote to add a new entity, regulatory authorities may control permissions).
In general, a federated blockchain network may be private between participating entities. In a federated blockchain network, consensus processes are controlled by a set of authorized nodes, one or more of which are operated by respective entities (e.g., financial institutions, insurance companies). For example, a federation of ten (10) entities (e.g., financial institutions, insurance companies) may operate a federated blockchain network, and each entity may operate at least one node in the federated blockchain network. Thus, a federated blockchain network can be considered a private network with respect to participating entities. In some examples, each tile must be signed by each entity (node) before it can be verified and added to the chain of tiles. In some examples, each tile must be signed by at least a subset of the entities (nodes) (e.g., at least 7 entities) in order to be verified and added to the tile chain.
Fig. 1 shows a schematic diagram of a
Node 102-110 may be configured to perform operations on
Fig. 2 illustrates a schematic diagram of a
The
The
Fig. 3 shows a schematic diagram of a
The
In some embodiments, the
In some embodiments, the
In some embodiments, the library may comprise a Dynamic Link Library (DLL). For example, a DLL may be a module of computer code that contains functions and data that may be used by another module, such as an application or another DLL. In some embodiments, the library may comprise a static library. For example, a static library may be a set of routines, external functions, and variables that are parsed in a caller at compile time and copied by a compiler into a target application, thereby generating a target file and a separate executable file. Static libraries may be of a larger size than DLLs.
In some embodiments, the
In some embodiments,
It should be understood that the reference is based on, for example, Intel
The use of hardware-levelIn some embodiments, once created,
Similarly, the
In addition to operating in their respective blockchain networks,
Similarly, the
It is to be understood that the above presented description is only an example and is not meant to be limiting. For example, although the
The
In some embodiments, the
In one embodiment, only a single process (e.g., a single Java process) executing on a single computing device is required to establish communication between the two blockchain networks. As a result, hardware cost can be reduced. In addition, since communication between the blockchain networks can be performed using function calls, communication efficiency can be improved compared to using a side chain. It should also be noted that use is made of a material such as Intel
Of a hardware-level processing unit instruction orOther instructions that support TEE, etc. to assign separate private storage areas to border nodes may provide additional security and protection for border nodes.Further, it should be noted that the above-described process can be utilized to facilitate communication between three or more blockchain networks. Fig. 4 illustrates a schematic diagram of a
As shown in fig. 4, in some embodiments process 402 may operate in a similar manner to process 370 (fig. 3) to establish communication between a first blockchain network (not shown) and a second blockchain network (not shown).
In some embodiments,
Fig. 5 shows a schematic diagram of a
Referring to fig. 5, a
In some embodiments, a
In some embodiments, a
In some embodiments, all three
Fig. 6 illustrates a flow diagram of a
Referring to fig. 3 and 6, at
At
At
The
Fig. 7 shows a block diagram of an
The embedding
Each of the above modules may be implemented as software or hardware, or a combination of software and hardware. For example, each of the above modules may be implemented using a processor executing instructions stored in a memory. Also, for example, each of the above described modules may be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components to perform the described methods. Further, each of the above modules may be implemented by using a computer chip or an entity, or by using a product having a specific function, for example. In one embodiment, the
For the implementation process of the function and role of each module in the
In some embodiments, a computer program product may include a non-transitory computer readable storage medium having computer readable program instructions stored thereon for causing a processor to perform the above-described method.
The computer readable storage medium may be a tangible device that may store instructions for use by an instruction execution device. The computer readable storage medium may be, for example (but not limited to), an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device such as punch cards or raised structures in grooves having instructions recorded thereon, and any suitable combination of the foregoing.
The computer-readable program instructions for performing the above-described methods may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages and conventional procedural programming languages. The computer-readable program instructions may execute entirely on the computing device as a stand-alone software package, or may execute partially on a first computing device and partially on a second computing device remote from the first computing device. In the latter case, the second remote computing device may be connected to the first computing device over any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN).
The computer-readable program instructions may be provided to a processor of a general purpose or special purpose computer or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the methods described above.
The flowcharts and diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments herein. In this regard, a block in the flowchart or diagram may represent a software program, segment, or portion of code, which comprises one or more executable instructions for implementing the specified function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the diagrams and/or flowchart illustration, and combinations of blocks in the diagrams and flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It is appreciated that certain features of the invention, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features that are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable subcombination, or as suitable in any other described embodiment herein. Unless otherwise specified, certain features described in the context of various embodiments are not essential features of those embodiments.
Although the present disclosure has been described in conjunction with specific embodiments, it is evident that many alternatives, modifications, and variations will be apparent to those skilled in the art. Accordingly, the following claims are intended to embrace all such alternatives, modifications and variances which fall within the scope of the claims.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:协助API调用处理的加速系统