Bitcoin Forum
April 19, 2024, 11:37:22 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Cancelling unconfirmed transactions  (Read 21057 times)
Spaceman_Spiff (OP)
Legendary
*
Offline Offline

Activity: 1638
Merit: 1001


₪``Campaign Manager´´₪


View Profile
March 10, 2013, 12:05:56 PM
 #1

Hi

As far as I am aware it is not possible to cancel unconfirmed transactions currently.  If the block limit is maintained, this will likely lead to a scenario where first transactions without fees will go through in calmer moments, then not at all anymore. 
I was now thinking of the following scenario: somebody tries to be a cheapass by not adding a fee to his transaction, transaction volume picks up forever, and the transaction is stuck in limbo forever.  He might try a new doublespend with fee, but apparently that is not trivial either? 
Would it be good to implement a "cancel unconfirmed transaction" option in the clients?  Or does this already exist and is my information outdated?
1713569842
Hero Member
*
Offline Offline

Posts: 1713569842

View Profile Personal Message (Offline)

Ignore
1713569842
Reply with quote  #2

1713569842
Report to moderator
1713569842
Hero Member
*
Offline Offline

Posts: 1713569842

View Profile Personal Message (Offline)

Ignore
1713569842
Reply with quote  #2

1713569842
Report to moderator
"I'm sure that in 20 years there will either be very large transaction volume or no volume." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713569842
Hero Member
*
Offline Offline

Posts: 1713569842

View Profile Personal Message (Offline)

Ignore
1713569842
Reply with quote  #2

1713569842
Report to moderator
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
March 10, 2013, 04:23:31 PM
 #2

As far as I know something like this does not yet exist and yes, imho this is a far more pressing issue than MAX_BLOCK_SIZE.

There might be problems for services that allow 0-confirmation transactions to already gain some kind of access/benefit if you implement a "currently pending transactions" screen with a "cancel" buttin next to each one - and also there might be some flooding issues if you can just create and withdraw transactions at will...

A solution might be to drop unconfirmed transactions out of the memorypool after 1008 blocks (~1 week) automatically and after 6 blocks (~1 hour) upon explicit request. Until then other clients will see other transactions with the same input(s) as a double spend and not relay them. I don't know if this should be a hard rule though, seems rather like a "nice thing to do" rule of thumb towards people who get a transaction stuck in limbo.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
deepceleron
Legendary
*
Offline Offline

Activity: 1512
Merit: 1025



View Profile WWW
March 10, 2013, 04:40:27 PM
 #3

There is no cancellation available at the protocol level. The best one could do would be to double-spend a duplicate transaction. Clients consider spent = spent, the spent funds being removed from your balance and unavailable, even if the transaction never will confirm.

The way a client could do this would be to offer a "modify and retransmit" feature, allowing one to re-spend the identical inputs and outputs of a transaction with more fees (adding more inputs if needed to increase the fee). Implementing a double-spend feature with this method shouldn't make an unconfirmed payment less trustable if the resent payment was recognized as a replacement.

The reference client doesn't let you create inadequately-fee'd transactions, so this is a feature unnecessary in any client that understands the rules. Only if larger-than-minimum fees become required for timely processing in the future, by everyone else paying more than standard fees for preferential treatment on an extremely busy network, would this be useful. I would expect new clients which start automatically recommending higher fees based on network activity if Bitcoin becomes this busy.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
March 11, 2013, 10:43:40 AM
 #4

I was now thinking of the following scenario: somebody tries to be a cheapass by not adding a fee to his transaction, transaction volume picks up forever, and the transaction is stuck in limbo forever. 

There was a feature that was written but never released in which the child could pay for parent.  What this means is that the code that determines if the fee is appropriate will also consider any other transactions that depend on this transaction and what are the fees for those transactions.  That way the miner can receive the fee for processing both the parent and the child. 

 - https://github.com/bitcoin/bitcoin/pull/1647

That would give the recipient of the payment a method to pay an additional fee after the sender has broadcast the transaction.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


ShadowOfHarbringer
Legendary
*
Offline Offline

Activity: 1470
Merit: 1005


Bringing Legendary Har® to you since 1952


View Profile
March 11, 2013, 11:38:11 AM
 #5

I thought I have seen Gavin somewhere talking about adding fees to already existing transactions... am I mistaken ?

porcupine87
Hero Member
*****
Offline Offline

Activity: 546
Merit: 500


hm


View Profile
March 11, 2013, 12:19:07 PM
 #6

Hey,

wouldn't it be a realistic scenario, that the transaction without fee gets just ignored by the miners. I mean, if you have 1 BTC and try to make a transaction without fee. Than you wait, and wait, wait and nothing happens. Than you try the same transaction with 0.001 BTC fee and the miners include that transaction into a block and the other transaction never will, because it is invalide? Or is there currently a hard rule, that the later transaction will always be ignored?

greetings

"Morality, it could be argued, represents the way that people would like the world to work - whereas economics represents how it actually does work." Freakonomics
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
March 11, 2013, 03:26:07 PM
 #7

It's not a hard rule (in the sense of "a client that does this will create an invalid fork") that the newer transaction HAS to be ignored, no matter what, but currently this is the case.

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 11, 2013, 04:27:05 PM
 #8

It is possible to cancel a transaction although it is intentionally not user friendly.

The first thing to know is that all nodes will forget about transactions after a few hours.  This is intentional otherwise someone could bring the network to its knees by spawning a huge number of low/no fee transactions when the blocks are close to max size.  Memory Pool spam vs blockchain spam.

The problem is your client is very diligent.  It continually looks to see if a transaction it sent has been including in a block.  If it hasn't then periodically it will notify its peers and the transaction will propogate the network again.  Any node which has forgotten about the tx will be informed of it again and the process will continuing infinitely.


To cancel a transaction you must delete it from your wallet.dat.  This will prevent your client from keeping it alive. Eventually all nodes will drop it from their memory pool automatically.

It would be useful to include a "special exception" to the double spend rules.  Nodes will drop double spends of outputs currently in their memory pool.  A double spend which consists of the exact same inputs and same outputs and only differs in the amount of the fee to miner by a preset amount (say up to 5x min fee) could be allowed to "pass through" the double spend shield.  This would allow users to "upgrade" a transaction from low/no fee to standard/higher fee and get it to miners.
justusranvier
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
March 11, 2013, 04:30:27 PM
 #9

It would be useful to include a "special exception" to the double spend rules.  Nodes will drop double spends of outputs currently in their memory pool.  A double spend which consists of the exact same inputs and same outputs and only differs in the amount of the fee to miner by a preset amount (say up to 5x min fee) could be allowed to "pass through" the double spend shield.  This would allow users to "upgrade" a transaction from low/no fee to standard/higher fee and get it to miners.
Mining pools could offer this as a service by setting up a node that allows for lots of direct connections and bypasses the normal relaying rules, and which immediately includes qualifying transactions in the next block.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 11, 2013, 04:38:22 PM
 #10

It would be useful to include a "special exception" to the double spend rules.  Nodes will drop double spends of outputs currently in their memory pool.  A double spend which consists of the exact same inputs and same outputs and only differs in the amount of the fee to miner by a preset amount (say up to 5x min fee) could be allowed to "pass through" the double spend shield.  This would allow users to "upgrade" a transaction from low/no fee to standard/higher fee and get it to miners.
Mining pools could offer this as a service by setting up a node that allows for lots of direct connections and bypasses the normal relaying rules, and which immediately includes qualifying transactions in the next block.

They could but for it to be useful it would need to be integrated into the client.  If you need to hack the wallet.dat to force a change then you might as well just delete the offending transaction and wait for the network to forget about it.

Also most mining pools limit incoming connections as a pool wants to get a block to other miners (namely other large pools) quickly.  Having a bitcoind bogged down with hundreds of connections doesn't help orphan rates.  In theory a miner's optimal peer configuration would be direct connections to all other mining pools and then a few connections to major tx hubs (exchanges, blockchain.info, major merchants, etc).
justusranvier
Legendary
*
Offline Offline

Activity: 1400
Merit: 1009



View Profile
March 11, 2013, 04:47:21 PM
 #11

Also most mining pools limit incoming connections as a pool wants to get a block to other miners (namely other large pools) quickly.  Having a bitcoind bogged down with hundreds of connections doesn't help orphan rates.  In theory a miner's optimal peer configuration would be direct connections to all other mining pools and then a few connections to major tx hubs (exchanges, blockchain.info, major merchants, etc).
If there was a significant demand for non-standard transactions they could set up a separate node, perhaps only available to subscribers, in order to accept them. Of course the people wanting to send these non-standard transactions would need to pay for the additional risk of orphaned blocks, since they wouldn't be in the signature cache of other nodes.
ThiagoCMC
Legendary
*
Offline Offline

Activity: 1204
Merit: 1000

฿itcoin: Currency of Resistance!


View Profile
March 11, 2013, 07:05:20 PM
 #12

I was thinking about Git... Is it possible to backup / restore (effectively cancelling unconfirmed transactions) your wallet by transforming the ~/.bitcoin into git local repository?

So, after each transaction (sending or receiving), a git commit occurs... Or something like that... It would be possible to "undo" transactions easily (for git users at least)... Going back and forward into transaction history...

http://en.wikipedia.org/wiki/Git_(software)

I'm going to try that, do I need to shutdown bitcoin-qt before running git-stuff to commit wallet changes?

Best,
Thiago
Dansker
Hero Member
*****
Offline Offline

Activity: 740
Merit: 500


Hello world!


View Profile
March 11, 2013, 07:56:44 PM
 #13

Amazing that this hasn't been discussed in detail before.

Such a basic feature. I guess it must be because fees have never been much of an issue before.

Jan
Legendary
*
Offline Offline

Activity: 1043
Merit: 1002



View Profile
March 11, 2013, 08:47:19 PM
 #14

...
The first thing to know is that all nodes will forget about transactions after a few hours
...
How long time does bitcoind remember a transaction?

Mycelium let's you hold your private keys private.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
March 12, 2013, 11:48:52 AM
 #15

...
The first thing to know is that all nodes will forget about transactions after a few hours
...
How long time does bitcoind remember a transaction?

It isn't just the duration, it is space in the memory pool.  As that space fills up, older transactions get bumped out.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


tbeau1
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
March 13, 2013, 07:14:59 AM
 #16

I have an unconfirmed transaction from October.  Embarrassed
Dansker
Hero Member
*****
Offline Offline

Activity: 740
Merit: 500


Hello world!


View Profile
March 13, 2013, 04:04:01 PM
 #17

I have an unconfirmed transaction from October.  Embarrassed

Now how can that be?

Can you resend it with a fee?

Even without a fee, surely it should have gone through by now?

DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 13, 2013, 04:12:51 PM
 #18

I have an unconfirmed transaction from October.  Embarrassed

Now how can that be?

Can you resend it with a fee?

Even without a fee, surely it should have gone through by now?

If it is a low priority tx the "anti-spam" fee is mandatory.  Without the fee most nodes won't even relay the tx much less include it in a block.  It is a denial of service prevention mechanism.
tbeau1
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
March 14, 2013, 04:10:11 AM
 #19

I have an unconfirmed transaction from October.  Embarrassed

Now how can that be?

Can you resend it with a fee?

Even without a fee, surely it should have gone through by now?

It was an accidental double-spend attempt. But because most of it had already been spent, it won't verify... leaving the remainder in limbo.
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
March 14, 2013, 12:40:59 PM
 #20

leaving the remainder in limbo.

Since the wallet has no provision to delete transactions, what you can do is export the keys, create a new wallet and import the keys.  Voila, your funds are spendable once again.

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1] 2 3 »  All
  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!