-
Notifications
You must be signed in to change notification settings - Fork 38.7k
rpc: Deprecate totalfee argument in bumpfee
#15996
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
Conversation
|
just noting that actual removal of the RPC call will likely call for some additional test-rewriting since most tests are using the totalFee argument for high-precision transaction malleation. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
7c04b8e to
7ccf9dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7ccf9dc. Feel free to ignore the mentioned nits.
Tested beyond code review by compiling and verifying (1) bumpfee help output and (2) that all the wallet_bumpfee functional tests using totalFee raise a JSONRPCException with the expected deprecation message when -deprecatedrpc=totalFee is not passed:
test_small_output_fails
test_dust_to_fee
test_rebumping
test_rebumping_not_replaceable
test_change_script_match
The other subtests in wallet_bumpfee.py all still pass without -deprecatedrpc=totalFee.
src/wallet/rpcwallet.cpp
Outdated
| "An opt-in RBF transaction with the given txid must be in the wallet.\n" | ||
| "The command will pay the additional fee by reducing change outputs or adding inputs when necessary. It may add a new change output if one does not already exist.\n" | ||
| "If `totalFee` is given, adding inputs is not supported, so there must be a single change output that is big enough or it will fail.\n" | ||
| "If `totalFee`(DEPRECATED) is given, adding inputs is not supported, so there must be a single change output that is big enough or it will fail.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps separate totalFee and (DEPRECATED) with a space?
src/wallet/rpcwallet.cpp
Outdated
| "By default, the new fee will be calculated automatically using estimatesmartfee.\n" | ||
| "The user can specify a confirmation target for estimatesmartfee.\n" | ||
| "Alternatively, the user can specify totalFee, or use RPC settxfee to set a higher fee rate.\n" | ||
| "Alternatively, the user can specify totalFee(DEPRECATED), or use RPC settxfee to set a higher fee rate.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem.
src/wallet/rpcwallet.cpp
Outdated
| { | ||
| {"confTarget", RPCArg::Type::NUM, /* default */ "fallback to wallet's default", "Confirmation target (in blocks)"}, | ||
| {"totalFee", RPCArg::Type::NUM, /* default */ "fallback to 'confTarget'", "Total fee (NOT feerate) to pay, in satoshis.\n" | ||
| {"totalFee", RPCArg::Type::NUM, /* default */ "(DEPRECATED) fallback to 'confTarget'", "Total fee (NOT feerate) to pay, in satoshis.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps display the deprecation similarly to EntryDescriptionString in src/rpc/blockchain.cpp:L387, e.g.:
{"totalFee", RPCArg::Type::NUM, /* default */ "fallback to 'confTarget'", "Total fee (NOT feerate) to pay, in satoshis (DEPRECATED).\n"|
Wrote a test for the deprecation itself. Feel free to steal/use/adapt. |
7ccf9dc to
59bc35c
Compare
|
@jonatack I took the deprecation test itself, comment changes seem somewhat unrelated so left those out of this PR in favor of your follow-up PR. Thanks! |
|
@instagibbs All good. Might update the follow-up to removing totalFee from the bumpfee tests if this gets in. |
|
SGTM! Would appreciate the assist. |
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a new test why not update test/functional/wallet_bumpfee.py?
I began by doing that and found that this is cleaner, because for now the bumpfee tests need to use totalFee. Testing the deprecation separately makes sense. I also considered doing it in rpc_deprecated.py but this change only concerns an argument, not the rpc itself. When this is removed entirely it also seems easier to just have a separate test file to remove. The |
I agree. Adding a separate test for this deprecated option makes it very easy to remove when the deprecated option is removed. ACK 59bc35c10386a4a58d7835d0a983fdde10eb2400 |
|
ACK reviewed code and ran functional tests locally. No manual tests. One thing I do worry about with deprecating this is closing off the possibility of clients using alternative fee-rate estimation algorithms or techniques. Are there more details on why we think the value of this argument is questionable? |
|
@etscrivner I think it'd be more worthwhile to allow feerate as an argument instead, since only |
|
@instagibbs Agree, that sounds better than |
|
@etscrivner #16203 made an issue, if you feel like tackling this as a feature |
|
@instagibbs I think a valid concern could be that a user might want to bump the fee on a descendant transaction of unconfirmed transactions. The aim would be to bring the feerate of the package up to some desired value. Without being able to specify the totalfee on the child, it would be very difficult to target a feerate for the entire package. |
|
@jnewbery something to think about sure, but that's an incredibly advances use-case that someone could manually RBF anyways. |
Yeah, you're right. For a consumer-facing wallet (which is what Bitcoin Core wallet primarily is), fee-bumping child transactions is quite advanced. |
bumpfeebumpfee
|
ACK 59bc35c10386a4a58d7835d0a983fdde10eb2400 |
59bc35c to
c569474
Compare
|
rebased |
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditional utACK c56947435a79da3b4f3a96dc3acc5effb5fffe68 with suggested change to avoid moving IsDeprecatedRPCEnabled
Next steps: remove `totalFee` from the wallet_bumpfee functional tests.
c569474 to
2f7eb77
Compare
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 2f7eb77. Only change since last review is leaving IsDeprecatedRPCEnabled in its happy home, and switching to rpcEnableDeprecated instead. (Thanks!)
jonatack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2f7eb77. Built locally, manually tested rpc bumpfee, help output (gist), all tests pass. Travis failures appears to be unrelated, the bitcoin builds are green.
meshcollider
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review ACK 2f7eb77
2f7eb77 Add RPC bumpfee totalFee deprecation test (Jon Atack) a92d9ce deprecate totalFee argument in bumpfee RPC call (Gregory Sanders) Pull request description: totalFee argument is of questionable use, and should be removed in favor of feerate-based features. I first moved IsDeprecatedRPCEnabled because `bitcoin-wallet` doesn't link `libbitcoin_server`. ACKs for top commit: ryanofsky: utACK 2f7eb77. Only change since last review is leaving IsDeprecatedRPCEnabled in its happy home, and switching to rpcEnableDeprecated instead. (Thanks!) jonatack: ACK 2f7eb77. Built locally, manually tested rpc bumpfee, help output ([gist](https://gist.github.com/jonatack/863673eacc02f9da39ff6d6712f9d837)), all tests pass. Travis failures appears to be unrelated, the [bitcoin builds are green](https://bitcoinbuilds.org/index.php?build=121). meshcollider: Code Review ACK 2f7eb77 Tree-SHA512: c97465205ee59575df37894bcbb6c4ecf8858dd8fe9d89503f9342b226768c1dcb553153bc9eb3055f7bf5eb41573e48b8efa57e083cd255793cbe5280f0026a
What are those feerate-based features? I couldn't find any in bumpfee. It seems weird to remove a feature that is likely used, without replacement and without mention in the release notes. |
Currently working on this, see : #16492 |
|
Release notes being added in #16504 |
…e option of bumpfee 73b692b doc: Add release note for the deprecated totalFee option of bumpfee (João Barbosa) Pull request description: Adds release notes for bitcoin#15996. Top commit has no ACKs. Tree-SHA512: 2d75c2fbdd122aa02e808013dd3424843495038bac289b64acc6cc9889bb8ee30d6a91ec2a1b61e6949b1b6e4437331388588d804c81a83757d35d07bf579bc3
c3857c5 wallet: remove CreateTotalBumpTransaction() (Jon Atack) 4a0b27b wallet: remove totalfee from createBumpTransaction() (Jon Atack) e347cfa rpc: remove deprecated totalFee arg from RPC bumpfee (Jon Atack) bd05f96 test: delete wallet_bumpfee_totalfee_deprecation.py (Jon Atack) a6d1ab8 test: update bumpfee testing from totalFee to fee_rate (Jon Atack) Pull request description: Since 0.19, fee-bumping using `totalFee` was deprecated in #15996 and replaced by `fee_rate` in #16727. This changeset removes it. ACKs for top commit: laanwj: ACK c3857c5 Tree-SHA512: c1bb15d664baf4d2dea06981f36384af02057d125c51fcbc8640b9d5563532187c7b84aa952f7b575255a88ce383ed4d7495bec920a47b05b6fc0d432dce1f00
totalFee argument is of questionable use, and should be removed in favor of feerate-based features.
I first moved IsDeprecatedRPCEnabled because
bitcoin-walletdoesn't linklibbitcoin_server.