Summary
This PR deprecates the settxfee RPC and paytxfee setting, marking it for removal in Bitcoin Core 31.0.
Motivation
The PR was initially motivated by #31088. The intention was to create a new function settxfeerate
to allow users to set a static fee rate in sat/vB
instead of btc/kvB
.
The settxfee
RPC allows users to set a static fee rate for all transactions created by the wallet. However, in a dynamic fee environment, this can lead to poor fee choices, either overpaying when the mempool is empty or underpaying when congestion is high. The preferred approach is to rely on fee estimation, which is designed to adapt to network conditions, and is the one by default. Same argument apply for paytxfee
setting.
During discussion the consensus was that static fee settings are a footgun and that users should instead specify the fee rate per transaction if they don’t want to rely on the fee estimation. Given this, rather than introducing a settxfeerate
alternative, this PR goes towards removing settxfee
and paytxfee
entirely.
Key Changes
settxfee
and paytxfee
is now deprecated and will be removed in Bitcoin Core 31.0.
Users should rely on fee estimation or explicitly specify a fee rate when constructing transactions.
Impact on Users
If users currently use settxfee or paytxfee, they should transition to specifying fees per transaction.
No immediate breakage in 30.0 (must use -deprecatedrpc=settxfee
), but settxfee
and paytxfee
will be removed in 31.0.
Alternative Approaches Considered
A settxfeerate alternative (using sat/vB) was initially proposed but ultimately rejected in favor of deprecating static fee setting entirely.
Notes for removal
- When removing paytxfee we should also update txconfirmtarget startup option help text.
- Get back the comment from
rpc_deprecated.py
test. +info