CN112700240B - UTXO architecture-based transaction commission fee promotion method and system in block chain - Google Patents

UTXO architecture-based transaction commission fee promotion method and system in block chain Download PDF

Info

Publication number
CN112700240B
CN112700240B CN202110309117.8A CN202110309117A CN112700240B CN 112700240 B CN112700240 B CN 112700240B CN 202110309117 A CN202110309117 A CN 202110309117A CN 112700240 B CN112700240 B CN 112700240B
Authority
CN
China
Prior art keywords
transaction
replacement
original
block
input
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
CN202110309117.8A
Other languages
Chinese (zh)
Other versions
CN112700240A (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.)
Nanjing Jinninghui Technology Co ltd
Original Assignee
Nanjing Jinninghui 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 Nanjing Jinninghui Technology Co ltd filed Critical Nanjing Jinninghui Technology Co ltd
Priority to CN202110309117.8A priority Critical patent/CN112700240B/en
Publication of CN112700240A publication Critical patent/CN112700240A/en
Application granted granted Critical
Publication of CN112700240B publication Critical patent/CN112700240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • G06Q20/367Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
    • G06Q20/3678Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes e-cash details, e.g. blinded, divisible or detecting double spending
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0283Price estimation or determination

Abstract

The application discloses a transaction commission charge promotion method and system in a block chain based on a UTXO architecture, which comprises the steps of establishing an original transaction, signing and broadcasting the original transaction; verifying the validity of the original transaction and storing the original transaction into a memory transaction pool; creating a replacement transaction; finding the original transaction, and copying the original transaction input into the replacement transaction input; adjusting a minimum time for replaceable indicia and a predetermined packaging of the replacement transaction; modifying the receive address and the commission at the output of the replacement transaction; signing and broadcasting the replacement transaction; verifying the validity of the replacement transaction; if the verification is passed, deleting the original transaction in the internal memory transaction pool and storing the replacement transaction in the transaction pool; deleting the original transaction in the wallet file and crediting the wallet file with the replacement transaction. The transaction creator achieves the effect of being packaged more quickly by improving the handling fee of the replacement transaction, so that the problem that the transaction cannot be packaged into a block in time and can only wait for a long time after being broadcast and legally stored into the memory transaction pool by being verified by other nodes is solved.

Description

UTXO architecture-based transaction commission fee promotion method and system in block chain
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and a system for increasing transaction commission in a blockchain based on a UTXO architecture.
Background
Transaction (Transaction) data for blockchains exists mainly in two places: a memory transaction pool (TXMemoryPool) and a Block (Block). When a node sends a signed common transaction to the network, most nodes receive the transaction within a few seconds, the transaction is stored in a memory transaction pool after being verified by a rule (rule), and finally the transaction is packed by miners and mined out blocks to be extended to a block chain.
Each whole node in the blockchain system maintains a blockchain, and searches and traverses all blocks through the blockchain to obtain a UTXO (unspent output) pool, and the balance quantity is output on a user level after statistics, so that the traceable and unchangeable data mechanism protects the transaction security of the whole network nodes.
When the transaction is broadcast to the network, most nodes receive the transaction, and a small part of nodes which do not receive the broadcast due to network reasons also receive the transaction when the network is clear, and finally the transaction is packed into a block and is extended to a block chain. However, due to the block size limitation or TPS (transaction per second) limitation of the block chain system, the miners' nodes cannot pack all transactions in all memory transaction pools into a block in the next block, which results in that the transactions cannot be updated to be confirmed in time after being broadcast and being legally stored into the memory transaction pools by being verified by other nodes, where confirmed means that the transactions are packed into a block, and the transactions waiting for confirmation, i.e., the transactions waiting for being packed into a block, can only be waited for a long time, which is especially common when the number of huge nodes and the number of broadcast transactions are increased dramatically.
Disclosure of Invention
Based on the technical problem, the application provides a method and a system for promoting transaction commission charge in a block chain based on a UTXO (unified transform and encryption) architecture, so as to solve the problem that the transaction cannot be packed into a block in time and only can be waited for a long time after being broadcasted and legally stored in a memory transaction pool by being checked by other nodes.
In a first aspect, the present application provides a method for increasing transaction commission in a blockchain based on a UTXO architecture, the method including:
a transaction commission promotion method in a blockchain based on UTXO architecture, the method comprises the following steps:
traversing the unspent output based on the UTXO architecture for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time;
signing and broadcasting the original transaction;
verifying the validity of the original transaction and storing the original transaction passing the verification into a memory transaction pool;
creating a replacement transaction;
finding the original transaction that corresponds to the replacement transaction that is not packaged;
copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction;
adjusting the replaceable indicia and preset packaged minimum time for the replacement transaction as needed;
modifying the received address and commission at the output of the replacement transaction;
signing and broadcasting the replacement transaction;
verifying the validity of the replacement transaction according to a preset transaction replacement rule;
if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool;
deleting the original transaction at the wallet file, and crediting the wallet file with the replacement transaction.
Further, the method also comprises the steps of checking the legal original transactions in the memory transaction pool, packaging the legal original transactions into a block, generating a transaction block, and sending the transaction block to other full nodes participating in mining;
and the full node checks the transaction blocks, enumerates the transaction blocks passing the check as candidate blocks and identifies the candidate blocks.
Further, the preset packed minimum time usage rule is that the original transaction cannot be packed into the block until the original transaction for which the preset packed minimum time is set does not reach the minimum time.
Further, the method further comprises broadcasting the block after the original transaction is packed into the block, and checking the block according to a block checking rule;
and if the original transaction sets the minimum time for presetting the package but does not reach the minimum time, judging the block to be an illegal block.
Further, the step of checking the validity of the replacement transaction according to a preset transaction replacement rule includes:
verifying the validity of the replacement transaction by the replaceable mark and judging whether the input of the original transaction and the input of the replacement transaction are consistent;
if the replaceable indicia is present and the input of the original transaction equals the input of the replacement transaction, the replacement transaction is legitimate.
Further, the commission of the replacement transaction is not less than the sum of the commission of the original transaction and the network broadband fee.
Further, the method may include reducing change at the output of the replacement transaction to increase the commission for the replacement transaction.
Further, the method may further comprise setting a specific field of the replacement transaction input to a preset function code to make the replacement transaction replaceable.
In a second aspect, the present application further provides a system for promoting transaction commission charge in a block chain based on a UTXO architecture, which includes a transaction creator and a plurality of full nodes, wherein:
the transaction creator is configured to perform the steps of:
traversing the unspent output based on the UTXO architecture for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time;
signing and broadcasting the original transaction;
verifying the validity of the original transaction and storing the original transaction passing the verification into a memory transaction pool;
creating a replacement transaction;
finding the original transaction that corresponds to the replacement transaction that is not packaged;
copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction;
adjusting the replaceable indicia and preset packaged minimum time for the replacement transaction as needed;
modifying the received address and commission at the output of the replacement transaction;
signing and broadcasting the replacement transaction;
the plurality of full nodes are configured to perform the steps of:
verifying the validity of the replacement transaction according to a preset transaction replacement rule;
if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool;
the transaction creator is further configured to perform the steps of:
deleting the original transaction at the wallet file, and crediting the wallet file with the replacement transaction.
Further, the plurality of said full nodes are further configured to perform the steps of:
broadcasting the block after the original transaction is packed into the block, and checking the block according to a block checking rule;
and if the original transaction sets the minimum time for presetting the package but does not reach the minimum time, judging the block to be an illegal block.
From the above technical solutions, the present application discloses a method and a system for increasing transaction commission in a blockchain based on a UTXO architecture, including: traversing the unspent output based on the UTXO framework for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time; signing and broadcasting the original transaction; verifying the validity of the original transaction and storing the verified original transaction into a memory transaction pool; creating a replacement transaction; finding an unpackaged original transaction corresponding to the replacement transaction; copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction; adjusting the replaceable indicia of the replacement transaction and the preset packaged minimum time as needed; modifying the receive address and the commission at the output of the replacement transaction; signing and broadcasting the replacement transaction; verifying the validity of the replacement transaction according to a preset transaction replacement rule; if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool; the original transaction is deleted at the wallet file and the replacement transaction is credited to the wallet file. The transaction creator achieves the effect of being packaged more quickly by improving the handling fee of the replacement transaction, so that the problem that the transaction cannot be packaged into a block in time and can only wait for a long time after being broadcast and legally stored into the memory transaction pool by being verified by other nodes is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of a transaction commission promotion method in a blockchain based on a UTXO architecture;
FIG. 2 is a diagram illustrating the setting of a default packaged minimum time and usage rules for an original transaction;
fig. 3 is a schematic diagram of the replacement validity check flow and replacement process of the original transaction and the replacement transaction.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The main objective of the present application is to provide a method and a system for increasing transaction commission in a blockchain based on a UTXO architecture, in which the output of transactions that have been broadcast to a network but not packed into a block and in a memory transaction pool is modified, so as to achieve the purpose of increasing transaction commission and replacing transaction output.
Utxo (outstanding Transaction outputs) is an inexpensive Transaction output, which is a core concept for bitcoin Transaction generation and verification. The transactions form a set of chain structures, all legal bitcoin transactions can be traced back to the output of one or more previous transactions, the source of the chains is mining rewards, the tail end of the chains is the current unspent transaction output, and all unspent outputs are UTXO of the whole bitcoin network. The bit currency specifies that the input of each new transaction must be the output which is not spent by a certain transaction, each input also needs the private key corresponding to the last output to carry out signature, and the node of each bit currency stores the UTXO on the current whole block chain, and the node on the whole network verifies the validity of the new transaction through the UTXO and the signature algorithm.
In the blockchain, a certain commission is paid to complete a transaction. On one hand, because the capacity of the block for accommodating the transaction records is limited, miners can pack transactions with high transaction commission preferentially, and if the transaction commission is not paid, the transactions can be packed for a long time; on the other hand, if no handling fee exists, malicious transactions or non-cost transactions may exist, a large number of malicious transactions may cause waste of networks, CPUs, computing power and the like, more efficient contract codes may be encouraged by paying a certain handling fee, unnecessary computing is reduced, and the system is prevented from being attacked and the like.
Referring to fig. 1, fig. 1 is a schematic flow chart of a transaction commission fee promotion method in a blockchain based on a UTXO architecture, as can be seen from fig. 1, the method specifically includes:
s1: traversing the unspent output based on the UTXO framework for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time;
in the block chain based on the UTXO architecture, assuming that a node a creates an alternative original transaction T through unconsumed output, the node a is the transaction creator, and adds an alternative tag field to a specific field of the transaction input as needed, for example, referring to table 1, table 1 is a schematic diagram of a transaction input structure (the table structure is only an exemplary illustration and does not represent an actual table structure), table 1 lists the transaction type, the transaction ID, the output of the previous transaction (i.e. the source of the money), the public key and unlock information of the sender, and the alternative tag, etc. of the original transaction input, and the node a sets the "alternative tag" field of the original transaction input to 0 xfffffffff-1-1, which represents the tag of the alternative transaction, i.e. if the original transaction is to be replaced, the field must be filled.
TABLE 1 transaction input architecture
Figure 765469DEST_PATH_IMAGE001
The preset packed minimum time is a minimum time for which the transaction creator sets the original transaction to be packed on the incidental information of the original transaction when creating the original transaction, and the preset packed minimum time usage rule is that the original transaction cannot be packed into the block until the original transaction with the set preset packed minimum time does not reach the minimum time, which will be described in detail below.
S2: signing and broadcasting the original transaction;
the transaction creator may sign the original transaction using the private key and then broadcast the original transaction to the entire network.
S3: verifying the validity of the original transaction and storing the verified original transaction into a memory transaction pool;
the node of the whole network can check the validity of the original transaction and store the original transaction into the memory transaction pool, namely, the original transaction is broadcast and then enters the memory transaction pool through legal check. In the next round of mining, the miners will select a portion of the trade packages in the in-memory trade pool. The usage rule of the preset packed minimum time is to be followed when packing, for convenience of description, the preset packed minimum time may be referred to as a locking time, for convenience of understanding of the usage rule, referring to fig. 2, fig. 2 is a schematic diagram of the preset packed minimum time and the usage rule set for the original transaction, and fig. 2 is now explained as follows:
t is an original transaction created by a transaction creator, thread indicates that T is broadcasted, Miner indicates a Miner, CreateBlock indicates a created Block, now () indicates a current time, nLockTime indicates a lock time, i.e., 2 preset minimum time to pack, Block indicates a Block, then the preset minimum time to pack, i.e., the lock time usage rule shown in fig. 2 is that a transaction set to the minimum time to pack must not be packed into a Block until the corresponding time is not reached, i.e., if the current time > the lock time, the Miner may pack the original transaction T; if the current time is less than the locking time, the Miner cannot pack the original transaction T, and actually, the preset minimum packing time is set to optimize the duration of the original transaction stored in the memory transaction pool.
After the original transaction is packaged into the block, broadcasting the block, checking the block according to the block checking rule, if the minimum time for presetting and packaging is set for the original transaction but the minimum time is not reached, judging the block to be an illegal block, and setting the minimum time for presetting and packaging can ensure that the original transaction is replaced within the effective time. Specifically, after the blocks are excavated, the blocks are broadcast to the whole network, when other nodes receive and check the blocks, the following check items are added to the validity of the original transaction, and if the transaction which sets the locking time but does not reach the corresponding time is judged to be an illegal block, the effective time for replacing the original transaction which the transaction creator wants to create can be ensured.
Furthermore, when the block is packed, the miners check legal original transactions in the memory transaction pool and pack the legal original transactions into the block to generate a transaction block, and send the transaction block to other full nodes participating in mining; and checking the transaction blocks by the whole nodes, listing the transaction blocks passing the check as candidate blocks and identifying the candidate blocks. The full nodes are nodes with complete block chain accounts, need to occupy memory to synchronize all block chain data, can independently check all transactions on the block chain and update data in real time, and are mainly responsible for broadcasting and verifying transactions of the block chain. The block legal verification comprises the legal verification of the original transaction in the block, the block is listed as a candidate block and is identified after the verification is passed, and the process does not affect the safety of the whole transaction system.
S4: creating a replacement transaction;
a replacement transaction is a new transaction created by the transaction creator to replace the original transaction. When the node for creating the original transaction marks the original transaction as an alternative transaction when the original transaction is created, the original transaction is stored in a memory transaction pool by other miner nodes after being broadcasted, and at the moment, 1 replacement transaction for replacing the original transaction, namely a new transaction, is created by the node for creating the original transaction.
S5: finding an unpackaged original transaction corresponding to the replacement transaction;
the transaction creator finds the original transaction that it wishes to replace, i.e., the original transaction that was originally created without packaging.
S6: copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction;
the input of the original transaction is copied into the input of the replacement transaction, i.e. the input must be equal before and after the transaction replacement. Specifically, the implementation may be implemented by program codes, and in order to visually represent this link, for example, part of the implemented program codes may be (for a clearer description, a schematic description of concise codes is directly used here):
if (replaceable rule, if replacement condition (original transaction) is satisfied)
{
Alternate transaction = new transaction (·);
input = original transaction input;
at least the amount that needs to be increased = calculate the commission (original transaction) that the replacement must increase;
for (output member: original transaction output)
{
if (wallet. recipient Address container. Contains (output member. recipient address))
{
Amount of members- = amount of at least required to be promoted;
}
push _ back (output member);
}
it should be noted that the above codes do not represent actual real codes, but are merely exemplary lists for visual presentation without considering the writing rules.
S7: adjusting the replaceable indicia of the replacement transaction and the preset packaged minimum time as needed;
the transaction creator adjusts the minimum time for the replaceable indicia and the pre-set packaging as needed.
S8: modifying the receive address and the commission at the output of the replacement transaction;
the receiving address and the handling fee are modified at the output of the replacement transaction for canceling the transaction or raising the handling fee, the handling fee of the replacement transaction is not less than the sum of the handling fee of the original transaction and the network broadband fee, and in addition, change is reduced at the output of the replacement transaction so that the handling fee of the replacement transaction is raised.
It should be noted that the replacement of the original transaction may be performed more than once, assuming that the original transaction T successfully enters the memory transaction pool after being broadcasted, at this time, the transaction amount in the network is sent very frequently, and miners cannot ensure that the original transaction T is packed and confirmed in the next block in consideration of the benefit maximization that the packing sequence of the transactions starts from the highest commission charge, at this time, the node a creates a new transaction, i.e., the replacement transaction T ', and may find the input of the original transaction T again and copy the input to the input of the replacement transaction T', at this time, a specific field of the input of the replacement transaction is set to a preset function code, so that the replacement transaction may also be performed, that is, the replacement of the original transaction may be performed more than once. For example, according to actual requirements, the preset rule can be that if the value of the replaceable mark field of the replacement transaction is smaller than that of the replaceable mark of the original transaction, this represents that this is the latest replacement transaction, and if the above condition is met, the filling of the replaceable mark field content can be set to std:: numeric _ limits < signaled int >: max () -3, which represents the latest transaction of the replacement transaction.
The transaction creator achieves the effect of being packaged more quickly by improving the handling fee of the replacement transaction, and the specific implementation mode is that change making is reduced in the output of the replacement transaction, the change making is basically filled with the receiving address and the amount of money of the transaction creator at the output position, the amount of money is reduced from the position of the output change making, and the reduced amount of money can become the transaction handling fee, so that the purpose of improving the handling fee is achieved.
S9: signing and broadcasting the replacement transaction;
after the receiving address and the commission charge of the replacement transaction are modified, the replacement transaction is signed and broadcast, and other miners can receive the replacement transaction. And after the original transaction is broadcasted, the original transaction enters a memory transaction pool after legal verification of miners, and when the replacement transaction created by the transaction creator is broadcasted, the miners replace the original transaction after receiving the replacement transaction and performing replacement rule and legal verification.
S10: verifying the validity of the replacement transaction according to a preset transaction replacement rule;
after receiving the replacement transaction, the other mineworker nodes check the validity of the replacement transaction according to a preset transaction replacement rule, for example, the replacement rule may include the following aspects that the validity of the replacement transaction is checked through the replaceable mark and whether the input of the original transaction and the input of the replacement transaction are consistent, if the replaceable mark exists in the original transaction and the input of the original transaction is equal to the input of the replacement transaction, and the commission of the replacement transaction reaches the minimum standard in the replacement rule, if the commission of the replacement transaction is not less than the sum of the commission of the original transaction and the network broadband fee, the replacement transaction is legal, and the replacement rule is not specifically limited by the present application.
S11: if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool;
referring to fig. 3, fig. 3 is a schematic diagram of a replacement validity check flow and a replacement process of an original transaction and a replacement transaction, where T is still the original transaction, after rule verification is performed on a validity rule (rule) of the original transaction after broadcasting, the original transaction and the replacement transaction are stored in a memory transaction pool txMemoryPool by a Miner, T ' is a replacement transaction created according to the replacement rule, and according to a preset transaction replacement rule, if the replacement check of the original transaction and the replacement transaction passes, that is, the replacement rule is met after the verification, as shown in fig. 3, the original transaction T is deleted in the memory transaction pool, a cross in the diagram represents deletion, and the verified replacement transaction T ' is stored in the memory transaction pool, and the replacement of the original transaction T by the replacement transaction T ' is completed according to the rule, and Replace is replacement operation.
S12: the original transaction is deleted at the wallet file and the replacement transaction is credited to the wallet file.
The wallet file comprises all the output which is not spent and the transaction records related to the wallet file, in the embodiment of the application, the wallet file has the function of counting information required by a user, such as balance and the like, at a user level, and deleting the original transaction in the wallet file and storing the replaced transaction in the wallet file after the original transaction and the replaced transaction are replaced in the internal transaction pool according to the transaction replacement rule, so that the update is carried out.
In actual work, there are cases that a legal transaction is recorded in a memory transaction pool of other nodes once being broadcast and is finally packaged into a block, but at least the time for waiting for at least a long time to be confirmed (namely, being packaged into a block) after the transaction is broadcast cannot be set to be at least the required time, in this case, all transfers made cannot be withdrawn, for example, a transfers money to B, but before the transaction is not packaged into a block after being broadcast, a repels the transfer to be withdrawn, and at this time, the function can be realized by using the application for replacing the transaction.
From the above technical solutions, the present application discloses a method for increasing transaction commission in a blockchain based on a UTXO architecture, including: traversing the unspent output based on the UTXO framework for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time; signing and broadcasting the original transaction; verifying the validity of the original transaction and storing the verified original transaction into a memory transaction pool; creating a replacement transaction; finding an unpackaged original transaction corresponding to the replacement transaction; copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction; adjusting the replaceable indicia of the replacement transaction and the preset packaged minimum time as needed; modifying the receive address and the commission at the output of the replacement transaction; signing and broadcasting the replacement transaction; verifying the validity of the replacement transaction according to a preset transaction replacement rule; if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool; the original transaction is deleted at the wallet file and the replacement transaction is credited to the wallet file. The transaction creator achieves the effect of being packaged more quickly by improving the handling fee of the replacement transaction, so that the problem that the transaction cannot be packaged into a block in time and can only wait for a long time after being broadcast and legally stored into the memory transaction pool by being verified by other nodes is solved.
In addition, the application also provides a transaction commission charge promotion system in a block chain based on the UTXO architecture corresponding to the above method, which includes a transaction creator and a plurality of full nodes, wherein:
the transaction creator is configured to perform the steps of:
traversing the unspent output based on the UTXO framework for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time;
signing and broadcasting the original transaction;
verifying the validity of the original transaction and storing the verified original transaction into a memory transaction pool;
creating a replacement transaction;
finding an unpackaged original transaction corresponding to the replacement transaction;
copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction;
adjusting the replaceable indicia of the replacement transaction and the preset packaged minimum time as needed;
modifying the receive address and the commission at the output of the replacement transaction;
signing and broadcasting the replacement transaction;
the plurality of full nodes are configured to perform the steps of:
verifying the validity of the replacement transaction according to a preset transaction replacement rule;
if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool;
the transaction creator is further configured to perform the steps of:
the original transaction is deleted at the wallet file and the replacement transaction is credited to the wallet file.
Further, the plurality of full nodes are further configured to perform the steps of:
broadcasting the block after the original transaction is packed into the block, and checking the block according to the block checking rule;
and if the preset packed minimum time is set for the original transaction but the minimum time is not reached, judging the block as an illegal block.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. The method for promoting transaction commission charge in a block chain based on UTXO architecture is characterized by comprising the following steps:
traversing the unspent output based on the UTXO architecture for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time;
signing and broadcasting the original transaction;
verifying the validity of the original transaction and storing the original transaction passing the verification into a memory transaction pool;
creating a replacement transaction;
finding the original transaction that corresponds to the replacement transaction that is not packaged;
copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction;
adjusting the replaceable indicia and preset packaged minimum time for the replacement transaction as needed;
modifying the received address and commission at the output of the replacement transaction;
signing and broadcasting the replacement transaction;
verifying the validity of the replacement transaction according to a preset transaction replacement rule;
verifying the validity of the replacement transaction by the replaceable mark and judging whether the input of the original transaction and the input of the replacement transaction are consistent;
if the replaceable indicia is present and the input of the original transaction equals the input of the replacement transaction, the replacement transaction is legitimate;
if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool;
deleting the original transaction at the wallet file, and crediting the wallet file with the replacement transaction.
2. The UTXO architecture based blockchain transaction commission promotion method of claim 1 further comprising:
the original transactions which are legal in the memory transaction pool are checked and packaged into a block, a transaction block is generated, and the transaction block is sent to other full nodes which participate in mine digging;
and the full node checks the transaction blocks, enumerates the transaction blocks passing the check as candidate blocks and identifies the candidate blocks.
3. The UTXO-architecture-based transaction commission of the blockchain of claim 1 wherein the predetermined packed minimum time usage rule is that the original transaction cannot be packed into a block until the predetermined packed minimum time set for the original transaction has not reached the minimum time.
4. The UTXO architecture based blockchain transaction commission promotion method of claim 3 further comprising:
broadcasting the block after the original transaction is packed into the block, and checking the block according to a block checking rule;
and if the original transaction sets the minimum time for presetting the package but does not reach the minimum time, judging the block to be an illegal block.
5. The UTXO architecture based blockchain transaction commission promotion method of claim 1 wherein the commission for the replacement transaction is not less than the sum of the commission for the original transaction and the network broadband fee.
6. The UTXO architecture based blockchain transaction commission promotion method of claim 1 further comprising reducing change at the output of the replacement transaction to promote the commission of the replacement transaction.
7. The UTXO architecture based blockchain transaction commission promotion method of claim 1 further comprising setting a specific field of the replacement transaction input to a preset function code to make the replacement transaction replaceable.
8. The system for promoting transaction commission charge in a block chain based on UTXO architecture is characterized by comprising a transaction creator and a plurality of full nodes, wherein:
the transaction creator is configured to perform the steps of:
traversing the unspent output based on the UTXO architecture for creating an original transaction, the original transaction including the replaceable token and the pre-set packed minimum time;
signing and broadcasting the original transaction;
verifying the validity of the original transaction and storing the original transaction passing the verification into a memory transaction pool;
creating a replacement transaction;
finding the original transaction that corresponds to the replacement transaction that is not packaged;
copying the input of the original transaction into the input of the replacement transaction such that the input of the original transaction equals the input of the corresponding replacement transaction;
adjusting the replaceable indicia and preset packaged minimum time for the replacement transaction as needed;
modifying the received address and commission at the output of the replacement transaction;
signing and broadcasting the replacement transaction;
the plurality of full nodes are configured to perform the steps of:
verifying the validity of the replacement transaction according to a preset transaction replacement rule;
if the verification is passed, deleting the original transaction in the memory transaction pool, and storing the replacement transaction passing the verification into the memory transaction pool;
the transaction creator is further configured to perform the steps of:
deleting the original transaction at the wallet file, and crediting the wallet file with the replacement transaction.
9. The UTXO architecture based block chain transaction commission facilitation system of claim 8 wherein the plurality of full nodes are further configured to perform the steps of:
broadcasting the block after the original transaction is packed into the block, and checking the block according to a block checking rule;
and if the original transaction sets the minimum time for presetting the package but does not reach the minimum time, judging the block to be an illegal block.
CN202110309117.8A 2021-03-24 2021-03-24 UTXO architecture-based transaction commission fee promotion method and system in block chain Active CN112700240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110309117.8A CN112700240B (en) 2021-03-24 2021-03-24 UTXO architecture-based transaction commission fee promotion method and system in block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110309117.8A CN112700240B (en) 2021-03-24 2021-03-24 UTXO architecture-based transaction commission fee promotion method and system in block chain

Publications (2)

Publication Number Publication Date
CN112700240A CN112700240A (en) 2021-04-23
CN112700240B true CN112700240B (en) 2021-06-25

Family

ID=75515446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110309117.8A Active CN112700240B (en) 2021-03-24 2021-03-24 UTXO architecture-based transaction commission fee promotion method and system in block chain

Country Status (1)

Country Link
CN (1) CN112700240B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592639B (en) * 2021-05-21 2023-10-13 上海简苏网络科技有限公司 Block chain transaction deleting method and system
CN115604354B (en) * 2022-12-09 2023-03-28 北京百度网讯科技有限公司 Transaction processing method, device and equipment based on block chain and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN110555684A (en) * 2019-08-26 2019-12-10 北京米弘科技有限公司 Account and system based on block chain system
CN111967860A (en) * 2019-05-20 2020-11-20 深圳市红砖坊技术有限公司 Transaction system, method and node in transaction system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN111967860A (en) * 2019-05-20 2020-11-20 深圳市红砖坊技术有限公司 Transaction system, method and node in transaction system
CN110555684A (en) * 2019-08-26 2019-12-10 北京米弘科技有限公司 Account and system based on block chain system

Also Published As

Publication number Publication date
CN112700240A (en) 2021-04-23

Similar Documents

Publication Publication Date Title
CN112700240B (en) UTXO architecture-based transaction commission fee promotion method and system in block chain
CN111309711A (en) Cross-block-chain data migration method, device, equipment and storage medium
CN111433803A (en) Block chain communication and ordering
JP3799757B2 (en) VERIFYED DATA GENERATION DEVICE AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING VERIFYED DATA GENERATION PROGRAM
TW201837805A (en) Securing blockchain transaction based on undetermined data
CN111033544A (en) Script-based byte interpretation for blockchain implementations
WO2022121348A1 (en) Delayed transaction generation method, delayed transaction execution method, and device and storage medium
CN110597839A (en) Transaction data processing method, device, equipment and storage medium
CN110851870A (en) Block chain privacy protection method, system and medium based on trusted execution environment
CN112583811B (en) Wallet finding method, equipment and storage medium
EP3709568A1 (en) Deleting user data from a blockchain
CN109447601B (en) Method for performing witness transfer transactions in blockchain networks
Bistarelli et al. An analysis of non-standard transactions
CN114175036A (en) Providing down-link functionality using blockchain transactions
WO2022206482A1 (en) Blockchain editing method and blockchain node
CN113874839A (en) Intra-script functions within blockchain transactions
CN114175035A (en) Protocol for verifying that blockchain transactions are valid
CN113132459B (en) Distributed storage method, system, storage medium, information data processing terminal
Sel et al. Towards solving the data availability problem for sharded ethereum
CN112132574A (en) Block chain data checking method, data processing method, device and equipment
EP3907644B1 (en) Blockchain
US7818256B1 (en) Digital receipt for electronic data and methods and systems for generating same
CN114430830A (en) Blockchain transactions including partial codes in different languages for complex verification
CN114531941A (en) Multi-standard blockchain protocol
CN116128658A (en) Block chain-based data storage insurance method, device, equipment 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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Shi Ning

Inventor after: Lai Shihui

Inventor before: Shi Ning

Inventor before: Li Jilai

Inventor before: Lai Shihui

PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and system for raising transaction fee in blockchain based on utxo architecture

Effective date of registration: 20220401

Granted publication date: 20210625

Pledgee: Zijin Trust Co.,Ltd.

Pledgor: Nanjing jinninghui Technology Co.,Ltd.

Registration number: Y2022980003745

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230421

Granted publication date: 20210625

Pledgee: Zijin Trust Co.,Ltd.

Pledgor: Nanjing jinninghui Technology Co.,Ltd.

Registration number: Y2022980003745