CN112600664A - Delayed transaction generation method, delayed transaction execution device and storage medium - Google Patents
Delayed transaction generation method, delayed transaction execution device and storage medium Download PDFInfo
- Publication number
- CN112600664A CN112600664A CN202011425280.2A CN202011425280A CN112600664A CN 112600664 A CN112600664 A CN 112600664A CN 202011425280 A CN202011425280 A CN 202011425280A CN 112600664 A CN112600664 A CN 112600664A
- Authority
- CN
- China
- Prior art keywords
- delayed
- transaction
- deposit
- time
- block
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3236—Cryptographic 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3247—Cryptographic 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Power Engineering (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a delayed transaction generation method, a delayed transaction execution method, equipment and a storage medium, and relates to the technical field of block chains and the like, wherein the method comprises the following steps: receiving a delayed deposit transaction; when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction, and depositing the delayed certificate-deposit transaction onto the block chain; storing the delayed transactions to the local, and determining the initial packaging time of the delayed transactions according to the delayed information; when the initial packing time is reached and the packing right of the latest first block after the initial packing time is possessed, generating a first block according to the delayed transaction; and broadcasting the first block to other block chain nodes so as to delete local delayed transactions of other block chain nodes. The block chain network security enhancing method and the block chain network security enhancing device enhance the security of the block chain network.
Description
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a delayed transaction generation method, a delayed transaction execution method, a device, and a storage medium.
Background
In the prior art, there are generally two execution modes for delayed transactions: 1. after receiving the delayed transaction tx1, the node caches tx1 in the mempool; 2. after receiving the delayed transaction tx1, the node stores tx1 locally, and packs the transaction into a block after the time is up.
In the mechanism 1, since the size of the block chain node mempool is limited, if a malicious node attacks, the problem that the storage space of the block chain node mempool is greatly occupied is easily caused; in the mechanism 2, since the way of storing tx1 locally at the chunk node point is free, if there is a malicious node attack, it is also easy to cause a problem that the local storage space of the chunk node point is largely occupied.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a delayed transaction generating method, a delayed transaction executing method, a device and a storage medium for enhancing the security of a blockchain network.
In a first aspect, the present invention provides a method for generating a delayed transaction applicable to a client, where the method includes:
generating delayed transactions, and generating delayed evidence-storing transactions according to the delayed transactions; the payload field of the delayed credit transaction comprises delayed transaction, and the delayed transaction comprises delayed information;
and sending the delayed credit transaction to a block chain network for block chain nodes:
when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction, and depositing the delayed certificate-deposit transaction onto the block chain; and the number of the first and second groups,
storing the delayed transactions to the local, and determining the initial packaging time of the delayed transactions according to the delayed information; and the number of the first and second groups,
when the initial packing time is reached and the packing right of the latest first block after the initial packing time is possessed, generating a first block according to the delayed transaction; and the number of the first and second groups,
and broadcasting the first block to other block chain nodes so as to delete local delayed transactions of other block chain nodes.
In a second aspect, the present invention provides a delayed transaction execution method for a blockchain node, where the method includes:
receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to the delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction, and depositing the delayed certificate-deposit transaction onto the block chain;
storing the delayed transactions to the local, and determining the initial packaging time of the delayed transactions according to the delayed information;
when the initial packing time is reached and the packing right of the latest first block after the initial packing time is possessed, generating a first block according to the delayed transaction;
and broadcasting the first block to other block chain nodes so as to delete local delayed transactions of other block chain nodes.
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 delayed transaction generation method and a delayed transaction execution method 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 delayed transaction generating method and the delayed transaction executing method provided according to the embodiments of the present invention.
The delayed transaction generation method, the delayed transaction execution method, the equipment and the storage medium provided by the embodiments of the invention receive the delayed deposit evidence transaction; when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction, and depositing the delayed certificate-deposit transaction onto the block chain; storing the delayed transactions to the local, and determining the initial packaging time of the delayed transactions according to the delayed information; when the initial packing time is reached and the packing right of the latest first block after the initial packing time is possessed, generating a first block according to the delayed transaction; the first block is broadcasted to other block chain nodes, so that the local delayed transaction method can be deleted by other block chain nodes, and the safety of the block chain network is enhanced.
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 a delayed transaction generating method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a delayed transaction execution method according to an embodiment of the present invention.
Fig. 3 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 relevant invention and not restrictive of 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 the embodiments and features of the embodiments in the present application 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 a delayed transaction generating method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a delayed transaction generating method suitable for a client, where the method includes:
s12: generating delayed transactions, and generating delayed evidence-storing transactions according to the delayed transactions; the payload field of the delayed credit transaction comprises delayed transaction, and the delayed transaction comprises delayed information;
s14: and sending the delayed credit transaction to a block chain network for block chain nodes:
when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction, and depositing the delayed certificate-deposit transaction onto the block chain; and the number of the first and second groups,
storing the delayed transactions to the local, and determining the initial packaging time of the delayed transactions according to the delayed information; and the number of the first and second groups,
when the initial packing time is reached and the packing right of the latest first block after the initial packing time is possessed, generating a first block according to the delayed transaction; and the number of the first and second groups,
and broadcasting the first block to other block chain nodes so as to delete local delayed transactions of other block chain nodes.
Specifically, the delay information is taken as a fixed time; the first signature information of the delayed transaction comprises delayed information of the delayed transaction; when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction comprises the following steps: judging that the delayed evidence-depositing transaction is the first type of transaction needing delay according to the name of an executor of the delayed evidence-depositing transaction, and deducting the commission charge of the delayed evidence-depositing transaction as an example; assuming that the delayed transaction is tx1, the delayed evidence transaction is tx2, the payload field of tx2 includes tx1, and the delay information is a fixed time, which is assumed to be 0:00:00 in 1 month and 1 day of 2021 year;
the client performs the step S12, generates tx1, and generates tx2 according to tx 1;
the client executes the step S14 to send tx2 to the blockchain network;
the block link points judge that tx2 is the first type of transaction needing time delay according to the actuator name delay of tx2, deduct the commission charge of tx2 and store tx2 on the block chain;
the block chain link point stores tx1 locally, and the time delay information in the signature information of tx1 determines the initial packaging time of tx1, wherein the initial packaging time is 2021 year, 1 month, 1 day 0:00: 00;
when the packaging right of the latest block after the block link point A is owned by the block link point A at 1 month and 1 day 0:00:00 of 2021 year is reached, the block is generated according to tx 1;
a broadcasts the tile to other blockchain nodes, which delete tx1 locally.
In the embodiment, the delay information is used as the fixed time; the first signature information of the delayed transaction comprises delayed information of the delayed transaction; when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction comprises the following steps: the delayed evidence deposit transaction is judged to be the first type of transaction needing delay according to the name of the executor of the delayed evidence deposit transaction, and the processing fee of the delayed evidence deposit transaction is deducted, so that the delayed transaction generation method is exemplarily explained.
In further embodiments, the delay information may be configured according to actual requirements, for example, configured as a first time length required to be extended for the delayed transaction, and correspondingly, the calculation method of the starting packing time of the delayed transaction should also be configured according to actual situations, for example, configured as: the initial packaging time of the delayed transaction is determined according to the first time and the first time length of the packaged delayed deposit certificate transaction, and the same technical effect can be achieved.
In further embodiments, the delay information of the delayed transaction may also be configured in other fields according to actual requirements. It will be understood by those skilled in the art that when the delay information for the delayed transaction is configured in the signature information, the assets delayed in the delayed transaction may be not only assets in the delayed contract, but also assets of other contracts (i.e., the actuator name for the delayed transaction is configured as other contracts outside the delayed contract), or global assets (i.e., the actuator name for the delayed transaction is configured as null).
In more embodiments, the manner of determining whether the delayed credit-saving transaction is the first type of transaction that needs to be delayed may also be configured according to actual requirements, for example, the manner is configured that a hash value of a delayed transaction executor is recorded on a block chain, hash operation is performed according to an executor name of the delayed credit-saving transaction to obtain a hash value ', and whether the hash value is the same as the hash value' is determined to determine whether the delayed credit-saving transaction is the first type of transaction that needs to be delayed, so that the same technical effect can be achieved.
The above-described embodiments enhance blockchain network security.
Preferably, when the delayed deposit receipt is determined to be the first type of receipt needing delaying, deducting the commission charge of the delayed deposit receipt includes:
and judging that the delayed evidence-depositing transaction is the first type of transaction needing delay according to the executor name of the delayed evidence-depositing transaction, and deducting the commission charge of the delayed evidence-depositing transaction.
The delayed transaction generation principle of the above embodiment may refer to the method shown in fig. 1, and is not described herein again.
In the scenario shown in FIG. 1, tx1 is packed into blocks in advance if blockchain node A is bad, and other nodes cannot verify that tx1 is packed after a sufficient amount of time. The above mechanism would render the asset of the transaction sender of tx1 insecure.
The above problem can be solved by the following embodiments:
preferably, the delay information is a first time length required to be prolonged by the delayed transaction; storing the delayed transaction to the local, and determining the initial packaging time of the delayed transaction according to the delayed information comprises the following steps:
determining the initial packaging time of the delayed transaction according to the first time and the first time length of the packaged delayed deposit evidence transaction;
storing the delayed transaction locally, and storing a first corresponding relation between a first hash value of the delayed evidence transaction and a second hash value of the delayed transaction;
wherein the first correspondence is for other blockchain nodes:
when the delayed transaction is executed, the delayed evidence storing transaction is found according to the second hash value, and the initial packaging time of the delayed transaction is determined according to the first time and the first time length at which the delayed evidence storing transaction is packaged;
judging whether the packaging time of the delayed transaction is not earlier than the initial packaging time:
otherwise, the delayed transaction execution is unsuccessful.
Specifically, assuming that tx2 is packed at the first time of 24/11/2020/0: 00/00, the first time duration is 7days, and the generation time of the block generated by a is 30/0: 00/12/2020;
determining the starting packing time of tx1 according to the time 2020 of 11, 24, 0:00:00 and 7days when the block link points are packed according to tx2, wherein the starting packing time of tx1 is 2021, 1, 0:00: 00;
the block chain link point stores tx1 locally and stores the corresponding relation between hash (tx2) and hash (tx 1);
when the other blockchain nodes receive the blocks generated by A and execute to tx1, tx2 is found according to hash (tx1), the initial packaging time of tx1 is determined according to the time 2020 of tx1 being packaged, 11, 24, 0:00:00 and the first time length 7days, and the initial packaging time of tx1 is 2021, 1, 0:00: 00;
judging whether the node of the other block chains is 0:00:00 not earlier than the initial packaging time 2021, 1 month and 1 day 0:00:00 at 12 months and 30 days in 2020;
since 30/12/2020/0: 00:00 is earlier than 1/2021/0: 00:00 at the start packing time, the other blockchain nodes fail to execute tx 1.
Since most nodes fail to execute tx1, the error block generated by the blockchain node a becomes a block on the side chain, and finally the safety of the asset of the transaction sender of tx1 is guaranteed.
Preferably, the first signature information of the delayed transaction includes delayed information of the delayed transaction.
The delayed transaction generation principle of the above embodiment may refer to the method shown in fig. 1, and is not described herein again.
Further, the generating the first block according to the delayed transaction includes:
judging whether each first signature data in the first signature information accords with a multiple signature judgment rule:
if yes, generating a first block according to the delayed transaction.
Specifically, assume that signature information of tx1 includes "7 days: multisign:3:2: public key 1: public key 2: public key 3: public key 4: sigdata1: sigdata2: sigdata 3"; wherein 7days is delay information; multiple sign is a multiple signature identifier; 3:2 is a multiple signature judgment rule, 3 indicates that 3 signature data are required to be obtained at least, public keys corresponding to the 3 signature data should be included in public keys 1-4, and 2 indicates that at least 2 signature data in the 3 signature data are correct; the public key 1, the public key 2, the public key 3 and the public key 4 are public keys of each first account which can manage a transaction initiator of delayed transaction, the sigdata1, the sigdata2 and the sigdata3 are signature data, in the current embodiment, it is assumed that the sigdata1, the sigdata2 and the sigdata3 are correct signature data, and the corresponding public keys are all included in the public keys 1 to 4;
since sigdata1, sigdata2 and sigdata3 are correct signature data and the corresponding public keys are all included in public keys 1 to 4, the multiple signature judgment rule of tx1 is met, and then the block chain nodes generate the first block according to tx 1.
In further embodiments, the multiple signature determination rules may also be configured according to actual requirements, for example, the multiple signature determination rules are configured to be 3: 50%, where 3 indicates that at least 3 signature data need to be obtained, and 50% indicates that at least 2 signature (rounding up of 1.5) data in the 3 signature data are correct, so that the same technical effect can be achieved.
It should be understood by those skilled in the art that when multiple signature information of a delayed transaction is configured in the signature information, the assets governed by multiple signatures may be not only assets in the delayed contract, but also assets of other contracts (i.e., the executor name of the delayed transaction is configured as other contracts outside the delayed contract), or global assets (i.e., the executor name of the delayed transaction is configured as null).
Further, when each first signature data in the first signature information does not accord with the multiple signature judgment rule, a packaging failure identifier is printed on the delayed transaction locally;
after a second length of time, the credentialing transaction is deleted locally.
In more embodiments, a policy for applying the packaging failure identifier may be configured according to actual requirements, for example, it is further necessary to determine whether the commission charge of the delayed transaction is sufficient or insufficient, and apply the packaging failure identifier to the delayed transaction locally.
It should be appreciated by those skilled in the art that the blockchain system may also be configured with a first interface for the user to query the status of the delayed transaction. When the state of the delayed transaction is found to be packaging failure, the user can resend the delayed transaction. And determining delayed transactions according to the first time and the first time length of the delayed evidence-storing transactions at the initial packaging time, and inquiring corresponding delayed evidence-storing transactions by the block chain link points according to the hash values of the delayed transactions when the block chain link points receive the delayed transactions again, wherein the block chain nodes can store the delayed transactions in the memory pool only when the block chain has the corresponding delayed evidence-storing transactions and the current time reaches the initial packaging time of the delayed transactions.
Fig. 2 is a flowchart of a delayed transaction execution method according to an embodiment of the present invention. As shown in fig. 2, in this embodiment, the present invention provides a method for performing a delayed transaction applicable to a blockchain node, where the method includes:
s21: receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to the delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
s23: when the delayed certificate-deposit transaction is judged to be the first type of transaction needing delay, deducting the commission charge of the delayed certificate-deposit transaction, and depositing the delayed certificate-deposit transaction onto the block chain;
s25: storing the delayed transactions to the local, and determining the initial packaging time of the delayed transactions according to the delayed information;
s27: when the initial packing time is reached and the packing right of the latest first block after the initial packing time is possessed, generating a first block according to the delayed transaction;
s29: and broadcasting the first block to other block chain nodes so as to delete local delayed transactions of other block chain nodes.
The delayed transaction execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, when the delayed deposit receipt is determined to be the first type of receipt needing delaying, deducting the commission charge of the delayed deposit receipt includes:
and judging that the delayed evidence-depositing transaction is the first type of transaction needing delay according to the executor name of the delayed evidence-depositing transaction, and deducting the commission charge of the delayed evidence-depositing transaction.
The delayed transaction execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the delay information is a first time length required to be prolonged by the delayed transaction; storing the delayed transaction to the local, and determining the initial packaging time of the delayed transaction according to the delayed information comprises the following steps:
determining the initial packaging time of the delayed transaction according to the first time and the first time length of the packaged delayed deposit evidence transaction;
storing the delayed transaction locally, and storing a first corresponding relation between a first hash value of the delayed evidence transaction and a second hash value of the delayed transaction;
wherein the first correspondence is for other blockchain nodes:
when the delayed transaction is executed, the delayed evidence storing transaction is found according to the second hash value, and the initial packaging time of the delayed transaction is determined according to the first time and the first time length at which the delayed evidence storing transaction is packaged;
judging whether the packaging time of the delayed transaction is not earlier than the initial packaging time:
if yes, the local delayed transaction is deleted.
The delayed transaction execution principle of the above embodiment can refer to a method of a preferred embodiment shown in fig. 1, and is not described herein again.
Preferably, the first signature information of the delayed transaction includes delayed information of the delayed transaction.
The delayed transaction execution principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Further, the delayed transaction is a multiple signature transaction, the first signature information includes multiple signature identifiers, a first public key of each first account that can manage a transaction initiator of the delayed transaction, multiple signature determination rules that can successfully execute the first multiple signature transaction, and first signature data obtained by a plurality of second accounts signing transaction contents of the delayed transaction according to a held private key, and the generating the first block according to the delayed transaction includes:
judging whether each first signature data in the first signature information conforms to the multiple signature judgment rule:
if yes, generating the first block according to the delayed transaction.
The delayed transaction execution principle of the above embodiment can refer to a method of a preferred embodiment shown in fig. 1, and is not described herein again.
Further, when each first signature data in the first signature information does not accord with the multiple signature judgment rule, a packaging failure identifier is printed on the delayed transaction locally;
and after a second time period, locally deleting the deposit transaction.
The delayed transaction execution principle of the above embodiment can refer to a method of a preferred embodiment shown in fig. 1, and is not described herein again.
Fig. 3 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 3, as another aspect, the present application also provides an apparatus including one or more Central Processing Units (CPUs) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the apparatus 300 are also stored. The CPU301, ROM302, and RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input portion 306 including a keyboard, a mouse, and the like; an output section 307 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 308 including a hard disk and the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. A drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 310 as necessary, so that a computer program read out therefrom is mounted into the storage section 308 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 309, and/or installed from the removable medium 311.
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 which 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 of the described units 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 above description is only a preferred embodiment 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 (14)
1. A delayed transaction generation method is applicable to a client side, and comprises the following steps:
generating delayed transactions, and generating delayed evidence-storing transactions according to the delayed transactions; wherein, the payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
and sending the delayed credit transaction to a block chain network for block chain nodes:
when the delayed certificate deposit transaction is judged to be a first type transaction needing delay, deducting the commission charge of the delayed certificate deposit transaction, and placing the delayed certificate deposit transaction on a block chain; and the number of the first and second groups,
storing the delayed transaction to the local, and determining the initial packaging time of the delayed transaction according to the delayed information; and the number of the first and second groups,
when the packaging right of the latest first block after the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is possessed, generating the first block according to the delayed transaction; and the number of the first and second groups,
broadcasting the first block to other block chain nodes for other block chain nodes to delete the local delayed transaction.
2. The method of claim 1, wherein deducting a commission for the delayed deposit transaction when the delayed deposit transaction is determined to be a first type of transaction requiring a delay comprises:
and judging that the delayed evidence-depositing transaction is the first type of transaction needing delaying according to the executor name of the delayed evidence-depositing transaction, and deducting the commission charge of the delayed evidence-depositing transaction.
3. The method of claim 1, wherein the delay information is a first time period required to be extended for the delayed transaction; the step of storing the delayed transaction locally and determining the initial packaging time of the delayed transaction according to the delayed information comprises:
determining the initial packaging time of the delayed transaction according to the first time when the delayed deposit evidence transaction is packaged and the first time length;
storing the delayed transaction to the local, and storing a first corresponding relation between a first hash value of the delayed evidence-storing transaction and a second hash value of the delayed transaction;
wherein the first correspondence is for other blockchain nodes:
when the delayed transaction is executed, finding the delayed deposit certificate transaction according to the second hash value, and determining the initial packaging time of the delayed transaction according to the first time and the first time length at which the delayed deposit certificate transaction is packaged;
judging whether the packaging time of the delayed transaction is not earlier than the initial packaging time:
otherwise, the delayed transaction execution is unsuccessful.
4. The method of claim 1, wherein the first signature information of the delayed transaction comprises delayed information of the delayed transaction.
5. The method of claim 4, wherein the delayed transaction is a multiple signature transaction, the first signature information includes multiple signature identifications, first public keys of first accounts that can manage transaction initiators of the delayed transaction, multiple signature determination rules that can successfully execute the first multiple signature transaction, and first signature data obtained by signing transaction contents of the delayed transaction by a plurality of second accounts according to a held private key, and the generating the first block according to the delayed transaction includes:
judging whether each first signature data in the first signature information conforms to the multiple signature judgment rule:
if yes, generating the first block according to the delayed transaction.
6. The method of claim 5, further comprising:
when each first signature data in the first signature information does not accord with the multiple signature judgment rule, a packaging failure identifier is printed on the delayed transaction locally;
and after a second time period, locally deleting the deposit transaction.
7. A delayed transaction execution method applied to a blockchain node, the method comprising:
receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
when the delayed certificate deposit transaction is judged to be a first type transaction needing delay, deducting the commission charge of the delayed certificate deposit transaction, and placing the delayed certificate deposit transaction on a block chain;
storing the delayed transaction to the local, and determining the initial packaging time of the delayed transaction according to the delayed information;
when the packaging right of the latest first block after the initial packaging time is reached and the packaging right of the latest first block after the initial packaging time is possessed, generating the first block according to the delayed transaction;
broadcasting the first block to other block chain nodes for other block chain nodes to delete the local delayed transaction.
8. The method of claim 7, wherein deducting a commission for the delayed deposit transaction when the delayed deposit transaction is determined to be a first type of transaction requiring a delay comprises:
and judging that the delayed evidence-depositing transaction is the first type of transaction needing delaying according to the executor name of the delayed evidence-depositing transaction, and deducting the commission charge of the delayed evidence-depositing transaction.
9. The method of claim 7, wherein the delay information is a first time period required to be extended for the delayed transaction; the step of storing the delayed transaction locally and determining the initial packaging time of the delayed transaction according to the delayed information comprises:
determining the initial packaging time of the delayed transaction according to the first time when the delayed deposit evidence transaction is packaged and the first time length;
storing the delayed transaction to the local, and storing a first corresponding relation between a first hash value of the delayed evidence-storing transaction and a second hash value of the delayed transaction;
wherein the first correspondence is for other blockchain nodes:
when the delayed transaction is executed, finding the delayed deposit certificate transaction according to the second hash value, and determining the initial packaging time of the delayed transaction according to the first time and the first time length at which the delayed deposit certificate transaction is packaged;
judging whether the packaging time of the delayed transaction is not earlier than the initial packaging time:
and if so, deleting the local delayed transaction.
10. The method of claim 7, wherein the first signature information of the delayed transaction comprises delayed information of the delayed transaction.
11. The method of claim 10, wherein the delayed transaction is a multiple signature transaction, the first signature information includes multiple signature identifications, first public keys of first accounts that can manage transaction initiators of the delayed transaction, multiple signature determination rules that can successfully execute the first multiple signature transaction, and first signature data obtained by signing transaction contents of the delayed transaction by a plurality of second accounts according to a held private key, and the generating the first block according to the delayed transaction includes:
judging whether each first signature data in the first signature information conforms to the multiple signature judgment rule:
if yes, generating the first block according to the delayed transaction.
12. The method of claim 11, further comprising:
when each first signature data in the first signature information does not accord with the multiple signature judgment rule, a packaging failure identifier is printed on the delayed transaction locally;
and after a second time period, locally deleting the deposit transaction.
13. An apparatus, characterized in that the apparatus 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-12.
14. 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-12.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011425280.2A CN112600664B (en) | 2020-12-09 | 2020-12-09 | Delayed transaction generation method, delayed transaction execution device and storage medium |
PCT/CN2021/111855 WO2022121348A1 (en) | 2020-12-09 | 2021-08-10 | Delayed transaction generation method, delayed transaction execution method, and device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011425280.2A CN112600664B (en) | 2020-12-09 | 2020-12-09 | Delayed transaction generation method, delayed transaction execution device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112600664A true CN112600664A (en) | 2021-04-02 |
CN112600664B CN112600664B (en) | 2022-06-24 |
Family
ID=75191123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011425280.2A Active CN112600664B (en) | 2020-12-09 | 2020-12-09 | Delayed transaction generation method, delayed transaction execution device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112600664B (en) |
WO (1) | WO2022121348A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113225193A (en) * | 2021-05-06 | 2021-08-06 | 杭州复杂美科技有限公司 | Delayed transaction storage method, computer device and storage medium |
CN113222577A (en) * | 2021-05-25 | 2021-08-06 | 杭州复杂美科技有限公司 | Delayed transfer method, computer device and storage medium |
CN113592651A (en) * | 2021-08-02 | 2021-11-02 | 杭州复杂美科技有限公司 | Delayed transaction method, computer device and storage medium |
CN113592653A (en) * | 2021-08-02 | 2021-11-02 | 杭州复杂美科技有限公司 | Proxy delayed transaction method, computer device and storage medium |
CN113706303A (en) * | 2021-08-02 | 2021-11-26 | 杭州复杂美科技有限公司 | Universal time-delay transaction method, computer equipment and storage medium |
WO2022121348A1 (en) * | 2020-12-09 | 2022-06-16 | 杭州复杂美科技有限公司 | Delayed transaction generation method, delayed transaction execution method, and device and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019035573A1 (en) * | 2017-08-16 | 2019-02-21 | 김용태 | Blockchain-based trading system and method therefor |
CN110175847A (en) * | 2019-05-31 | 2019-08-27 | 联想(北京)有限公司 | Exchange management method, trade managing system and computer system |
CN110288445A (en) * | 2019-06-28 | 2019-09-27 | 杭州复杂美科技有限公司 | Decentralization storage method, equipment and storage medium |
CN110930157A (en) * | 2019-11-14 | 2020-03-27 | 杭州复杂美科技有限公司 | Delayed transaction processing method, device and storage medium |
CN111290733A (en) * | 2020-02-18 | 2020-06-16 | 杭州复杂美科技有限公司 | Settlement method, apparatus and storage medium |
KR20200079877A (en) * | 2018-12-26 | 2020-07-06 | 주식회사 호윤 | Blockchain system for delaying execution of smart contract |
CN111524012A (en) * | 2020-05-06 | 2020-08-11 | 杭州复杂美科技有限公司 | Data delay publishing method, device and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11080701B2 (en) * | 2015-07-02 | 2021-08-03 | Royal Bank Of Canada | Secure processing of electronic payments |
CN109947845A (en) * | 2018-11-23 | 2019-06-28 | 阿里巴巴集团控股有限公司 | A kind of block chain deposits card method, apparatus and computer equipment |
CN110782255B (en) * | 2019-11-06 | 2022-11-15 | 杭州复杂美科技有限公司 | Delayed transaction cancellation method, apparatus and storage medium |
CN111523894A (en) * | 2020-05-06 | 2020-08-11 | 杭州复杂美科技有限公司 | Data delay publishing method, device and storage medium |
CN112583811B (en) * | 2020-12-09 | 2023-04-14 | 杭州复杂美科技有限公司 | Wallet finding method, equipment and storage medium |
CN112600664B (en) * | 2020-12-09 | 2022-06-24 | 杭州复杂美科技有限公司 | Delayed transaction generation method, delayed transaction execution device and storage medium |
CN112381543A (en) * | 2020-12-09 | 2021-02-19 | 杭州复杂美科技有限公司 | Multiple signature transaction method, device and storage medium |
-
2020
- 2020-12-09 CN CN202011425280.2A patent/CN112600664B/en active Active
-
2021
- 2021-08-10 WO PCT/CN2021/111855 patent/WO2022121348A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019035573A1 (en) * | 2017-08-16 | 2019-02-21 | 김용태 | Blockchain-based trading system and method therefor |
KR20200079877A (en) * | 2018-12-26 | 2020-07-06 | 주식회사 호윤 | Blockchain system for delaying execution of smart contract |
CN110175847A (en) * | 2019-05-31 | 2019-08-27 | 联想(北京)有限公司 | Exchange management method, trade managing system and computer system |
CN110288445A (en) * | 2019-06-28 | 2019-09-27 | 杭州复杂美科技有限公司 | Decentralization storage method, equipment and storage medium |
CN110930157A (en) * | 2019-11-14 | 2020-03-27 | 杭州复杂美科技有限公司 | Delayed transaction processing method, device and storage medium |
CN111290733A (en) * | 2020-02-18 | 2020-06-16 | 杭州复杂美科技有限公司 | Settlement method, apparatus and storage medium |
CN111524012A (en) * | 2020-05-06 | 2020-08-11 | 杭州复杂美科技有限公司 | Data delay publishing method, device and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022121348A1 (en) * | 2020-12-09 | 2022-06-16 | 杭州复杂美科技有限公司 | Delayed transaction generation method, delayed transaction execution method, and device and storage medium |
CN113225193A (en) * | 2021-05-06 | 2021-08-06 | 杭州复杂美科技有限公司 | Delayed transaction storage method, computer device and storage medium |
CN113222577A (en) * | 2021-05-25 | 2021-08-06 | 杭州复杂美科技有限公司 | Delayed transfer method, computer device and storage medium |
CN113592651A (en) * | 2021-08-02 | 2021-11-02 | 杭州复杂美科技有限公司 | Delayed transaction method, computer device and storage medium |
CN113592653A (en) * | 2021-08-02 | 2021-11-02 | 杭州复杂美科技有限公司 | Proxy delayed transaction method, computer device and storage medium |
CN113706303A (en) * | 2021-08-02 | 2021-11-26 | 杭州复杂美科技有限公司 | Universal time-delay transaction method, computer equipment and storage medium |
CN113706303B (en) * | 2021-08-02 | 2023-05-30 | 杭州复杂美科技有限公司 | Universal time delay transaction method, computer equipment and storage medium |
CN113592651B (en) * | 2021-08-02 | 2023-05-30 | 杭州复杂美科技有限公司 | Delay transaction method, computer device and storage medium |
CN113592653B (en) * | 2021-08-02 | 2023-05-30 | 杭州复杂美科技有限公司 | Proxy delay transaction method, computer device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2022121348A1 (en) | 2022-06-16 |
CN112600664B (en) | 2022-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112600664B (en) | Delayed transaction generation method, delayed transaction execution device and storage medium | |
CN111629039B (en) | Block chain consensus method, client, endorsement node and sequencing node | |
CN107342867B (en) | Signature verification method and device | |
CN112583811B (en) | Wallet finding method, equipment and storage medium | |
CN113037817B (en) | Method and device for starting intelligent contract, electronic equipment and storage medium | |
CN110599177A (en) | Transaction verification method and related equipment | |
CN112381543A (en) | Multiple signature transaction method, device and storage medium | |
CN110187831B (en) | Block data storage system and method of block chain alliance chain | |
CN113706313A (en) | Financing method, system and computer readable storage medium based on block chain | |
CN109840769A (en) | Card method and device, system and storage medium are deposited based on block chain | |
CN113326332B (en) | Snapshot synchronization method and device of blockchain | |
CN117635333A (en) | Block chain transaction execution method and block chain link point | |
CN111523896B (en) | Attack prevention method, apparatus and storage medium | |
CN111523897B (en) | Anti-attack method, device and storage medium | |
WO2024055740A1 (en) | Data processing method, computer device, and readable storage medium | |
CN112258188A (en) | Processing method, device, equipment and system for block chain transaction | |
CN114266665B (en) | Contract multi-main chain crossing method, equipment and storage medium | |
CN114092093B (en) | Block chain transaction processing method and device, electronic equipment and readable medium | |
CN115412557A (en) | Block chain resource management method and device based on multi-chain cooperation | |
CN113592639B (en) | Block chain transaction deleting method and system | |
US20220005025A1 (en) | Distributed ledger management system, distributed ledger management method, and node | |
CN111290733B (en) | Settlement method, apparatus and storage medium | |
CN113592653A (en) | Proxy delayed transaction method, computer device and storage medium | |
CN113051625A (en) | Data evidence storing method and device based on block chain | |
CN113592652B (en) | Delay transaction 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 |