bitcoinlib icon indicating copy to clipboard operation
bitcoinlib copied to clipboard

Increase fees retrospectively?

Open yanone opened this issue 2 years ago • 3 comments

Is it possible to retrospectively bump transaction fees? I've briefly looked through the docs and the source code but couldn't find anything.

yanone avatar Jul 07 '23 09:07 yanone

This is not supported out of the box at the moment.

But you can change the transaction's sequence field to signal RBF.

mccwdev avatar Jul 07 '23 09:07 mccwdev

I'm too simple of a user to understand your reply (atm). So thank you for accepting that as a feature request.

yanone avatar Jul 07 '23 09:07 yanone

@mccwdev right now most nodes acept FullRBF without need of the flag RBF enabled...

about the "bump transaction fees" this part need to be done manually maybe with help of external API, but it requires some knowlege about what are you doing, basically you need to to take the same inputs of the current TX and recalculate the fee, update the ouputs and make the signature again and broadcast it.

I already tested with bitcoinlib and external API mempool.space, by the way it is not warranty that the miners take your new TX if you change the destination address, example a TX of 1 Sat/vB was taken over other TX with 37 Sat/vB (TX f6453f74bbb997f5cbbf0ffda5d7f5d27bd3b10dd14e3633fd29639977d689d5 in testnet)

image

albertobsd avatar Aug 24 '23 00:08 albertobsd

Add replace-by-fee option to Wallet, Transaction and commandline wallet in release 0.7 commit 11c2857cb356f9289513665cc793cfb8d9b1e462

mccwdev avatar Mar 13 '24 15:03 mccwdev