CN110650189B - Relay-based block chain interaction system and method - Google Patents

Relay-based block chain interaction system and method Download PDF

Info

Publication number
CN110650189B
CN110650189B CN201910890131.4A CN201910890131A CN110650189B CN 110650189 B CN110650189 B CN 110650189B CN 201910890131 A CN201910890131 A CN 201910890131A CN 110650189 B CN110650189 B CN 110650189B
Authority
CN
China
Prior art keywords
chain
transaction
cross
subsystem
blockchain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910890131.4A
Other languages
Chinese (zh)
Other versions
CN110650189A (en
Inventor
高强
张国翊
郭少勇
邵苏杰
田志峰
保剑
黄哲
黄儒雅
陈嘉
周瑾瑜
吴谦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Power Supply Bureau Co Ltd
Original Assignee
Shenzhen Power Supply Bureau Co Ltd
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 Shenzhen Power Supply Bureau Co Ltd filed Critical Shenzhen Power Supply Bureau Co Ltd
Priority to CN201910890131.4A priority Critical patent/CN110650189B/en
Publication of CN110650189A publication Critical patent/CN110650189A/en
Application granted granted Critical
Publication of CN110650189B publication Critical patent/CN110650189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/50Network services
    • H04L67/56Provisioning of proxy services
    • 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
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The invention discloses a relay-based block chain interaction system and a relay-based block chain interaction method, wherein the relay-based block chain interaction system comprises the following steps: the coordination network consists of a plurality of coordination nodes which are connected with each other and is used for synchronizing the states of all the block chain subsystems, the states of the relay nodes and the routing information, maintaining the routing information and the identity authentication information of all the block chain subsystems in the system and coordinating the communication of all the block chain subsystems; the block chain subsystems consist of a plurality of common nodes and a plurality of interactive nodes, are used for storing block information, transaction lists and calculation tasks and are used for carrying out information interaction with the relay nodes; the relay node is used for adapting the information of the corresponding block chain subsystem and maintaining an interactive node list connected with the relay node. By implementing the invention, the cross-link interaction does not depend on the record state of the relay; the block chain subsystems exist in parallel, the whole multi-chain structure tends to be flat, and high-cohesion low-coupling is realized.

Description

Relay-based block chain interaction system and method
Technical Field
The invention belongs to the field of block chains, and relates to a relay-based block chain interaction system and method.
Background
With the popularity of digital currency, represented by Bittersweet, blockchains are gaining attention as the key underlying technology. The block chain technology is a distributed book technology, and can be applied to the fields of finance, health care, supply chain, asset management and the like. Due to the systematic characteristics of decentralization, data non-tamper-resistance and dynamic flexibility of the block chain, the block chain has a very wide application prospect in multiple fields such as banks, credit investigation, finance and the like, but due to the restriction of factors such as throughput, network isolation, supervision, flexibility and the like, the current block chain project cannot serve commercial application well. Among the problems faced by blockchains, network isolation prevents interoperability between different blockchains, and greatly limits the application space of blockchains.
Blockchain may be used to share decentralized and transactional data between unreliable participant networks, and applications based on blockchain techniques have attracted attention in recent years in a variety of scenarios. However, due to the constraints of throughput, network isolation, supervision, scalability, etc., the current blockchain project cannot serve business applications well. Among the problems faced by blockchains, network isolation prevents interoperability between different blockchains, and greatly limits the application space of blockchains.
Many organizations or companies establish private or alliance chains, but when data exchange with another domain private or alliance chain is required, the cost of establishing a connection is high. In addition, the global consensus mechanism of the blockchain makes the added nodes unable to increase the speed of transaction processing, so the throughput of a single blockchain easily reaches the bottleneck. The bitcoin TPS peaks at 4.7, i.e. up to about 40 million transactions per day, while the network payment institution required at the central row has TPS reaching at least 2 million. Thus, the short board of cross-chain connectivity and throughput limits the development of blockchains.
Due to the common knowledge mechanism, there is no efficient service provided by the blockchain, i.e. the blockchain is not suitable as an infrastructure to provide services for other blockchains. Therefore, no solution for building a general blockchain as infrastructure is adopted in the design. The connectors between the blockchains are designed to have sufficient robustness, and low coupling between the blockchains is also ensured in multi-blockchain cross-chain interaction, so that the abnormity of the whole multi-blockchain structure cannot be caused by the breakdown of one blockchain or network partitioning.
Some solutions exist in the prior art, but all have different degrees of defects, as follows:
the technical scheme 1: patent CN108600301A, main blockchain and method for crossing between blockchains relates to a method for crossing between blockchains and a main blockchain. According to the scheme, the atomicity of cross-chain transaction is guaranteed through introducing an intelligent contract mechanism, the transaction of the main blockchain and the transaction in the target blockchain belong to a synchronous mode, if a large number of transactions to be executed by the target blockchain exist, the pressure of the sub-chain module is high, the polling transaction list is possibly overtime, but the transaction of the target chain is not overtime actually, and inconsistency is caused.
The technical scheme 2 is as follows: patent CN110019103A entitled "a block chain based cross-chain system and cross-chain implementation method", which relates to a block chain based cross-chain system and cross-chain implementation method. The execution of the transaction by the cross-chain and the cross-chain in the scheme should belong to an atomic operation, but the consistency of the two chains in the cross-chain transaction cannot be guaranteed only through one guarantee connection.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to solve the problem of information interaction in a heterogeneous block chain, ensure the stability of a multi-chain architecture, and simultaneously improve the throughput of cross-chain interaction in the multi-chain architecture by using a middleware technology, and reduce the interaction delay.
The invention provides a relay-based block chain interactive system, which comprises:
the coordination network comprises a plurality of coordination nodes which are connected with each other and used for synchronizing the states of all the block chain subsystems, the states of the relay nodes and the routing information, maintaining the routing information and the identity authentication information of all the block chain subsystems in the system and coordinating the communication of all the block chain subsystems;
the block chain subsystems comprise a plurality of common nodes and a plurality of interactive nodes, are used for storing block information, transaction lists and calculation tasks and are used for carrying out information interaction with the relay nodes;
the relay nodes are used for adapting the information of the blockchain subsystem and maintaining an interactive node list of the blockchain subsystem, one relay node is only connected with one coordination node in the coordination network at the same time, and one relay node is simultaneously connected with all interactive nodes in the corresponding blockchain subsystem.
Specifically, the coordination nodes are used for recording states of corresponding blockchain subsystems, states of corresponding relay nodes and routing information, each coordination node interacts with only one blockchain subsystem at the same time, and the coordination nodes provide routing and record indexes of transaction hashes of both interaction parties in the whole cross-link interaction process.
Specifically, the inter-link message is forwarded in the interaction process between the coordinating node and the relay node, and the inter-link message includes the following fields:
magic: the method comprises the steps of calibrating the beginning of a section of cross-chain information and verifying the cross-chain information;
size: the length of the actual cross-link message load, namely the length of the payload, is recorded, and the unit is byte;
src-blockchain/dest-blockchain: indicating a blockchain address, which is a standard domain name or a public network address;
payload: to record the actual content in the cross-chain message;
auth: the system is used for recording authentication information based on a security authentication module and verifying the identity and the authority of a cross-chain requester;
sign: the system is used for recording the signature of the cross-chain message and verifying the integrity of the cross-chain message.
Specifically, the interaction node is configured to provide an internal and external interaction function for the blockchain subsystem, and implement interactive communication in an inter-process communication manner, where the interaction node is respectively connected to a common node in the blockchain subsystem to which the interaction node belongs and a relay node corresponding to the blockchain subsystem.
Specifically, the common nodes include a lightweight node, a full-scale node and a miner node, the lightweight node is used for storing partial block information or partial information of a block, and the lightweight node is deployed on a device with limited hardware resources; the full-volume node is used for storing all blocks and transaction lists and all block chain data needing to be synchronized;
the invention also provides a relay-based block chain cross-chain interaction method, which carries out cross-chain transaction through the system and specifically comprises the following steps:
step S1, the block chain subsystem A requests to create a cross-chain transaction through the relay node corresponding to the block chain subsystem A, creates a cross-chain transaction with the coordinating node corresponding to the block chain subsystem A, marks the state as 'to be confirmed', and returns a cross-chain transaction identifier;
step S2, after receiving the response of creating the cross-chain transaction, the blockchain subsystem A calls the intelligent contract on the blockchain subsystem A, pre-executes the transaction in the blockchain subsystem A, and generates a transaction identifier on the blockchain subsystem A;
step S3, the pre-executed transaction result of the block chain subsystem A is sent to the coordination network through the relay node corresponding to the pre-executed transaction result, a cross-chain transaction request is sent out at the same time, the transaction identifier on the block chain subsystem A is updated, and the cross-chain transaction state is changed into 'sent';
step S4, the coordination network sends a cross-chain transaction request to the blockchain subsystem B, the relay node corresponding to the blockchain subsystem B receives the request and then carries out transaction inquiry according to the transaction identifier on the blockchain subsystem A, the intelligent contract of the blockchain subsystem B is called after the validity is verified, and the transaction identifier on the blockchain subsystem B is returned to the blockchain subsystem A through the coordination network;
step S5, the block chain subsystem B sends the transaction result to the corresponding coordination node, updates the transaction identification and modifies the cross-chain transaction state into 'completed';
step S6, after receiving the transaction identifier returned by the blockchain subsystem B through the coordination network, the blockchain subsystem a performs cross-chain transaction query and verification, and after verifying that the transaction identifier is legal, calls an intelligent contract to confirm the transaction, and performs rollback if the transaction on the blockchain subsystem B is abnormal, and if no abnormality exists, the cross-chain transaction is completely completed.
Specifically, the intelligent contract in step S2 is an address for transferring in or out assets, when the cross-chain transaction initiator performs pre-execution on the blockchain subsystem a, the assets of the blockchain subsystem a are transferred to the address of the intelligent contract, and when the transaction initiator submits the assets to the transaction recipient, the assets are transferred to the transaction recipient.
Specifically, the intelligent contract is called three times in the cross-link transaction, and when the intelligent contract is called, whether a timeout event is triggered is checked, so as to prevent a network partition or a relay or a node of one party from being down all suddenly; when the intelligent contract is called for the first time to trigger the overtime event, the current cross-chain transaction is directly cancelled; when the intelligent contract is called for the second time to trigger the overtime event, directly entering the third intelligent contract calling to rollback; the third intelligent contract is initiated by the intelligent contract on the block chain subsystem A, and the intelligent contract is continuously retried after the timeout event is triggered until the intelligent contract is completed.
Specifically, when the intelligent contract in step S2 is called, it is checked whether to trigger a timeout event, and if the timeout event is triggered, the current cross-chain transaction is directly cancelled; when the intelligent contract in the step S4 is called, whether a timeout event is triggered is checked, if the timeout event is triggered, the intelligent contract in the step S6 is directly called to roll back; the intelligent contract in step S6 is invoked by the intelligent contract on the blockchain subsystem a, and if a timeout event is triggered, the intelligent contract is continuously retried until the intelligent contract is completed.
The embodiment of the invention has the following beneficial effects:
according to the relay-based block chain interaction system and method provided by the embodiment of the invention, the relay part selects the relay node and the coordination node, a complex consensus mechanism is not provided, the relay node and the coordination node are only used as middleware for communication and recording, and cross-chain interaction does not depend on the recording state of the relay; a plurality of block chain subsystems exist in parallel, the multiple chains are loosely coupled through the relay nodes and the coordination nodes, the whole multi-chain architecture tends to be flat, and high-cohesion low-coupling is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is within the scope of the present invention for those skilled in the art to obtain other drawings based on the drawings without inventive exercise.
Fig. 1 is a schematic diagram of an embodiment of a relay-based blockchain interactive system provided in the present invention.
Fig. 2 is a schematic flow chart of an interaction method of a block chain based on a relay according to the present invention.
Fig. 3 is a logic diagram of an interaction method of a relay-based blockchain according to the present invention.
Fig. 4 is a schematic diagram of a data structure of a cross-chain message provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, a schematic diagram of an embodiment of an interactive system based on a relay block chain provided in the present invention is shown, and in this embodiment, the interactive system includes:
the coordination network 6 comprises a plurality of coordination nodes 1 which are connected with each other and used for synchronizing the states of all the block chain subsystems 5, the states of the relay nodes 2 and the routing information, maintaining the routing information and the identity authentication information of all the block chain subsystems 5 in the system and coordinating the communication of all the block chain subsystems 5; the coordination nodes 1 are used for recording states of corresponding blockchain subsystems 5, states of corresponding relay nodes 2 and routing information, each coordination node 1 interacts with only one blockchain subsystem 5 at the same time, and the coordination nodes 1 provide routing and record indexes of transaction hashes of two interacting parties in the whole cross-chain interaction process.
As shown in fig. 1, embodiments of the present invention enable heterogeneous blockchain subsystems 5 to interoperate by creating a separate component of a coordinated network 6. The coordination network 6 comprises a plurality of coordination nodes 1, and the coordination nodes 1 are nodes which are trusted by the independent block chain subsystem 5 and operated by the block chain subsystem 5; a plurality of coordinating nodes 1 are interconnected to form a P2P network, and maintain routing information and authentication information of a plurality of blockchain subsystems 5 in a multi-chain system.
Whenever a blockchain subsystem 5 is newly added, the blockchain subsystem 5 selects a coordinating node 1 to connect to the coordinating network 6, and after initialization, the blockchain subsystem 5 can communicate with other blockchain subsystems 5 in the blockchain network; each blockchain subsystem 5 connected to the system is connected to the coordinating network 6 through at least one coordinating node 1 and becomes a member of the coordinating network 6; the coordinating node 1 of each blockchain subsystem 5 is responsible for updating the routing information and the identity authentication related information of the blockchain subsystem 5 and synchronizing to other coordinating nodes 1 of the coordinating network 6.
As shown in fig. 1, the block chain subsystems 5 include a plurality of common nodes 4 and a plurality of interactive nodes 3, for storing block information, transaction lists and computation tasks, and for performing information interaction with the relay node 2; the interaction node 3 is used for providing an internal and external interaction function for the block chain subsystem 5, and realizing interactive communication in an interprocess communication mode, and the interaction node 3 is respectively connected with a common node 4 in the block chain subsystem 5 and a relay node 2 corresponding to the block chain subsystem 5;
the common nodes 4 include a lightweight node, a full node and a miner node, the lightweight node is used for storing partial block information or partial information of a block, such as block header information, block hash and the like, and the lightweight node is deployed on a device with limited hardware resources; the full-volume node is used for storing all blocks, transaction lists and all block chain data needing to be synchronized, and has strong storage capacity; the miner nodes are used for processing calculation tasks, have strong calculation capacity, obtain answers through violent calculation passwords, generate new blocks and transmit the new blocks, and simultaneously perform data synchronization with other nodes in a block chain, all the common nodes 4 can form a complete independent block chain network, and the nodes connected with the common nodes 4 are other common nodes 4 and interaction nodes 3 in the block chain.
The blockchain network composed of all the common nodes 4 has no capability of interacting with outside of the blockchain, and the blockchain without the capability of interacting obviously has no application value, so that a node capable of providing the capability of interacting inside and outside of the blockchain, namely the interacting node 3, is needed to achieve the purpose of communication in an interprocess communication mode.
The interactive node 3 is a special common node 4, and is different from the common node 4 in that the interactive node 3 provides an ability of interacting with outside the block chain, for example, Go-ethereum realized by the Go language of etherhouses can start HTTP-RPC service through RPC parameters, the address, port, designated service option and other information of the RPC service are designated through rpcaddr, rpcport, rpcapi and other parameters, and the interactive node 3 is connected with the common node 4 and the corresponding relay node 2 in the block chain.
As shown in fig. 1, the relay nodes 2 are configured to adapt to information of the blockchain subsystem 5 and maintain a list of the interactive nodes 3 of the blockchain subsystem 5, one relay node 2 is connected to only one coordinating node 1 in the coordinating network 6 at the same time, and one relay node 2 is connected to all the interactive nodes 3 in the corresponding blockchain subsystem 5 at the same time; the relay node 2 is a core part in the whole system, is responsible for information adaptation of the block chain subsystem 5 in the system, maintains an interactive node 3 list of the block chain subsystem 5, ensures high availability of the sub-block chain by fast switching after the interactive node 3 crashes, and plays a role in load balancing; since the common identification protocol, service interface and transaction type in the heterogeneous blockchain system are different, the relay node 2 is needed to shield the difference in the blockchain subsystem 5, convert the specific interaction format into a general cross-chain service interaction format, and further perform cross-chain interaction with other heterogeneous blockchains; the relay node 2 is connected with the interactive node 3 in the block chain subsystem 5, the coordinating node 1 and the interactive nodes 3 of other block chain subsystems 5.
In the embodiment of the invention, the relay node 2 is connected with the coordination node 1, a plurality of block chain subsystems 5 can form a multi-chain system, and the relay scheme is a scheme of a master-slave chain architecture through the relay node 2 and the coordination node 1 instead of a relay block chain. In the master-slave chain architecture, a block chain is adopted as a main chain for the relay, and other multi-block chain systems are used as sub-chains, so that the throughput of the main block chain is likely to become a bottleneck of multi-chain cross-chain interaction. Therefore, the multi-link architecture relay part provided by the invention selects the relay node 2 and the coordination node 1, does not have a complex consensus mechanism, only serves as a middleware for communication and recording, and cross-link interaction does not depend on the recording state of the relay. A plurality of block chains exist in parallel, the multiple chains are loosely coupled through the relay node 2 and the coordination node 1, the whole multi-chain architecture tends to be flat, and the idea of high-cohesion low-coupling in the architecture design is met.
As shown in fig. 2 and fig. 3, the present embodiment further provides a relay-based blockchain inter-chain interaction method, which performs inter-chain transaction through a relay-based blockchain inter-chain interaction system, and specifically includes the following steps:
step S1, the blockchain subsystem A requests to create a cross-chain transaction through the relay node corresponding to the blockchain subsystem A, creates a cross-chain transaction with the coordinating node corresponding to the blockchain subsystem A, marks the state as 'to be confirmed', and returns a cross-chain transaction identifier to the blockchain subsystem A;
step S2, after the blockchain subsystem A receives the cross-chain transaction identifier, calling an intelligent contract on the blockchain subsystem A, pre-executing the transaction in the blockchain subsystem A, and generating the transaction identifier on the blockchain subsystem A;
step S3, the pre-executed transaction result of the block chain subsystem A is sent to the coordination network through the relay node corresponding to the pre-executed transaction result, and meanwhile, a cross-chain transaction request is sent out, the transaction identifier on the block chain subsystem A is updated, and the cross-chain transaction state is changed into 'sent';
step S4, the coordination network sends a cross-chain transaction request to the blockchain subsystem B, the relay node corresponding to the blockchain subsystem B receives the request and then carries out transaction inquiry according to the transaction identifier on the blockchain subsystem A, the intelligent contract of the blockchain subsystem B is called after the validity is verified, and the transaction identifier on the blockchain subsystem B is returned to the blockchain subsystem A through the coordination network;
step S5, the block chain subsystem B sends the transaction result to the corresponding coordination node, updates the transaction identification and modifies the cross-chain transaction state into 'completed';
step S6, after receiving the transaction identifier returned by the blockchain subsystem B through the coordination network, the blockchain subsystem a performs cross-chain transaction query and verification, and after verifying that the transaction identifier is legal, calls an intelligent contract to confirm the transaction, and performs rollback if the transaction on the blockchain subsystem B is abnormal, and if no abnormality exists, the cross-chain transaction is completely completed.
In a specific embodiment, the intelligent contract in step S2 is an address as the user himself, and is used to transfer in or out the asset, when the cross-chain transaction initiator performs pre-execution on the blockchain subsystem a, the asset of the blockchain subsystem a is transferred to the address of the intelligent contract, and when the transaction initiator submits the asset to the transaction recipient.
As shown in fig. 3, three smart contract invocations are involved in the entire cross-chain transaction flow, including pre-execution on blockchain subsystem a, execution on blockchain subsystem B, and validation on last blockchain subsystem a; when the intelligent contract is called, whether a timeout event is triggered or not is checked, so that network partitions or relays or nodes of one party are prevented from going down suddenly;
further, when the intelligent contract is called for the first time, that is, when the intelligent contract in step S2 is called, it is checked whether to trigger a timeout event, and if the timeout event is triggered, the current cross-chain transaction is directly cancelled;
further, when the intelligent contract is called for the second time, that is, the intelligent contract in the step S4 is called, it is checked whether a timeout event is triggered, if the timeout event is triggered, the intelligent contract is directly called for the step S6 to perform rollback, which is equivalent to directly entering the intelligent contract for the third time to perform rollback;
further, the third invocation of the intelligent contract, that is, the intelligent contract in step S6 is invoked by the intelligent contract on the blockchain subsystem a, and if a timeout event is triggered, the retry is continuously performed until the intelligent contract is completed.
The cross-link interaction is different from the common application interaction, the private link and the alliance link with privacy and data confidentiality requirements cannot easily expose the public network address of the node, and a gateway which is replaced regularly and a specific domain name are generally adopted for resolution; therefore, in the message format design, the source address and the destination address are not addresses of a common public network, but a source block chain and a destination block chain, and a cross-chain message is transmitted by coordinating forwarding of the node 1 and the relay node 2, and comprises the following fields:
magic: the method is used for calibrating the beginning of a section of chain spanning information and verifying the chain spanning information, and occupies 8 bytes;
size: the length of the actual cross-link message load, namely the length of the payload, is recorded, and the unit is byte;
src-blockchain/dest-blockchain: the block chain address can be a standard domain name or a public network address;
payload: the method is used for recording the actual content of the cross-link message and adopting a specific mode for coding, thereby ensuring the high efficiency and the secrecy of message transmission;
auth: the system is used for recording authentication information of the security authentication module and verifying the identity and the authority of a cross-chain requester;
sign: the system is used for recording the signature of the cross-chain message, verifying the integrity of the cross-chain message and playing a certain role in verifying the identity of the requester.
For further details, reference may be made to the preceding description of the drawings, which are not described in detail herein.
The embodiment of the invention has the following beneficial effects:
according to the relay-based block chain interaction system and method provided by the embodiment of the invention, the relay part selects the relay node and the coordination node, a complex consensus mechanism is not provided, the relay node and the coordination node are only used as middleware for communication and recording, and cross-chain interaction does not depend on the recording state of the relay; a plurality of block chain subsystems exist in parallel, the multiple chains are loosely coupled through the relay nodes and the coordination nodes, the whole multi-chain architecture tends to be flat, and high-cohesion low-coupling is achieved.
The relay node of the relay-based block chain interaction system mainly provides a heterogeneous chain information adaptation function, and the coordination node maintains multi-block chain inter-chain routing information and cross-chain transaction identification. In addition, a cross-chain message format, cross-chain query and cross-chain transaction defined by the cross-chain protocol part can meet the requirements of privacy and consistency of cross-chain communication, a set of multi-chain architecture supporting safe and efficient cross-chain communication is established, the barrier of cross-chain interaction between heterogeneous block chains is broken, and a plurality of block chain data isolated islands are connected.
While the invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not to be limited to the disclosed embodiment, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A relay-based blockchain interactive system is characterized by comprising,
the coordination network comprises a plurality of coordination nodes which are connected with each other and used for synchronizing the states of all the block chain subsystems, the states of the relay nodes and the routing information, maintaining the routing information and the identity authentication information of all the block chain subsystems in the system and coordinating the communication of all the block chain subsystems;
the block chain subsystems comprise a plurality of common nodes and a plurality of interactive nodes, are used for storing block information, transaction lists and calculation tasks and are used for carrying out information interaction with the relay nodes;
the relay node is used for adapting the information of the corresponding block chain subsystem and maintaining an interactive node list connected with the relay node, one relay node is only connected with one coordination node at the same time, and one relay node is simultaneously connected with all interactive nodes in the corresponding block chain subsystem.
2. The system of claim 1, wherein the coordinating node is configured to record the state of the corresponding blockchain subsystem, the state of the corresponding relay node, and routing information, and the coordinating node provides routing and records an index of transaction hashes of both interacting parties during the whole cross-link interaction process.
3. The system of claim 2, wherein the inter-process between the coordinating node and the relay node forwards a cross-chain message, the cross-chain message comprising the following fields:
magic: the method comprises the steps of calibrating the beginning of a section of cross-chain information and verifying the cross-chain information;
size: to record the length of the cross-chain message load;
src-blockchain/dest-blockchain: to indicate a block chain address;
payload: to record the content of the cross-chain message;
auth: the system is used for recording the authentication information of the security authentication module and verifying the identity and the authority of the cross-chain requester;
sign: to record the signature of the cross-chain message and verify the integrity of the cross-chain message.
4. The system according to any one of claims 1 to 3, wherein the interactive node is configured to provide inter-and-inter interaction for the blockchain subsystem, and implement interactive communication by means of inter-process communication, and the interactive node is respectively connected to a common node in the belonging blockchain subsystem and a relay node corresponding to the belonging blockchain subsystem.
5. The system of claim 4, wherein the common nodes comprise,
a lightweight node to store partial block information or partial information of a block;
the full-volume node is used for storing all blocks, a transaction list and all block chain data needing to be synchronized;
and the miner node is used for processing the calculation task, generating a new block, transmitting the new block to other nodes and synchronizing data with other nodes in the block chain subsystem.
6. A relay-based blockchain inter-chain interaction method, wherein a cross-chain transaction is performed by the system of any one of claims 1 to 5, comprising the following steps:
step S1, the blockchain subsystem A requests to create a cross-chain transaction through the relay node corresponding to the blockchain subsystem A, creates a cross-chain transaction with the coordinating node corresponding to the blockchain subsystem A, marks the state as to-be-confirmed, and returns a cross-chain transaction identifier to the blockchain subsystem A;
step S2, after the blockchain subsystem A receives the cross-chain transaction identifier, calling an intelligent contract on the blockchain subsystem A, pre-executing the transaction in the blockchain subsystem A, and generating the transaction identifier on the blockchain subsystem A;
step S3, the pre-executed transaction result of the block chain subsystem A is sent to the coordination network through the relay node corresponding to the pre-executed transaction result, and meanwhile, a cross-chain transaction request is sent out, the transaction identifier on the block chain subsystem A is updated, and the cross-chain transaction state is modified to be sent;
step S4, the coordination network sends a cross-chain transaction request to the blockchain subsystem B, the relay node corresponding to the blockchain subsystem B receives the request and then carries out transaction inquiry according to the transaction identifier on the blockchain subsystem A, the intelligent contract of the blockchain subsystem B is called after the validity is verified, and the transaction identifier on the blockchain subsystem B is returned to the blockchain subsystem A through the coordination network;
step S5, the block chain subsystem B sends the transaction result to the corresponding coordination node, updates the transaction identification and modifies the cross-chain transaction state to be completed;
step S6, after receiving the transaction identifier returned by the blockchain subsystem B through the coordination network, the blockchain subsystem a performs cross-chain transaction query and verification, and after verifying that the transaction identifier is legal, calls an intelligent contract to confirm the transaction, and performs rollback if the transaction on the blockchain subsystem B is abnormal, and if the transaction is not abnormal, completes the cross-chain transaction.
7. The method as claimed in claim 6, wherein the intelligent contract in step S2 is an address for transferring in or out assets, and when the cross-chain transaction initiator performs pre-execution on the blockchain subsystem a, the assets of the blockchain subsystem a are transferred to the address of the intelligent contract, and when submitted, the assets are transferred to the transaction recipient.
8. The method according to claim 7, wherein the intelligent contract in step S2 is invoked to check whether a timeout event is triggered to prevent a sudden occurrence of a network partition or a complete downtime of a relay or a node of a certain party, and if the timeout event is triggered, the current cross-link transaction is directly cancelled.
9. The method as claimed in claim 8, wherein the intelligent contract in step S4 is invoked to check whether a timeout event is triggered, and if the timeout event is triggered, the intelligent contract invocation of step S6 is directly proceeded to roll back.
10. The method of claim 9, wherein the intelligent contract invocation in step S6 is initiated by an intelligent contract on the blockchain subsystem a, and if a timeout event is triggered, the retry is continued until the intelligent contract is completed.
CN201910890131.4A 2019-09-20 2019-09-20 Relay-based block chain interaction system and method Active CN110650189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910890131.4A CN110650189B (en) 2019-09-20 2019-09-20 Relay-based block chain interaction system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910890131.4A CN110650189B (en) 2019-09-20 2019-09-20 Relay-based block chain interaction system and method

Publications (2)

Publication Number Publication Date
CN110650189A CN110650189A (en) 2020-01-03
CN110650189B true CN110650189B (en) 2022-01-18

Family

ID=69010870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910890131.4A Active CN110650189B (en) 2019-09-20 2019-09-20 Relay-based block chain interaction system and method

Country Status (1)

Country Link
CN (1) CN110650189B (en)

Families Citing this family (53)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111314438A (en) * 2020-01-20 2020-06-19 厦门顺势共识信息科技有限公司 Credible block chain system based on role distribution and cross-chain consensus method
EP3794537B1 (en) 2020-02-03 2023-05-03 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain-based trustable guarantees
WO2020098834A2 (en) 2020-02-03 2020-05-22 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain-based trustable gurantees
WO2020098833A2 (en) 2020-02-03 2020-05-22 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain-based trustable gurantees
EP3794483A4 (en) 2020-02-03 2021-04-28 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain-based trustable guarantees
CN111418184B (en) * 2020-02-03 2022-09-09 支付宝(杭州)信息技术有限公司 Credible insurance letter based on block chain
EP3794484B1 (en) 2020-02-03 2024-04-17 Alipay (Hangzhou) Information Technology Co., Ltd. Blockchain-based trustable guarantees
CN111311415B (en) * 2020-02-28 2023-11-24 中国工商银行股份有限公司 Loosely coupled blockchain transaction method and transaction node
CN111416808B (en) * 2020-03-13 2021-04-13 财付通支付科技有限公司 Cross-block-chain data mutual storage method, device, equipment and storage medium
CN111552991A (en) * 2020-04-29 2020-08-18 支付宝实验室(新加坡)有限公司 Block chain transaction method and device
CN112003889B (en) * 2020-07-10 2022-11-08 南京邮电大学 Distributed cross-link system and cross-link information interaction and system access control method
CN111917865B (en) * 2020-07-29 2022-09-20 成都质数斯达克科技有限公司 Block chain network system, gateway and networking method
CN111817967B (en) 2020-08-28 2020-12-18 支付宝(杭州)信息技术有限公司 Communication optimization system and message forwarding method of block chain network
CN111769958B (en) * 2020-09-02 2021-01-01 百度在线网络技术(北京)有限公司 Block chain cross-chain processing method, device, equipment and storage medium
WO2022052091A1 (en) * 2020-09-14 2022-03-17 天津理工大学 Asset and data cross-chain method and system based on blockchain
CN113079081B (en) 2020-09-25 2022-08-02 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN112953821B (en) * 2020-09-25 2022-02-25 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN112968969B (en) * 2020-09-25 2023-05-12 支付宝(杭州)信息技术有限公司 Block chain system, message transmission method and device
CN112968967B (en) 2020-09-25 2023-05-19 支付宝(杭州)信息技术有限公司 Block synchronization method and device
CN111934998B (en) 2020-09-25 2021-02-09 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111934999B (en) * 2020-09-25 2021-01-22 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111935000B (en) 2020-09-25 2021-01-08 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111934997B (en) * 2020-09-25 2021-01-12 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN112491959B (en) * 2020-10-28 2023-03-24 杭州趣链科技有限公司 Cross-link resource exchange method, device and system based on relay link
CN112446785B (en) * 2020-11-06 2023-09-22 杭州趣链科技有限公司 Cross-chain transaction method, system, device, equipment and storage medium
CN112600874B (en) * 2020-11-24 2023-03-31 成都质数斯达克科技有限公司 Node joining method and device, electronic equipment and readable storage medium
CN114567643B (en) * 2020-11-27 2023-05-23 腾讯科技(深圳)有限公司 Cross-blockchain data transfer method, device and related equipment
CN114095329A (en) * 2020-11-30 2022-02-25 北京八分量信息科技有限公司 Method for realizing network topology role by optimizing node communication
CN112583917B (en) * 2020-12-10 2022-09-06 浙商银行股份有限公司 CSCP-based hybrid chain construction method
CN112566211B (en) * 2020-12-11 2022-04-15 安徽大学 Cell relay cooperative communication method based on block chain intelligent contract
CN112529577A (en) * 2020-12-17 2021-03-19 上海万向区块链股份公司 Block chain cross-chain system and method based on excitation treatment
CN112714158B (en) * 2020-12-21 2023-11-17 东软集团股份有限公司 Transaction processing method, relay network, cross-link gateway, system, medium and equipment
CN112783877A (en) * 2020-12-30 2021-05-11 北京百度网讯科技有限公司 Cross-link data verification method, device, equipment and storage medium
CN112732837A (en) * 2021-01-14 2021-04-30 浙江大学 Remote sensing data cross-boundary service sharing system based on hybrid chain technology
CN112887380B (en) * 2021-01-15 2022-06-10 杭州链网科技有限公司 Cross-chain intercommunication method and system
CN112882802A (en) * 2021-02-01 2021-06-01 杭州云象网络技术有限公司 Multi-chain message table transaction processing method for cross-chain and cross-chain system
CN112667749B (en) * 2021-03-16 2021-05-25 腾讯科技(深圳)有限公司 Data processing method, device, equipment and storage medium
CN113673991A (en) * 2021-03-30 2021-11-19 支付宝(杭州)信息技术有限公司 Cross-link data processing method and device
CN112738139B (en) * 2021-03-30 2021-07-06 支付宝(杭州)信息技术有限公司 Cross-link access control method and device
CN113114759B (en) * 2021-04-09 2022-06-10 杭州链网科技有限公司 Chain-crossing method and system for realizing multi-chain intercommunication
CN113179324B (en) * 2021-04-29 2024-03-26 中国人民银行数字货币研究所 Block chain link point and service processing method executed by block chain link point
CN113922971B (en) * 2021-06-02 2023-10-27 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113259119B (en) * 2021-06-02 2021-10-29 支付宝(杭州)信息技术有限公司 Block chain message distribution method and device
CN113259461B (en) * 2021-06-02 2021-09-28 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and block chain system
CN113923228A (en) * 2021-06-02 2022-01-11 支付宝(杭州)信息技术有限公司 Cross-chain interaction method and device
CN113067774B (en) * 2021-06-02 2021-09-14 支付宝(杭州)信息技术有限公司 Transaction forwarding method between block chain networks
CN113259130B (en) * 2021-06-21 2021-09-14 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and medium
CN113360504B (en) * 2021-06-22 2023-08-15 东北大学 Connection query optimization method based on multi-block chain environment
CN113570479B (en) * 2021-08-03 2023-12-12 贝壳找房(北京)科技有限公司 Block chain transmission method, system and storage medium for real estate transaction data
CN113783854B (en) * 2021-08-30 2023-10-17 湖南天河国云科技有限公司 Credit data cross-chain sharing method and device based on block chain
CN114449003A (en) * 2022-01-28 2022-05-06 浪潮云信息技术股份公司 Alliance chain data processing method and alliance chain
US20230367788A1 (en) * 2022-05-13 2023-11-16 Circle Internet Financial, Inc. Atomically bridging transactions across different blockchains
CN115174309B (en) * 2022-09-06 2022-12-27 深圳市明源云科技有限公司 Block chain communication method, communication device and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530083A (en) * 2016-10-27 2017-03-22 上海亿账通区块链科技有限公司 Multi-chain management method and system based on block chain
CN108880794A (en) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 Across chain user identity and its digital asset management system
CN109035012A (en) * 2018-06-11 2018-12-18 西安纸贵互联网科技有限公司 A kind of across the chain processing method and computer readable storage medium of block catenary system
CN110035046A (en) * 2018-11-16 2019-07-19 阿里巴巴集团控股有限公司 The interactive system of transregional piece of chain
AU2018347193B2 (en) * 2018-11-16 2020-05-14 Advanced New Technologies Co., Ltd. Cross-chain interactions using a domain name scheme in blockchain systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106530083A (en) * 2016-10-27 2017-03-22 上海亿账通区块链科技有限公司 Multi-chain management method and system based on block chain
CN109035012A (en) * 2018-06-11 2018-12-18 西安纸贵互联网科技有限公司 A kind of across the chain processing method and computer readable storage medium of block catenary system
CN108880794A (en) * 2018-06-15 2018-11-23 浙江华信区块链科技服务有限公司 Across chain user identity and its digital asset management system
CN110035046A (en) * 2018-11-16 2019-07-19 阿里巴巴集团控股有限公司 The interactive system of transregional piece of chain
AU2018347193B2 (en) * 2018-11-16 2020-05-14 Advanced New Technologies Co., Ltd. Cross-chain interactions using a domain name scheme in blockchain systems

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
区块链跨链技术进展研究;李 芳;《软件学报》;20190327;全文 *

Also Published As

Publication number Publication date
CN110650189A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
CN110650189B (en) Relay-based block chain interaction system and method
CN111598566A (en) Network payment system based on mixed cross-chain
TWI710979B (en) Cross-block chain interaction method, device, system, and electronic equipment
US11461773B2 (en) Blockchain-based node management methods and apparatuses
CN110443704B (en) Method and device for sending resources in cross-link mode
CN107193490B (en) Distributed data storage system and method based on block chain
US20200143366A1 (en) Methods for decentralized digital asset transfer and smart contract state transition
WO2022193985A1 (en) Data processing method and apparatus, and device and storage medium
CN112583917B (en) CSCP-based hybrid chain construction method
CN111681003A (en) Resource cross-chain transfer method and device, computer equipment and storage medium
CN114255031A (en) System for executing cross block chain of transaction, cross chain transaction method and equipment
CN111461723A (en) Data processing system, method and device based on block chain
CN112866380B (en) Chain network architecture based on block chain
CN113837760B (en) Data processing method, data processing device, computer equipment and storage medium
CN108259175A (en) A kind of distribution routing algorithm method of servicing and system
Xu et al. Cloudchain: a cloud blockchain using shared memory consensus and rdma
CN111552991A (en) Block chain transaction method and device
US20230370285A1 (en) Block-chain-based data processing method, computer device, computer-readable storage medium
Xiao et al. A multi-blockchain architecture supporting cross-blockchain communication
JP2024515022A (en) Blockchain-based data processing method, device, equipment, and computer program
CN116827957B (en) Information processing method, device, equipment and medium based on multi-block chain
CN112615838B (en) Extensible block chain cross-chain communication method
US20230259930A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
Bu et al. Cross hyperledger fabric transactions
CN111510306B (en) Offline signature method and device based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant