Skip to content

Conversation

@instagibbs
Copy link
Member

@instagibbs instagibbs commented Aug 26, 2019

Taking over for #16492 which seems to have gone inactive.

Only minor commit cleanups, rebase, and some help text fixes on top of previous PR. Renamed feeRate to fee_rate to reflect updated guidelines.

@instagibbs
Copy link
Member Author

Added some additional basic argument testing, changed the logic to use BTC/kB like everywhere else.

@DrahtBot
Copy link
Contributor

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #11413 ([wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate option by kallewoof)

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.

@fanquake fanquake changed the title Explicit feerate for bumpfee wallet: Explicit feerate for bumpfee Aug 27, 2019
@fanquake fanquake removed the Tests label Aug 27, 2019
@Sjors
Copy link
Member

Sjors commented Aug 27, 2019

Concept ACK.

Alternatively you could rebase on #11413 and use that syntax instead, which is easier to use on the command line than a JSON options object.

@Relaxo143
Copy link

Why does Bitcoin Core use btc/kB? Every other service/wallet seems to use sats/byte.

@Sjors
Copy link
Member

Sjors commented Aug 27, 2019

@Relaxo143 you'll be pleased to see #11413 then...

@instagibbs
Copy link
Member Author

instagibbs commented Aug 27, 2019 via email

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.

Concept ACK.

Copy link
Contributor

Choose a reason for hiding this comment

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

Drop ().

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@luke-jr
Copy link
Member

luke-jr commented Sep 2, 2019

Renamed feeRate to fee_rate to reflect updated guidelines.

Every other RPC uses "feeRate"...

@instagibbs
Copy link
Member Author

Every other RPC uses "feeRate"...

We used to use confTarget, but now have conf_target in use in various newer args. I see no reason to introduce old styles for old style sake.

@instagibbs
Copy link
Member Author

going to leave #11413 type ideas alone for now.

I think this is a pretty simple feature and I'd like it in.

@maflcko maflcko added this to the 0.19.0 milestone Sep 23, 2019
Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

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

Quite a bit of code duplication in 74b271616016a5efd03d96c3077bdac79c38b134 rpc bumpfee check fee_rate argument. Can you add a helper?

Also left some documentation nits as of d086d25.

Copy link
Member

Choose a reason for hiding this comment

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

"BTC per kB"

Copy link
Member

Choose a reason for hiding this comment

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

CURRENCY_UNIT + "per kB\n"

Copy link
Member

Choose a reason for hiding this comment

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

\n missing

Sjors doesn't like being addressed in third person. Also there's no need to explain that a fee rate determines the total fee; we don't do that in other places either. More importantly, this doesn't cover the actual RBF rules.

What about: "Specify a specific fee rate instead of relying on the built-in fee estimator. Must be at least 0.0001 BTC per kB higher than the current rate."

Fun fact: there's no convenient way to find the current fee rate.

Copy link
Member

Choose a reason for hiding this comment

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

"either a confirmation target in blocks for automatic fee estimation, or an explicit fee rate (or an absolute fee amount - deprecated)."

Copy link
Member Author

Choose a reason for hiding this comment

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

not going to tell users about a deprecated arg here, otherwise taking suggestion

Copy link
Member

Choose a reason for hiding this comment

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

May want to check that it's not null.

@instagibbs
Copy link
Member Author

Fixed most nits, @Sjors if you're referring to code duplication with respect to TotalBump, I don't really feel like optimizing a piece of code we're going to rip out in 0.20.

@laanwj
Copy link
Member

laanwj commented Sep 30, 2019

The bumpfee test is failing in the CIs.

@instagibbs
Copy link
Member Author

pushed fixed test

@Sjors
Copy link
Member

Sjors commented Sep 30, 2019

Code review ACK c812aba

Copy link
Member

@laanwj laanwj left a comment

Choose a reason for hiding this comment

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

ACK c812aba
Some small remarks but nothing that needs to hold up the merge.

// the minimum of that and the wallet's conservative
// WALLET_INCREMENTAL_RELAY_FEE value to future proof against changes to
// network wide policy for incremental relay fee that our node may not be
// aware of. This ensures we're over the over the required relay fee rate
Copy link
Member

Choose a reason for hiding this comment

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

"over the over the"
Though I see this typo exists in the old code as well so there's no need to fix that in this PR.

// The user provided a feeRate argument.
// We calculate this here to avoid compiler warning on the cs_wallet lock
const int64_t maxTxSize = CalculateMaximumSignedTxSize(*wtx.tx, wallet);
Result res = CheckFeeRate(wallet, wtx, *(new_coin_control.m_feerate), maxTxSize, errors);
Copy link
Member

Choose a reason for hiding this comment

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

Why the set of parentheses around new_coin_control.m_feerate?


if (newFeerate.GetFeePerK() < minMempoolFeeRate.GetFeePerK()) {
errors.push_back(strprintf(
"New fee rate (%s) is lower than the minimum fee rate (%s) to get into the mempool -- ",
Copy link
Member

Choose a reason for hiding this comment

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

Does this error message need to specify units for the numbers?

laanwj added a commit that referenced this pull request Oct 2, 2019
c812aba test bumpfee fee_rate argument (ezegom)
9f25de3 rpc bumpfee check fee_rate argument (ezegom)
88e5f99 rpc bumpfee: add fee_rate argument (ezegom)
1a4c791 rpc bumpfee: move feerate estimation logic into separate method (ezegom)

Pull request description:

  Taking over for #16492 which seems to have gone inactive.

  Only minor commit cleanups, rebase, and some help text fixes on top of previous PR. Renamed `feeRate` to `fee_rate` to reflect updated guidelines.

ACKs for top commit:
  Sjors:
    Code review ACK c812aba
  laanwj:
    ACK c812aba

Tree-SHA512: 5f7f51bd780a573ccef1ccd72b0faf3e5d143f6551060a667560c5163f7d9480e17e73775d1d7bcac0463f3b6b4328f0cff7b27e39483bddc42a530f4583ce30
@laanwj laanwj merged commit c812aba into bitcoin:master Oct 2, 2019
return feebumper::Result::OK;
}

static CFeeRate EstimateFeeRate(CWallet* wallet, const CWalletTx& wtx, CCoinControl& coin_control, CAmount& old_fee)
Copy link
Member

Choose a reason for hiding this comment

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

This can be const CWallet& wallet, as this shouldn't be mutable, nor nullable.

@maflcko
Copy link
Member

maflcko commented Oct 9, 2019

post merge ACK c812aba

maflcko pushed a commit that referenced this pull request Oct 15, 2019
66b2984 change wallet pointers to references in feebumper (Adam Jonas)
9be6666 typo and unneccessary parentheses (Adam Jonas)

Pull request description:

  Picking up some of the suggestions in the comments of #16727 including:
  #16727 (comment)
  #16727 (comment)
  #16727 (comment)

ACKs for top commit:
  promag:
    Code review ACK 66b2984.
  MarcoFalke:
    ACK 66b2984 (looked at the diff on GitHub)
  fjahr:
    ACK 66b2984 reviewed code

Tree-SHA512: d118f7689970fe39d9f5318dc818f13283cce9194370b3ce4758f298172e4681ae119ddc809f5c0b7602677137ac0d38147b915422ff616531a76a570b766fa2
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 16, 2019
66b2984 change wallet pointers to references in feebumper (Adam Jonas)
9be6666 typo and unneccessary parentheses (Adam Jonas)

Pull request description:

  Picking up some of the suggestions in the comments of bitcoin#16727 including:
  bitcoin#16727 (comment)
  bitcoin#16727 (comment)
  bitcoin#16727 (comment)

ACKs for top commit:
  promag:
    Code review ACK 66b2984.
  MarcoFalke:
    ACK 66b2984 (looked at the diff on GitHub)
  fjahr:
    ACK 66b2984 reviewed code

Tree-SHA512: d118f7689970fe39d9f5318dc818f13283cce9194370b3ce4758f298172e4681ae119ddc809f5c0b7602677137ac0d38147b915422ff616531a76a570b766fa2
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.

10 participants