-
Notifications
You must be signed in to change notification settings - Fork 36.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalize fee units for RPC ("BTC/kB" and "sat/B) #19543
Comments
cc @instagibbs @jonatack @kallewoof (from original discussion) |
This is on my to-do list this month. |
Ping me when there's something reviewable (preferably in the form of a PR) and/or if help is needed. |
Am now targeting doing this after October 15 feature freeze, as ISTM it's a bugfix, for 0.21, but if that is incorrect please let me know. I just now noticed that has been labeled as Up For Grabs, so if anyone is working on it please advise here so that we don't both work on it. |
I'd be interested in helping with this (feerates are something I have an idea about), but I am not sure how I would start. @jonatack would you be interested in pairing on this? Otherwise, I'd also be happy to review. Edit: |
@jonatack I'm not working on it, but if you drop it, let us know. |
SGTM @xekyo! My priorities for the next 6 days are reviewing PRs 19953 (BIPs 340-342), 19954 (BIP 155/Tor v3), and 19988 (tx relay logic). Then this on Oct 16 to propose it by Oct 20/21, will ping you and @kallewoof when starting. Have a look at the last week of comments on #11413, if you like; ISTM we need to (a) fill in the tests to have a regression spec, which I've more or less done (b) catch up with changes since that merge, (c) design the change, (d) implement and propose it. |
@kallewoof @MarcoFalke @xekyo Moving forward on this. To be sure I'm understanding the desired result here, is this what you have in mind? current master... ./src/bitcoin-cli -signet -named sendtoaddress address="tb1qga36nkpuy3f3qswy0ltrvcayj7wfrk48tfdrd9" \
amount=0.00001 conf_target=2 estimate_mode=sat/b desired replacement (no more overloading of ./src/bitcoin-cli -signet -named sendtoaddress address="tb1qga36nkpuy3f3qswy0ltrvcayj7wfrk48tfdrd9" \
amount=0.00001 feerate="2 sat/vb" e.g. the (applied to the same RPCs as #11413 plus the new |
Yes, I think that makes sense and is an improvement |
Not sure if I understood you correctly. Are you asking why |
ISTM the main goal is to not overload
Murch made a good point in a message yesterday:
We could indeed leave off the units, if users don't find it too confusing or scary? e.g. |
Oh great! Not sure why I got confused about that then.
Adding the unit makes it much easier to input an incorrect value. In the comments here alone, I see I just realized, though, if we make 1 sat/vB the cutoff, we may be in trouble when the |
SGTM, I'll start the day tomorrow with running this by @kallewoof on IRC if he is around and otherwise move forward with proposing |
Concept ACK |
Please, don't encode the unit into the value. Definitely don't vary the unit for the same parameter. I have seen this in c-lightning and I think this is very inconvenient for RPC clients, as they have to evaluate units every time at parsing time (making parsing a two-step process too). Either put it in the key (e.g. |
First follow-up is #20220 to fix bugs, error messages, and docs before the 0.21 release and have a test spec in place. |
0be2900 rpc: update conf_target helps for correctness/consistency (Jon Atack) 778b9be wallet, rpc: fix send subtract_fee_from_outputs help (Jon Atack) 603c005 wallet: add rpc send explicit fee rate coverage (Jon Atack) dd341e6 wallet: add sendtoaddress/sendmany explicit fee rate coverage (Jon Atack) 44e7bfa wallet: add walletcreatefundedpsbt explicit fee rate coverage (Jon Atack) 6e1ea42 test: refactor for walletcreatefundedpsbt fee rate coverage (Jon Atack) 3ac7b0c wallet: fundrawtx fee rate coverage, fixup ParseConfirmTarget() (Jon Atack) 2d8eba8 wallet: combine redundant bumpfee invalid params and args tests (Jon Atack) 1697a40 wallet: improve bumpfee error/help, add explicit fee rate coverage (Jon Atack) fc57217 wallet: fix SetFeeEstimateMode() error message (Jon Atack) 052427e wallet, bugfix: fix bumpfee with explicit fee rate modes (Jon Atack) Pull request description: Follow-up to #11413 providing a base to build on for #19543: - bugfix for `bumpfee` raising a JSON error with explicit feerates, fixes issue #20219 - adds explicit feerate test coverage for `bumpfee`, `fundrawtransaction`, `walletcreatefundedpsbt`, `send`, `sendtoaddress`, and `sendmany` - improves a few related RPC error messages and `ParseConfirmTarget()` / error message - fixes/improves the explicit fee rate information in the 6 RPC helps, of which 2 were also missing `conf_target` sat/B units This provides a spec and regression coverage for the potential next step of a universal `sat/vB` feerate argument (see #19543), as well as immediate coverage and minimum fixes for 0.21. ACKs for top commit: kallewoof: Concept/Tested ACK 0be2900 meshcollider: Code review + functional test run ACK 0be2900 Tree-SHA512: efd965003e991cba51d4504e2940f06ab3d742e34022e96a673606b44fad85596aa03a8c1809f06df7ebcf21a38e18a891e54392fe3d6fb4d120bbe4ea0cf5e0
|
05e82d8 wallet: override minfee checks (fOverrideFeeRate) for fee_rate (Jon Atack) 9a670b4 wallet: update sendtoaddress, send RPC examples with fee_rate (Jon Atack) be481b7 wallet: use MIN_RELAY_TX_FEE in bumpfee help (Jon Atack) 449b730 wallet: provide valid values if invalid estimate mode passed (Jon Atack) 6da3afb wallet: update remaining rpcwallet fee rate units to BTC/kvB (Jon Atack) 173b5b5 wallet: update fee rate units, use sat/vB for fee_rate error messages (Jon Atack) 7f9835a wallet: remove fee rates from conf_target helps (Jon Atack) b7994c0 wallet: add fee_rate unit warnings to bumpfee (Jon Atack) 410e471 wallet: remove redundant bumpfee fee_rate checks (Jon Atack) a0d4957 wallet: introduce fee_rate (sat/vB) param/option (Jon Atack) e21212f wallet: remove unneeded WALLET_BTC_KB_TO_SAT_B constant (Jon Atack) 6112cf2 wallet: add CFeeRate ctor doxygen documentation (Jon Atack) 3f72791 wallet: fix bug in RPC send options (Jon Atack) Pull request description: This PR builds on #11413 and #20220 to address #19543. - replace overloading the conf_target and estimate_mode params with `fee_rate` in sat/vB in the sendtoaddress, sendmany, send, fundrawtransaction, walletcreatefundedpsbt, and bumpfee RPCs - allow non-actionable conf_target value of `0` and estimate_mode value of `""` to be passed to use `fee_rate` as a positional argument, in addition to as a named argument - fix a bug in the experimental send RPC described in #20220 (comment) where args were not being passed correctly into the options values - update the feerate error message units for these RPCs from BTC/kB to sat/vB - update the test coverage, help docs, doxygen docs, and some of the RPC examples - other changes to address the excellent review feedback See this wallet meeting log for more context: http://www.erisian.com.au/bitcoin-core-dev/log-2020-11-06.html#l-309 ACKs for top commit: achow101: re-ACK 05e82d8 MarcoFalke: review ACK 05e82d8 did not test and found a few style nits, which can be fixed later 🍯 Xekyo: tACK 05e82d8 Sjors: utACK 05e82d8 Tree-SHA512: a4ee5f184ada53f1840b2923d25873bda88c5a2ae48e67eeea2417a0b35154798cfdb3c147b05dd56bd6608a784e1b91623bb985ee2ab9ef2baaec22206d0a9c
This needs to happen before the next major release. Otherwise, it will be a breaking change.
Some more context: #11413 (comment)
The text was updated successfully, but these errors were encountered: