bitcoin / bitcoin/bitcoin

Migrate from BTC/kvB to sat/vB on RPC and startup options

Open
#32,093 14 comments 5 reactions 0 assignees View on GitHub
Brainstorming RPC/REST/ZMQ
Dominant language
C++
Stars
90.2k
Forks
39.4k
Avg merge
3d 10h
Merged PRs (30d)
92

Description

This issue is motivated by the comments in https://github.com/bitcoin/bitcoin/issues/31088

Most of the RPC and Startup options use BTC/kvB while the "standardized" units by users and other softwares is sats/vB.
Note that updating to sat/vB can be backward incompatible in some cases.

There are three approaches that can be followed:
- Update all to sat/vB even if that is not backward compatible (all in the same release). This has been done before with `bumpfee` and `psbtbumpfee`, before v0.21 were using BTC/kvB and after moved to sats/vB.
- Add an option to use sats/vB but don't remove BTC/kvB. This has been done before with `fundrawtransaction` and `walletcreatefundedpsbt`.
- Add a global init option to choose the units.

### List of Fee-Related Options and RPC Calls

#### Takes BTC/kvB as Argument
##### **Startup Options**
- [ ] `-consolidatefeerate`
- [ ] `-discardfee`
- [ ] `-fallbackfee`
- [ ] `-mintxfee`
- [x] `-paytxfee` (https://github.com/bitcoin/bitcoin/pull/31278)
- [ ] `-minrelaytxfee`
- [ ] `-blockmintxfee`

##### **RPC Calls**
- [ ] `sendrawtransaction`
- [ ] `submitpackage`
- [ ] `testmempoolaccept`
- [x] `settxfee` (https://github.com/bitcoin/bitcoin/pull/31278)

#### Prints BTC/kvB as a Result
##### **RPC Calls**
- [ ] `getmempoolinfo` ( https://github.com/bitcoin/bitcoin/pull/33741)
- [ ] `getnetworkinfo` (https://github.com/bitcoin/bitcoin/pull/33741)
- [ ] `analyzepsbt`
- [ ] `submitpackage`
- [ ] `testmempoolaccept`
- [ ] `estimatesmartfee` (https://github.com/bitcoin/bitcoin/pull/33741)
- [ ] `estimaterawfee` (https://github.com/bitcoin/bitcoin/pull/33741)
- [ ] `getwalletinfo` (https://github.com/bitcoin/bitcoin/pull/33741)

#### Prints BTC as Units for Fee Instead of Sats
##### **RPC Calls**
- [ ] `getmempoolinfo` (could make sense to keep BTC)
- [ ] `analyzepsbt`
- [ ] `createrawtransaction`
- [ ] `fundrawtransaction`
- [ ] `submitpackage`
- [ ] `testmempoolaccept`
- [ ] `walletcreatefundedpsbt`

Contributor guide

Open the contributing guide

Research direction

Review the comments in issue #31088, then inventory the unchecked startup options and RPC calls listed here, using the linked pull requests for context. The work needs a chosen migration approach and an explicit affected-scope definition; done means the selected fee-unit behavior is applied consistently across the covered options and RPC results.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.