Pages:
Author

Topic: All about "stuck" transactions and what you can do to fix them - page 6. (Read 143770 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
what the OP of this thread calls "RBF" is actually a double spend attempt.
it is misleading and dishonest to call it RBF.
RBF is, by definition, a double spend attempt, regardless of Opt-in or not. You are creating a transaction which spends inputs already spent by an unconfirmed transaction.

This method is Full RBF, not Opt-in or First-Seen-Safe RBF. It is still RBF and is as Peter Todd originally proposed RBF.
newbie
Activity: 1
Merit: 0
quick question guys i sent some bitcoins to an address the coin was never confirmed after 2 days they put the money back on my wallet,then about an hour later the money was gone again,i checked my wallet again now its at another address that i didn't even send them to,and that transaction has more than 600 conformations,and it also says unspent to that address.....so how do i retrieve my bitcoins
legendary
Activity: 1896
Merit: 1353
I personally think the opt-in RBF option by electrum is an improvement over this as you can replace a transaction you have created a few minutes ago, while your way would suffer from nodes blocking propagation.
Opt-in RBF is indeed a great feature. Unfortunately it is not used by most people so it is not really applicable here as most transactions will not enable RBF.

what the OP of this thread calls "RBF" is actually a double spend attempt.
it is misleading and dishonest to call it RBF.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
If you restore from seed unconfirmed transactions are removed IIRC. Thus you can restore from on a temp wallet, create a double spend and continue.
I asked someone to try this and it did not work for them.

Alright, Ill need to get this out of my head then. Thanks

I personally think the opt-in RBF option by electrum is an improvement over this as you can replace a transaction you have created a few minutes ago, while your way would suffer from nodes blocking propagation.
Opt-in RBF is indeed a great feature. Unfortunately it is not used by most people so it is not really applicable here as most transactions will not enable RBF.

Yeah, Im working on a similar thread to this for the german section and I put it in the "preparations" section because of this.
staff
Activity: 3458
Merit: 6793
Just writing some code
If you restore from seed unconfirmed transactions are removed IIRC. Thus you can restore from on a temp wallet, create a double spend and continue.
I asked someone to try this and it did not work for them.

I personally think the opt-in RBF option by electrum is an improvement over this as you can replace a transaction you have created a few minutes ago, while your way would suffer from nodes blocking propagation.
Opt-in RBF is indeed a great feature. Unfortunately it is not used by most people so it is not really applicable here as most transactions will not enable RBF.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
Wallets that do not allow you to or ones that I don't know how to make RBF transactions
  • Electrum

Thank you very much for misleading unsuspecting users. Are you doing this on purpose?
No. It seems that I forgot to hit send for my reply to you in PM. What I am trying to do here is to explain how to do RBF spends without opting into RBF because very few people use Opt in RBF. All I could find on Electrum was how to do it with Opt in RBF, not any way to RBF without opting in. If you could provide instructions for how to do that, I would happily add it to the list.

If you restore from seed unconfirmed transactions are removed IIRC. Thus you can restore from on a temp wallet, create a double spend and continue. I personally think the opt-in RBF option by electrum is an improvement over this as you can replace a transaction you have created a few minutes ago, while your way would suffer from nodes blocking propagation.
staff
Activity: 3458
Merit: 6793
Just writing some code
Wallets that do not allow you to or ones that I don't know how to make RBF transactions
  • Electrum

Thank you very much for misleading unsuspecting users. Are you doing this on purpose?
No. It seems that I forgot to hit send for my reply to you in PM. What I am trying to do here is to explain how to do RBF spends without opting into RBF because very few people use Opt in RBF. All I could find on Electrum was how to do it with Opt in RBF, not any way to RBF without opting in. If you could provide instructions for how to do that, I would happily add it to the list.
legendary
Activity: 1896
Merit: 1353
Wallets that do not allow you to or ones that I don't know how to make RBF transactions
  • Electrum

Thank you very much for misleading unsuspecting users. Are you doing this on purpose?
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
Great tutorial Smiley
A couple remarks:

1) it's also possible to do a CPFP if you're the sender, as long as there was a change address that received an input with a value high enough to cover the fees of both the parent and the child transaction. If there is no/insufficient change, only the receiver can do a CPFP.

2) RBF is possible with electrum, you can move it to the wallets for which it is an easy thing to do... You can opt-in RBF when creating a transaction, the transaction will be indicated as replaceble in the history tab, and when you right click on a replaceble transaction, you can increase the fee (don't remember the exact icons/descriptions used, since i only tested it out once).

3) Since you use double spending unconfirmed inputs as a way to do a RBF, about any wallet whose private key/xprv can be exported should be able to do a RBF. This should include Blockchain.info, multibit, Bitcoin Wallet for Android. Granted, the procedure becomes pretty long and tedious, since you would first have to get your hands on the private keys for the addresses whose unspent outputs were used in the hanging transaction, and then you'd have to import them in core, and then you would have to generate a raw tx, sign it, broadcast it... But it IS possible

4) in the "Waiting for the network to "forget" about the transaction", maybe you should add the warning that some wallets (like core) keep broadcasting the transaction, unless you abandon it, or zap the wallet txes?

5) some shameless promotion about CPFP, if you use my (in) sufficient fee checker on my website (mocacinno.com), i try to generate an unsigned CPFP tx for my visitors if i detect insufficient fees. This feature is still in beta, but in my (small amount) of testcases, it did work (bug reports are always welcome, only works with reasonably simple transactions).
staff
Activity: 3458
Merit: 6793
Just writing some code
What is a "Stuck" transaction? How are they caused?

A "stuck" transaction is a transaction which has remained unconfirmed for period of time which either the receiver or the sender is uncomfortable with. Stuck transactions can be annoying as it means that recipients often consider the senders to not have paid yet, or the recipient needs the money as soon as possible.

Stuck transactions are typically caused by low transaction fee rates. However other things can cause stuck transactions such as spending from an unconfirmed transaction, having dust outputs in the transaction, or being a double spend of another transaction. If a transaction has a double spending transaction and the double spend confirms, then the transaction will be "stuck" forever as it can never confirm.

What can I do to make my stuck transaction confirm?

There are a few options for confirming stuck transactions.

For both the recipient and the sender of the transaction, you can:
  • Wait for the transaction to confirm
  • Wait for the network to "forget" about the transaction
  • Ask a miner to confirm it for you

For the sender of a transaction, you can also:
  • Attempt an Replace-By-Fee double spend transaction
  • If you have a change output, you can attempt a Child-Pays-For-Parent transaction

For the recipient of a transaction, you can also:
  • Attempt a Child-Pays-For-Parent transaction

Waiting for a confirmation


If you are incapable of performing any of the other options are are too afraid to do so, you can simply wait and hope that the transaction will eventually confirm. To make sure that network is constantly being reminded of the transaction, you can rebroadcast the transaction periodically. Most wallets will rebroadcast automatically, so simply leaving your wallet open will allow rebroadcasting to happen.

Waiting for the network to "forget" about the transaction

If a transaction remains unconfirmed for too long, it can be eventually "forgotten" by most nodes on the Bitcoin network if no one rebroadcasts the transaction. This happens due to node restarts, mempool expiry times, or mempool eviction because the minimum relay fee has increased. This process typically takes a few days (usually 3). Once a transaction has been "forgotten", you may not see it in your wallet and you probably will not see the transaction in most block explorers. Once the transaction has been "forgotten", you can simply send the Bitcoin again but include a higher transaction fee. If you still see the transaction in your wallet, you will need to follow the instructions in the next Replace-By-Fee Section.

Note that some wallets will continuously rebroadcast the transaction while the wallet is on, so you either have to remove the transaction from the wallet using the instructions in the RBF section, or shut down the wallet and keep it off for several days.


Ask a miner for help


Some mining pools and miners offer services to allow you to prioritize your transaction in their mempool so that it is chosen sooner for inclusion in a block. The mining pools F2Pool and ViaBTC both offer transaction acceleration for an additional out-of-band fee. Please visit their linked websites for more details.

The blockchain explorer https://mempool.space/ also offers a transaction acceleration service as they have connections with several mining pools. You will find an "Accelerate" button next to the transaction fee on any unconfirmed transaction. This can be used to pay out-of-band for the transaction to be mined in a block sooner.

Also note that if you attempt an Replace-By-Fee transaction, both the original transaction and the RBF transaction will be considered double spends and miners will likely not help with any transactions marked as double spends.

Attempting a Replace-By-Fee (RBF) double spend transaction

What is an RBF transaction

A Replace-By-Fee transaction is a transaction that is nearly identical to your stuck transaction but pays a higher transaction fee. Since the original transaction most likely does not use Opt-in RBF, the RBF transaction that we will be creating will be considered a double spend and marked as such. The transaction uses Full-RBF and thus may still take a little bit longer to confirm as it is technically a double spend.

The difference between the types of RBF transactions

Replace-By-Fee transactions have 3 different types, First-Seen-Safe(FSS) RBF, Full RBF, and Opt-in RBF. FSS RBF requires that the RBF transaction include the same outputs as the transaction it replaces and consumes the same inputs. Full RBF means that the transaction is simply a double spend of another transaction but pays a higher transaction fee than the one(s) it replaces. Opt-in RBF means that the RBF transaction can only replace a transaction that has Opted-in to allowing itself to be replaced. Opt-in RBF follows BIP 125.

The instructions given in this section will be for making Full RBF transactions. Opt-in RBF transactions will be described in the "Avoiding Stuck Transactions In The Future" section.

How to make a Full RBF transaction

Making a Full RBF transaction depends entirely on the wallet that you are using. Some wallet support the advanced functionality required to make a Full RBF transaction, others do not. The following will be guides for each wallet on how to make a Full RBF transaction with that wallet. In general the procedure is to remove the unconfirmed transaction from the wallet and then resend the Bitcoin but with a higher transaction fee.

When making a Full RBF transaction, the transaction should include the recommended fee rate at the time of creating the transaction. See the "Avoiding this issue in the future" section for help with that.

Bitcoin Core

Bitcoin Core makes making Full RBF transactions very easy. Simply go to the transactions list, right click the transaction that is stuck, and choose the "Abandon Transaction" option.

If that option is greyed out, then you must go to the Bitcoin Core datadir and delete the mempool.dat file. Then restart Bitcoin Core with the -walletbroadcast=0 option and then you should be able to use "Abandon Transaction".

Once the transaction is either Abandoned or cleared from the wallet, you can simply go to the Send tab and send the Bitcoin again but make sure that you include a sufficient transaction fee.

Bitcoin Armory

Bitcoin Armory also makes making Full RBF transactions very easy. Go to Help > Clear All Unconfirmed Transactions and restart Armory. This will clear all of the unconfirmed transactions from the wallet and thus allow you to create the Full RBF transaction. Once Armory has restarted, simply send the Bitcoin again as you normally would but be sure to include a sufficient transaction fee.

MultiBit HD

MultiBit HD allows for making Full RBF transactions fairly easy as well. Go to Manage Wallet and click on Repair Wallet and follow the wizard. This process will clear all of the unconfirmed transactions from your wallet much like Bitcoin Core and Armory do. Once repair wallet has completed, simply send the Bitcoin again as you normally would.

Wallets that do not allow you to or ones that I don't know how to make Full RBF transactions

Not all wallets support the creation of Full RBF transactions. Many wallets do not allow clearing all unconfirmed transactions to allow for making Full RBF transactions. The following is a list of wallet software which do not support Full RBF transactions. If a wallet on this list does support FullRBF transactions, please let me know and provide instructions for that so I can add it above.

  • Blockchain.info and web wallets in general
  • Electrum (supports Opt-in RBF, but not Full RBF)
  • Mycelium
  • MultiBit Classic
  • Bitcoin Wallet for Android
  • Breadwallet
  • Copay

Attempting a Child-Pays-For-Parent transaction

What is a Child-Pays-For-Parent transaction?


A Child-Pays-For-Parent (CPFP) transaction is exactly as the name implies, a child transaction spends from an unconfirmed parent transaction and includes a transaction fee which covers both the fee of the child and the parent. However creating CPFP transactions are much more difficult as it requires spending from an unconfirmed transaction, something that most wallets do not allow.

How can I avoid making Stuck transactions in the future?

Using Dynamic Fees

The best way to avoid having stuck transactions is to make sure that you are not spending from an unconfirmed transaction, and include a sufficient transaction fee. If your wallet supports dynamic transaction fees, you should use those. If you want very fast confirmations, set the dynamic fees to choose the fastest fee possible. Dynamic fees are calculated by the wallet by analyzing the current state of the network and determining an optimal transaction fee from there. Because the state of the network constantly changes, the optimal transaction fee calculated one day may not necessarily be the best fee for the next day.

If your wallet does not support dynamic fees but does support setting a custom transaction fee rate for each transaction, you can look up the optimal fee rate on sites like https://mempool.space/ and https://bitcoinfees.github.io/ and set the fee rate for each transaction based on those sites. You must do this for each transaction you make otherwise you may end up paying a sub-optimal fee.

If your wallet does not support any sort of fee rate or does not allow setting custom transaction fees, you should upgrade to a new wallet. Using a fixed fee or fixed fee rate is no longer a good idea as the network constantly changes. You can use this formula: *148 + *34 + 10 where is the number of inputs and is the number of outputs to estimate the size of your transaction and determine the optimal fee for it.

Note that some wallets (e.g. blockchain.info), even though they use dynamic fees, set an upper limit to the transaction fee. If you notice that your transactions are constantly being stuck even though you are using dynamic fees, you should check the settings of your wallet and perhaps even switch to a new wallet which has no limit to the transaction fee.

Use Opt-In RBF

Opt-In RBF is a feature that allows for an RBF transaction to be more easily created as these transactions will not be rejected by nodes supporting Opt-In RBF.

Currently several wallets support creating Opt-In RBF transactions, many by default.

Bitcoin Core

Opt-in-RBF is enabled by default, but can also be enabled or disabled on a per-transaction basis. On the "Send" tab, clicking on "Choose..." next to the transaction fee field will give access to the "Enable Replace-By-Fee" checkbox. Checking this will enable Opt-in RBF for the transaction, although it should already be checked by default.

Unconfirmed transactions that have opted in to RBF can have their fee increased by right clicking the transaction in the "Transactions" tab and choosing the "Increase transaction fee" option.

Electrum

Electrum always creates transactions with Opt-in RBF enabled.

To increase the fee of a transaction that uses Opt-In RBF, right click the transaction in the history list and choose the "Increase Fee" option.

Armory

Armory also allows for the creation of RBF transactions. When sending a transaction, choose the checkbox "Enable RBF".

To increase the fee of a transaction that uses Opt-In RBF, right click the transaction in the transactions list and choose the "Bump Fee" option. Transactions whose fee can be increased are labeled clearly in the transactions list.



This post is meant as a more thorough update to https://bitcointalksearch.org/topic/faq-all-about-unconfirmed-0-confirmation-transaction-fee-read-before-posting-232979.

If there are any inaccuracies or if I am missing anything, please let me know and I can add it. If anyone has instructions for CPFP or RBF with any wallets, please let me know and give me the detailed instructions so I can add them to the post.
Pages:
Jump to: