CN111526211B - Asset transfer method, device and storage medium - Google Patents

Asset transfer method, device and storage medium Download PDF

Info

Publication number
CN111526211B
CN111526211B CN202010373068.XA CN202010373068A CN111526211B CN 111526211 B CN111526211 B CN 111526211B CN 202010373068 A CN202010373068 A CN 202010373068A CN 111526211 B CN111526211 B CN 111526211B
Authority
CN
China
Prior art keywords
asset transfer
transfer transaction
transaction
main chain
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010373068.XA
Other languages
Chinese (zh)
Other versions
CN111526211A (en
Inventor
何正军
吴思进
王志文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202010373068.XA priority Critical patent/CN111526211B/en
Publication of CN111526211A publication Critical patent/CN111526211A/en
Application granted granted Critical
Publication of CN111526211B publication Critical patent/CN111526211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • 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/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast

Abstract

The invention provides an asset transfer method, equipment and a storage medium, wherein the method comprises the following steps: after the first asset transfer transaction is successfully executed, whether a first push address registered by a node of the first parallel chain exists is searched: if yes, storing the transaction into a list to be pushed; monitoring whether a first transaction for withdrawal of the first user exists in a first number of subsequent backbone blocks: if not, pushing the transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel link nodes; if yes, judging whether all the first transactions are executed successfully: if yes, pushing the transaction to a first pushing address for broadcasting, packaging and executing of the corresponding parallel link node; if not, monitoring whether the transaction fails to be executed after the block to which the transaction belongs rolls back: if not, pushing the transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel link nodes; if yes, the transaction is deleted from the list to be pushed. The method and the device guarantee normal operation of cross-chain asset transfer in the parallel chain system.

Description

Asset transfer method, device and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an asset transfer method, device, and storage medium.
Background
In a series of parallel chain patent applications applied by the applicant before, a whole set of parallel chain architecture is constructed, in the set of architecture, mutual communication is not needed among all parallel chain nodes, the parallel chain nodes record parallel chain transactions to a main chain through the main chain nodes, all the parallel chain nodes synchronize the parallel chain transactions from the main chain to generate parallel chain blocks, then a plurality of consensus nodes in all the parallel chain nodes respectively generate consensus transactions and send the consensus transactions to the main chain nodes, the main chain nodes perform parallel chain consensus through executing all the consensus transactions and record parallel chain consensus results on the main chain, and then all the parallel chain link points synchronize all the consensus transactions and then perform parallel chain self consensus locally and record the parallel chain self consensus results on the parallel chain.
The above parallel chain architecture has the disadvantages that:
on one hand, all parallel chain transactions must be recorded on the main chain, when the number of parallel chains configured on one main chain is larger, the number of parallel chain transactions required to be recorded on the main chain is larger, so that tps (transaction processing amount per second) of the main chain and each parallel chain is limited by transaction processing capacity of the main chain, cannot be horizontally expanded, and is difficult to meet the requirement of high tps of some services;
on the other hand, when the main chain branches back, the parallel chain will roll back along with the main chain, so that it is difficult for the business side of the parallel chain to quickly obtain the transaction execution result that guarantees the certainty.
In view of the above problems, the applicant has proposed a parallel chain consensus mechanism in another application filed concurrently with the present application, which enables tps of a parallel chain not to be limited by transaction processing capability of a main chain and enables a business party of the parallel chain to quickly obtain a transaction execution result that guarantees certainty.
In the parallel chain consensus mechanism, each node of a parallel chain carries out parallel chain consensus through a consensus protocol without bifurcation, the parallel chain does not need to record each parallel chain transaction to a main chain, only the main chain evidence deposit transaction of each parallel chain block height needs to be recorded to the main chain, and after the parallel chain nodes confirm that the main chain evidence deposit transaction of the latest height is successfully executed on the main chain, the parallel chain evidence deposit transactions of the same height are stored in a local transaction pool, so that the parallel chain consensus of the height can be confirmed.
In the parallel chain consensus mechanism, because the consensus mechanism of the parallel chain is not forked, the parallel chain does not roll back along with the rolling back of the main chain, and after the parallel chain execution transaction succeeds when the assets of the main chain are transferred to the parallel chain, the main chain risks rolling back, for example, a user a transfers some assets on the main chain to the parallel chain (main chain-m 1, parallel chain + m 1), and after the parallel chain execution transaction succeeds, the main chain rolls back, and the original successfully executed transaction fails to be executed after rolling back (main chain-0, parallel chain + m 1), which may cause the user a to obtain an asset due to empty.
Disclosure of Invention
In view of the above-mentioned deficiencies or inadequacies in the prior art, it would be desirable to provide an asset transfer method, apparatus, and storage medium that ensure proper operation of cross-chain asset transfers in the parallel chain mechanism described above.
In a first aspect, the present invention provides an asset transfer method suitable for a main chain node, where the main chain node stores push addresses registered by a plurality of parallel link nodes, each parallel link node of a parallel chain performs parallel chain consensus through a consensus protocol that does not diverge, and a parallel chain block does not roll back along with the rolling back of the main chain block, the method including:
after the first asset transfer transaction is successfully executed, whether a first push address registered by a parallel chain node of a first parallel chain is stored locally is searched for:
if yes, storing the first asset transfer transaction into a list to be pushed; wherein the first asset transfer transaction is a transaction in which a first user requests to transfer his first asset on the main chain to a first parallel chain; and (c) a second step of,
monitoring whether a first transaction for withdrawal by a first user exists in a first number of backbone blocks after a backbone block to which the first asset transfer transaction belongs:
if not, pushing the first asset transfer transaction to a first pushing address for broadcasting and packaging execution of the corresponding parallel link node;
if yes, judging whether all the first transactions are successfully executed:
if yes, pushing the first asset transfer transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel chain nodes;
if not, monitoring whether the first asset transfer transaction fails to be executed after the block to which the first asset transfer transaction belongs is rolled back:
if not, pushing the first asset transfer transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel link nodes;
if so, the first asset transfer transaction is deleted from the to-be-pushed list.
Wherein the first number is a rollback safe depth of the main chain.
In a second aspect, the present invention provides an asset transfer method applicable to parallel chain nodes, where a current parallel chain node registers a first push address of the current parallel chain node in a first main chain node, each parallel chain node of the current parallel chain performs parallel chain consensus through a consensus protocol that does not branch, and a parallel chain block does not roll back along with a main chain block, the method including:
and receiving a first asset transfer transaction pushed by the first main chain node according to the first push address, broadcasting and packaging to execute the first asset transfer transaction.
The first asset transfer transaction is stored in a to-be-pushed list after being successfully executed by a first main chain node, and whether a plurality of first transactions for withdrawing by first users exist in a first number of main chain blocks after the main chain block to which the first asset transfer transaction belongs is monitored:
if not, pushing the first asset transfer transaction to a first pushing address;
if yes, judging whether all the first transactions are executed successfully:
if yes, pushing the first asset transfer transaction to a first pushing address;
if not, monitoring whether the first asset transfer transaction fails to be executed after the block to which the first asset transfer transaction belongs is rolled back:
if not, pushing the first asset transfer transaction to a first pushing address;
if yes, deleting the first asset transfer transaction from the list to be pushed;
the first number is the rollback safe depth of the main chain.
In a third aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a method of asset transfer provided according to embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the asset transfer method provided according to the embodiments of the present invention.
According to the asset transfer method, the equipment and the storage medium provided by the embodiments of the invention, a push mechanism for pushing the asset transfer transaction successfully executed on the main chain from the main chain node to the parallel chain link point is configured for the parallel chain which is not branched and does not roll back along with the main chain, and a safety mechanism for monitoring whether the asset transfer transaction has the risk of execution failure after roll back is configured in the push mechanism, so that the asset transfer transaction pushed from the main chain node to the parallel chain node has no risk of execution failure after roll back, and the normal operation of cross-chain asset transfer in the main chain-parallel chain system is ensured;
the asset transfer method, device and storage medium provided by some embodiments of the present invention further query and verify whether the asset transfer transaction has a risk of execution failure after rollback by the parallel chain node after receiving the asset transfer transaction pushed by the main chain node to the other main chain nodes, thereby further avoiding a risk caused by malicious behavior of the main chain node.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of an asset transfer method according to an embodiment of the present invention.
FIG. 2 is a flow chart of a main chain node responding to a query request of a parallel chain node in a preferred embodiment of the method shown in FIG. 1.
Fig. 3 is a flowchart of another asset transfer method according to an embodiment of the invention.
FIG. 4 is a flow chart of a preferred embodiment of the method of FIG. 3.
Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the present application, the embodiments and features of the embodiments may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of an asset transfer method according to an embodiment of the present invention.
As shown in fig. 1, in this embodiment, the present invention provides an asset transfer method suitable for a main chain node, where the main chain node stores push addresses registered by a plurality of parallel chain nodes, the parallel chain nodes of a parallel chain perform parallel chain consensus through a consensus protocol that does not branch, and a parallel chain block does not roll back along with the main chain block, the method includes:
s11: after the first asset transfer transaction is successfully executed, whether a first push address registered by a parallel chain node of a first parallel chain is stored locally is searched for:
if yes, go to step S12: storing the first asset transfer transaction into a to-be-pushed list; wherein the first asset transfer transaction is a transaction in which a first user requests to transfer his first asset on the main chain to a first parallel chain; and (c) a second step of,
s13: monitoring whether a first transaction for withdrawal by a first user exists in a first number of backbone blocks after a backbone block to which the first asset transfer transaction belongs:
otherwise, step S14 is executed: pushing the first asset transfer transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel chain nodes;
if yes, go to step S15: judging whether all the first transactions are executed successfully:
if yes, go to step S14: pushing the first asset transfer transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel chain nodes;
otherwise, step S16 is executed: monitoring whether the first asset transfer transaction fails to execute after the belonging block rolls back:
otherwise, step S14 is executed: pushing the first asset transfer transaction to a first pushing address for broadcasting, packaging and executing by corresponding parallel chain nodes;
if yes, go to step S17: the first asset transfer transaction is deleted from the to-be-pushed list.
Wherein the first number is the rollback safety depth of the main chain.
The method is exemplified below by the case where the user a has 120 aaa coins in the account of the main chain M and performs asset transfer by sending one asset transfer transaction tx1 for transferring 100 aaa coins on the main chain M to the parallel chain N.
After the user side of the user A generates tx1, the tx1 is sent to the main chain network, the main chain node broadcasts, packages and executes the tx1, and the execution is successful, at this time, the balance of the aaa coin in the account of the main chain M of the user A is 20 (the commission charge is not considered temporarily, for example, the commission charge is configured into other currency types, and the balance of the currency type is not influenced).
In step S11, after tx1 is successfully executed, each main-chain node respectively searches whether a push address registered by a parallel-chain node of the parallel chain N exists locally:
for example, if the main chain node m0 is not found, then m0 does not need to push tx1 to the parallel chain link point;
for another example, the main chain node m1 finds the push addresses addr registered in the parallel chain nodes N1 and N2 of the parallel chain N respectively n1 、addr n2 Then, the main chain node m1 executes step S12 to store tx1 in the to-be-pushed list. Other master link points are similar to m0 or m1 and are not listed.
In step S13, the main chain node m1 monitors whether there is a transaction for withdrawal by the user a in 6 main chain blocks (in this embodiment, the rollback security depth of the main chain is 6, and in further embodiments, different block chain systems may be configured with different rollback security depths) after the main chain block1 to which tx1 belongs:
otherwise, step S14 is executed to push tx1 to addr n1 、addr n2 For parallel chain nodes n1, n2 to broadcast and perform in a packagetx1, adding 100 aaa coins in the account of the user A in the parallel chain N;
if yes, step S15 is executed to determine whether all the monitored transactions (single or multiple transactions may be monitored) of the user a for withdrawing money are successfully executed:
for example, if it is detected that one transaction tx2, tx2 is a transaction for extracting 10 aaa coins, and tx2 is successfully executed, step S14 is also executed;
for another example, if it is monitored that one transaction tx3, tx3 is a transaction for extracting 50 aaa coins, and tx3 fails to be executed, step S16 is executed to monitor whether tx1 fails to be executed after block1 rolls back:
for example, if block1 is not rolled back, step S14 is also executed;
for another example, after block1 rolls back, tx1 is executed again successfully, and step S14 is executed in the same way;
for another example, after block1 rolls back, tx3 is executed successfully first (at this time, the balance of aaa coins in the account of the user a on the main chain M remains only 70), and tx1 is executed unsuccessfully, step S17 is executed, tx1 is deleted from the list to be pushed, and tx1 is not pushed any more.
In the embodiment, a pushing mechanism for pushing the asset transfer transaction successfully executed on the main chain from the main chain node to the parallel chain link point is configured for the parallel chain which is not forked and does not roll back along with the main chain, and a safety mechanism for monitoring whether the asset transfer transaction has the risk of execution failure after rolling back is configured in the pushing mechanism, so that the asset transfer transaction pushed from the main chain node to the parallel chain node does not have the risk of execution failure after rolling back, and the normal operation of cross-chain asset transfer in the main chain-parallel chain system is ensured.
FIG. 2 is a flow chart of a main chain node responding to a query request of a parallel chain node in a preferred embodiment of the method shown in FIG. 1.
As shown in fig. 2, in a preferred embodiment, the method further comprises:
s181: receiving a first query request sent by a first parallel link node; wherein the first query request includes a transaction hash of the second asset transfer transaction;
s183: querying an execution result of the second asset transfer transaction according to the transaction hash;
s185: and returning the execution result to the first parallel chain node for judging whether to broadcast and package the second asset transfer transaction according to the execution result and the height difference between the current block height of the main chain and the block height of the block to which the second asset transfer transaction belongs.
Specifically, for the scheme shown in fig. 1, although the security mechanism configured on the main chain side may ensure that there is no risk of execution failure after rollback of the asset transfer transaction pushed by the main chain node to the parallel chain node, when the main chain node directly pushes the asset transfer transaction to the parallel chain node due to malicious reason such as not complying with the security mechanism, the risk of execution failure after rollback of the transaction on the main chain still exists when the parallel chain node directly broadcasts and packages the asset transfer transaction.
In view of the above problem, in this embodiment, after the parallel link node receives the asset transfer transaction pushed by the main chain node, it is possible to verify whether the main chain node pushing the transaction complies with the security mechanism and whether there is a risk in executing the transaction by querying the execution result of the asset transfer transaction and the height difference between the current block height of the main chain and the block height of the block to which the asset transfer transaction belongs.
For example, after receiving tx1 pushed by the main chain node m1, the parallel chain node n1 generates a query request including hash (tx 1), and sends the query request to the main chain node m5.
The main-chain node m5 performs step S181 of receiving the query request, and,
s183, the main chain node m5 queries the execution result of tx1 according to the hash (tx 1);
s185, the main chain node m5 returns the execution result queried in step S183 to the parallel chain node n1.
After receiving the execution result, the parallel chain node n1 judges whether tx1 is successful, and whether the height difference H-H1 between the current block height H of the main chain and the block height H1 of the block1 to which tx1 belongs is not less than the rollback safety depth of the main chain:
if not, it indicates that the main chain node m1 does not comply with the security mechanism of the scheme shown in fig. 1, and the parallel chain node n1 may choose to discard tx1, or may choose to wait for a period of time and then send a query request to other main chain nodes again;
if yes, it means that the main chain node m1 complies with the security mechanism of the scheme shown in fig. 1, and the parallel chain node n1 may broadcast and perform tx1 in a packet manner, or perform a delay process on tx1 according to the security policy configured by the parallel chain.
The above embodiment further checks and verifies whether the asset transfer transaction has a risk of execution failure after rollback by the parallel chain node after receiving the asset transfer transaction pushed by the main chain node, thereby further avoiding the risk caused by the malicious behavior of the main chain node.
Fig. 3 is a flowchart of another asset transfer method according to an embodiment of the invention. The method illustrated in fig. 3 may be performed in conjunction with the method illustrated in fig. 1.
As shown in fig. 3, in the present invention, an asset transfer method applicable to a parallel chain node is further provided, where a current parallel chain node registers a first push address of the current parallel chain node in a first main chain node, each parallel chain node of the current parallel chain performs parallel chain consensus through a consensus protocol that does not diverge, and a parallel chain block does not roll back along with a main chain block, and the method includes:
s21: and receiving a first asset transfer transaction pushed by the first main chain node according to the first push address, broadcasting and packaging to execute the first asset transfer transaction.
The first asset transfer transaction is stored in a to-be-pushed list after being successfully executed by a first main chain node, and whether a plurality of first transactions for withdrawing money of first users exist in a first number of main chain blocks after the main chain block to which the first asset transfer transaction belongs is monitored:
if not, pushing the first asset transfer transaction to a first pushing address;
if yes, judging whether all the first transactions are executed successfully:
if yes, pushing the first asset transfer transaction to a first push address;
if not, monitoring whether the first asset transfer transaction fails to be executed after the block to which the first asset transfer transaction belongs is rolled back:
if not, pushing the first asset transfer transaction to a first pushing address;
if yes, deleting the first asset transfer transaction from the list to be pushed;
the first number is the rollback safe depth of the main chain.
The asset transfer principle of the method shown in fig. 3 can refer to the method shown in fig. 1, and is not described herein again.
FIG. 4 is a flow chart of a preferred embodiment of the method shown in FIG. 3. The method illustrated in fig. 4 may be performed in conjunction with the method illustrated in fig. 2.
As shown in fig. 4, in a preferred embodiment, step S21 includes:
s211: receiving a first asset transfer transaction pushed by a first main chain node according to a first pushing address;
s213: generating a first query request according to the transaction hash of the first asset transfer transaction and sending the first query request to the second main chain node, so that the second main chain node queries an execution result of the first asset transfer transaction according to the transaction hash and returns the execution result;
s215: receiving an execution result, verifying whether the first asset transfer transaction is successfully executed on the main chain according to the execution result, and verifying whether the height difference between the current block height of the main chain and the block height of the block to which the second asset transfer transaction belongs conforms to the safety strategy of the current parallel chain: if so, a second asset transfer transaction is broadcast and packaged for execution.
The asset transfer principle of the method shown in fig. 4 can refer to the method shown in fig. 2, and is not described herein again.
Fig. 5 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 5, as another aspect, the present application also provides an apparatus 500 including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the apparatus 500 are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each unit may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The foregoing description is only exemplary of the preferred embodiments of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (6)

1. An asset transfer method, wherein the method is applied to a main chain node, the main chain node stores push addresses respectively registered by a plurality of parallel chain link points, each parallel chain node of a parallel chain performs parallel chain consensus through a consensus protocol without bifurcation, and a block of the parallel chain does not roll back along with the roll back of the main chain block, the method comprising:
after the first asset transfer transaction is successfully executed, whether a first push address registered by a parallel chain node of a first parallel chain is stored locally is searched for:
if yes, storing the first asset transfer transaction into a list to be pushed; wherein the first asset transfer transaction is a transaction in which a first user requests to transfer its first asset on a main chain to the first parallel chain; and the number of the first and second groups,
monitoring whether there are a number of first transactions for withdrawal by the first user in a first number of backbone blocks after the backbone block to which the first asset transfer transaction belongs:
if not, pushing the first asset transfer transaction to the first pushing address for broadcasting and packaging execution of the corresponding parallel link node;
if yes, judging whether all the first transactions are executed successfully:
if yes, pushing the first asset transfer transaction to the first pushing address for broadcasting and packaging execution of the corresponding parallel link node;
if not, monitoring whether the first asset transfer transaction fails to be executed after the rollback of the affiliated block:
if not, pushing the first asset transfer transaction to the first pushing address for broadcasting, packaging and executing by corresponding parallel chain nodes;
if yes, deleting the first asset transfer transaction from the list to be pushed;
wherein the first number is a rollback safe depth of the main chain.
2. The method of claim 1, further comprising:
receiving a first query request sent by a first parallel link node; wherein the first query request includes a transaction hash of a second asset transfer transaction;
querying an execution result of the second asset transfer transaction according to the transaction hash;
and returning the execution result to the first parallel chain node, so as to judge whether to broadcast and package to execute the second asset transfer transaction according to the execution result and whether the height difference H-H1 between the current block height H of the main chain and the block height H1 of the block to which the second asset transfer transaction belongs is not less than the rollback safety depth of the main chain.
3. An asset transfer method, wherein the method is applied to a parallel chain node, a current parallel chain node registers a first push address of the current parallel chain node in a first main chain node, each parallel chain node of a current parallel chain performs parallel chain consensus through a consensus protocol that no bifurcation occurs, and a parallel chain block does not roll back along with a main chain block roll back, and the method comprises:
receiving a first asset transfer transaction pushed by the first main chain node according to the first pushing address, broadcasting and packaging to execute the first asset transfer transaction;
the first asset transfer transaction is a transaction that a first user requests to transfer a first asset of the first asset transfer transaction on a main chain to a current parallel chain, the first asset transfer transaction is stored in a to-be-pushed list by the first main chain node after being successfully executed, and whether a plurality of first transactions for withdrawing money of the first user exist in a first number of main chain blocks after the main chain block to which the first asset transfer transaction belongs is monitored:
if not, pushing the first asset transfer transaction to the first pushing address;
if yes, judging whether all the first transactions are executed successfully:
if yes, pushing the first asset transfer transaction to the first push address;
if not, monitoring whether the first asset transfer transaction fails to be executed after the block to which the first asset transfer transaction belongs is rolled back:
if not, pushing the first asset transfer transaction to the first pushing address;
if yes, deleting the first asset transfer transaction from the list to be pushed;
the first number is a rollback safe depth of the main chain.
4. The method of claim 3, wherein receiving a first asset transfer transaction pushed by the first backbone node according to the first push address, broadcasting and packaging execution of the first asset transfer transaction comprises:
receiving a first asset transfer transaction pushed by the first backbone node according to the first push address;
generating a first query request according to the transaction hash of the first asset transfer transaction and sending the first query request to a second main chain node, so that the second main chain node queries an execution result of the first asset transfer transaction according to the transaction hash and returns the execution result;
receiving the execution result, verifying whether the first asset transfer transaction is successfully executed on the main chain according to the execution result, and verifying whether the height difference H-H1 between the current block height H of the main chain and the block height H1 of the block to which the first asset transfer transaction belongs conforms to the safety strategy of the current parallel chain:
if so, the first asset transfer transaction is broadcast and packaged for execution.
5. A computer device, characterized in that the device comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-4.
6. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-4.
CN202010373068.XA 2020-05-06 2020-05-06 Asset transfer method, device and storage medium Active CN111526211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010373068.XA CN111526211B (en) 2020-05-06 2020-05-06 Asset transfer method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010373068.XA CN111526211B (en) 2020-05-06 2020-05-06 Asset transfer method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111526211A CN111526211A (en) 2020-08-11
CN111526211B true CN111526211B (en) 2023-04-14

Family

ID=71908385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010373068.XA Active CN111526211B (en) 2020-05-06 2020-05-06 Asset transfer method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111526211B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767267A (en) * 2017-10-20 2018-03-06 上海策赢网络科技有限公司 The transfer method and device of a kind of virtual resource
CN108122100A (en) * 2016-11-28 2018-06-05 张家界航空工业职业技术学院 Transaction/circulation method of currency in a kind of financial transaction
CN109377365A (en) * 2018-10-18 2019-02-22 杭州复杂美科技有限公司 A kind of assets transfer method, equipment and storage medium
CN110033271A (en) * 2019-03-22 2019-07-19 湖南天河国云科技有限公司 Across the chain method of commerce of one kind, system and computer readable storage medium
CN111080449A (en) * 2019-12-03 2020-04-28 深圳前海微众银行股份有限公司 Block chain cross-chain transaction method, management node and block chain network
CN111091380A (en) * 2019-10-25 2020-05-01 趣派(海南)信息科技有限公司 Block chain asset management method based on friend covert verification

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA3000340A1 (en) * 2017-04-06 2018-10-06 Stronghold Labs, Llc Account platform for a distributed network of nodes
US20200013027A1 (en) * 2018-07-06 2020-01-09 Decentralized Finance Labs, Inc. Hybrid proof of work and proof of stake consensus to reduce circulating tokens in a blockchain system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108122100A (en) * 2016-11-28 2018-06-05 张家界航空工业职业技术学院 Transaction/circulation method of currency in a kind of financial transaction
CN107767267A (en) * 2017-10-20 2018-03-06 上海策赢网络科技有限公司 The transfer method and device of a kind of virtual resource
CN109377365A (en) * 2018-10-18 2019-02-22 杭州复杂美科技有限公司 A kind of assets transfer method, equipment and storage medium
CN110033271A (en) * 2019-03-22 2019-07-19 湖南天河国云科技有限公司 Across the chain method of commerce of one kind, system and computer readable storage medium
CN111091380A (en) * 2019-10-25 2020-05-01 趣派(海南)信息科技有限公司 Block chain asset management method based on friend covert verification
CN111080449A (en) * 2019-12-03 2020-04-28 深圳前海微众银行股份有限公司 Block chain cross-chain transaction method, management node and block chain network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A Survey on Security and Privacy Issues of Bitcoin;Mauro Conti;《IEEE》;20180531;全文 *
区块链技术在金融行业应用研究;赵鹞;《武汉金融》;20180315(第03期);全文 *
基于DAG 的分布式账本共识机制研究;高政风;《软件学报》;20191205;全文 *

Also Published As

Publication number Publication date
CN111526211A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
CN109325762B (en) Parallel chain cross-chain transaction method, equipment and storage medium
CN108647963B (en) Method and device for determining main chain of block chain, server and storage medium
CN109377365B (en) Asset transfer method, device and storage medium
CN109886681A (en) Block chain common recognition method and common recognition system
CN110730225A (en) Data processing method of Internet of things based on block chain, Internet of things and storage medium
CN111861471B (en) Parallel chain consensus method, parallel chain block rollback method, apparatus and storage medium
WO2023016428A1 (en) Byzantine fault tolerance method and apparatus, and electronic device and storage medium
CN109255057B (en) Block generation method, device, equipment and storage medium
WO2023040364A1 (en) Consensus method and apparatus, and blockchain system
CN112583811B (en) Wallet finding method, equipment and storage medium
CN110430066A (en) For reducing method, equipment and the storage medium of block chain transaction repeated broadcast
WO2023016426A1 (en) Asynchronous binary agreement method and apparatus, and electronic device and storage medium
WO2022183802A1 (en) Load balancing method, apparatus, and device, storage medium, and computer program product
CN110336677B (en) Block packing and broadcasting method and system, equipment and storage medium
CN111245897B (en) Data processing method, device, system, storage medium and processor
CN110784501B (en) Method, system, device and storage medium for packaging and broadcasting transaction group containing block
CN111526211B (en) Asset transfer method, device and storage medium
CN112436962B (en) Block chain consensus network dynamic expansion method, electronic device, system and medium
CN111524010B (en) Parallel chain consensus method, apparatus and storage medium
CN113592653B (en) Proxy delay transaction method, computer device and storage medium
CN112583908B (en) Block chain consensus method, system, equipment and medium applied to block outlet node
CN112202863B (en) Data synchronization method and device, electronic equipment and readable storage medium
CN112600698B (en) Block chain consensus method, system, equipment and medium applied to non-block-out node
KR102386921B1 (en) Computer-readable recording medium that recorded block data
CN113592485B (en) Wallet retrieving method, computer device and storage medium

Legal Events

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