CN113965329A - Cross-chain interoperation system, method, medium and data processing terminal - Google Patents

Cross-chain interoperation system, method, medium and data processing terminal Download PDF

Info

Publication number
CN113965329A
CN113965329A CN202111241209.3A CN202111241209A CN113965329A CN 113965329 A CN113965329 A CN 113965329A CN 202111241209 A CN202111241209 A CN 202111241209A CN 113965329 A CN113965329 A CN 113965329A
Authority
CN
China
Prior art keywords
chain
transaction
cross
relay
application
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.)
Withdrawn
Application number
CN202111241209.3A
Other languages
Chinese (zh)
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.)
Zhejiang Normal University CJNU
Original Assignee
Zhejiang Normal University CJNU
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 Zhejiang Normal University CJNU filed Critical Zhejiang Normal University CJNU
Priority to CN202111241209.3A priority Critical patent/CN113965329A/en
Publication of CN113965329A publication Critical patent/CN113965329A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • 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/3236Cryptographic 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 using cryptographic hash functions
    • H04L9/3239Cryptographic 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 using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • 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/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
    • H04L9/3255Cryptographic 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 using group based signatures, e.g. ring or threshold 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/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/3263Cryptographic 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 certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention belongs to the technical field of block chains, and discloses a cross-chain interoperation system, a method, a medium and a data processing terminal, wherein the cross-chain interoperation system comprises a relay alliance chain, a cross-chain gateway, a CCIP (content-centric protocol) protocol and an application chain; the relay alliance chain is a central center of the whole cross-chain system and is used for being responsible for management of an application chain and a user thereof and management of cross-chain transactions; the cross-link gateway is used as an intermediate routing node, is used for communicating the application link and the relay alliance link, and has a protocol conversion function; the CCIP protocol is used for message transmission between a relay alliance chain and an application chain; the application chain is a blockchain platform participating in cross-chain interaction, and a public chain, a alliance chain and a private chain can all participate in the cross-chain system. The block chain cross-chain interoperation system based on union autonomy provides a safe, reliable and efficient universal platform for interaction requirements among different block chains, and has advanced technical significance and wide application value.

Description

Cross-chain interoperation system, method, medium and data processing terminal
Technical Field
The invention belongs to the technical field of block chains, and particularly relates to a cross-chain interoperation system, a cross-chain interoperation method, a cross-chain interoperation medium and a data processing terminal.
Background
At present, the block chain technology is raised, a large number of block chain platforms are produced at the same time, and a deep revolution is brought to the social development. However, under the full scene of the blockchain technology, such as flowers being in the same place and hundreds of families playing with a cry, a key problem which needs to be solved urgently, namely cross-chain interoperation, is hidden. Due to the independent and closed characteristics of the block chains and the high isomerization among the chains, a very high technical barrier is provided for data exchange and value circulation among different block chains, the problem of difficult cross-chain interaction causes a block chain value island phenomenon, and the block chain technology is prevented from further landing and global development.
The blockchain technology is acknowledged as one of the most revolutionary technologies in recent decades, and the innovative decentralized trust value system changes the traditional way of establishing and maintaining trust by relying on a centralized mechanism in the internet, is a key technology for solving the trust crisis in future social development, and is expected to remodel the activity form of the human society like the internet. The reports on the ergocoln study indicated that: the blockchain technology is the core technology that has the most potential to trigger the fifth round of subversive revolution and wave after the steam engine, power, information and internet technologies.
The blockchain has great potential, and attracts high attention of people in all world boundaries, the blockchain is raised to the height of a national strategic layer in many countries in the world, China also highly pays attention to the blockchain technology, and the blockchain is used as an important block for new national infrastructure. Over a decade, with the deep development of block chain technology and the continuous popularization of application scenarios, block chains have been gradually applied to various fields such as internet of things, agriculture, medical treatment, supply chains, laws, government affairs, and the like, and various block chain items, such as blowout, emerge to form numerous block chain infrastructures and business systems, the data exchange, value circulation, and application collaboration requirements among the block chain applications are increasing, the appeal of each industry on cross-chain interaction is more and more prominent, how to establish a universal, safe, and efficient cross-chain system standard, and meeting the data sharing, value circulation, and business collaboration among chains becomes the greatest importance of the research of the block chains in the current area. However, different blockchain projects are developed by different enterprises according to different application scenarios and design concepts by adopting different technical frameworks, the blockchain projects are more or less different in system architecture, network topology, underlying data structure, consensus algorithm, encryption mechanism, intelligent contract and the like, the blockchain projects are seriously isomerized with each other, the blockchain naturally has the characteristics of being closed and independent, and information and value are only shared and circulated on respective chains, so that a large number of blockchain projects become an isolated information and value system, like islands floating in the sea, and the data sharing and value circulation among the islands have extremely high technical barriers. With the continuous and vigorous development of the block chain technology, a situation of multi-chain interconnection symbiosis is formed in the future, the chain-crossing technology can break through the self-sufficient current situation of each block chain system, realize the interaction between parallel block chains, break through the performance bottleneck of a single block chain, improve the expandability of the block chain, is a powerful technological engine for promoting the large-range rapid landing and cross-scene fusion development of the block chain industry, and is also a core and key technology for realizing chain networking and building a trust and value network.
However, the cross-chain technology is difficult to implement and is still in the preliminary exploration stage at present. Although four more mature cross-chain schemes have been developed: the method comprises the steps of notary mechanism, side chain/relay, Hash locking, distributed key control, and occurrence of mainstream cross-link projects such as InterLedger, Cosmos, Polkadot, and the like, but a unified cross-link standard and a stable and general cross-link system are still not formed, all parties are still in respective administrative states, and existing research results have certain limitations, and either only stay in a theoretical stage or have a narrow application scene and have a short distance from actual landing. The development of the cross-chain technology is still to be researched by vast researchers, and a great deal of difficulty and challenge will be inevitably encountered in the future to really realize the trust and value internet of the ten-thousand-chain interconnection.
Through the above analysis, the problems and defects of the prior art are as follows:
(1) the existing chain-crossing technology is difficult to realize and still is in a preliminary exploration stage at present.
(2) The existing chain-crossing scheme does not form a uniform chain-crossing standard and a stable and universal chain-crossing system, all parties are still in a state of being in mutual administration, and the technical barrier is extremely high.
(3) The existing research results have certain limitations, and either only stay in a theoretical stage or have narrow application scenes and a small distance from the actual ground.
The difficulty in solving the above problems and defects is: different types of block chain systems have more or less differences in the aspects of underlying data structures, network topologies, consensus mechanisms, privacy protection mechanisms and the like, and the design of the block chain is an independent ecosystem, so that even if the interaction between homogeneous block chains has higher complexity, the interaction between heterogeneous block chains is more challenging. In addition, the existing chain-crossing schemes, projects or research results have limitations, and some of the chain-crossing schemes, the projects or the research results have narrow application ranges and are only suitable for exchanging among assets; some also in the theoretical research stage, lack of practical verification; some of the effects are unsatisfactory, and problems occur frequently. And the cross-chain projects developed by all parties lack communication, and are divided into administrative parts, so that a secondary island phenomenon is formed. At present, the cross-chain technology is far away from the application of large-scale market, the difficulty is very great, and the industry and the academia are required to continuously explore and research.
The significance of solving the problems and the defects is as follows: the block chain technology is developed vigorously at present, application scenes are continuously expanded, and profound influences are generated in various social fields such as finance, internet of things, government affairs, logistics, laws and the like. A single blockchain cannot solve all problems, each blockchain project has a specific application scenario, and under the large background of current economic globalization, the interworking and cooperation of different industry fields are very important, and although the blockchain provides efficient and safe services for each industry, the problem of difficult cross-chain interoperation directly limits the further development of the blockchain and the corresponding industry. At this time, communication barriers between different block chain platforms need to be opened, a general and stable block chain cross-chain technical system needs to be established, so that safe and efficient data sharing, value circulation and service cooperation can be performed between different block chains, a chain networking similar to the internet and the internet of things is formed, and even a ten thousand chain interconnection price value internet era is opened. Once the chain networking and even the value internet are formed, the global productivity and the production relation are greatly influenced, and the transaction efficiency and the safety protection of each industry are greatly improved.
Disclosure of Invention
The invention provides a system, a method, equipment, a medium and a data processing terminal for cross-chain interoperation, and particularly relates to a system, a method, a medium and a data processing terminal for block chain cross-chain interoperation based on alliance autonomy.
The invention is realized in such a way that the cross-chain interoperation system comprises a relay alliance chain, a cross-chain gateway, a CCIP protocol and an application chain.
The relay alliance chain is a central center of the whole cross-chain system and is used for being responsible for management of an application chain and a user thereof and management of cross-chain transactions;
the cross-link gateway is used as an intermediate routing node, is used for communicating the application link and the relay alliance link, and has a protocol conversion function;
the CCIP protocol is used for message transmission between a relay alliance chain and an application chain;
the application chain is a block chain platform which is put into use in the market at present and needs to participate in cross-chain interaction, and a public chain, a alliance chain or a private chain can participate in the cross-chain system.
Further, the relay alliance chain is the core of a cross-chain system and is used for overall management of cross-chain transactions; the design and application of the relay alliance chain are based on a chain control idea, and an alliance chain system is adopted to realize the relay alliance chain; the relay alliance chain is governed by all cross-chain participants together. Each external blockchain system is abstracted into an organizational structure, mapped into a relay federation chain, and treated as a huge container accommodating ten thousand chains and a supermarket supporting ten thousand chain interactions. And users in the external blockchain system are mapped into the relay alliance chain in an account mode, and users of different blockchain platforms carry out free service interaction in the relay alliance chain on the premise of complying with a cross-chain rule. All cross-chain interoperation transactions are performed in the relay alliance chain, and all cross-chain interactions occurring in the relay alliance chain are synchronously executed in the corresponding external blockchain system.
All cross-chain interoperation transactions follow a cross-chain interaction protocol, and the CCIP is a set of universal cross-blockchain message interaction protocol designed on the basis of the problem that data structures of heterogeneous blockchains are different and used for reducing communication cost among the heterogeneous blockchains. The Proof field is a certificate of the cross-link transaction validity and is used for proving that a certain event really occurs on a source chain, and the content of the Proof field comprises a block sequence number, a Mercker root hash and a path hash and a signature of a transactor. And when the transaction validity is verified, calculating the content of the Payload field by using a corresponding hash algorithm to obtain a transaction hash value, calculating the transaction hash value and the Mercker path hash, and if the finally obtained hash value is consistent with the Mercker root hash, indicating that the transaction is actually generated on a source chain. And the transaction proposal initiated by the source chain is firstly sent to the cross-chain gateway, the cross-chain gateway analyzes the transaction proposal, verifies the validity of the transaction proposal, and if the transaction proposal passes the verification, the transaction proposal is reconstructed into a CCIP message format according to protocol rules and submitted to the relay alliance chain.
The cross-link gateway is a communication component for connecting the application chains and the relay alliance chain, one or more cross-link gateways are specially responsible for communication between the two parties between the relay alliance chain and each application chain, and the cross-link gateway has the following three functions:
the method comprises the steps that firstly, the bridge serves as a two-way communication bridge between an application chain and a relay alliance chain, a cross-link request sent by the application chain is received and forwarded to the relay alliance chain, and a message sent by the relay alliance chain is forwarded to the application chain;
monitoring transaction events on an application chain and a relay alliance chain, and acquiring corresponding block transaction information and a Mercker certificate and transmitting the block transaction information and the Mercker certificate to a corresponding chain for processing after monitoring a specific event;
and the protocol conversion function is used for converting the information transmitted by the application chain into a message of a CCIP structure and converting the message of the CCIP structure into a transaction format which can be identified by the specific application chain.
Another objective of the present invention is to provide a cross-chain interoperation method using the cross-chain interoperation system, where the cross-chain interoperation method includes the following steps:
step one, a chain-crossing system based on a relay mode is provided, and interactive service is provided for a same heterogeneous block chain;
step two, designing a relay alliance chain in detail, and setting rules of an application chain and a user thereof participating in a cross-chain system;
step three, generalizing the basic type of cross-chain interaction and making a detailed implementation scheme of the cross-chain transaction;
and step four, verifying the feasibility of the cross-chain scheme through multiple groups of experiments, evaluating the performance index of the cross-chain system, and analyzing the safety of the cross-chain network.
Further, in step two, the design of the relay alliance chain includes:
the relay alliance chain is used as a core component of a cross-chain system, and the functions are divided into two parts: 1) identity management and authority control of the application chain and the user thereof; 2) the management of cross-chain affairs ensures the ACID characteristics, safety and verifiability of cross-chain interoperation affairs; wherein the ACID characteristics include atomicity, consistency, isolation, and persistence; and adopting HyperLegendr Fabric as a relay alliance chain.
The design of the relay alliance chain also comprises cross-chain interaction based on multi-channel service, and is solved by using a private data mechanism, the private data set is equivalent to a sub-channel in the channel, private communication between organizations can be realized by creating the private data set for a group of organizations to perform cross-chain interaction, and a large number of application chains can be accommodated in one channel.
Further, the cross-chain interoperation method further includes:
taking the application chain a to perform cross-chain interaction with the application chain B as an example, the cross-chain interoperation process is as follows:
(1) application chain joining cross-chain system:
1) and establishing a mapping relation and issuing a certificate. If a certain block chain platform wants to be added into a cross-chain system, qualification examination is needed; mapping of each external blockchain system to the relay chain network becomes an organization, and each organization issues digital certificates by an independent Certificate Authority (CA) and comprises identity certificates and TLS transmission encryption certificates.
2) A channel or private data set is created. And creating a new channel or private data set for the application chain according to the service requirement. Creating a new channel, writing a channel configuration file, writing MSP certificate information, access control strategies, read-write authorities and other configuration information organized corresponding to the application chain into the channel configuration file, and creating the channel according to the configuration information. Creating a private data set, writing a private data set configuration file including organization information and endorsement policies of private data levels, reading and writing authority content by members, and introducing the private data set configuration file when a contract is deployed.
3) And adding the nodes into the channel and deploying the intelligent contract. After the channel is successfully created, the nodes under the organization can be added into the channel. After the nodes join the channel, intelligent contracts can be deployed to realize cross-link services.
(2) After the channel, the private data and the intelligent contract are deployed, the users under the application chain A and the application chain B can perform cross-chain interaction:
1) the user on the application chain A firstly uses a cross-chain intelligent contract on the chain, a block chain system which does not support the intelligent contract can realize corresponding functions by using a script or a program, a cross-chain transaction proposal is initiated, and the proposal is sent to a corresponding cross-chain gateway;
2) after receiving the transaction proposal, the cross-link gateway analyzes the transaction proposal, verifies the source of the transaction proposal, checks the signature of the transaction proposal, constructs the transaction proposal into a CCIP message format after passing the verification, and sends the CCIP message format to the relay alliance link for preprocessing;
3) the relay alliance chain performs primary processing on cross-chain transaction, generates corresponding transaction instructions according to transaction contents and respectively sends the transaction instructions to the application chains A and B;
4) the application chain A, B verifies the validity of the transaction instruction, and executes corresponding operation according to the transaction instruction after confirming no error;
5) the cross-link gateway monitors whether the two links successfully execute the operation required by the transaction instruction, and once the operation is successfully linked, the cross-link gateway acquires the transaction original text of the operation and the transaction existence certification and returns the transaction original text and the transaction existence certification to the relay alliance link;
6) and after all the sub-transactions of the cross-link transaction are successfully completed, if a certain link has a problem, the transaction will be rolled back, even the transaction is cancelled, the relay alliance chain will perform a final processing on the cross-link transaction, and after the processing is completed, a transaction receipt is generated and returned to the application chains A and B for verification and evidence storage.
(3) Out-of-block right assignment
The relay alliance chain network adopts a raft consensus algorithm, the sequencing node masters the block generation and distribution power, and how to reasonably distribute the power is the key point for realizing alliance consensus. In the raft consensus, one leader node is responsible for processing all transactions, and when the leader node cannot send heartbeat information to the follower node in time due to reasons such as failure or delay, other follower nodes have the probability of becoming a new leader. The block-out weight allocation scheme is as follows: each organization, namely the application chain is used as a group for controlling the sequencing nodes, a certain number of sequencing nodes are distributed according to the performance of each organization in the cross-chain transaction, the better the performance is, the more the distributed sequencing nodes are, the higher the probability that the sequencing nodes under the organization become leader nodes is, and the master of the leader nodes is equal to the master of the block right.
An appointment system is designed for distribution of block right, when each new appointment starts, the network redistributes the sequencing nodes and reselects the leader node, the ownership of the sequencing nodes is distributed through certificates, and a new round of election is triggered by short downtime of the leader node. During the tenure t, the organization i is allocated to the number of the sequencing nodes as follows:
Figure BDA0003319277210000051
wherein,
Figure BDA0003319277210000052
wherein, NumallIs the total number of sequencing nodes in the network, NumrIs the number of sequencing nodes assigned to the policing organization, which does not participate in block right contention.
Figure BDA0003319277210000053
Is the credit degree of the organization i in the last tenure, measured by the success rate of cross-chain transaction, miAnd niRespectively, the number of successful transactions and the total number of transactions completed by the organization i in the last tenure; provision of only niA certain number of organizations can participate in the election,
Figure BDA0003319277210000054
is the reputation of organization i during the last tenure. Considering the existence of decimal points, the final calculation result needs to be rounded down, after the node allocation is completed, a plurality of nodes remain, and the remaining nodes are allocated to the organization which has the best performance in the last tenure as rewards; and sets a maximum number of successive appointments for an organization, as well as penalties for low-reputation organizations.
Further, the cross-chain interoperation method further includes:
(1) asset mapping scheme based on distributed (k, n) threshold signatures
The asset mapping scheme consists of two phases of asset mapping and asset release. In the asset mapping stage, after a mapping address is calculated through a threshold algorithm, assets are transferred to the address to be locked; in the asset release stage, assets in the mapping address are unlocked after the threshold signature is calculated through a threshold algorithm.
(2) Cross-chain transaction state table
At the initiation of each cross-link transaction, the trunking federation chain initializes a transaction state table. The TXid field in the CCIP message protocol is the cross-chain transaction ID in the table, followed by an incrementing number as the child transaction ID. A cross-chain transaction is usually composed of a plurality of sub-transactions, the cross-chain transaction is considered to be completed only when all the sub-transactions are completed successfully, and if any step in the middle fails, corresponding operation of rolling back or canceling the transaction is taken. Each operation completed by the application chain in a complete cross-chain transaction is used as a sub-transaction, and after the application chain completes the corresponding operation, the relevant information is sent to the relay alliance chain in a CCIP format for verification, so that each CCIP message sent by the application chain is used as the sub-transaction for verification.
Further, the cross-chain interoperation method further includes:
formally diverse cross-chain interoperation is summarized into four basic types: asset exchange, asset transfer, information payment and information interaction, and designs the implementation process of four basic types of cross-chain interaction in detail.
(1) Asset exchange type implementation flow
For an asset exchange type cross-chain transaction, such as chain A user Alice wanting to exchange 10acoin, a chain A token, for 20 bcin, a chain B token, of chain B user Bob, both have accounts on both chains, the transaction process is as follows:
1) and (3) sending a transaction proposal to the cross-chain gateway by Alice, analyzing the transaction content after the cross-chain gateway receives the transaction proposal, checking the signature, if the proposal is valid, constructing the transaction proposal into a CCIP message format according to protocol rules, sending the CCIP message format to a designated endorsement node in a channel, and executing an asset exchange intelligent contract:
Figure BDA0003319277210000061
2) and each endorsement node calls an asset mapping interface respectively, and aggregates calculation results to generate two asset mapping addresses:
addresschainA=GenerateAddresschainA(GPK);
addresschainB=GenerateAddresschainB(GPK);
3) alice and Bob transfer own digital assets into mapping account addresses on respective chains to be locked, and only if correct threshold signatures are obtained, the assets in the mapping accounts can be transferred into the account addresses of the opposite sides; setting a time lock, and returning to the original account if the fund in the account is not taken within the time period t, wherein the time lock needs to be larger than the time lock;
Figure BDA0003319277210000062
Figure BDA0003319277210000063
4) after monitoring that the locked transaction of the two chains is successfully linked, the cross-link gateway submits the transaction original text and the transaction existence certification of the two transactions to the relay alliance chain;
5) after the relay alliance chain verifies the two locking transactions, corresponding digital assets are created to contract account addresses of Alice and Bob, and the assets and data can be stored in an account of a user in the relay alliance chain;
6) initiating an asset exchange request to Bob by Alice through a contract, calling an asset release interface by each endorsement node, constructing a complete threshold signature, and sending the complete threshold signature to Alice;
7) after obtaining the threshold signature, Alice extracts the assets in the chain B mapping account in a time period, and leaves the trace of the threshold signature at the same time, and Bob then obtains the assets in the chain A mapping account in the time period; and after the transaction of the extracted assets of the mapping account is confirmed, destroying the corresponding assets in the relay alliance chain contract account.
(2) Asset transfer type implementation flow
For a cross-chain transaction of the asset transfer type, for example, chain A user Alice wants to send 10acoin to chain B user Bob, assuming an acoin to bcin exchange rate of 1: 20, the transaction process is as follows:
1) similar to asset exchange, Alice sends a transaction proposal to the inter-chain gateway, and each endorsement node calls an asset mapping interface respectively to generate an asset mapping address:
addresschainA=GenerateAddresschainA(GPK);
2) initiating a transaction by Alice to lock own digital assets into a mapping account address, submitting a transaction original text and a transaction existence certification to a relay alliance chain for verification after a cross-chain gateway monitors that the transaction is successfully locked, and creating corresponding digital assets into a contract account of Alice after the verification is passed;
3) initiating an asset transfer transaction to Bob by Alice on a contract, and transferring 10acoin 'in the contract account of Alice, namely converting the assets mapped into the relay alliance chain into 200 bcoin' according to the exchange rate to transfer the assets into the contract account of Bob;
4) after the asset transfer transaction is confirmed by the uplink, the relay alliance chain constructs a transaction proposal, wherein the transaction proposal comprises information such as a transaction original text of the asset transfer transaction, a transaction existence certification and the like, the information is sent to a chain B through a cross-chain gateway, and after the chain B receives the information and verifies the information, 200bcoin is issued or unfrozen to an account of Bob;
5) after the 200bcoin transaction received by Bob is confirmed by the chain B, the cross-chain gateway monitors the transaction, returns the original text of the transaction and the transaction existence certification to the relay alliance chain for verification, and destroys the 200 bcoin' in the contract account of Bob after the verification is passed.
The transferred asset can be returned as it is, Bob can also use 200 bcoin' as his way, and the transaction process is as follows:
1) the first five steps are the same as the asset transfer process, but Alice is changed into Bob;
2) after Bob converts 200bcoin 'into 10 acoin' and transfers the 10acoin 'to Alice's trade uplink, each endorsement node calls an asset release interface to reconstruct a complete threshold signature and send the threshold signature to Alice, and the asset release interface corresponds to a generated asset mapping interface, and the constructed threshold signature can only unlock assets but cannot unlock the assets;
3) and after the Alice receives the threshold signature, the assets in the transaction can be acquired, after the transaction is confirmed by the chain A, the cross-chain gateway monitors the transaction, returns the original text of the transaction and the verification of the existence of the transaction to the relay alliance chain, and destroys 10acoin the Alice contract account after the verification is passed.
(3) Information payment type implementation process
For a cross-chain transaction of the information payment type, such as a chain A user Alice wanting to purchase an information resource sold by a chain B user Bob, the transaction process is as follows:
1) the same as the first two steps of the asset transfer, and Bob transmits the information resource to the contract account after encrypting the information resource by the public key of Alice;
2) initiating an information payment transaction by Alice, transferring the digital assets in a contract account into a contract account address of Bob, and simultaneously sending information resources in the account of Bob to the account of Alice, wherein the operation is an atomic operation, and the transaction is confirmed to be valid only if the transfer operation and the information sending operation are all successful;
3) after successful chaining of information payment transactions, Alice can locally pull information resources and decrypt the information resources by using a private key, and Bob can obtain corresponding assets in the account of the chain B.
(4) Information interaction type implementation process
For cross-chain transactions of the information interaction type, for example, a chain a user Alice wants to write some data into a chain B and read the result after this event occurs, the interaction process is as follows:
1) alice initiates a transaction proposal, which comprises a transaction request to a target chain, and submits the transaction request to a relay alliance chain network after the transaction request is converted by a cross-chain gateway;
2) after the relay alliance chain receives and verifies the data, a transaction instruction is constructed and sent to the chain B, a transaction state table is established for recording and tracking the state of the transaction, and the transaction is marked to be completed when the data is successfully written into the chain B and the result after the event is obtained;
3) and after the transaction is completed, returning the result to Alice.
It is another object of the present invention to provide a computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of:
the method is used for providing interactive service for the same heterogeneous block chain by proposing a relay mode-based cross-chain system; designing a relay alliance chain in detail, and setting rules of an application chain and a user thereof participating in a cross-chain system; inducing basic types of cross-chain interaction and making a detailed implementation scheme of cross-chain transactions; and verifying the feasibility of the cross-chain scheme through multiple groups of experiments, and evaluating the performance index of the cross-chain system.
Another objective of the present invention is to provide an information data processing terminal, where the information data processing terminal is configured to implement the cross-chain interoperation system.
By combining all the technical schemes, the invention has the advantages and positive effects that: the invention provides a cross-chain interoperation system, in particular to a block chain cross-chain interoperation system based on union autonomy, which is used for solving the problem of interaction among different block chains, and providing a cross-chain interoperation platform with high safety, good performance, convenience and convenience among all the block chains, so that block chain services in different fields and different scenes can be safely, efficiently and mutually cooperated. The core idea of the scheme is to manage a cross-link network by constructing a relay alliance chain which is commonly controlled by multiple parties in a chain control mode. Firstly, the invention provides a chain-crossing system based on a relay mode, which can provide interactive service for heterogeneous block chains; secondly, a relay alliance chain is designed in detail, and rules of an application chain and a user thereof participating in a cross-chain system are set; secondly, the basic types of cross-chain interaction are generalized and a detailed implementation scheme of cross-chain transactions is formulated; finally, the feasibility of the cross-chain scheme is verified through multiple groups of experiments, and the performance index of the cross-chain system is evaluated. The block chain cross-chain interoperation system based on union autonomy provides a safe, reliable and efficient universal platform for interaction requirements among different block chains, and has advanced technical significance and wide application value.
The invention discloses a block chain cross-chain interoperation system based on union autonomy, and aims to construct a universal cross-chain interaction platform, so that each block chain system can realize safe and efficient data sharing, value circulation and service collaboration through the platform. The main characteristics are as follows:
firstly, a cross-chain interoperation system is designed based on a relay mode, a uniform cross-chain interaction mode is provided, and the access of the same heterogeneous block chain is supported.
Secondly, the relay alliance chain is designed in detail, rules and modes of application links entering the relay alliance chain are set, and ordering of cross-chain participation is guaranteed.
And thirdly, a multi-channel mode-based chain crossing service is provided, and network resources are reasonably distributed while the privacy security of chain crossing interaction is ensured.
Fourthly, a block right distribution scheme is formulated, the right of the generated and distributed blocks is fairly, fairly and reasonably distributed to cross-chain participants with high credit, and the safety and the fairness of a cross-chain system are improved;
fifthly, the cross-chain transactions are summarized into four basic types, detailed cross-chain interaction processes are designed for the four basic types, cross-chain interactions of the four basic types are compiled into four intelligent contract templates, and the four intelligent contract templates can meet most of current cross-chain scenes.
Sixthly, the safety of the cross-chain assets is ensured by using an asset mapping scheme based on a distributed threshold signature technology, and a cross-chain transaction state table is designed to ensure the atomicity and consistency of cross-chain transactions.
The invention provides a block chain cross-chain interoperation system based on federation autonomy, which is characterized in that a relay federation chain which is controlled by multiple parties is constructed to operate the whole cross-chain network in a chain control mode. The rules and the modes of the application chains participating in cross-chain interaction are formulated by applying technologies and schemes such as a PKI certificate system, an MSP (mixed-public-data-processor) permission strategy, a channel mechanism, a private data mechanism, an endorsement mechanism, a channel allocation strategy, a block-out right allocation scheme and the like, and a safe and reliable technical platform is provided for the interoperation between the application chains. Four basic types of cross-chain interaction are designed and realized, and the requirements of most of current cross-chain scenes can be met. The distributed threshold signature technology and the cross-chain transaction state table are used for ensuring the security privacy and the ACID characteristic of the cross-chain transaction. And experiments and analysis prove that the cross-chain system provided by the invention has good performance and safety. The scheme supports multi-party cross-chain interaction, but needs to be realized on the basis of cross-chain of two parties, and the efficiency needs to be improved, so that a safe and efficient multi-party cross-chain mode is further researched on the basis of the scheme in the future.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a cross-chain interoperation method provided by an embodiment of the present invention.
FIG. 2 is a schematic diagram of a cross-chain interoperation system architecture according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an application link entering relay alliance link according to an embodiment of the present invention.
FIG. 4 is a flowchart of cross-chain interoperation provided by an embodiment of the present invention.
FIG. 5 is a schematic diagram of cross-chain intelligent contract performance evaluation provided by an embodiment of the invention.
Fig. 5(a) is a schematic diagram of performance evaluation of an asset exchange intelligent contract provided by an embodiment of the present invention.
FIG. 5(b) is a schematic diagram of an asset transfer intelligent contract performance evaluation provided by an embodiment of the invention.
Fig. 5(c) is a schematic diagram of performance evaluation of an information payment intelligent contract according to an embodiment of the present invention.
Fig. 5(d) is a schematic diagram of information interaction intelligent contract performance evaluation provided by the embodiment of the invention.
Fig. 5(e) is a schematic diagram of performance evaluation of the threshold signature algorithm according to the embodiment of the present invention.
Fig. 5(f) is a schematic diagram of CPU utilization evaluation of a contract container of threshold algorithm provided in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In view of the problems in the prior art, the present invention provides a cross-chain interoperation system, a method, a device, a medium, and a data processing terminal, and the present invention is described in detail below with reference to the accompanying drawings.
As shown in fig. 1, the cross-chain interoperation method provided by the embodiment of the present invention includes the following steps:
s101, a chain-crossing system based on a relay mode is provided and used for providing interactive service for the same heterogeneous block chain;
s102, designing a relay alliance chain in detail, and setting rules of an application chain and a user thereof participating in a cross-chain system;
s103, summarizing basic types of cross-chain interaction and making a detailed implementation scheme of cross-chain transactions;
s104, verifying the feasibility of the cross-chain scheme through multiple groups of experiments, evaluating the performance index of the cross-chain system, and analyzing the safety of the cross-chain network.
As shown in fig. 2, the cross-link interoperation system provided in the embodiment of the present invention includes a relay alliance link, a cross-link gateway, a CCIP protocol, and an application link.
The relay alliance chain is a central center of the whole cross-chain system and is used for being responsible for management of an application chain and a user thereof and management of cross-chain transactions;
the cross-link gateway is used as an intermediate routing node, is used for communicating the application link and the relay alliance link, and has a protocol conversion function;
the CCIP protocol is used for message transmission between a relay alliance chain and an application chain;
the application chain is a block chain platform which is put into use in the market at present and needs to participate in cross-chain interaction, and a public chain, a alliance chain or a private chain can participate in the cross-chain system.
The technical solution of the present invention is further described below with reference to specific examples.
1. Summary of the invention
The invention discloses a block chain cross-chain interoperation system based on alliance autonomy, which is used for solving the interaction problem among different block chains. Firstly, the invention provides a chain-crossing system based on a relay mode, which can provide interactive service for heterogeneous block chains; secondly, a relay alliance chain is designed in detail, and rules of an application chain and a user thereof participating in a cross-chain system are set; secondly, the basic types of cross-chain interaction are generalized and a detailed implementation scheme of cross-chain transactions is formulated; finally, the feasibility of the cross-chain scheme is verified through multiple groups of experiments, and the performance index of the cross-chain system is evaluated. The block chain cross-chain interoperation system based on alliance autonomy provided by the embodiment of the invention provides a safe, reliable and efficient universal platform for interaction requirements among different block chains, and has advanced technical significance and wide application value.
2. System model
The architecture of the cross-chain interoperation system provided by the invention is shown in fig. 2, and the main components of the cross-chain interoperation system comprise a relay alliance chain, a cross-chain gateway, a CCIP protocol and an application chain. The relay alliance chain is a central center of the whole cross-chain system and is responsible for management of the application chain and users thereof and management of cross-chain transactions; the cross-link gateway serves as an intermediate routing node, communicates the application link and the relay alliance link, and has a protocol conversion function; the CCIP protocol is used for message transmission between the relay alliance chain and the application chain; the application chain is a blockchain platform which is put into use in the market at present and needs to participate in cross-chain interaction, and a public chain, a alliance chain or a private chain can participate in the cross-chain system.
2.1 Relay alliance chain
The relay alliance chain is the core of the cross-chain system and is used for overall management of cross-chain transactions. The design and application of the relay alliance chain are used for a chain control thought, the alliance chain system is adopted to realize the relay alliance chain, the relay alliance chain is also a block chain system, and the safety characteristic of the block chain is attached to the relay alliance chain. Each external blockchain system is abstracted into an organization, is mapped into a relay alliance chain, and can be regarded as a huge container capable of accommodating ten thousand chains and a supermarket supporting ten thousand chain interaction. Users in the external blockchain system (if they need cross-chain interaction) are also mapped into the relay alliance chain in the form of an account, and users of different blockchain platforms can perform free business interaction in the supermarket of the relay alliance chain under the premise of complying with cross-chain rules. All cross-chain interoperation transactions are performed in the relay alliance chain, and all cross-chain interactions occurring in the relay alliance chain can be synchronously executed in the corresponding external blockchain system, so that the atomicity and consistency of the whole cross-chain process are guaranteed. The detailed design of the relay alliance chain will be described in the following paragraphs.
2.2 Cross-chain Interactive protocol Standard
All inter-Chain inter-operation transactions follow a Cross-Chain Interaction Protocol (Cross-Chain Interaction Protocol), and CCIP is a set of common inter-block-Chain message Interaction protocols designed based on the problem of different data structures of heterogeneous block chains to reduce the communication cost between heterogeneous block chains, and its main message fields are shown in part b of fig. 2. The Proof field is a certificate of the cross-chain transaction validity and is used for proving that a certain event really occurs on a source chain, and the content of the Proof field comprises a block sequence number, a Mercker root hash and a path hash and a signature of a transactor. And when the transaction validity is verified, calculating the content of the Payload field by using a corresponding hash algorithm to obtain a transaction hash value, calculating the transaction hash value and the Mercker path hash, and if the finally obtained hash value is consistent with the Mercker root hash, indicating that the transaction is actually generated on a source chain. And the transaction proposal initiated by the source chain is firstly sent to the cross-chain gateway, the cross-chain gateway analyzes the transaction proposal, verifies the validity of the transaction proposal, and if the transaction proposal passes the verification, the transaction proposal is reconstructed into a CCIP message format according to protocol rules and submitted to the relay alliance chain.
2.3 Cross-chain gateway
The cross-link gateway is a communication component for connecting the application chains and the relay alliance chain, and a group (one or more) of cross-link gateways are exclusively responsible for communication between the two parties between the relay alliance chain and each application chain, and the structure of the cross-link gateway is shown as part c in fig. 2, and the cross-link gateway has the following three functions:
1) the relay alliance chain is used as a bridge for bidirectional communication between the application chain and the relay alliance chain, receives a cross-chain request sent by the application chain, forwards the cross-chain request to the relay alliance chain and forwards a message sent by the relay alliance chain to the application chain;
2) monitoring transaction events on an application chain and a relay alliance chain, and acquiring corresponding block transaction information and a Mercker certificate and transmitting the block transaction information and the Mercker certificate to a corresponding chain for processing after monitoring a specific event;
3) the protocol conversion function can convert the information transmitted by the application chain into the information of the CCIP structure, and also can convert the information of the CCIP structure into a transaction format which can be identified by the specific application chain.
3. Design of relay alliance chain
The relay alliance chain is used as a core component of a cross-chain system, and the main work of the relay alliance chain can be two parts: 1) identity management and authority control of the application chain and the user thereof; 2) for the management of cross-chain transactions, the ACID characteristics (atomicity, consistency, isolation, durability), security, verifiability and the like of cross-chain interoperation transactions need to be ensured. In practice, the present invention employs HyperLegger Fabric as the Relay alliance chain.
3.1 Multi-channel service based Cross-chain interaction
Concept interpretation: 1) a channel: a channel is a communication channel constructed based on data isolation and privacy, and is a private subnet for communication between several specific network members for conducting private and confidential transactions. Each channel in the network is independent and isolated, and an account book is maintained, so that the privacy and the safety of the transaction in one channel are ensured; 2) organizing: participants in a network, typically representing an organization or community, organize the following members in different types: the node, the administrator and the user can be added into different channels by one organization, and a plurality of organizations can form a service alliance; 3) private data mechanism: if a group of organizations on a channel need to keep data private to other organizations on the channel, a private data set can be selected to be created, after a private data mechanism is used, data interaction can only be carried out among a plurality of specific organizations, and other organizations can only see the hash value of the private data and cannot know specific data.
The method for accessing the relay alliance chain by the application chain is shown in fig. 3, each external blockchain system is mapped into an organization, one application chain uniquely corresponds to one organization, and if several application chains need to perform cross-chain interaction, the organizations corresponding to the application chains are added into the same channel (only the organizations with mutual interaction will be added into the same channel). However, if channels are allocated to the application chain in this way, as the number of application chains increases, a large number of channels are necessarily created, which are precious resources of the relay chain network, and it is necessary to pay a large amount of overhead to maintain them (maintaining intelligent contracts, policies, MSPs, etc. for each channel), and it is also impossible to fully utilize the resources of each channel. Aiming at the problem, the invention uses a private data mechanism to solve the problem, the private data set is equivalent to a sub-channel in the channel, and the private communication between organizations can be realized by establishing the private data set for a group of organizations which need to carry out cross-chain interaction, so that a large number of application chains can be accommodated in one channel, channel resources are fully utilized, and a large number of channels do not need to be established.
3.2 Cross-chain interoperation Process
The cross-chain interoperation flow is shown in fig. 4. Taking the example that the application chain A needs to perform cross-chain interaction with the application chain B, the specific process is as follows:
application chain joining cross-chain system:
1) and establishing a mapping relation and issuing a certificate. If a blockchain platform wants to be added into a cross-chain system, the blockchain platform needs to be qualified, for example, stable team updating and maintenance are performed, and the blockchain platform is accepted by the market. Each external blockchain system is mapped into the relay chain network to form an organization, and each organization issues a digital certificate (including an identity certificate and a TLS transmission encryption certificate) by an independent Certificate Authority (CA);
2) a channel or private data set is created. And creating a new channel or private data set for the application chain according to the service requirement. Creating a new channel, writing a channel configuration file, writing MSP certificate information, access control strategies, read-write authorities and other configuration information organized corresponding to the application chain into the channel configuration file, and creating the channel according to the configuration information. Creating a private data set, writing a private data set configuration file including organization information, endorsement policies of private data levels, member read-write rights and other contents, and introducing the private data set configuration file when a contract is deployed.
3) And adding the nodes into the channel and deploying the intelligent contract. After the channel is successfully created, the nodes under the organization can be added into the channel. After the nodes join the channel, intelligent contracts can be deployed to realize cross-link services.
After the channel, the private data and the intelligent contract are deployed, the users under the application chain A and the application chain B can perform cross-chain interaction:
1) a user on an application chain A firstly initiates a cross-chain transaction proposal through a cross-chain intelligent contract on the chain (a blockchain system which does not support the intelligent contract can realize corresponding functions by using a script or a program), and the proposal is sent to a corresponding cross-chain gateway;
2) after receiving the transaction proposal, the cross-link gateway analyzes the transaction proposal, verifies the source of the transaction proposal, checks the signature of the transaction proposal, constructs the transaction proposal into a CCIP message format after passing the verification, and sends the CCIP message format to the relay alliance link for preprocessing;
3) the relay alliance chain performs primary processing on cross-chain transaction, generates corresponding transaction instructions according to transaction contents and respectively sends the transaction instructions to the application chains A and B;
4) the application chain A, B verifies the validity of the transaction instruction, and executes corresponding operation according to the transaction instruction after confirming no error;
5) the cross-link gateway monitors whether the two links successfully execute the operation required by the transaction instruction, and once the operation is successfully linked, the cross-link gateway acquires the transaction original text of the operation and the transaction existence certification and returns the transaction original text and the transaction existence certification to the relay alliance link;
6) after all the sub-transactions of the cross-link transaction are successfully completed (if a certain link has a problem, the transaction is rolled back, even the transaction is cancelled), the relay alliance chain performs a final processing on the cross-link transaction, and after the processing is completed, a transaction receipt is generated and returned to the application chains A and B for verification and evidence storage.
3.3 Block run-out weight assignment
In the scheme, the relay alliance chain network adopts a raft consensus algorithm, the sequencing node masters the block generation and distribution power, and how to reasonably distribute the power is the key point for realizing alliance consensus. In the raft consensus, one leader node is responsible for processing all transactions, and when the leader node cannot send heartbeat information to the follower node in time due to reasons such as failure or delay, other follower nodes have the probability of becoming a new leader. The block-out weight allocation scheme is as follows: each organization (application chain) is used as a group for managing and controlling the sequencing nodes, a certain number of sequencing nodes are distributed according to the performance of each organization in a chain-crossing transaction, the better the performance is, the more the distributed sequencing nodes are, the higher the probability that the sequencing nodes under the organization become leader nodes is, the leader nodes are mastered, and the block-out right is mastered.
According to the scheme, an optional period is designed for distribution of the block right, when each new optional period starts, the network can redistribute the sequencing nodes, reselect the leader node, distribute the ownership of the sequencing nodes through certificates, and trigger a new round of election by temporarily taking down the leader node. During the tenure t, the organization i is allocated to the number of the sequencing nodes as follows:
Figure BDA0003319277210000121
wherein
Figure BDA0003319277210000122
NumallIs the total number of sequencing nodes in the network, NumrIs the number of sequencing nodes assigned to the policing organization, which does not participate in block right contention.
Figure BDA0003319277210000123
Is the credit degree of the organization i in the last tenure, measured by the success rate of cross-chain transaction, miAnd niThe number of successful transactions completed by organization i during the last tenure andthe total transaction amount, to ensure the liveness of the application chain, is defined to be n onlyiA certain number of organizations can participate in the election,
Figure BDA0003319277210000131
is the reputation of organization i in the last task period, so it is multiplied by
Figure BDA0003319277210000132
The purpose is to increase the cost of doing malicious activities and encourage the user to maintain good behavior for a long time. Considering the existence of decimal point, the final calculation result needs to be rounded down, after the node allocation is completed, several nodes (the number is not large) remain, and the remaining nodes are allocated to the best-performing organization in the last tenure as rewards so as to increase the election probability. And the maximum successive number of an organization and the punishment measures for low-reputation organizations are set, so that the fairness and the safety of the system are further improved. The competition of organizations (application chains) with high reputation to the block-out weight is beneficial to improving the safety of the cross-chain network, each organization can participate in the competition through the excellent performance of the organization, the fairness is embodied, and the block-out weight distribution scheme is beneficial to the formation of a benign economic ecological cycle of the whole cross-chain network in the long run.
4. Cross-chain interoperation implementation scheme
4.1 protocol used
4.1.1 asset mapping scheme based on distributed (k, n) threshold signatures
The asset mapping scheme consists of two phases of asset mapping and asset release. In the asset mapping stage, a mapping address is calculated through a threshold algorithm, and then assets are transferred to the address to be locked; and in the asset release stage, a threshold signature is calculated through a threshold algorithm, and then the assets in the mapping address are unlocked. For reasons of space, the detailed algorithm flow is not described in detail, and reference is made to ECC-Based Threshold Digital Signal Scheme with out a Trusted Party.
4.1.2 Cross-chain transaction State Table
To ensure atomicity and consistency of cross-chaining transactions, a relay federation chain initializes a transaction state table at the initiation of each cross-chaining transaction, as shown in Table 1. The TXid field in the CCIP message protocol is the cross-chain transaction ID in the table, followed by an incrementing number as the child transaction ID. A cross-chain transaction is usually composed of a plurality of sub-transactions, the cross-chain transaction is considered to be completed only when all the sub-transactions are completed successfully, and if any step in the middle fails, corresponding operation of rolling back or canceling the transaction is taken. The invention takes each operation completed by the application chain in a complete cross-chain transaction as a sub-transaction, and after the application chain completes the corresponding operation, the application chain sends the related information to the relay alliance chain in a CCIP format for verification, so in the specific implementation, each CCIP message sent by the application chain is used as the sub-transaction for verification.
Table 1 cross-chain transaction state table
Figure BDA0003319277210000133
4.2 Cross-chain service implementation
The present invention summarizes the diverse form of cross-chain interoperation into four basic types: asset exchange, asset transfer, information payment and information interaction, and four basic types of cross-chain interaction implementation processes are designed in detail.
4.2.1 asset exchange type implementation flow
For asset exchange type cross-chain transactions, such as chain A user Alice wanting to exchange 10acoin for 20 bcin of chain B user Bob (chain B token), both have accounts on both chains, the transaction process is as follows:
1) and (3) sending a transaction proposal to the cross-chain gateway by Alice, analyzing the transaction content after the cross-chain gateway receives the transaction proposal, checking the signature, if the proposal is valid, constructing the transaction proposal into a CCIP message format according to protocol rules, sending the CCIP message format to a designated endorsement node in a channel, and executing an asset exchange intelligent contract:
Figure BDA0003319277210000141
2) and each endorsement node calls an asset mapping interface respectively, and aggregates calculation results to generate two asset mapping addresses:
addresschainA=GenerateAddresschainA(GPK)
addresschainB=GenerateAddresschainB(GPK)
3) and respectively transferring the digital assets of Alice and Bob into the mapping account addresses on the respective chains to be locked, and transferring the assets in the mapping account to the account addresses of the other party only if the correct threshold signature is obtained. Meanwhile, a time lock is set, if the fund in the account is not taken away in the time period t, the fund is returned to the original account, and it is noted that the time lock needs to be larger than the time lock, and the time lock is set to improve the transaction speed and prevent the transaction from being delayed indefinitely, and to prevent Alice from taking the asset of Bob and obtaining the returned asset.
Figure BDA0003319277210000142
Figure BDA0003319277210000143
4) After monitoring that the locked transaction of the two chains is successfully linked, the cross-link gateway submits the transaction original text and the transaction existence certification of the two transactions to the relay alliance chain;
5) after the relay alliance chain verifies the two locking transactions, corresponding digital assets are created to contract account addresses of Alice and Bob (the user can store the assets and data in an account in the relay alliance chain);
6) initiating an asset exchange request to Bob by Alice through a contract, calling an asset release interface by each endorsement node, constructing a complete threshold signature, and sending the complete threshold signature to Alice;
7) after Alice acquires the threshold signature, the assets in the chain B mapping account are extracted within a time period, while leaving a trace of the threshold signature, and Bob can then acquire the assets in the chain A mapping account within a time period. And after the transaction of the extracted assets of the mapping account is confirmed, destroying the corresponding assets in the relay alliance chain contract account.
4.2.2 asset transfer type implementation flow
For a cross-chain transaction of the asset transfer type, for example, chain A user Alice wants to send 10acoin to chain B user Bob, assuming an acoin to bcin exchange rate of 1: 20, the transaction process is as follows:
1) similar to asset exchange, Alice sends a transaction proposal to the inter-chain gateway, and each endorsement node calls an asset mapping interface respectively to generate an asset mapping address:
addresschainA=GenerateAddresschainA(GPK)2) Alice initiates a transaction to lock own digital assets into a mapping account address, after monitoring that the transaction is successfully locked, a cross-link gateway submits a transaction original text and a transaction existence certification to a relay alliance link for verification, and after the verification is passed, corresponding digital assets are created to a contract account of Alice;
3) alice initiates an asset transfer transaction to Bob on the contract, and transfers 10acoin '(mapped to assets in the Relay alliance chain) in the own contract account to 200 bcoin' at the exchange rate to the contract account of Bob.
4) After the asset transfer transaction is confirmed by the uplink, the relay alliance chain constructs a transaction proposal, wherein the transaction proposal comprises information such as a transaction original text of the asset transfer transaction, a transaction existence certification and the like, the information is sent to the chain B through the cross-chain gateway, and after the chain B receives the information and verifies the information, 200bcoin is issued (or unfrozen) to an account of Bob.
5) After the 200bcoin transaction received by Bob is confirmed by the chain B, the cross-chain gateway monitors the transaction, returns the original text of the transaction and the transaction existence certification to the relay alliance chain for verification, and destroys the 200 bcoin' in the contract account of Bob after the verification is passed.
The transferred asset can be returned as it is (of course, Bob can use 200 bcoin' as well for his purpose), and the transaction process is as follows:
1) the first five steps are the same as the asset transfer procedure described above, except that Alice is changed to Bob.
2) After Bob converts 200bcoin 'into 10 acoin' and transfers the 10acoin 'to Alice's trade uplink, each endorsement node calls an asset release interface to reconstruct a complete threshold signature and send the threshold signature to Alice, and the asset release interface corresponds to a generated asset mapping interface, and the constructed threshold signature can only unlock assets but cannot unlock the assets;
3) and after the Alice receives the threshold signature, the assets in the transaction can be acquired, after the transaction is confirmed by the chain A, the cross-chain gateway monitors the transaction, returns the original text of the transaction and the verification of the existence of the transaction to the relay alliance chain, and destroys 10acoin the Alice contract account after the verification is passed.
4.2.3 information payment type implementation flow
For a cross-chain transaction of the information payment type, such as a chain A user Alice wanting to purchase an information resource sold by a chain B user Bob, the transaction process is as follows:
1) the same as the first two steps of the asset transfer, and Bob transmits the information resource to the contract account after encrypting the information resource by the public key of Alice;
2) initiating an information payment transaction by Alice, transferring the digital assets in a contract account into a contract account address of Bob, and simultaneously sending information resources in the account of Bob to the account of Alice, wherein the operation is an atomic operation, and the transaction is confirmed to be valid only if the transfer operation and the information sending operation are all successful;
3) after the information payment transaction is successfully linked, Alice can locally pull information resources and decrypt the information resources by using a private key, and Bob can also obtain corresponding assets in an account of the chain B;
4.2.4 information interaction type implementation flow
For cross-chain transactions of the information interaction type, for example, a chain a user Alice wants to write some data into a chain B and read the result after this event occurs, the interaction process is as follows:
1) alice initiates a transaction proposal, which contains a transaction request for a target chain, and submits the transaction request to a relay alliance chain network after the transaction request is converted by a cross-chain gateway;
2) after the relay alliance chain receives and verifies the data, a transaction instruction is constructed and sent to the chain B, a transaction state table is established for recording and tracking the state of the transaction, and the transaction is marked to be completed when the data is successfully written into the chain B and the result after the event is obtained;
3) and after the transaction is completed, returning the result to Alice.
5. Experiments and analyses
The multi-group experiment is carried out in the chapter, the performance of the cross-chain intelligent contract and the block right distribution scheme are evaluated, and then the safety of the cross-chain system is comprehensively analyzed.
The server configuration and fabric network configuration used in the experimental environment are shown in table 2.
TABLE 2 Server configuration and Fabric network configuration
Figure BDA0003319277210000161
5.1 Cross-chain Intelligent contract Performance assessment
Seven servers are used in the test, wherein three servers are used for building a relay alliance chain, two servers are used as a cross-chain gateway, and the other two servers are used for building two application chains, namely a Taifang test network and a fabric alliance chain network, so as to simulate a real cross-chain scene. The relay alliance chain comprises three organizations, wherein one server is provided with one organization, 5 nodes are organized in a sequence mode, and 4 nodes are organized in an Ethengfang organization and a fabric organization. The performance of the four cross-link contracts is tested, the transaction confirmation time of the application chain is not considered in the experiment, and the transaction is directly sent to the relay alliance chain through the SDK plug-in the cross-link gateway. The experimental settings were: each set of tests sends a one minute duration transaction to the network at a specific transaction sending rate, with the number of clients set to 10, i.e. 10 clients send transactions simultaneously.
The parts (a), (b), (c) and (d) of fig. 5 show the throughput and average delay time of four basic types of intelligent contracts for cross-link services, and as can be seen from the figure, the performance of the four contracts is almost the same, the write operation throughput increases with the increase of the transaction sending rate, reaches the highest value at the sending rate of 1000, approaches 1000TPS, and then slightly decreases. The average delay time initially decreases with the increase of the sending rate, and after the sending rate exceeds 800, the delay rapidly increases, because the transaction sending rate is higher than a certain degree, the transaction is overstocked, and the higher the sending rate is, the more the overstocked is, which results in the delay increase of the transaction processing. The read operation throughput is basically equal to the transmission rate, the highest throughput is kept at about 3000TPS, and the average delay is always kept at 0.1 second. It can be seen that the performance of the four basic types of cross-chain intelligent contracts can meet the requirements of most of the current cross-chain business scenarios
The threshold algorithm is specially tested, random numbers need to be calculated in the calculation process, and the random numbers can make read-write sets generated by each endorsement node in execution inconsistent, so that transaction verification fails, and therefore steps related to the random numbers in the threshold process need to be sent to each endorsement node to be executed independently. For the convenience of testing, a threshold algorithm contract is deployed on only one Peer node. Section (e) of fig. 5 evaluates the performance of the threshold signature algorithm, since a large number of cryptographic operations are involved, the overall performance is lower than that of the four traffic contract templates, only 758TPS at the highest, and the average delay time is also higher. Part (f) of fig. 5 shows the average CPU utilization of the contract container of the threshold algorithm, the utilization initially increases with the transaction sending rate, the CPU utilization reaches the highest value at the transaction sending rate of about 400, and then starts to decline slightly. Every 100% represents a CPU core, and because cryptographic operations are CPU-intensive operations, the CPU utilization is much higher than a business contract, but because of the existence of a relay alliance chain network transaction processing bottleneck, the CPU utilization does not always increase but slightly decreases as the transaction sending rate increases.
5.2 Block out distribution weight scheme test
The core of the scheme for distributing the block right is that the block right is competed by more sequencing nodes, 50 sequencing nodes are started in the test, the sequencing nodes are distributed to the organization A, B, C according to the proportion of 1:3:6, 2:4:4 and 3:5:2 respectively, each proportion is a group of experiments, 3 groups of experiments are performed in total, each group of experiments is performed with 50 elections, the experiment results are shown in table 3, the experiment data shows that the scheme for distributing the block right is really feasible, and the probability of competing the block right is higher when the number of the sequencing nodes is larger.
Table 3 experimental results of block allocation weight scheme
Figure BDA0003319277210000171
5.3 safety analysis
The security and privacy of the data. The method comprises the steps of firstly, isolating data among different channels, being independent of each other, then ensuring that own exclusive private channels exist among different cooperative groups through private data in the channels, and furthermore, realizing finer-grained authority control through endorsement strategies of three different levels, namely contract level, private data level, key level and the like and access control based on certificate attributes in an intelligent contract. Through the three levels, the authority policy can be flexibly set according to the service requirement, and the privacy security of the data can be effectively ensured.
The security of the block right competition scheme. In order to achieve the purpose of union co-treatment, a block right competition scheme is designed, and the probability of competing to a block right is higher as the organization performs better. Although raft is a CFT fault tolerance algorithm and cannot prevent malicious nodes, if a certain organization mastering a leader node maliciously tampers with block data, a peer node can verify the block failure, so that a network can quickly detect the malicious leader node, stop the operation of the malicious leader node, log off a certificate of the malicious leader node and apply punishment to the organization. The risk of malicious organizations exploiting the blocking authority for malignancy can be eliminated.
Security in the execution of the threshold algorithm. Because the threshold algorithm involves a random value, a plurality of endorsement nodes cannot execute the threshold algorithm at the same time, otherwise the verification of the proposal execution result is failed, so the step involving calculating the random value needs to be separately sent to each endorsement node for execution. The invention realizes the point through a private data mechanism, each endorsement node independently executes specific steps, important data such as random numbers, key shares and the like are stored in a private database instead of a public ledger, and only specific identities are set to be accessible to the data, so that the data is ensured not to be leaked. Shared data such as elliptic curve public parameters, public key shares and the like are stored in a public ledger, and legal identities can be accessed. The complete threshold process is divided into different steps through a private data mechanism, so that the relay alliance chain can be compatible with a distributed threshold signature algorithm, and the privacy safety of important data is ensured.
Security of a cross-chain network. The safety of the whole cross-link network consists of three parts, namely an application chain, a relay alliance chain and an intermediate transmission channel, wherein the application chain and the relay alliance chain are ensured by the safety mechanisms of the application chain and the relay alliance chain, and the safety is mainly in the intermediate transmission process between the application chain and the relay alliance chain. Firstly, the relay alliance chain issues a certificate to the cross-chain gateway, wherein the certificate comprises a certificate for verifying identity and a TLS transmission encryption certificate, and the gateway can be connected to the relay alliance chain through a legal certificate, so that the communication safety between the relay alliance chain and the cross-chain gateway is ensured. Secondly, there are three types of interactions of the application chain with the gateway: the application chain sends a transaction proposal to the gateway, and the gateway sends instructions from the relay alliance chain to the application chain and the gateway monitors specific events of the application chain. Firstly, because the application chain user sends the proposal with a public key and a digital signature and the cross-chain transaction is an atomic multi-step process, even if the malicious user replaces the original public key and digital signature, the cross-chain transaction cannot be normally completed; secondly, the application chain can verify the events occurring in the relay alliance chain by itself; thirdly, the gateway monitors that the application chain event is submitted to the relay alliance chain for verification, and corresponding rollback or cancellation operation is adopted once the verification is wrong. In summary, the communication security between the relay alliance chain and the application chain can be guaranteed.
ACID characteristics and security of cross-chain transactions. The invention tracks the progress of one cross-chain transaction through the cross-chain transaction state table, the transaction can be successfully linked on the relay alliance chain and the application chain only when all the sub-transactions of the cross-chain transaction are completed, if a certain sub-transaction has a problem, corresponding rollback or transaction cancellation operation can be adopted, and thus the consistency and the atomicity are ensured. Each cross-chain transaction and the sub-transactions thereof are bound in a cross-chain transaction state table and are managed by the state table independently, and different transactions do not interfere with each other, so that the isolation is ensured. With respect to persistence, blockchain data is inherently persistent. The source chain assets are mapped into the relay alliance chain through a distributed threshold signature algorithm, and a mapping account can be operated only by the common endorsement of a plurality of nodes of organizations participating in the service, so that the safety of cross-chain assets is guaranteed.
6. Conclusion
The invention provides a block chain cross-chain interoperation system based on federation autonomy, which is characterized in that a relay federation chain which is controlled by multiple parties is constructed to operate the whole cross-chain network in a chain control mode. The rules and the modes of the application chains participating in cross-chain interaction are formulated by applying technologies and schemes such as a PKI certificate system, an MSP (mixed-public-data-processor) permission strategy, a channel mechanism, a private data mechanism, an endorsement mechanism, a channel allocation strategy, a block-out right allocation scheme and the like, and a safe and reliable technical platform is provided for the interoperation between the application chains. Four basic types of cross-chain interaction are designed and realized, and the requirements of most of current cross-chain scenes can be met. The distributed threshold signature technology and the cross-chain transaction state table are used for ensuring the security privacy and the ACID characteristic of the cross-chain transaction. And experiments and analysis prove that the cross-chain system provided by the invention has good performance and safety. The scheme supports multi-party cross-chain interaction, but needs to be realized on the basis of cross-chain of two parties, and the efficiency needs to be improved, so that a safe and efficient multi-party cross-chain mode is further researched on the basis of the scheme in the future.
In the description of the present invention, "a plurality" means two or more unless otherwise specified; the terms "upper", "lower", "left", "right", "inner", "outer", "front", "rear", "head", "tail", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are only for convenience in describing and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, should not be construed as limiting the invention. Furthermore, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When used in whole or in part, can be implemented in a computer program product that includes one or more computer instructions. When loaded or executed on a computer, cause the flow or functions according to embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL), or wireless (e.g., infrared, wireless, microwave, etc.)). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A cross-chain interoperation method is characterized by comprising the following steps:
step one, providing interactive service for a same heterogeneous block chain based on a relay mode cross-chain system;
designing a relay alliance chain, and setting rules of an application chain and a user thereof participating in a cross-chain system;
step three, generalizing the basic type of cross-chain interaction and formulating an implementation method of cross-chain transactions;
and step four, verifying the performance of the cross-chain system through a plurality of groups of experiments and analyzing the safety of the cross-chain network.
2. The cross-chain interoperation method according to claim 1, wherein in the second step, the design of the relay alliance chain comprises:
(1) the relay alliance chain manages the application chain and the identity and authority control of the user of the application chain and manages cross-chain transactions;
(2) the design of the relay alliance chain further comprises the step of performing cross-chain interaction based on multi-channel service.
3. The cross-chain interoperation method according to claim 1, further comprising:
(1) adding an application chain into a chain crossing system;
(2) after the channel, the private data and the intelligent contract are deployed, the users under the application chain A and the application chain B carry out cross-chain interaction;
(3) and (3) block output weight distribution: the relay alliance chain network adopts a raft consensus algorithm, the sequencing node masters the block generation and distribution power, and how to reasonably distribute the power is the key point for realizing alliance consensus; in the raft consensus, one leader node is responsible for processing all transactions, and when the leader node cannot send heartbeat information to the follower node in time due to reasons such as faults or delay, other follower nodes have the probability of becoming a new leader; the block-out weight allocation scheme is as follows: each organization, namely an application chain is used as a group for controlling sequencing nodes, a certain number of sequencing nodes are distributed according to the performance of each organization in a chain-crossing transaction, the better the performance is, the more the distributed sequencing nodes are, the higher the probability that the sequencing nodes under the organization become leader nodes is, and the leader nodes are mastered, which is equal to mastering the block right;
designing an appointment system for the distribution of the block right, wherein when each new appointment period starts, the network redistributes the sequencing nodes and reselects the leader node, distributes the ownership of the sequencing nodes through certificates, and triggers a new round of election by temporarily taking down the leader node; during the tenure t, the organization i is allocated to the number of the sequencing nodes as follows:
Figure FDA0003319277200000021
wherein,
Figure FDA0003319277200000022
wherein, NumallIs the total number of sequencing nodes in the network, NumrThe number of sequencing nodes allocated to the supervision organization is the number of sequencing nodes, and the supervision organization does not participate in block right competition;
Figure FDA0003319277200000023
is the credit degree of the organization i in the last tenure, measured by the success rate of cross-chain transaction, miAnd niRespectively, the number of successful transactions and the total number of transactions completed by the organization i in the last tenure; provision of only niA certain number of organizations can participate in the election,
Figure FDA0003319277200000024
is the reputation of organization i in the last tenure; considering the existence of decimal points, the final calculation result needs to be rounded down, after the node allocation is completed, a plurality of nodes remain, and the remaining nodes are allocated to the organization which has the best performance in the last tenure as rewards; and setting an organizationA maximum number of successive appointments, and a penalty measure for low reputation organizations.
4. The method of claim 3, wherein the step (1) of applying a chain join to a chain-crossing system comprises:
1) establishing a mapping relation and issuing a certificate; if a certain block chain platform wants to be added into a cross-chain system, qualification examination is needed; each external blockchain system is mapped into the relay chain network to form an organization, and each organization issues a digital certificate by an independent Certificate Authority (CA), wherein the digital certificate comprises an identity certificate and a Transport Layer Security (TLS) transmission encryption certificate;
2) creating a channel or private data set; creating a new channel or private data set for the application chain according to the service requirement; creating a new channel, wherein channel configuration files need to be compiled, MSP certificate information, access control strategies, read-write authorities and other configuration information organized corresponding to an application chain are written into the channel configuration files, and the channel is created according to the configuration information; creating a private data set, wherein a private data set configuration file is required to be written, the private data set configuration file comprises organization information, an endorsement policy of a private data level, member read-write authority content, and then the private data set configuration file is introduced when a contract is deployed;
3) adding a node into a channel and deploying an intelligent contract; after the channel is successfully established, nodes under the organization can be added into the channel; after the nodes join the channel, intelligent contracts can be deployed to realize cross-link services;
the step (2) of performing cross-chain interaction by the users under the application chain A and the application chain B comprises the following steps:
1) the user on the application chain A firstly uses a cross-chain intelligent contract on the chain, a block chain system which does not support the intelligent contract can realize corresponding functions by using a script or a program, a cross-chain transaction proposal is initiated, and the proposal is sent to a corresponding cross-chain gateway;
2) after receiving the transaction proposal, the cross-link gateway analyzes the transaction proposal, verifies the source of the transaction proposal, checks the signature, constructs the transaction proposal into a CCIP message format after passing the verification, and sends the CCIP message format to the relay alliance link for preprocessing;
3) the relay alliance chain performs primary processing on cross-chain transaction, generates corresponding transaction instructions according to transaction contents and respectively sends the transaction instructions to the application chains A and B;
4) the application chain A, B verifies the validity of the transaction instruction, and executes corresponding operation according to the transaction instruction after confirming no error;
5) the cross-link gateway monitors whether the two links successfully execute the operation required by the transaction instruction, and once the operation is successfully linked, the cross-link gateway acquires the transaction original text of the operation and the transaction existence certification and returns the transaction original text and the transaction existence certification to the relay alliance link;
6) and after all the sub-transactions of the cross-link transaction are successfully completed, if a certain link has a problem, the transaction will be rolled back, even the transaction is cancelled, the relay alliance chain will perform a final processing on the cross-link transaction, and after the processing is completed, a transaction receipt is generated and returned to the application chains A and B for verification and evidence storage.
5. The cross-chain interoperation method according to claim 1, further comprising:
(1) asset mapping scheme based on distributed (k, n) threshold signatures
The asset mapping scheme consists of two stages of asset mapping and asset release; in the asset mapping stage, after a mapping address is calculated through a threshold algorithm, assets are transferred to the address to be locked; in the asset release stage, assets in the mapping address are unlocked after threshold signatures are calculated through a threshold algorithm;
(2) cross-chain transaction state table
When each cross-link transaction is initiated, a relay alliance chain initializes a transaction state table; the TXId field in the CCIP message protocol is a cross-chain transaction ID in the table, and an incremental number is added behind the cross-chain transaction ID to serve as a sub-transaction ID; a cross-chain transaction usually consists of a plurality of sub-transactions, the cross-chain transaction is considered to be completed only when all the sub-transactions are successfully completed, and if any step in the middle makes a fault, corresponding operation of rolling back or canceling the transaction is adopted; each operation completed by the application chain in a complete cross-chain transaction is used as a sub-transaction, and after the application chain completes the corresponding operation, the relevant information is sent to the relay alliance chain in a CCIP format for verification, so that each CCIP message sent by the application chain is used as the sub-transaction for verification.
6. The cross-chain interoperation method according to claim 1, further comprising:
(1) asset exchange type implementation flow
For an asset exchange type cross-chain transaction, such as chain A user Alice wanting to exchange 10acoin, a chain A token, for 20 bcin, a chain B token, of chain B user Bob, both have accounts on both chains, the transaction process is as follows:
1) and (3) sending a transaction proposal to the cross-chain gateway by Alice, analyzing the transaction content after the cross-chain gateway receives the transaction proposal, checking the signature, if the proposal is valid, constructing the transaction proposal into a CCIP message format according to protocol rules, sending the CCIP message format to a designated endorsement node in a channel, and executing an asset exchange intelligent contract:
Figure FDA0003319277200000041
2) and each endorsement node calls an asset mapping interface respectively, and aggregates calculation results to generate two asset mapping addresses:
addresschainA=GenerateAddresschainA(GPK);
addresschainB=GenerateAddresschainB(GPK);
3) alice and Bob transfer own digital assets into mapping account addresses on respective chains to be locked, and only if correct threshold signatures are obtained, the assets in the mapping accounts can be transferred into the account addresses of the opposite sides; setting a time lock, and returning to the original account if the fund in the account is not taken within the time period t, wherein the time lock needs to be larger than the time lock;
Figure FDA0003319277200000042
Figure FDA0003319277200000051
4) after monitoring that the locked transaction of the two chains is successfully linked, the cross-link gateway submits the transaction original text and the transaction existence certification of the two transactions to the relay alliance chain;
5) after the relay alliance chain verifies the two locking transactions, corresponding digital assets are created to contract account addresses of Alice and Bob, and the assets and data can be stored in an account of a user in the relay alliance chain;
6) initiating an asset exchange request to Bob by Alice through a contract, calling an asset release interface by each endorsement node, constructing a complete threshold signature, and sending the complete threshold signature to Alice;
7) after obtaining the threshold signature, Alice extracts the assets in the chain B mapping account in a time period, and leaves the trace of the threshold signature at the same time, and Bob then obtains the assets in the chain A mapping account in the time period; after the transaction of the extracted assets of the mapping account is confirmed, destroying the corresponding assets in the relay alliance chain contract account;
(2) asset transfer type implementation flow
For a cross-chain transaction of the asset transfer type, for example, chain A user Alice wants to send 10acoin to chain B user Bob, assuming an acoin to bcin exchange rate of 1: 20, the transaction process is as follows:
1) similar to asset exchange, Alice sends a transaction proposal to the inter-chain gateway, and each endorsement node calls an asset mapping interface respectively to generate an asset mapping address:
addresschainA=GenerateAddresschainA(GPK);
2) initiating a transaction by Alice to lock own digital assets into a mapping account address, submitting a transaction original text and a transaction existence certification to a relay alliance chain for verification after a cross-chain gateway monitors that the transaction is successfully locked, and creating corresponding digital assets into a contract account of Alice after the verification is passed;
3) initiating an asset transfer transaction to Bob by Alice on a contract, and transferring 10acoin 'in the contract account of Alice, namely converting the assets mapped into the relay alliance chain into 200 bcoin' according to the exchange rate to transfer the assets into the contract account of Bob;
4) after the asset transfer transaction is confirmed by the uplink, the relay alliance chain constructs a transaction proposal, wherein the transaction proposal comprises a transaction original text and transaction existence certification information of the asset transfer transaction, the transaction original text and the transaction existence certification information are sent to a chain B through a cross-chain gateway, and after the chain B receives the transaction original text and verifies the transaction existence certification information, 200bcoin is issued or unfrozen to an account of Bob;
5) after the Bob receives the confirmation of the 200bcoin transaction through the chain B, the cross-chain gateway monitors the transaction, returns the original text of the transaction and the verification of the existence of the transaction to the relay alliance chain for verification, and destroys the 200 bcoin' in the contract account of the Bob after the verification is passed;
the transferred asset can be returned as it is, Bob can also use 200 bcoin' as his way, and the transaction process is as follows:
1) the first five steps are the same as the asset transfer process, but Alice is changed into Bob;
2) after Bob converts 200bcoin 'into 10 acoin' and transfers the 10acoin 'to Alice's trade uplink, each endorsement node calls an asset release interface to reconstruct a complete threshold signature and send the threshold signature to Alice, and the asset release interface corresponds to a generated asset mapping interface, and the constructed threshold signature can only unlock assets but cannot unlock the assets;
3) after the Alice receives the threshold signature, the assets in the transaction can be acquired, after the transaction is confirmed by the chain A, the cross-chain gateway monitors the transaction, returns the original text of the transaction and the verification of the existence of the transaction to the relay alliance chain, and destroys 10acoin the Alice contract account after the verification is passed;
(3) information payment type implementation process
For a cross-chain transaction of the information payment type, such as a chain A user Alice wanting to purchase an information resource sold by a chain B user Bob, the transaction process is as follows:
1) the same as the first two steps of the asset transfer, and Bob transmits the information resource to the contract account after encrypting the information resource by the public key of Alice;
2) initiating an information payment transaction by Alice, transferring the digital assets in a contract account into a contract account address of Bob, and simultaneously sending information resources in the account of Bob to the account of Alice, wherein the operation is an atomic operation, and the transaction is confirmed to be valid only if the transfer operation and the information sending operation are all successful;
3) after the information payment transaction is successfully linked, Alice can locally pull information resources and decrypt the information resources by using a private key, and Bob can also obtain corresponding assets in an account of the chain B;
(4) information interaction type implementation process
For cross-chain transactions of the information interaction type, for example, a chain a user Alice wants to write some data into a chain B and read the result after this event occurs, the interaction process is as follows:
1) alice initiates a transaction proposal, which comprises a transaction request to a target chain, and submits the transaction request to a relay alliance chain network after the transaction request is converted by a cross-chain gateway;
2) after the relay alliance chain receives and verifies the data, a transaction instruction is constructed and sent to the chain B, a transaction state table is established for recording and tracking the state of the transaction, and the transaction is marked to be completed when the data is successfully written into the chain B and the result after the event is obtained;
3) and after the transaction is completed, returning the result to Alice.
7. A cross-chain interoperation system is characterized in that the cross-chain interoperation system comprises a relay alliance chain, a cross-chain gateway, a CCIP protocol and an application chain;
the relay alliance chain is a central center of the whole cross-chain system and is used for being responsible for management of an application chain and a user thereof and management of cross-chain transactions;
the cross-link gateway is used as an intermediate routing node, is used for communicating the application link and the relay alliance link, and has a protocol conversion function;
the CCIP protocol is used for message transmission between a relay alliance chain and an application chain;
the application chain is used to participate in cross-chain interactions.
8. The cross-chain interoperation system of claim 7 wherein the relay federation chain is to orchestrate management of cross-chain transactions; the relay alliance chain adopts an alliance chain system to realize the relay alliance chain; the relay alliance chain is jointly managed by all cross-chain participants; each external block chain system is an organization mechanism and is mapped into a relay alliance chain; mapping users in the external blockchain system into the relay alliance chain in an account mode, and performing service interaction on the users of different blockchain platforms in the relay alliance chain under the condition of complying with a cross-chain rule; all cross-chain interoperation transactions are carried out in the relay alliance chain, and all cross-chain interactions occurring in the relay alliance chain are synchronously executed in the corresponding external blockchain system;
all cross-chain interoperation transactions follow a CCIP cross-chain interaction protocol; the Proof field of the CCIP cross-link interaction protocol is a certificate of cross-link transaction legality and is used for proving that a certain event really occurs on a source chain, and the content of the Proof field comprises a block sequence number, a Mercker root hash and a path hash and a signature of a transactor; when the transaction validity is verified, the contents of Payload fields are operated by using a corresponding hash algorithm to obtain a transaction hash value, the transaction hash value and the Mercker path hash are operated, and if the finally obtained hash value is consistent with the Mercker root hash, the fact that the transaction is actually generated on a source chain is indicated; a transaction proposal initiated by a source chain is firstly sent to a cross-chain gateway, the cross-chain gateway analyzes the transaction proposal, verifies the validity, and if the verification is passed, reconstructs the transaction proposal into a CCIP message format according to protocol rules and submits the CCIP message format to a relay alliance chain;
the cross-link gateway is a communication component for connecting the application chain and the relay alliance chain, and one or more cross-link gateways are specially responsible for communication of the two parties between the relay alliance chain and each application chain.
9. A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the cross-chain interoperation method steps of any one of claims 1 to 6.
10. An information data processing terminal, characterized in that the information data processing terminal is used for implementing the cross-chain interoperation method according to any one of claims 1 to 6.
CN202111241209.3A 2021-10-25 2021-10-25 Cross-chain interoperation system, method, medium and data processing terminal Withdrawn CN113965329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111241209.3A CN113965329A (en) 2021-10-25 2021-10-25 Cross-chain interoperation system, method, medium and data processing terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111241209.3A CN113965329A (en) 2021-10-25 2021-10-25 Cross-chain interoperation system, method, medium and data processing terminal

Publications (1)

Publication Number Publication Date
CN113965329A true CN113965329A (en) 2022-01-21

Family

ID=79466784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111241209.3A Withdrawn CN113965329A (en) 2021-10-25 2021-10-25 Cross-chain interoperation system, method, medium and data processing terminal

Country Status (1)

Country Link
CN (1) CN113965329A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800463A (en) * 2020-05-29 2020-10-20 易联众信息技术股份有限公司 Inter-block chain cross-chain information interaction method, system, medium, equipment and application
CN114240439A (en) * 2022-02-28 2022-03-25 北京邮电大学 Cross-chain transaction rollback method and device based on threshold signature and double-hash chain mode
CN114244537A (en) * 2022-02-24 2022-03-25 环球数科集团有限公司 Information processing system based on cross-link communication and multi-link fusion
CN114357494A (en) * 2022-03-11 2022-04-15 浙江省金融综合服务平台管理有限公司 Account transaction information sharing method based on block chain
CN114499898A (en) * 2022-04-15 2022-05-13 北京邮电大学 Block chain cross-chain secure access method and device
CN114565326A (en) * 2022-04-29 2022-05-31 深圳市誉兴通科技股份有限公司 Medicine management method and system based on Internet of things
CN114579670A (en) * 2022-05-07 2022-06-03 武汉龙津科技有限公司 Data credit increasing method and system based on block chain and electronic equipment
CN114640683A (en) * 2022-02-28 2022-06-17 中国农业银行股份有限公司 Block chain data processing method and device, electronic equipment and storage medium
CN114841702A (en) * 2022-07-05 2022-08-02 国网数字科技控股有限公司 Side chain technology-based intelligent energy multi-microgrid system
CN115052001A (en) * 2022-06-09 2022-09-13 上海万向区块链股份公司 Extensibility solution, system and medium for federation chains
CN115174309A (en) * 2022-09-06 2022-10-11 深圳市明源云科技有限公司 Block chain communication method, communication device and computer readable storage medium
CN115208817A (en) * 2022-05-29 2022-10-18 北京理工大学 Credible cross-link routing method based on cross-link gateway and Floyd algorithm
CN115357932A (en) * 2022-08-18 2022-11-18 地心引力(武汉)科技有限公司 Cross-chain secure storage method and device based on block chain technology
CN115599794A (en) * 2022-09-29 2023-01-13 中国人民解放军战略支援部队信息工程大学(Cn) Cross-block-chain joint tracing method and system
CN115633032A (en) * 2022-10-08 2023-01-20 重庆邮电大学 Union chain and private chain one-way chain crossing method applied to supply chain weak connection
CN115914240A (en) * 2023-01-06 2023-04-04 江苏荣泽信息科技股份有限公司 Cross-chain transaction template management system based on DNS (Domain name System) analysis
CN115914244A (en) * 2022-09-23 2023-04-04 四川启睿克科技有限公司 Method for optimizing distributed account book interoperability
WO2023201927A1 (en) * 2022-04-23 2023-10-26 东南大学 Blockchain cross-chain regulation method for governance of chain by chain
CN116980189A (en) * 2023-07-19 2023-10-31 苏州大学 Malicious node detection method for sharded alliance chain
CN117614634A (en) * 2024-01-19 2024-02-27 成都信息工程大学 Alliance chain cross-chain identity authentication method and system based on traceable ring signature

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800463B (en) * 2020-05-29 2023-04-07 易联众信息技术股份有限公司 Inter-block chain cross-chain information interaction method, system, medium, equipment and application
CN111800463A (en) * 2020-05-29 2020-10-20 易联众信息技术股份有限公司 Inter-block chain cross-chain information interaction method, system, medium, equipment and application
CN114244537A (en) * 2022-02-24 2022-03-25 环球数科集团有限公司 Information processing system based on cross-link communication and multi-link fusion
CN114244537B (en) * 2022-02-24 2022-05-06 环球数科集团有限公司 Information processing system based on cross-link communication and multi-link fusion
CN114240439A (en) * 2022-02-28 2022-03-25 北京邮电大学 Cross-chain transaction rollback method and device based on threshold signature and double-hash chain mode
CN114240439B (en) * 2022-02-28 2022-05-13 北京邮电大学 Cross-chain transaction rollback method and device based on threshold signature and double-hash chain mode
CN114640683A (en) * 2022-02-28 2022-06-17 中国农业银行股份有限公司 Block chain data processing method and device, electronic equipment and storage medium
CN114357494A (en) * 2022-03-11 2022-04-15 浙江省金融综合服务平台管理有限公司 Account transaction information sharing method based on block chain
CN114499898A (en) * 2022-04-15 2022-05-13 北京邮电大学 Block chain cross-chain secure access method and device
WO2023201927A1 (en) * 2022-04-23 2023-10-26 东南大学 Blockchain cross-chain regulation method for governance of chain by chain
CN114565326B (en) * 2022-04-29 2022-08-30 深圳市誉兴通科技股份有限公司 Medicine management method and system based on Internet of things
CN114565326A (en) * 2022-04-29 2022-05-31 深圳市誉兴通科技股份有限公司 Medicine management method and system based on Internet of things
CN114579670B (en) * 2022-05-07 2022-08-16 武汉龙津科技有限公司 Data trust increasing method and system based on block chain and electronic equipment
CN114579670A (en) * 2022-05-07 2022-06-03 武汉龙津科技有限公司 Data credit increasing method and system based on block chain and electronic equipment
CN115208817A (en) * 2022-05-29 2022-10-18 北京理工大学 Credible cross-link routing method based on cross-link gateway and Floyd algorithm
CN115208817B (en) * 2022-05-29 2023-10-10 北京理工大学 Trusted cross-link routing method based on cross-link gateway and Floyd algorithm
CN115052001A (en) * 2022-06-09 2022-09-13 上海万向区块链股份公司 Extensibility solution, system and medium for federation chains
CN115052001B (en) * 2022-06-09 2024-04-05 上海万向区块链股份公司 Extendibility solving method, system and medium for alliance chain
CN114841702B (en) * 2022-07-05 2022-09-13 国网数字科技控股有限公司 Side chain technology-based intelligent energy multi-microgrid system
CN114841702A (en) * 2022-07-05 2022-08-02 国网数字科技控股有限公司 Side chain technology-based intelligent energy multi-microgrid system
CN115357932B (en) * 2022-08-18 2023-11-28 山东浪潮智慧供应链科技有限公司 Cross-chain secure storage method and device based on blockchain technology
CN115357932A (en) * 2022-08-18 2022-11-18 地心引力(武汉)科技有限公司 Cross-chain secure storage method and device based on block chain technology
CN115174309B (en) * 2022-09-06 2022-12-27 深圳市明源云科技有限公司 Block chain communication method, communication device and computer readable storage medium
CN115174309A (en) * 2022-09-06 2022-10-11 深圳市明源云科技有限公司 Block chain communication method, communication device and computer readable storage medium
CN115914244B (en) * 2022-09-23 2024-05-17 四川启睿克科技有限公司 Method for optimizing interoperability of distributed account book
CN115914244A (en) * 2022-09-23 2023-04-04 四川启睿克科技有限公司 Method for optimizing distributed account book interoperability
CN115599794A (en) * 2022-09-29 2023-01-13 中国人民解放军战略支援部队信息工程大学(Cn) Cross-block-chain joint tracing method and system
CN115633032A (en) * 2022-10-08 2023-01-20 重庆邮电大学 Union chain and private chain one-way chain crossing method applied to supply chain weak connection
CN115914240A (en) * 2023-01-06 2023-04-04 江苏荣泽信息科技股份有限公司 Cross-chain transaction template management system based on DNS (Domain name System) analysis
CN116980189A (en) * 2023-07-19 2023-10-31 苏州大学 Malicious node detection method for sharded alliance chain
CN117614634A (en) * 2024-01-19 2024-02-27 成都信息工程大学 Alliance chain cross-chain identity authentication method and system based on traceable ring signature

Similar Documents

Publication Publication Date Title
CN113965329A (en) Cross-chain interoperation system, method, medium and data processing terminal
CN109871669B (en) Data sharing solution based on block chain technology
Ou et al. An overview on cross-chain: Mechanism, platforms, challenges and advances
Robinson et al. Atomic crosschain transactions for ethereum private sidechains
CN108564471B (en) Energy Internet safety intelligent transaction system based on block chain technology and method thereof
Xiong et al. A notary group-based cross-chain mechanism
CN109447795B (en) Byzantine consensus method supporting rapid achievement of final confirmation
CN112000976B (en) Authentication management method, device, medium and electronic equipment for block chain system
CN114978638B (en) Block chain cross-chain supervision method based on shared node
Sun et al. A decentralized cross-chain service protocol based on notary schemes and hash-locking
CN112311772A (en) Hyperridge-based cross-domain certificate management system and method
WO2022152008A1 (en) Cross-chain collaborative governance system and method, and device and storage medium
Mao et al. A survey on cross-chain technology: Challenges, development, and prospect
Lin et al. The challenges of existence, status, and value for improving blockchain
CN112581130A (en) Cross-chain transaction method based on multi-chain interconnection
Zhong et al. Research on cross-chain technology of blockchain: Challenges and prospects
Zhu et al. A study on the challenges and solutions of blockchain interoperability
Guo et al. Blockchain cross-chain technology research
CN112669037A (en) Block chain construction method based on copyright transaction, copyright transaction system and method
CN115665166A (en) Heterogeneous multi-chain multi-application based collaborative innovation data sharing platform system
CN113676494B (en) Centralized data processing method and device
Zhu Research on key technologies and applications of energy internet blockchain
CN113656829B (en) Medical data secure sharing method based on lattice password and alliance chain
CN115865705A (en) Multi-party federal learning system, method, equipment and medium based on supervision mechanism
CN115664760A (en) Data transmission system based on cross-chain architecture and identity privacy protection

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20220121

WW01 Invention patent application withdrawn after publication