Author

Topic: Transaction expiration/time-to-live (Read 788 times)

full member
Activity: 136
Merit: 100
March 09, 2013, 08:46:51 AM
#1
Here is a scenario:
Person A wants to make a payment to person B. In order to save money, A issues a transaction T1 with no fee, but the transaction does not get included in the blockchain for a few hours. Person B grows impatient, and demands A pay him immediately for the service. Left with no choice, A issues another transaction T2 with a fee that gets included in the blockchain immediately. However, T1 lingers around for a few more hours, and as soon as space opens up in the blockchain, it is included as well, thus resulting in a double payment to B.

This scenario I think will become increasingly common in the future as transactions with insufficient fees linger around for a long time. To address the problem, I propose adding an expiration (time-to-live) time field to transactions, which disables transactions from being included after a specific block number. If a transaction isn't included in the blockchain before its expiration block number, it will just be disallowed. In other words, any block containing expired transactions will be considered invalid.

It would perhaps be prudent to add an expiration time of 6 blocks from current block to all transactions so that they don't keep clogging the network if they can't be included in a reasonable amount of time.
Jump to: