Skip to content

Conversation

@instagibbs
Copy link
Member

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.

@instagibbs
Copy link
Member Author

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.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 9, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #15911 (Use wallet RBF default for walletcreatefundedpsbt by Sjors)
  • #15888 (QA: Add wallet_implicitsegwit to test the ability to transform keys between address types by luke-jr)

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.

Copy link
Member

@jonatack jonatack left a 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.

"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"
Copy link
Member

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?

"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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem.

{
{"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"
Copy link
Member

@jonatack jonatack May 11, 2019

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"

@jonatack
Copy link
Member

Wrote a test for the deprecation itself. Feel free to steal/use/adapt.

@instagibbs instagibbs force-pushed the deprecate_totalfee branch from 7ccf9dc to 59bc35c Compare May 13, 2019 13:38
@instagibbs
Copy link
Member Author

instagibbs commented May 13, 2019

@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!

@jonatack
Copy link
Member

@instagibbs All good. Might update the follow-up to removing totalFee from the bumpfee tests if this gets in.

@instagibbs
Copy link
Member Author

SGTM! Would appreciate the assist.

Copy link
Contributor

@promag promag left a 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?

@jonatack
Copy link
Member

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 spend_one_input function in both bumpfee testfiles could be extracted, but since one of the two testfiles is destined be removed by 0.2.0 I'm not sure it's worthwhile to do unless other test files could use that function.

@jnewbery
Copy link
Contributor

Instead of adding a new test why not update test/functional/wallet_bumpfee.py?

When this is removed entirely it also seems easier to just have a separate test file to remove.

I agree. Adding a separate test for this deprecated option makes it very easy to remove when the deprecated option is removed.

ACK 59bc35c10386a4a58d7835d0a983fdde10eb2400
(reviewed code and run functional tests locally. No manual testing)

@etscrivner
Copy link
Contributor

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?

@instagibbs
Copy link
Member Author

@etscrivner I think it'd be more worthwhile to allow feerate as an argument instead, since only confTarget is allowed right now.

@etscrivner
Copy link
Contributor

@instagibbs Agree, that sounds better than totalFee to me.

@instagibbs
Copy link
Member Author

@etscrivner #16203 made an issue, if you feel like tackling this as a feature

@jnewbery
Copy link
Contributor

@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.

@instagibbs
Copy link
Member Author

@jnewbery something to think about sure, but that's an incredibly advances use-case that someone could manually RBF anyways.

@jnewbery
Copy link
Contributor

that's an incredibly advances use-case

Yeah, you're right. For a consumer-facing wallet (which is what Bitcoin Core wallet primarily is), fee-bumping child transactions is quite advanced.

@fanquake fanquake changed the title Deprecate totalfee argument in bumpfee rpc: Deprecate totalfee argument in bumpfee Jun 18, 2019
@fridokus
Copy link
Contributor

ACK 59bc35c10386a4a58d7835d0a983fdde10eb2400
Ran functional tests locally and reviewed code.

@instagibbs instagibbs force-pushed the deprecate_totalfee branch from 59bc35c to c569474 Compare July 11, 2019 18:12
@instagibbs
Copy link
Member Author

rebased

Copy link
Contributor

@ryanofsky ryanofsky left a 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

instagibbs and others added 2 commits July 26, 2019 14:09
Next steps: remove `totalFee` from the wallet_bumpfee functional tests.
@instagibbs instagibbs force-pushed the deprecate_totalfee branch from c569474 to 2f7eb77 Compare July 26, 2019 18:10
Copy link
Contributor

@ryanofsky ryanofsky left a 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!)

Copy link
Member

@jonatack jonatack left a 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.

Copy link
Contributor

@meshcollider meshcollider left a 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

@meshcollider meshcollider merged commit 2f7eb77 into bitcoin:master Jul 27, 2019
meshcollider added a commit that referenced this pull request Jul 27, 2019
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
@maflcko
Copy link
Member

maflcko commented Jul 29, 2019

totalFee argument is of questionable use, and should be removed in favor of feerate-based features.

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.

@ezegom
Copy link
Contributor

ezegom commented Jul 30, 2019

totalFee argument is of questionable use, and should be removed in favor of feerate-based features.

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

@fanquake
Copy link
Member

Release notes being added in #16504

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Jul 31, 2019
…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
laanwj added a commit that referenced this pull request Mar 26, 2020
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
@maflcko maflcko removed the Tests label Jan 15, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.