A cross-chain asset management method, device and storage medium
Coordinate cross-chain asset transfers through repeaters, record and mark transaction status, and solve statistics and clearing problems in cross-chain asset management, improve the stability and success rate of cross-chain transfers, and improve user experience.
Patent Information
- Application Number
- CN202210106131.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-01-28
AI Technical Summary
In existing cross-chain asset management, the statistics and liquidation of cross-chain asset transfers are quite troublesome, and existing tools are inefficient in cross-chain liquidation and are difficult to effectively check failed transactions.
Coordinate cross-chain asset transfer through repeaters, record and mark the status of withdrawal and deposit certificate transactions and transfer certificate transactions, monitor the blockchain system in real time, and provide statistics and clearing tools for cross-chain asset transfers to reduce the frequency of failures.
It improves the stability and success rate of cross-chain asset transfers, reduces the frequency of transaction failures, improves user experience, and provides cross-chain transfer inspection tools.
Smart Images

Figure CN114511323B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a cross-chain asset management method, device, and storage medium. Background Art
[0002] With the development of blockchain technology, various blockchain systems have emerged one after another. In order to avoid the emergence of information islands, cross-chain interactions between blockchains have gradually received attention. Cross-chain asset management, as an important part of cross-chain interaction, has naturally received a lot of attention. The current cross-chain asset management focuses on the security of cross-chain assets, and mainly controls the process of cross-chain asset transfer to ensure that each cross-chain asset transaction can be carried out safely and effectively. This will require each cross-chain asset transfer to be split into multiple steps for implementation and separate control. Cross-chain asset transfer can indeed effectively improve security performance, but it has caused great trouble for cross-chain asset statistics and liquidation. The existing technology currently provides cross-chain liquidation tools, which are tools for troubleshooting when cross-chain assets are transferred. Summary of the Invention
[0003] In order to solve the above problems, the present invention provides a cross-chain asset management method, device and storage medium, which coordinates cross-chain asset transfer operations through a repeater and provides statistical and liquidation tools for cross-chain asset transfers.
[0004] The present invention adopts the following technical solutions.
[0005] In a first aspect, the present invention provides a cross-chain asset management method applicable to a relay cross-chain blockchain system, wherein the blockchain system includes a first blockchain, a second blockchain, and a repeater, wherein both the first blockchain and the second blockchain have issued a first blockchain asset, wherein the first blockchain asset is a native asset of the first blockchain, and the method includes:
[0006] A cross-chain withdrawal transaction is generated in the first blockchain, where the cross-chain withdrawal transaction is used to lock a set amount of the first blockchain asset in the first blockchain; a repeater obtains and parses the cross-chain withdrawal transaction, and generates a corresponding withdrawal evidence transaction based on the parsed result; a determination is made as to whether the online wallet balance of the first blockchain asset in the second blockchain is sufficient; if so, the transaction hash and transaction amount of the current withdrawal evidence transaction are recorded, and the status corresponding to the transaction hash of the current withdrawal evidence transaction is set to pending, while the current withdrawal evidence transaction is sent to the second blockchain; otherwise, the sending of the withdrawal evidence transaction based on the first blockchain asset to the second blockchain is suspended; when a new block is generated on the second blockchain, the log is monitored to determine whether there is a successful withdrawal evidence transaction with a corresponding status of the transaction hash in pending; if so, the status corresponding to the transaction hash of the withdrawal evidence transaction is modified to successful;
[0007] Generate a cross-chain transfer transaction in the second blockchain, the cross-chain transfer transaction being used to destroy a set number of first blockchain assets in the second blockchain; the repeater obtains and parses the cross-chain transfer transaction, and generates a corresponding transfer evidence transaction based on the parsed result; records the transaction hash and transaction amount of the current transfer evidence transaction, sets the status corresponding to the transaction hash of the current transfer evidence transaction to a pending state, and simultaneously sends the current transfer evidence transaction to the first blockchain; when generating a new block in the first blockchain, monitor the log to determine whether there is a successful transfer evidence transaction with a pending state corresponding to the transaction hash; if so, change the status corresponding to the transaction hash of the transfer evidence transaction to successful;
[0008] Record and update the locked amount, cross-chain issuance amount, pending withdrawal amount, and pending transfer amount of the first blockchain asset in real time; the locked amount of the first blockchain asset is the amount of the first asset locked in the first blockchain, the cross-chain issuance amount of the first blockchain asset is the amount of the first asset issued in the second blockchain, the pending withdrawal amount of the first blockchain asset is the sum of the transaction amounts of all withdrawal evidence transactions in the repeater with the corresponding status of the transaction hash being in the pending state, and the pending transfer amount of the first blockchain asset is the sum of the transaction amounts of all transfer evidence transactions in the repeater with the corresponding status of the transaction hash being in the pending state;
[0009] When liquidation is required, all cross-chain operations on the first blockchain are stopped, and a check is made to see whether the difference between the locked amount of the first blockchain's assets and the pending withdrawal amount is equal to the sum of the cross-chain issuance amount and the pending transfer amount. If they are equal, liquidation is successful; otherwise, cross-chain withdrawal and transfer transactions are investigated.
[0010] Preferably, the method for determining whether the online wallet balance of the first blockchain asset in the second blockchain is sufficient comprises the following steps:
[0011] Obtain all pending withdrawal transactions recorded in the relayer for withdrawing assets from the first blockchain to the second blockchain and calculate the total amount of assets to be withdrawn;
[0012] The first blockchain asset balance in the queried online wallet of the second blockchain is compared with the total amount of assets to be withdrawn. If the sum of the total amount of assets to be withdrawn and the withdrawal amount of the current withdrawal transaction is less than or equal to the first blockchain asset balance in the queried online wallet of the second blockchain, it is determined that the online wallet balance is sufficient; otherwise, it is determined that the online wallet balance is insufficient.
[0013] Preferably, there are multiple relays, and a relay is randomly selected to obtain a cross-chain withdrawal transaction from the first blockchain or a cross-chain transfer transaction from the second blockchain, and to carry out subsequent steps. Data is communicated between all relays, and one of the relays is arbitrarily selected to record and update the pending withdrawal amount and pending transfer amount of the first blockchain asset in real time.
[0014] In a second aspect, a computer device is provided, comprising one or more processors;
[0015] a memory for storing one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method as described in the first aspect above.
[0017] In a third aspect, a storage medium storing a computer program is provided, which, when executed by a processor, implements the method described in the first aspect above.
[0018] The beneficial effect of the present invention is that the withdrawal evidence transaction and transfer evidence transaction generated in the cross-chain withdrawal and cross-chain transfer process are recorded and marked with a status by a repeater, and the transactions recorded by the repeater are used as a reference for judgment in subsequent cross-chain withdrawal and cross-chain transfer processes, thereby reducing the failure frequency of cross-chain extraction and cross-chain transfer. In addition, the repeater monitors the first blockchain and the second blockchain and combines the recorded withdrawal evidence transaction and transfer evidence transaction and status, and realizes the statistics and settlement of cross-chain asset transfers through the repeater, providing a tool for troubleshooting cross-chain transfers. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A flowchart of a cross-chain asset management method provided by one embodiment of the present invention;
[0020] Figure 2 A schematic diagram of the structure of a computer device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0021] The present invention will be further described in detail below in conjunction with specific embodiments and the accompanying drawings. Those of ordinary skill in the art will be able to implement the present invention based on these descriptions. In addition, the embodiments of the present invention involved in the following description are generally only embodiments of a part of the present invention, rather than all embodiments. Therefore, based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative work should fall within the scope of protection of the present invention. It should be noted that, unless there is a conflict, the embodiments in this application and the features in the embodiments can be combined with each other. Unless otherwise specified, the methods briefly described in the embodiments of the present invention are methods mastered by those skilled in the art.
[0022] Figure 1 This is a flowchart of a cross-chain asset management method provided by one embodiment of the present invention.
[0023] like Figure 1 As shown, this embodiment provides a cross-chain asset management method applicable to a relay cross-chain blockchain system, wherein the blockchain system includes a first blockchain, a second blockchain, and a repeater, wherein both the first blockchain and the second blockchain have issued a first blockchain asset, and the first blockchain asset is a native asset of the first blockchain. The method includes:
[0024] A cross-chain withdrawal transaction is generated in the first blockchain, where the cross-chain withdrawal transaction is used to lock a set amount of the first blockchain asset in the first blockchain; a repeater obtains and parses the cross-chain withdrawal transaction, and generates a corresponding withdrawal evidence transaction based on the parsed result; a determination is made as to whether the online wallet balance of the first blockchain asset in the second blockchain is sufficient; if so, the transaction hash and transaction amount of the current withdrawal evidence transaction are recorded, and the status corresponding to the transaction hash of the current withdrawal evidence transaction is set to pending, while the current withdrawal evidence transaction is sent to the second blockchain; otherwise, the sending of the withdrawal evidence transaction based on the first blockchain asset to the second blockchain is suspended; when a new block is generated on the second blockchain, the log is monitored to determine whether there is a successful withdrawal evidence transaction with a corresponding status of the transaction hash in pending; if so, the status corresponding to the transaction hash of the withdrawal evidence transaction is modified to successful;
[0025] Generate a cross-chain transfer transaction in the second blockchain, the cross-chain transfer transaction being used to destroy a set number of first blockchain assets in the second blockchain; the repeater obtains and parses the cross-chain transfer transaction, and generates a corresponding transfer evidence transaction based on the parsed result; records the transaction hash and transaction amount of the current transfer evidence transaction, sets the status corresponding to the transaction hash of the current transfer evidence transaction to a pending state, and simultaneously sends the current transfer evidence transaction to the first blockchain; when generating a new block in the first blockchain, monitor the log to determine whether there is a successful transfer evidence transaction with a pending state corresponding to the transaction hash; if so, change the status corresponding to the transaction hash of the transfer evidence transaction to successful;
[0026] Record and update the locked amount, cross-chain issuance amount, pending withdrawal amount, and pending transfer amount of the first blockchain asset in real time; the locked amount of the first blockchain asset is the amount of the first asset locked in the first blockchain, the cross-chain issuance amount of the first blockchain asset is the amount of the first asset issued in the second blockchain, the pending withdrawal amount of the first blockchain asset is the sum of the transaction amounts of all withdrawal evidence transactions in the repeater with the corresponding status of the transaction hash being in the pending state, and the pending transfer amount of the first blockchain asset is the sum of the transaction amounts of all transfer evidence transactions in the repeater with the corresponding status of the transaction hash being in the pending state;
[0027] When liquidation is required, all cross-chain operations on the first blockchain are stopped, and a check is made to see whether the difference between the locked amount of the first blockchain's assets and the pending withdrawal amount is equal to the sum of the cross-chain issuance amount and the pending transfer amount. If they are equal, liquidation is successful; otherwise, cross-chain withdrawal and transfer transactions are investigated.
[0028] Furthermore, the method for determining whether the online wallet balance of the first blockchain asset in the second blockchain is sufficient includes the following steps:
[0029] Obtain all pending withdrawal transactions recorded in the relayer for withdrawing assets from the first blockchain to the second blockchain and calculate the total amount of assets to be withdrawn;
[0030] The first blockchain asset balance in the queried online wallet of the second blockchain is compared with the total amount of assets to be withdrawn. If the sum of the total amount of assets to be withdrawn and the withdrawal amount of the current withdrawal transaction is less than or equal to the first blockchain asset balance in the queried online wallet of the second blockchain, it is determined that the online wallet balance is sufficient; otherwise, it is determined that the online wallet balance is insufficient.
[0031] Furthermore, there are multiple relays, and a relayer is randomly selected to obtain a cross-chain withdrawal transaction from the first blockchain or a cross-chain transfer transaction from the second blockchain, and to carry out subsequent steps. Data is communicated between all relays, and one of the relayers is randomly selected to record and update the pending withdrawal amount and pending transfer amount of the first blockchain asset in real time.
[0032] To avoid loss of generality, this example uses the cross-chain transfer of asset A between chain A and chain B as an example to illustrate the above method. In this example, the representation of asset A on chain B is B_assetA. The cross-chain asset extraction process is as follows:
[0033] 1. The user initiates a cross-chain asset withdrawal transaction on chain A, exemplified as the first cross-chain asset withdrawal transaction. This transaction is used to withdraw 100 of chain A assets on chain B, i.e., to withdraw 100B_assetA. Based on the execution of the first cross-chain asset withdrawal transaction, 100 assetA is first locked in chain A. The repeater monitors the log of chain A, discovers the first cross-chain asset withdrawal transaction, parses the asset type (B_assetA) and amount (100), and prepares to initiate the first withdrawal evidence transaction to chain B.
[0034] 2. The relayer queries the balance of the online wallet on chain B to see if it can fully support the asset withdrawal operation of the first withdrawal evidence transaction. The judgment conditions are as follows: the amounts of the withdrawal evidence transactions previously initiated to chain B that are still pending are accumulated to obtain sum_pending, and the current online wallet balance is balance, and the asset withdrawal amount of the current transaction is withdraw_amount. If withdraw_amount + sum_pending <= balance, then continue to initiate the first withdrawal evidence transaction to chain B; otherwise, all subsequent asset withdrawal operations will be suspended. For example, if the current balance of wallet B_assetA on chain B is 30,000, and the amount of the currently pending withdrawal evidence transactions is 29,999, then the online wallet balance is insufficient to support the asset withdrawal operation of the first withdrawal evidence transaction, and all subsequent asset withdrawal operations will need to be suspended.
[0035] 3. If the asset withdrawal operation is initiated normally on the B chain, the hash of the first asset withdrawal transaction (i.e., the transaction hash of the first asset withdrawal transaction) and the amount are recorded, and the status corresponding to the hash of the first asset withdrawal transaction is set to pending. When a new B chain block is generated, the success of the asset withdrawal is determined by monitoring the log events (it is not possible to simply determine the success of the asset withdrawal by querying a single transaction). If successful, the status corresponding to the transaction hash is updated to successful; if unsuccessful, it is updated to fail.
[0036] 4. If the current online wallet balance is insufficient, the relayer will suspend all pending withdrawal transactions and send an alarm message in the background (email or other alarm channels).
[0037] 5. After the operator successfully recharges the online wallet through the transaction, the relayer will receive the recharge log information, and then restart the asset withdrawal transaction cached locally, running the review conditions in step 2 again for each transaction. If the conditions are met, the transaction will be initiated, otherwise it will be suspended.
[0038] The cross-chain asset transfer process is as follows:
[0039] 1. The user initiates a cross-chain asset transfer transaction on the B chain, exemplarily recorded as the first cross-chain asset transfer transaction. This transaction is used to transfer 100 A chain assets from the B chain to the A chain, that is, transfer 100 assetA. Based on the execution of the first cross-chain asset transfer transaction, 100 B_assetA is first destroyed in the B chain. The repeater monitors the log of the B chain, finds the first cross-chain asset transfer transaction, parses the asset type (assetA) and amount (100), and prepares to initiate the first transfer evidence transaction to the A chain;
[0040] 2. The relayer records the transaction hash and transaction amount of the first transfer evidence transaction, sets the corresponding status of the transaction hash to pending, and sends the first transfer evidence transaction to chain A. Because the transaction hash corresponds to the transaction one-to-one, the transaction hash is used to reduce the amount of data. Therefore, the status corresponding to the transaction hash is the status of the transaction;
[0041] 3. When a new A-chain block is generated, the relayer monitors log events to determine whether the asset withdrawal is successful. If successful, the status corresponding to the transaction hash is updated to successful; if unsuccessful, it is updated to fail.
[0042] During the above-mentioned cross-chain asset withdrawal and cross-chain asset transfer processes, the blockchain system records and updates assetA's locked amount, cross-chain issuance amount, pending withdrawal amount, and pending transfer amount in real time. AssetA's pending withdrawal amount and pending transfer amount are obtained through the relayer, and assetA's locked amount and cross-chain issuance amount are obtained from chain A and chain B, respectively. When liquidation is required, all cross-chain operations on chain A are stopped, and a check is made to see whether the difference between assetA's locked amount and pending withdrawal amount is equal to the sum of the cross-chain issuance amount and pending transfer amount. If they are equal, liquidation is successful. Otherwise, the cross-chain withdrawal and transfer transactions are investigated.
[0043] If a cross-chain transfer or withdrawal transaction fails after a long wait, the relayer can be used to check whether the transaction is pending or failed. If it is in a failed state, the specific reason for the failure can be checked, which can help us to clear the account.
[0044] The above embodiment coordinates cross-chain asset transfers through a relay to avoid the situation where multiple concurrent cross-chain asset withdrawal transactions use the same online wallet balance as a reference during periods of high cross-chain withdrawal activity, which can lead to asset withdrawal failures. The relay compares the total amount of assets to be withdrawn from all pending cross-chain asset withdrawal transactions with the first cross-chain asset withdrawal transaction and the online wallet balance of the target blockchain, thereby ensuring the successful execution of cross-chain asset withdrawal transactions, making cross-chain asset withdrawal more stable and improving the user experience. Furthermore, the relay records and marks the status of withdrawal and transfer evidence transactions generated during cross-chain withdrawal and transfer processes. In subsequent cross-chain withdrawal and transfer processes, the transactions recorded by the relay are used as a reference for judgment, reducing the frequency of cross-chain withdrawal and transfer failures. Furthermore, the relay monitors the first and second blockchains and combines the recorded withdrawal and transfer evidence transactions and their status to achieve cross-chain asset transfer statistics and settlement through the relay, providing a tool for troubleshooting cross-chain transfers.
[0045] Figure 2 A schematic structural diagram of a device provided in one embodiment of the present invention.
[0046] like Figure 2 As shown, as another aspect, the present application also provides a computer device 500, including one or more central processing units (CPUs) 501, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or programs loaded from a storage portion 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the device 500 are also stored in the RAM 503. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An I / O interface 505 is also connected to the bus 504.
[0047] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A driver 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is mounted on the driver 510 as needed, so that a computer program read therefrom can be installed into the storage section 508 as needed.
[0048] In particular, according to the embodiments disclosed herein, the method described in Embodiment 1 above can be implemented as a computer software program. For example, the embodiments disclosed herein include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for executing the method described in any of the embodiments above. In such embodiments, the computer program can be downloaded and installed from a network via the communication portion 509 and / or installed from the removable medium 511.
[0049] As another aspect, the present application further provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment, or a standalone computer-readable storage medium not incorporated into the apparatus. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the method described in the present application.
[0050] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the prescribed logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0051] The units or modules involved in the embodiments described in this application may be implemented in software or hardware. The units or modules described may also be provided in a processor. For example, each of the units may be a software program provided in a computer or mobile smart device, or a separately configured hardware device. The names of these units or modules do not, in certain circumstances, constitute limitations on the units or modules themselves.
[0052] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the concept of this application. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A cross-chain asset management method, characterized in that: A blockchain system suitable for relaying cross-chain, the blockchain system comprising a first blockchain, a second blockchain, and a relay, wherein both the first blockchain and the second blockchain have issued a first blockchain asset, the first blockchain asset being a native asset of the first blockchain, and the method comprising: A cross-chain withdrawal transaction is generated in the first blockchain, where the cross-chain withdrawal transaction is used to lock a set amount of the first blockchain asset in the first blockchain, and the transaction constitutes the first stage of the cross-chain asset transfer; a repeater obtains and parses the cross-chain withdrawal transaction, and generates a corresponding withdrawal evidence transaction based on the parsed result; a determination is made as to whether the online wallet balance of the first blockchain asset in the second blockchain is sufficient; if so, the transaction hash and transaction amount of the current withdrawal evidence transaction are recorded, and the status corresponding to the transaction hash of the current withdrawal evidence transaction is set to pending, and the current withdrawal evidence transaction is sent to the second blockchain; otherwise, the sending of the withdrawal evidence transaction based on the first blockchain asset to the second blockchain is suspended; when a new block is generated on the second blockchain, the log is monitored to determine whether there is a successful withdrawal evidence transaction with a pending status corresponding to the transaction hash; if so, the status corresponding to the transaction hash of the withdrawal evidence transaction is modified to successful; A cross-chain transfer transaction is generated in the second blockchain, where the cross-chain transfer transaction is used to destroy a set number of first blockchain assets in the second blockchain, and this transaction constitutes the second stage of the cross-chain asset transfer. The repeater obtains and parses the cross-chain transfer transaction, and generates a corresponding transfer evidence transaction based on the parsed result. The repeater records the transaction hash and transaction amount of the current transfer evidence transaction, sets the status corresponding to the transaction hash of the current transfer evidence transaction to pending, and simultaneously sends the current transfer evidence transaction to the first blockchain. When a new block is generated in the first blockchain, the repeater monitors the log to determine whether there is a successful transfer evidence transaction with a pending status corresponding to the transaction hash. If so, the repeater changes the status corresponding to the transaction hash of the transfer evidence transaction to successful. Record and update the locked amount, cross-chain issuance amount, pending withdrawal amount, and pending transfer amount of the first blockchain asset in real time; the locked amount of the first blockchain asset is the amount of the first asset locked in the first blockchain, the cross-chain issuance amount of the first blockchain asset is the amount of the first asset issued in the second blockchain, the pending withdrawal amount of the first blockchain asset is the sum of the transaction amounts of all withdrawal evidence transactions in the repeater with the corresponding status of the transaction hash being in the pending state, and the pending transfer amount of the first blockchain asset is the sum of the transaction amounts of all transfer evidence transactions in the repeater with the corresponding status of the transaction hash being in the pending state; When liquidation is required, all cross-chain operations on the first blockchain are stopped, and a check is made to see whether the difference between the locked amount of the first blockchain's assets and the pending withdrawal amount is equal to the sum of the cross-chain issuance amount and the pending transfer amount. If they are equal, liquidation is successful; otherwise, cross-chain withdrawal and transfer transactions are investigated.
2. The method according to claim 1, characterized in that Methods for determining whether the online wallet balance of the first blockchain asset in the second blockchain is sufficient include: Obtain all pending withdrawal transactions recorded in the relayer for withdrawing assets from the first blockchain to the second blockchain and calculate the total amount of assets to be withdrawn; The first blockchain asset balance in the queried online wallet of the second blockchain is compared with the total amount of assets to be withdrawn. If the sum of the total amount of assets to be withdrawn and the withdrawal amount of the current withdrawal transaction is less than or equal to the first blockchain asset balance in the queried online wallet of the second blockchain, it is determined that the online wallet balance is sufficient; otherwise, it is determined that the online wallet balance is insufficient.
3. The method according to claim 1, characterized in that There are multiple relayers, and a relayer is randomly selected to obtain cross-chain withdrawal transactions from the first blockchain or cross-chain transfer transactions from the second blockchain, and to carry out subsequent steps. Data is communicated between all relayers, and one of the relayers is randomly selected to record and update the pending withdrawal amount and pending transfer amount of the first blockchain asset in real time.
4. A computer device comprising: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors are caused to perform the method according to any one of claims 1 to 3.
5. A storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Block chain cross-chain method, device and system and electronic device
CN110245517A
Hash time locking method and system based on cloud cross-chain transfer protocol
CN113269545A