mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-23 02:10:51 +02:00
2f2ab47bf74f4da37aad75a186cb0bb16e8af579 Release notes (Pol Espinasa) bf194c920cf768d1339d41aef1441a78e2f5fcbe wallet, rpc: deprecate settxfee and paytxfee (Pol Espinasa) Pull request description: **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 https://github.com/bitcoin/bitcoin/issues/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](https://github.com/bitcoin/bitcoin/pull/31278#discussion_r1998876768) ACKs for top commit: fjahr: re-ACK 2f2ab47bf74f4da37aad75a186cb0bb16e8af579 ismaelsadeeq: re-ACK 2f2ab47bf74f4da37aad75a186cb0bb16e8af579 rkrux: Concept and utACK 2f2ab47bf74f4da37aad75a186cb0bb16e8af579 Tree-SHA512: 0272812cbe5a519737c5d0683acc2072e67559792b4a6472bca8b23426e5ce9e88a3a1eba987feda70a082b8b474b3126893848628d7bf11e1520357b18c8d3e