wallet: add config setting "wallet_fullrbf"
This adds a config variable "wallet_fullrbf", which (if enabled) lets the user ignore the BIP-125 signalling rules and try to RBF any tx.
Because of the need to connect to an electrum server that sets mempoolfullrbf=1, and the related tx-propagation and miner-hashrate-fraction issue (as also mentioned in the config var description added here), this is atm not exposed to the GUI.
related https://github.com/spesmilo/electrum/issues/8088#issuecomment-1338381458
If a tx is a channel funding, it might be mutated by another instance of the same wallet, who does not know about that. That is pretty much the only reason why we still use the RBF flag.
I do not like the idea of adding another user setting, without a clear explanation of the use case for it, and how important that use case is, compared to other use cases.
- Are we trying to bump the fees of transactions created by other wallets and imported in Electrum?
- Is that use case more important than the risk of losing funds from malleating channel funding transactions?
If a tx is a channel funding, it might be mutated by another instance of the same wallet, who does not know about that.
Right. There is detailed discussion in https://github.com/spesmilo/electrum/issues/7072.
That is pretty much the only reason why we still use the RBF flag.
Well, tbh, I think we still need to distinguish between RBF (signalling) and non-RBF txs, because it is reliably possible to replace a signalling tx, which is probably not true for non-RBF.
the risk of losing funds from malleating channel funding transactions?
wallet.is_lightning_funding_tx() should provide some protection against that, which is also used in this PR. (more discussion in https://github.com/spesmilo/electrum/issues/7072#issuecomment-1896199752)
use case for it
- transactions created by other wallets and imported in Electrum (indeed as you correctly pointed out)
- (double-spend) cancelling our own channel funding txs
- because, as above, we are not signalling RBF for them
- but perhaps we should just signal RBF for them instead
- but if we do that, we might as well still have this PR, as the main reason against it is users accidentally bump_fee-ing funding txs
note: if we decide that it is desirable to cancel channel funding transactions, then I think this should not be an option. we could instead set the RBF flag on all channel funding tx. we would still need a mechanism to prevent users from bumping the fee of a channel funding tx from another instance of Electrum.
How can I withdraw