Summary
This PR deprecates the settxfee RPC, marking it for removal in Bitcoin Core 30.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.
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
entirely.
Key Changes
settxfee
is now deprecated and will be removed in Bitcoin Core 30.0.
Users should rely on fee estimation or explicitly specify a fee rate when constructing transactions.
Impact on Users
If users currently use settxfee, they should transition to specifying fees per transaction.
No immediate breakage in 29.0, but settxfee
will be removed in 30.0.
Alternative Approaches Considered
A settxfeerate alternative (using sat/vB) was initially proposed but ultimately rejected in favor of deprecating static fee setting entirely.