Bitcoin Forum
May 10, 2024, 02:13:34 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [RFC] Finite transaction lifetime (aka "fill or kill")  (Read 1564 times)
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1091


View Profile
March 21, 2011, 09:59:55 PM
Last edit: March 22, 2011, 12:08:11 AM by jgarzik
 #1

One of my major bitcoin criticisms remains non-deterministic transaction behavior, from the user PoV.  Transactions that are non-standard, or too large for the included fees, will be resent hopelessly, without the user ever having any resolution whatsoever.  I call these "zombie transactions."

In the real world, transactions tend to be more binary:  they either succeed or fail.  They don't sit around in limbo forever.

Therefore, I propose a new network rule:
  • Note the current block height, when a TX is received at a node, X.
  • When block height increases to X+T, and the TX has not yet been put into a block, remove it from the TX cache.  T could be 150 blocks, around 24 hours, but that's open to discussion.

In the short term, this should have little effect, as clients will continue to resend transactions ad infinitum, until they get into a block.  And TX cache is flushed in any case, when a bitcoin node restarts.

In the long term, this guarantees predictable behavior for each transaction.  With this network rule in place, a user will know that their TX will probably either make it into a block, or disappear from TX caches [and thus be eligible for resubmittal].  This should open up the possibility for users to recover spent coins that never made it into a block (never confirmed).  The current inability for a user to recover unconfirmed-and-never-will-be money is a flaw that should be corrected, though luckily these are rare cases today.

However...   Such unspending is difficult:  a spend potentially creates a change transaction, which itself could then be spent, and so on.  Of course, these zombie coins will never confirm, because their originating transaction is a zombie transaction.  But it is difficult to unroll a chain of spends reliably.

Comments welcome.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
1715307214
Hero Member
*
Offline Offline

Posts: 1715307214

View Profile Personal Message (Offline)

Ignore
1715307214
Reply with quote  #2

1715307214
Report to moderator
The Bitcoin network protocol was designed to be extremely flexible. It can be used to create timed transactions, escrow transactions, multi-signature transactions, etc. The current features of the client only hint at what will be possible in the future.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12982


View Profile
March 21, 2011, 11:57:59 PM
 #2

An expiration time on memory pool transactions would be a good idea for this and other reasons.

When a transaction is given up on, a new transaction back to the sender needs to be created using the same coins. Otherwise, the old transaction might eventually make it into a block, which would be undesirable. Given this, transaction replacement should be re-enabled so that this problem can be solved as intended: to cancel a transaction, you send a transaction back to yourself using the same inputs with lower sequence numbers, and all nodes update the transaction immediately.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
caveden
Legendary
*
Offline Offline

Activity: 1106
Merit: 1004



View Profile
March 22, 2011, 09:04:15 AM
 #3

Maybe making the T variable specified by the transaction itself, not a constant.

Also, block that includes a transaction which should have been expired could be considered an invalid block by the network.
This is backward incompatible though, and maybe theymos suggestion of resending the same transaction to self after the expiration would be a good idea - it would be a good idea to send this second transaction with a higher fee, too. Smiley

But anyway, reclaiming and resending with a higher fee should be even simpler to implement, shouldn't it? And it's a more generic use case.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12982


View Profile
March 22, 2011, 09:24:52 AM
 #4

Also, block that includes a transaction which should have been expired could be considered an invalid block by the network.

It's bad for a transaction to be valid at one time and then become invalid. If this happens, then network splits of less than 120 blocks in length can cause many transactions to become invalid, breaking the guarantees that Bitcoin normally provides.

For example, say a transaction with an expiration time gets in a block. 6 blocks later, the recipient of this transaction sends these coins, and 6 blocks later the next recipient sends the coins, etc. 80 blocks later, the network recombines from a split. The first transaction is now expired, and all child transactions are also invalid. There could potentially be hundreds or thousands of transactions that are now reversed unexpectedly, even though the network split lasted less than the 120-block limit.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
March 22, 2011, 09:42:45 AM
Last edit: March 22, 2011, 10:30:22 AM by moa
 #5

Just considering out into the (far?) future if there will be a time when essentially no transaction will go through without a fee.

Aside: I know that some space in each block is set aside for free transactions but if the queue of free transactions is so long that the time for a free transaction to confirm is crazy long then that mechanism is impractical (1 month, 1 year, etc) and free transactions become basically useless.

So, at this point there will be some minimum fee that is required to get a transaction confirm in a practical time. Is there a way to get the current average minimum fee from the network to be sent to the client, so that when selecting a fee for transaction prioritisation the sender has some idea of what is needed for the trade to go through?

If this was implemented allowing for a minimum fee down to the 8th decimal place it would allow for a natural, continuous growth of the use of fees as the number of transactions on the network grows. I.e start using fees sooner rather than later, even if they are only infinitesimal at present and future-proof the infrastructure for when they become  more significant (forward compatible).

EDIT: On the front-end, the bitcoin client would default to include the current minimum fee for a timely transaction, with a zero fee transaction being a user-selectable choice.

Thndr
Member
**
Offline Offline

Activity: 78
Merit: 10


View Profile
March 22, 2011, 10:05:16 AM
 #6

Well I personally think that in the future, there should be a priority level based on transaction fee and also the time the transaction original was requested.

So basically, there would a minimum number of blocks generated before a 0 fee transaction priority would be shifted to the top by the amount of time since the transaction started. This would ensure no failed transactions, and every transaction is processed.

Even in the even of thousands of 0 fee transactions being processed, the ones with fees would gain priority with time as well, becoming a higher priority faster base on the fee, leveling out the field. Once fees become standard, it should encourage people to use them due to the significant delay on low/no fee transactions.

◈◈   SOCIALMEDIA.MARKET   ◈◈   BLOCKCHAIN BASED Influencer Marketing Platform
ANN Thread   WhitePaper   Facebook   Telegram   Twitter
▰▰▰▰▰▰▰▰▰▰▰▰   TOKEN SALE : 09 February - 16 March   ▰▰▰▰▰▰▰▰▰▰▰▰
Timo Y
Legendary
*
Offline Offline

Activity: 938
Merit: 1001


bitcoin - the aerogel of money


View Profile
March 22, 2011, 11:49:53 AM
 #7

From my understanding, it is in theory possible to "double spend" a transaction in limbo.  If the second attempt with a higher transaction fee makes it into a block, the first attempt will be interpreted as a double spending attempt by miners and simply be ignored.

(correct me if I'm wrong)

GPG ID: FA868D77   bitcoin-otc:forever-d
Hal
VIP
Sr. Member
*
Offline Offline

Activity: 314
Merit: 3853



View Profile
March 22, 2011, 07:16:53 PM
 #8

From my understanding, it is in theory possible to "double spend" a transaction in limbo.  If the second attempt with a higher transaction fee makes it into a block, the first attempt will be interpreted as a double spending attempt by miners and simply be ignored.
A txn "in limbo" (in the transaction pool) will block double spends from being forwarded by peers, or accepted by (unhacked) miners. The pool is only in memory so gets wiped when the node is restarted, making network behavior somewhat nondeterministic. The wallet currently retransmits unconfirmed txns indefinitely, however the peers will not forward them unless/until the txns are cleared from peer memory due to a restart.

Hal Finney
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!