CN115601168A - Cross-link asset transaction method, system and equipment based on relay link - Google Patents

Cross-link asset transaction method, system and equipment based on relay link Download PDF

Info

Publication number
CN115601168A
CN115601168A CN202211208434.1A CN202211208434A CN115601168A CN 115601168 A CN115601168 A CN 115601168A CN 202211208434 A CN202211208434 A CN 202211208434A CN 115601168 A CN115601168 A CN 115601168A
Authority
CN
China
Prior art keywords
transaction
chain
cross
verification
link
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
CN202211208434.1A
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.)
Hangzhou Yunxiang Network Technology Co Ltd
Original Assignee
Hangzhou Yunxiang Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Yunxiang Network Technology Co Ltd filed Critical Hangzhou Yunxiang Network Technology Co Ltd
Priority to CN202211208434.1A priority Critical patent/CN115601168A/en
Publication of CN115601168A publication Critical patent/CN115601168A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • 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
    • 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
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/72Signcrypting, i.e. digital signing and encrypting simultaneously

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a cross-link asset transaction method, a system and equipment based on a relay link, wherein the method comprises the steps of transaction chaining, receiving a transaction request of a cross-link gateway by a branch link, carrying out transaction verification on a transaction block by a branch link cross-link transaction contract after endorsement, packaging, sequencing and block discharge, writing a result of successful or failed verification into an account book file, and issuing a corresponding event; transaction verification, namely, the cross-link gateway receives the relay link transaction and performs credibility verification on the relay link transaction, and the relay link performs credibility verification on the cross-link transaction request after receiving the cross-link transaction request; asset transaction: and executing the intra-branch asset transaction flow or cross-branch asset transaction according to different conditions, and adopting a two-stage transaction management model in the asset transaction process. The invention defines the transaction uplink process, sets a transaction verification method to ensure the authenticity and the information accuracy of the transaction, ensures the correctness of the transaction by using two-stage transaction management, and comprehensively ensures the safety and the correctness of the cross-chain asset transaction.

Description

Cross-chain asset transaction method, system and equipment based on relay chain
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a cross-link asset transaction method, system and equipment based on a relay link.
Background
Most federation chains now do not provide much of a way to implement irreversible transactions or reduce the risk of centralization that can expose the entire network to risk due to network review and simple point-of-failure errors.
The mode of the alliance chain and the private chain is in a certain degree of violation of a de-center value and trust system of the blockchain, digital assets in the blockchain cannot be directly transferred among different blockchains, value islanding is caused actively or passively, and therefore various cross-chain technologies for connecting different blockchains are concerned and explored. For the blockchain, a cross-chain technology is a key for realizing a value network, and is a bridge for outward expansion and connection of the blockchain.
The existing common cross-chain technology comprises a notary mechanism, a side chain/relay chain, hash locking, distributed private key control and the like, wherein the notary mechanism is a simple cross-chain mechanism, when two transaction parties can not trust each other, a third party which can be trusted by both transaction parties is introduced to serve as a notary as an intermediary, the single-sign notary mechanism has the problem that the security of a central node can not be guaranteed, and the multi-sign notary mechanism requires a chain to support multiple signatures and has high requirements. The distributed signature notary mechanism, while more secure, also presents implementation-level complexity issues. Hash locking is a technology which can be used for asset exchange between block chain networks, and the Hash locking ensures the safety of the block chain assets, but has the problems of few supported functions, limited application scenes and the like. The distributed private key control is a multi-party calculation and threshold key sharing mechanism, although the distributed private key control mechanism can avoid centralized risk under a notary mechanism to a certain extent and can reduce cross-link access cost, the cross-link needs to be adaptively developed according to the characteristics of an original chain and the time for waiting for confirmation of the original chain is long, so that the problems of high development difficulty and low operation efficiency exist.
Cross-link data transmission and asset transaction are very important, and a technical means related to a relay link is urgently needed to realize the cross-link data transmission and the asset transaction and ensure the safety of the asset transaction.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, and a device for cross-chain asset transaction based on a relay chain, which provide a transaction uplink process, a transaction verification method, a multi-level relay chain architecture, and a cross-chain asset transaction process for solving the practical and security problems that may exist in heterogeneous blockchain asset transaction, and implement efficient, safe, trusted, and privacy-reliable multi-party data sharing and computing power sharing in a multi-chain scenario on the basis of meeting the requirement of the cross-chain asset transaction in the multi-chain scenario.
According to one aspect of the invention, a cross-chain asset transaction method based on a relay chain is provided, which comprises the following specific contents:
1) Transaction uplink: the branch chain receives a transaction request of the cross-chain gateway, format verification and content verification are carried out on transaction blocks through endorsement, packaging, sequencing and block discharge by the branch chain cross-chain transaction contract, a verification success or failure result is obtained, an account book file is written, and a corresponding event is issued;
2) Transaction verification: the cross-link gateway receives the relay link transaction, first credible verification is carried out on the relay link transaction, and second credible verification is carried out on the cross-link transaction request after the relay link receives the cross-link transaction request;
3) Asset transaction: the method comprises the steps that a service end initiates service calling to an application chain of a transaction sender, asset transfer related parameters are input, a cross-chain contract is set in the application chain of the transaction sender to correspond to a cross-chain event, the cross-chain gateway of the transaction sender monitors the cross-chain event and then sends a cross-chain request to a branch chain, if the branch chain judges that a receiver of the request belongs to an application chain managed by the branch chain, a resource transaction flow in the branch chain is executed, if the branch chain judges that the receiver of the request does not belong to the application chain managed by the branch chain, cross-chain asset transaction is executed, and a two-stage transaction management model is adopted in the asset transaction process.
The specific implementation method of the content 1) is as follows:
the branch chain receives a transaction request of the cross-chain gateway, format verification and content verification are carried out on transaction blocks through endorsement, packaging, sequencing and block discharge by the branch chain cross-chain transaction contract, a verification success or failure result is obtained, an account book file is written, and a corresponding event is issued;
the endorsement process comprises the following steps:
an endorsement strategy is set by the application chain node or the service end, wherein the endorsement strategy comprises the number of the endorsement nodes;
when a service terminal initiates a service call to a transaction sender application chain, the transaction sender application chain initiates a transaction proposal request, one or more endorsement nodes for receiving a transaction proposal are appointed, if the transaction proposal request is not appointed, the transaction proposal request is sent to all nodes managed by the relay chain, and the sender application chain waits for the return of the endorsement nodes after sending;
after receiving the transaction proposal request, the endorsement node carries out checking and signature verification, verifies that the endorsement node simulates an execution contract and generates a proposal result, adds the digital signature of the endorsement node in the proposal result and signs the result by using a private key to finish the endorsement of the proposal result;
and after receiving the endorsement node results with the number required by the endorsement strategy, the application chain of the sender indicates that the transaction is correct, the transaction proposal, the simulation result and the endorsement information are packaged and sent to the consensus sequencing node, and if the application chain of the sender does not collect the endorsement information fed back by the endorsement nodes with the number required by the endorsement strategy, the transaction is abandoned.
The specific implementation method of the content 2) is as follows:
wherein the performing of the first trusted verification of the relay chain transaction comprises the steps of:
the verifier sets an endorsement strategy, including the number of endorsement nodes;
verifying the presence of cross-chain transactions at the relay chain: the cross-link gateway monitors the relay link transaction, checks the basic parameters, the verifier sends a transaction verification query request to the endorsement node, the endorsement node returns a result after simulation execution, the verifier performs consistency result comparison after obtaining the endorsement result, and if the corresponding endorsement strategy is met, the existence of the transaction in the relay link is proved;
verifying the validity of the cross-chain transaction in the relay chain: calculating a hash value of a return result after the endorsement node is simulated and executed, comparing whether the hash value of the currently monitored transaction is equal to the calculated hash value or not, and if so, proving the validity of the transaction in a relay chain;
the verifier can be an application chain node or a business application system and judges the authenticity of the transaction.
Wherein the second trusted verification of the cross-chain transaction request comprises the following steps:
the relay link receives a cross-link transaction request forwarded by the cross-link gateway, and performs basic verification on the cross-link transaction request, including: verifying the transaction ID, verifying the validity of the signature, verifying whether the timestamp is reasonable and verifying non-repeated transactions;
after the relay chain carries out endorsement on the transaction request, the consensus module is responsible for recognizing the block in a consensus mode, and after the block is recognized, the verification engine plug-in verifies the validity and the existence of all transactions of the block in a batch mode;
the verification process of the verification engine plug-in is as follows:
the application chain is registered to the relay chain, the information of a verifier needs to be submitted, the information of the verifier mainly comprises certificate information and an endorsement strategy array, after a verification engine receives a transaction, the application chain and contract information of a transaction sender are analyzed, corresponding verification rules are obtained according to the application chain and the contract information, verification is carried out, and the verification comprises the steps that whether the certificate of an endorsement node is issued by a root certificate is verified by the root certificate, whether the signature of the verification node is correct, and whether the signature of the verification endorsement node meets the strategy is verified.
The specific implementation method of the content 3) is as follows:
wherein, the intra-branch asset transaction process comprises the following steps:
the service end initiates service calling to an application chain of a transaction sender and inputs asset transfer related parameters;
setting a corresponding cross-link event in a cross-link contract in an application chain of a transaction sender, and sending a cross-link request to a branch chain after the cross-link gateway of the transaction sender monitors the cross-link event;
the receiver of the branch chain judgment request belongs to an application chain managed by the receiver, and after corresponding parameter authority and transaction verification check are carried out, corresponding locked transaction is packaged and sent to a corresponding cross-chain gateway of a transaction sender and a cross-chain gateway of a transaction receiver;
after receiving the locked transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes locking operation and monitors a result event, and the transaction sender application chain puts a locking result in the event;
after receiving the locked transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes locking operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts a locking result in the event;
if the subcohain receives a successful response of the transaction sender cross-chain gateway and the transaction receiver cross-chain gateway within the specified time, packaging the corresponding unlocking transaction, and sending the corresponding unlocking transaction to the corresponding transaction sender cross-chain gateway and the corresponding transaction receiver cross-chain gateway;
after receiving the unlocking transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes unlocking operation and monitors result events, and the transaction sender application chain puts a locking result in the events;
after receiving the unlocking transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes unlocking operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts an unlocking result in the event;
if the branch link receives a failure response or overtime failure response of one party of the transaction sender cross-link gateway and the transaction receiver cross-link gateway within the specified time, packaging the corresponding rollback transaction, and sending the corresponding rollback transaction to the corresponding transaction sender cross-link gateway and the corresponding transaction receiver cross-link gateway;
after receiving the rollback transaction, the transaction sender sends a transaction verification query to the corresponding sub-chain through the cross-chain gateway, after the verification is successful, a rollback operation is executed to the transaction sender application chain and a result event is monitored, and the rollback result is placed in the event by the transaction sender application chain;
after receiving the rollback transaction, the transaction receiver sends a transaction verification query to the corresponding sub-chain through the cross-chain gateway, after the verification is successful, executes the rollback operation to the application chain B and monitors a result event, and the application chain B puts a rollback result in the event;
wherein, the cross-branch asset transaction process comprises the following steps:
a service end initiates service call to an application chain of a transaction sender and inputs asset transfer related parameters;
setting a corresponding cross-link event in a cross-link contract in an application chain of a transaction sender, and sending a cross-link request to a branch chain after the cross-link gateway of the transaction sender monitors the cross-link event;
the receiver of the branch chain judgment request does not belong to the application chain managed by the receiver, and sends the corresponding parameter authority and the transaction verification check to the root chain;
and after verifying the branch chain transaction, the root chain initiates routing addressing, finds the branch chain corresponding to the transaction receiver, encapsulates the corresponding locked transaction by the root chain, and sends the locked transaction to the transaction sender branch chain and the transaction receiver branch chain. After verifying the root chain transaction, the sender chain and the receiver chain are sent to the corresponding cross-chain gateway of the transaction sender and the cross-chain gateway of the transaction receiver;
after receiving the locked transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes locking operation and monitors a result event, and the transaction sender application chain puts a locking result in the event;
after receiving the locked transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, a locking operation is executed to the transaction receiver application chain and a result event is monitored, and the transaction receiver application chain puts the locking result in the event;
if the root chain receives a successful response of the transaction sender cross-chain gateway and the transaction receiver cross-chain gateway B within the specified time, packaging the corresponding unlocking transaction, firstly sending the unlocking transaction to the transaction sender sub-chain and the transaction receiver sub-chain, and after the root chain transaction is verified by the transaction sender sub-chain and the transaction receiver sub-chain, sending the unlocking transaction to the corresponding transaction sender cross-chain gateway and the corresponding transaction receiver cross-chain gateway;
after receiving the unlocking transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes unlocking operation and monitors result events, and the transaction sender application chain puts a locking result in the events;
after receiving the unlocking transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes unlocking operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts an unlocking result in the event;
if the root chain receives a failure response or overtime failure response of one party of the transaction sender cross-chain gateway and the transaction receiver cross-chain gateway within the specified time, packaging the corresponding rollback transaction, sending the rollback transaction to the transaction sender sub-chain and the transaction receiver sub-chain, and sending the rollback transaction to the corresponding transaction sender cross-chain gateway and the corresponding transaction receiver cross-chain gateway;
after receiving the rollback transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, and after the verification is successful, executes a rollback operation to the transaction sender application chain and monitors a result event, and the transaction sender application chain puts a rollback result in the event;
after receiving the rollback transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes a rollback operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts a rollback result in the event;
wherein, the two-phase transaction management model comprises the following steps:
the business end sends a cross-link transaction to the branch link or the root link, wherein the participant of the transaction is a business contract on the application link of the transaction sender and a business contract on the application link of the transaction receiver, and the business end is the application link of the transaction sender or the branch link corresponding to the application link of the transaction sender;
the branch chain or the root chain is used as a coordinator of the two-stage transaction, preparation calling is initiated to a transaction contract of the transaction sender, assets on the transaction contract of the transaction sender are pre-frozen according to service requirements, and after the preparation is completed, the service contract responds to a block chain gateway of the transaction sender to the result of successful or failed transaction processing;
the branch chain or the root chain initiates preparation calling to a transaction receiver service contract, the transaction receiver cross-chain gateway monitors a corresponding preparation request, then the transaction receiver cross-chain gateway executes corresponding calling, and the transaction receiver cross-chain gateway informs the branch chain or the root chain of a final preparation execution result;
the branch chain or the root chain waits for responses prepared by the participants of the two parties within a certain time, if the response results of all the participants are successful, the transaction is determined to be successful, if the response results of all the participants are overtime, the transaction is determined to be failed, all the participants are informed to rollback, and the state change on the application contract is cancelled, wherein if the response result of one participant is failed, the transaction is determined to be failed, all the participants are informed to rollback, and the state change on the application contract is cancelled;
the branch chain or the root chain waits for the response confirmed by the participants of both parties within a certain time, if the response result of only one participant is successful, the cross-chain transaction is determined to be failed, and errors are recorded;
if the response results of the participants of the two parties are both failure, the cross-chain transaction is determined to be failed, all the participants are informed to roll back, the state change on the application contract is cancelled, the cross-chain transaction is determined to be successful if the response results of all the participants are successful, and the cross-chain transaction is determined to be failed if one participant fails to roll back, and errors are recorded.
In accordance with another aspect of the present invention, there is provided a relay chain-based cross-chain asset transaction system, comprising:
the system adopts a multilayer relay chain architecture, which comprises a two-layer relay chain architecture and a single-layer application chain architecture, wherein the two-layer relay chain architecture comprises a root chain and a branch chain, only one root chain is arranged, the application chain and the branch chain are connected through a cross-chain gateway, so that the cross-chain interoperation of the application chain in the branch chain is realized, and the branch chain and the root chain are connected through a branch chain gateway, so that the cross-chain interoperation of the application chain among the branch chains is realized;
a transaction verification module: the system comprises a server and a server, wherein the server is used for performing credible verification on a relay chain transaction and a cross-chain transaction request when receiving the relay chain transaction and the cross-chain transaction request;
transaction uplink module: defining a transaction uplink process, including receiving a transaction request of a cross-link gateway by a branch link, endorsing, packaging, sequencing and blocking, calling a transaction verification module for a transaction block by a branch link cross-link transaction contract to obtain a result of successful verification or failure, writing an account book file, and issuing a corresponding event;
an asset transaction module: and specifying a cross-chain asset transaction process, which comprises an intra-chain asset transaction process and a cross-chain asset transaction process, wherein the intra-chain asset transaction process is executed when the sub-chain judges that a receiver of the cross-chain transaction request belongs to the self-managed application chain, and the cross-chain asset transaction process is executed when the sub-chain judges that the receiver of the cross-chain transaction request does not belong to the self-managed application chain.
According to another aspect of the present invention, there is provided a relay link-based cross-link asset transaction device, comprising a memory, a processor, at least one program code stored in the memory, the program code being loaded and executed by the processor to implement the method described above.
The invention has the beneficial effects that:
aiming at the problems of practicability and safety possibly existing in heterogeneous block chain asset transaction, the invention provides a transaction chain linking process, a transaction verification method, a multi-level relay chain architecture and a cross-chain asset transaction process, and realizes high-efficiency, safe and reliable multi-party data sharing and calculation power sharing under a multi-chain scene on the basis of meeting the requirement of asset cross-chain transaction under the multi-chain scene.
Drawings
The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention, wherein:
FIG. 1 illustrates a relay chain based cross-chain asset transaction method technical architecture;
FIG. 2 illustrates a relay chain based cross-chain asset transaction system;
FIG. 3 illustrates a flow of asset transactions within a branch chain;
FIG. 4 illustrates a cross-chaining asset transaction flow.
Detailed Description
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood, the technical solutions of the present invention can be implemented according to the content of the description, and in order to more clearly clarify the above and other objects, features, and advantages of the present invention, the present invention is further described in detail with reference to the accompanying drawings and the detailed description.
The cross-link asset transaction system based on the relay link is based on an application chain-branch chain-root chain three-layer relay link architecture, an asset transaction module calls a transaction uplink module, the transaction uplink module calls a transaction verification module, and cross-link asset transaction is realized through information transfer among the modules.
In one embodiment, the intra-branch asset transaction flow is described in detail in conjunction with fig. 3:
a service end system initiates a service request to an application chain A and inputs asset transfer related parameters;
a cross-link contract A sets a corresponding cross-link event, and after monitoring the cross-link event, a cross-link gateway sends a cross-link request to a branch link;
a receiver of the branch chain judgment request belongs to an application chain managed by the receiver, and after corresponding parameter authority and transaction verification check are carried out, corresponding locked (prefix) transaction is packaged and sent to a corresponding cross-chain gateway A and a corresponding cross-chain gateway B;
after receiving the locked transaction, the cross-link gateway A can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway A successfully verifies, the cross-link gateway A executes locking operation to the application link A and monitors a result event, and the application link A puts a locking result in the event;
after receiving the locked transaction, the cross-link gateway B can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway B successfully verifies, the cross-link gateway B executes locking operation to the application link B and monitors a result event, and the application link B puts a locking result in the event;
if the subcohain receives a successful response of the cross-chain gateway A and the cross-chain gateway B within the specified time, packaging a corresponding unlocking (commit) transaction, and sending the commit transaction to the corresponding cross-chain gateway A and the cross-chain gateway B;
after receiving the unlocking transaction, the cross-link gateway A can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway A successfully verifies, the cross-link gateway A executes unlocking operation to the application chain A and monitors a result event, and the application chain A puts a locking result in the event;
after receiving the unlocking transaction, the cross-link gateway B can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway B successfully verifies, the cross-link gateway B executes unlocking operation to the application link B and monitors a result event, and the application link B puts an unlocking result in the event;
if the subcohain receives a failure response or no response after overtime of one of the cross-chain gateway A and the cross-chain gateway B within the specified time, packaging a corresponding rollback (rollback) transaction, and sending the rollback transaction to the corresponding cross-chain gateway A and the corresponding cross-chain gateway B;
after receiving the rollback transaction, the cross-link gateway A can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway A successfully verifies, the cross-link gateway A executes a rollback operation to the application link A and monitors a result event, and the application link A puts a rollback result in the event;
after receiving the rollback transaction, the cross-link gateway B may send a transaction verification query to the corresponding child chain, and after the cross-link gateway B succeeds in verification, execute a rollback operation to the application link B and monitor a result event, and the application link B places a rollback result in the event.
Embodiment two, a cross-chaining asset transaction flow is detailed in conjunction with fig. 4:
a service end system initiates a service request to an application chain A and inputs asset transfer related parameters;
a cross-link contract A sets a corresponding cross-link event, and after monitoring the cross-link event, a cross-link gateway sends a cross-link request to a branch link;
the receiver of the branch chain judgment request does not belong to the application chain managed by the receiver, and sends the corresponding parameter authority and the transaction verification check to the root chain;
after verifying the split-link transaction by the root chain, initiating routing addressing, finding a split-link 2 corresponding to the receiver, encapsulating the corresponding locked transaction by the root chain, sending the locked transaction to the corresponding split-link 1 and the split-link 2, and after verifying the root-link transaction by the split-link 1 and the split-link 2, sending the verified transaction to the corresponding cross-link gateway A and the cross-link gateway B;
after receiving the locked transaction, the cross-link gateway A can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway A successfully verifies, the cross-link gateway A executes locking operation to the application link A and monitors a result event, and the application link A puts a locking result in the event;
after receiving the locked transaction, the cross-link gateway B can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway B successfully verifies, the cross-link gateway B executes locking operation to the application link B and monitors a result event, and the application link B puts a locking result in the event;
if the root chain receives a successful response of the cross-chain gateway A and the cross-chain gateway B within the specified time, packaging the corresponding unlocking transaction, firstly sending the corresponding unlocking transaction to the corresponding branch chain 1 and the branch chain 2, and sending the corresponding unlocking transaction to the corresponding cross-chain gateway A and the cross-chain gateway B after the root chain transaction is verified by the branch chain 1 and the branch chain 2;
after receiving the unlocking transaction, the cross-link gateway A can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway A successfully verifies, the cross-link gateway A executes unlocking operation to the application link A and monitors a result event, and the application link A puts a locking result in the event;
after receiving the unlocking transaction, the cross-link gateway B may send a transaction verification query to the corresponding child chain. And after the cross-link gateway B successfully verifies, executing unlocking operation to the application link B and monitoring a result event. The chain of applications B puts the unlock result in an event.
If the root chain receives a failure response or no response after overtime of one of the cross-chain gateway A and the cross-chain gateway B within the specified time, packaging the corresponding rollback transaction, firstly sending the rollback transaction to the corresponding branch chain 1 and the corresponding branch chain 2, and then sending the rollback transaction to the corresponding cross-chain gateway A and the corresponding cross-chain gateway B;
after receiving the rollback transaction, the cross-link gateway A can send a transaction verification query to the corresponding sub-chain, after the cross-link gateway A successfully verifies, the cross-link gateway A executes a rollback operation to the application chain A and monitors a result event, and the application chain A puts a rollback result in the event;
after receiving the rollback transaction, the cross-link gateway B may send a transaction verification query to the corresponding child chain, and after the cross-link gateway B succeeds in verification, execute a rollback operation to the application chain B and monitor a result event, and the application chain B puts a rollback result in the event.

Claims (10)

1. A cross-chain asset transaction system based on a relay chain is characterized by comprising a multi-level relay chain architecture, a transaction verification module, a transaction uplink module and an asset transaction module, wherein the multi-level relay chain architecture comprises: the two-layer relay chain architecture comprises a root chain and branch chains, and only one root chain is provided; the application chains are connected with the branch chains through a chain-crossing gateway to realize the inter-chain operation of the application chains in the branch chains, and the branch chains are connected with the root chains through a chain-crossing gateway to realize the inter-chain operation of the application chains among the branch chains;
the transaction verification module performs credible verification on the relay chain transaction and the cross-chain transaction request when receiving the relay chain transaction and the cross-chain transaction request;
the transaction uplink module defines a transaction uplink process, the transaction uplink process comprises that a branch chain receives a transaction request of a cross-chain gateway, and a transaction verification module is called on a transaction block by a branch chain cross-chain transaction contract through endorsement, packing, sorting and block discharging to obtain a result of successful or failed verification, and the result is written into an account book file to issue a corresponding event;
the asset transaction module specifies a cross-chain asset transaction flow, the cross-chain asset transaction flow comprises a branch chain internal asset transaction flow and a cross-chain asset transaction flow, the branch chain internal asset transaction flow is executed when judging that a receiver of the cross-chain transaction request belongs to an application chain managed by the branch chain, and the branch chain internal asset transaction flow is executed when judging that the receiver of the cross-chain transaction request does not belong to the application chain managed by the branch chain.
2. A cross-chain asset transaction method based on a relay chain is characterized by comprising the following steps:
a transaction uplink step: the branch chain receives a transaction request of the cross-chain gateway, and after an endorsement process, a packaging process, a sequencing process and a block outlet process, the branch chain cross-chain transaction contract performs format verification and content verification on a transaction block to obtain a result of successful or failed verification, writes the result into an account book file, and issues a corresponding event;
a transaction verification step: the cross-link gateway receives the relay link transaction, performs first credible verification on the relay link transaction, and performs second credible verification on the cross-link transaction request after the relay link receives the cross-link transaction request;
and (3) asset transaction step: the method comprises the steps that a service end initiates service calling to an application chain of a transaction sender, asset transfer related parameters are input, a cross-chain contract of the application chain of the transaction sender sets a corresponding cross-chain event, the cross-chain gateway of the transaction sender monitors the cross-chain event and then sends a cross-chain request to a branch chain, if the branch chain judges that a receiver of the request belongs to an application chain managed by the transaction sender, a resource transaction flow in the branch chain is executed, and if the branch chain judges that the receiver of the request does not belong to the application chain managed by the transaction sender, cross-chain asset transaction is executed.
3. The method for trading across chain assets based on relay chain as claimed in claim 2, wherein: the endorsement process comprises the following steps:
an endorsement strategy is set by an application chain node or a service end, wherein the endorsement strategy comprises the number of endorsement nodes required;
when a service terminal initiates a service call to a transaction sender application chain, the transaction sender application chain initiates a transaction proposal request, one or more endorsement nodes for receiving a transaction proposal are appointed, if the transaction proposal request is not appointed, the transaction proposal request is sent to all nodes managed by the relay chain, and the sender application chain waits for the return of the endorsement nodes after sending;
the endorsement node checks and verifies the signature after receiving the transaction proposal request, after the verification is passed, the endorsement node simulates an execution contract to generate a proposal result, adds the digital signature of the endorsement node in the proposal result and signs the proposal result by using a private key to complete the endorsement of the proposal result;
and after receiving the endorsement node results with the number required by the endorsement strategy, the application chain of the sender packs the transaction proposal, the simulation result and the endorsement information to the consensus sequencing node, and if the application chain of the sender does not collect the endorsement information fed back by the endorsement nodes with the number required by the endorsement strategy, the application chain of the sender gives up the transaction.
4. The method for trading across chain assets based on relay chain as claimed in claim 2, wherein: the first credible verification of the relay chain transaction comprises the following steps:
verifying the presence of cross-chain transactions in the relay chain: the cross-link gateway monitors the relay link transaction, verifies the basic parameters, the verifier sends a transaction verification query request to the endorsement node, the endorsement node returns a result after simulation execution, the verifier compares consistency results after obtaining the endorsement result, and if the corresponding preset endorsement strategy is met, the existence of the transaction in the relay link is proved;
verifying the validity of the cross-chain transaction in the relay chain: and calculating a hash value of a return result after the endorsement node performs simulation, comparing whether the hash value of the currently monitored transaction is equal to the calculated hash value, and if so, proving the validity of the transaction in the relay chain.
5. The method of claim 2, wherein the method comprises: the second credible verification of the cross-chain transaction request comprises the following steps:
the relay link receives a cross-link transaction request forwarded by the cross-link gateway, and performs basic verification on the cross-link transaction request, including: verifying the transaction ID, verifying the validity of the signature, verifying whether the timestamp is reasonable and verifying non-repeated transactions;
after the relay chain backs a book on the cross-chain transaction request, the consensus module is responsible for recognizing the block in a consensus mode, and after the block is recognized, the engine plug-ins verify the validity and the existence of all transactions in the block in batch;
the verification process of the verification engine plug-in is as follows:
the application chain is registered to the relay chain, information of a verifier needs to be submitted, the information of the verifier comprises certificate information and an endorsement strategy array, after a verification engine receives a transaction, the application chain and contract information of a transaction sender are analyzed, corresponding verification rules are obtained according to the application chain and the contract information, verification is carried out to obtain a verification result, and the verification comprises the steps that whether the certificate of an endorsement node is signed and issued by a root certificate or not is verified through the root certificate, whether the signature of the verification node is correct or not and whether the signature of the verification endorsement node meets the strategy or not is verified.
6. The method of claim 2, wherein the method comprises: the branch chain internal asset transaction process comprises the following steps:
a service end initiates service call to an application chain of a transaction sender, and the application chain of the sender acquires asset transfer related parameters;
a cross-chain contract of a transaction sending party application chain is provided with a corresponding cross-chain event, and after the cross-chain contract of the transaction sending party monitors the cross-chain event, a cross-chain request is sent to a branch chain;
the receiver of the branch chain judgment request belongs to an application chain managed by the receiver, and after corresponding parameter authority and transaction verification check are carried out, corresponding locked transaction is packaged and sent to a corresponding cross-chain gateway of a transaction sender and a cross-chain gateway of a transaction receiver;
after receiving the locked transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes locking operation and monitors a result event, and the transaction sender application chain puts a locking result in the event;
after receiving the locked transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, a locking operation is executed to the transaction receiver application chain and a result event is monitored, and the transaction receiver application chain puts the locking result in the event;
if the subcohain receives a successful response of the transaction sender cross-chain gateway and the transaction receiver cross-chain gateway within the specified time, packaging the corresponding unlocking transaction, and sending the corresponding unlocking transaction to the corresponding transaction sender cross-chain gateway and the corresponding transaction receiver cross-chain gateway;
after receiving the unlocking transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes unlocking operation and monitors result events, and the transaction sender application chain puts a locking result in the events;
after receiving the unlocking transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes unlocking operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts an unlocking result in the event;
if the branch link receives a failure response of one party of the transaction sender cross-link gateway and the transaction receiver cross-link gateway within a specified time or receives no response within overtime, packaging the corresponding rollback transaction, and sending the corresponding rollback transaction to the corresponding transaction sender cross-link gateway and the corresponding transaction receiver cross-link gateway;
after receiving the rollback transaction, the transaction sender sends a transaction verification query to the corresponding sub-chain through the cross-chain gateway, after the verification is successful, a rollback operation is executed to the transaction sender application chain and a result event is monitored, and the rollback result is placed in the event by the transaction sender application chain;
and after the transaction receiver cross-link gateway receives the rollback transaction, a transaction verification query is sent to the corresponding sub-chain, after the verification is successful, a rollback operation is executed to a transaction receiver application chain and a result event is monitored, and the rollback result is placed in the event by the receiver application chain.
7. The method for trading across chain assets based on relay chain as claimed in claim 2, wherein: the cross-branch asset transaction process comprises the following steps:
a service end initiates service calling to a transaction sender application chain, and the transaction sender application chain acquires asset transfer related parameters;
a cross-link contract of a transaction sender application chain is provided with a corresponding cross-link event, and the cross-link gateway of the transaction sender monitors the cross-link event and then sends a cross-link request to a branch chain;
the receiving party of the branch chain judgment request does not belong to the application chain managed by the receiving party, and sends the receiving party to the root chain after corresponding parameter authority and transaction verification check are carried out;
after verifying the split-chain transaction, the root chain initiates routing addressing, finds out the split chain corresponding to the transaction receiver, packages the corresponding locked transaction by the root chain, and sends the locked transaction to the split chain of the transaction sender and the split chain of the transaction receiver, and after verifying the root chain transaction by the split chain of the sender and the split chain of the receiver, sends the locked transaction to the cross-chain gateway of the corresponding transaction sender and the cross-chain gateway of the transaction receiver;
after receiving the locked transaction, the transaction sender sends a transaction verification query to the corresponding sub-chain through the cross-link gateway, after the verification is successful, the transaction sender application chain executes locking operation and monitors a result event, and the transaction sender application chain puts a locking result in the event;
after receiving the locked transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes locking operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts a locking result in the event;
if the root chain receives a successful response of the transaction sender cross-chain gateway and the transaction receiver cross-chain gateway within the specified time, packaging the corresponding unlocking transaction, firstly sending the unlocking transaction to the transaction sender sub-chain and the transaction receiver sub-chain, and after the transaction sender sub-chain and the transaction receiver sub-chain verify the root chain transaction, sending the verification result to the corresponding transaction sender cross-chain gateway and the corresponding transaction receiver cross-chain gateway;
after receiving the unlocking transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, the transaction sender application chain executes unlocking operation and monitors result events, and the transaction sender application chain puts a locking result in the events;
after receiving the unlocking transaction, the transaction receiver cross-link gateway sends a transaction verification query to the corresponding sub-chain, after the verification is successful, executes unlocking operation to the transaction receiver application chain and monitors a result event, and the transaction receiver application chain puts an unlocking result in the event;
if the root chain receives a failure response or overtime failure response of one of the transaction sender cross-chain gateway and the transaction receiver cross-chain gateway within a specified time, packaging the corresponding rollback transaction, firstly sending the rollback transaction to the transaction sender sub-chain and the transaction receiver sub-chain, and then sending the rollback transaction to the corresponding transaction sender cross-chain gateway and the corresponding transaction receiver cross-chain gateway;
after receiving the rollback transaction, the transaction sender cross-link gateway sends a transaction verification query to the corresponding sub-chain, and after the verification is successful, executes a rollback operation to the transaction sender application chain and monitors a result event, and the transaction sender application chain puts a rollback result in the event;
and after the transaction receiver cross-link gateway receives the rollback transaction, a transaction verification query is sent to the corresponding sub-chain, after the verification is successful, a rollback operation is executed to the transaction receiver application chain and a result event is monitored, and the rollback result is placed in the event by the transaction receiver application chain.
8. The method of claim 2, wherein the method comprises: the two-phase transaction management model comprises the following steps:
a service end sends a cross-chain transaction to a branch chain or a root chain, wherein participants of the cross-chain transaction are a service contract on an application chain of a transaction sender and a service contract on an application chain of a transaction receiver, and the service end is the application chain of the transaction sender or the branch chain corresponding to the application chain of the transaction sender;
the branch chain or the root chain is used as a coordinator of the two-stage transaction, preparation calling is initiated to a transaction contract of the transaction sender, assets on the transaction contract of the transaction sender are pre-frozen according to service requirements, and after the preparation is completed, the service contract responds to a block chain gateway of the transaction sender to the result of successful or failed transaction processing;
the branch chain or the root chain initiates a preparation call to a transaction receiver service contract, the transaction receiver cross-chain gateway monitors a corresponding preparation request, then the transaction receiver cross-chain gateway executes the corresponding call, and the transaction receiver cross-chain gateway informs a final preparation execution result to the branch chain or the root chain;
the branch chain or the root chain waits for responses prepared by the participants of the two parties in preset time, if the response results of all the participants are successful, the transaction is determined to be successful, if the response results of all the participants are overtime, the transaction is determined to be failed, all the participants are informed to rollback, and the state change on the application contract is cancelled, wherein if the response result of one participant is failed, the transaction is determined to be failed, all the participants are informed to rollback, and the state change on the application contract is cancelled;
the branch chain or the root chain waits for the response confirmed by the participants of both parties within a certain time, if the response result of only one participant is successful, the cross-chain transaction is determined to be failed, and an error is recorded;
if the response results of the participants of the two parties are failure, the cross-link transaction is determined to be failed, all the participants are informed to roll back, the state change on the application contract is cancelled, the cross-link transaction is determined to be successful if the response results of all the participants are success, and if one participant fails to roll back, the cross-link transaction is determined to be failed, and errors are recorded.
9. An electronic device, wherein the electronic device comprises:
a processor; and
a memory storing computer-executable instructions that, when executed, the processor performs the method of any of claims 2-8.
10. A computer readable storage medium, wherein the computer readable storage medium stores one or more programs which, when executed by a processor, implement the method of any of claims 2-8.
CN202211208434.1A 2022-09-30 2022-09-30 Cross-link asset transaction method, system and equipment based on relay link Withdrawn CN115601168A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211208434.1A CN115601168A (en) 2022-09-30 2022-09-30 Cross-link asset transaction method, system and equipment based on relay link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211208434.1A CN115601168A (en) 2022-09-30 2022-09-30 Cross-link asset transaction method, system and equipment based on relay link

Publications (1)

Publication Number Publication Date
CN115601168A true CN115601168A (en) 2023-01-13

Family

ID=84845134

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211208434.1A Withdrawn CN115601168A (en) 2022-09-30 2022-09-30 Cross-link asset transaction method, system and equipment based on relay link

Country Status (1)

Country Link
CN (1) CN115601168A (en)

Similar Documents

Publication Publication Date Title
CN112446785B (en) Cross-chain transaction method, system, device, equipment and storage medium
CN109002725B (en) Data processing system based on block chain
US11429738B2 (en) Blockchain endorsement with approximate hash verification
US11539527B2 (en) Peer node recovery via approximate hash verification
US12003647B2 (en) Reduced-step blockchain verification of media file
US20230275743A1 (en) Committing data to blockchain based on approximate hash verification
US11689356B2 (en) Approximate hash verification of unused blockchain output
CN111414413B (en) Blockchain endorsement verification
CN110599095B (en) Block chain network-based hazardous waste treatment method and node of block chain network
US20200382309A1 (en) Approximate hash verification for blockchain
CN112612856B (en) Block chain-based data processing method and device
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN112818056A (en) Log security sharing method, system and device of block chain
WO2023168993A1 (en) Blockchain-based data processing method, apparatus, and device, medium, and product
CN112037062A (en) Transaction consensus method, device, electronic equipment and readable storage medium
CN111209542A (en) Authority management method and device, storage medium and electronic equipment
CN111131329A (en) Data consensus method and device for block chain system and hardware equipment
CN115701078B (en) Cross-chain transaction processing method, device, electronic equipment and storage medium
CN115601168A (en) Cross-link asset transaction method, system and equipment based on relay link
CN114257429B (en) Aggregation transaction signature verification and storage method and system based on alliance chain
CN114372092A (en) Case collaborative search processing method, system, device and electronic equipment
CN116186786A (en) Block chain-based service processing method and device, electronic equipment and readable medium
CN114820179A (en) Block chain signature checking method and related equipment
CN115708119A (en) Cross-chain transaction system, method, device and storage medium
CN112508703A (en) Isomorphic public chain value exchange method

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

Application publication date: 20230113