Author

Topic: Bitcoin Core bumpfee with descendants in mempool (Read 190 times)

jr. member
Activity: 31
Merit: 14
As mentioned, bumpfee won't let you do this, but if you do attempt it with a raw transaction, note that you will have to bump the fee relative to the entire package of transactions. So if you are bumping the fee of a transaction with a lot of descendants, you will need to calculate the total package size in bytes, then bump the fee accordingly.
Are you thinking of CPFP (Child-Pays-For-Parent)? Huh If so, that works the other way... when you're trying to get one of the descendants confirmed quickly, you have to take into account all of the ascendants.

ie. if you have the following chain of transactions: TransA -> TransB -> TransC -> TransD -> TransE

And you bumpfee on TransA... then B, C, D and E will become invalid as the hash of TransA will change, making B invalid.

If you're wanting to get TransE confirmed quickly, then you would need to take A, B, C & D into account as well, to make sure that the fees are big enough for miners to want to get all 5 transactions included in a block.

Are you familiar with RBF pinning? This is a good explanation of the issue I have described. CPFP is subject to the same principle. If I could just kick out transactions w/ descendants from the mempool without paying for the full package that would be a DoS attack of sorts. Unfortunately it can also be turned on its head to "stick" transactions.

https://bitcoinops.org/en/topics/transaction-pinning/

HCP
legendary
Activity: 2086
Merit: 4361
As mentioned, bumpfee won't let you do this, but if you do attempt it with a raw transaction, note that you will have to bump the fee relative to the entire package of transactions. So if you are bumping the fee of a transaction with a lot of descendants, you will need to calculate the total package size in bytes, then bump the fee accordingly.
Are you thinking of CPFP (Child-Pays-For-Parent)? Huh If so, that works the other way... when you're trying to get one of the descendants confirmed quickly, you have to take into account all of the ascendants.

ie. if you have the following chain of transactions: TransA -> TransB -> TransC -> TransD -> TransE

And you bumpfee on TransA... then B, C, D and E will become invalid as the hash of TransA will change, making B invalid.

If you're wanting to get TransE confirmed quickly, then you would need to take A, B, C & D into account as well, to make sure that the fees are big enough for miners to want to get all 5 transactions included in a block.
jr. member
Activity: 31
Merit: 14
As mentioned, bumpfee won't let you do this, but if you do attempt it with a raw transaction, note that you will have to bump the fee relative to the entire package of transactions. So if you are bumping the fee of a transaction with a lot of descendants, you will need to calculate the total package size in bytes, then bump the fee accordingly.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
I tried it today. It works fine with sendrawtransaction. You only get a txn-mempool-conflict if Replace by fee is disabled.
Sorry, sendrawtransaction indeed works.
Seems like I have used the wrong UTXO on my previous test.
The previous transaction and its descendants were automatically booted out of the node's mempool.
newbie
Activity: 14
Merit: 7
Can you bump the fee manually with sendrawtransaction?
After manually creating a replacement signed raw transaction?
You will probably get "txn-mempool-conflict" due to the same reason achow101 explained above (I've only tested in on regtest).

But sending that RAW transaction through other clients might work as long as the to-be-replaced transaction is RBF.

I tried it today. It works fine with sendrawtransaction. You only get a txn-mempool-conflict if Replace by fee is disabled.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
Can you bump the fee manually with sendrawtransaction?
After manually creating a replacement signed raw transaction?
You will probably get "txn-mempool-conflict" due to the same reason achow101 explained above (I've only tested in on regtest).

But sending that RAW transaction through other clients might work as long as the to-be-replaced transaction is RBF.
newbie
Activity: 14
Merit: 7
Oh interesting. Why can you do it on Wallets like Electrum if its not allowed?
It's not disallowed by the network. It's just disallowed by Bitcoin Core's bumpfee functionality.

Can you bump the fee manually with sendrawtransaction?
staff
Activity: 3458
Merit: 6793
Just writing some code
Oh interesting. Why can you do it on Wallets like Electrum if its not allowed?
It's not disallowed by the network. It's just disallowed by Bitcoin Core's bumpfee functionality.
newbie
Activity: 14
Merit: 7
No, it is not.

If a transaction has descendants, that means that there are transactions that spend its outputs. Bumping the fee on that transaction will change the txid of that transaction and invalidate those descendant transactions. Thus bumpfee is disallowed on transactions with descendants.

Oh interesting. Why can you do it on Wallets like Electrum if its not allowed?
staff
Activity: 3458
Merit: 6793
Just writing some code
No, it is not.

If a transaction has descendants, that means that there are transactions that spend its outputs. Bumping the fee on that transaction will change the txid of that transaction and invalidate those descendant transactions. Thus bumpfee is disallowed on transactions with descendants.
newbie
Activity: 14
Merit: 7
Hello,
Is it possible to use the bumpfee command if there are descendants in the mempool? Currently Bitcoin Core 0.20.0 always prints following error:

Code:
error code: -8
error message:
Transaction has descendants in the mempool

Is there a way to still do a replace by fee? How does it work?
Jump to: