-
Notifications
You must be signed in to change notification settings - Fork 38.7k
wallet: Explicit feerate for bumpfee #16727
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
664f08b to
ae700f8
Compare
|
Added some additional basic argument testing, changed the logic to use BTC/kB like everywhere else. |
ae700f8 to
b72d3ff
Compare
|
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. |
|
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. |
|
Why does Bitcoin Core use btc/kB? Every other service/wallet seems to use sats/byte. |
|
@Relaxo143 you'll be pleased to see #11413 then... |
|
@Relaxo143 Unless you allow decimal points it will have less precision.
…On Tue, Aug 27, 2019, 6:44 AM Relaxo143 ***@***.***> wrote:
Why does Bitcoin Core use btc/kB? Every other service/wallet seems to use
sats/byte.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#16727?email_source=notifications&email_token=ABMAFUYWXNZF556SIQ4CPFTQGUAQXA5CNFSM4IPQ24D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HJXSY#issuecomment-525245387>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMAFUZSS2H575PNQTKBVL3QGUAQXANCNFSM4IPQ24DQ>
.
|
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.
Concept ACK.
test/functional/wallet_bumpfee.py
Outdated
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.
Drop ().
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.
fixed
Every other RPC uses "feeRate"... |
We used to use confTarget, but now have |
b72d3ff to
33911b9
Compare
|
going to leave #11413 type ideas alone for now. I think this is a pretty simple feature and I'd like it in. |
33911b9 to
d086d25
Compare
Sjors
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.
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.
src/wallet/rpcwallet.cpp
Outdated
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.
"BTC per kB"
src/wallet/rpcwallet.cpp
Outdated
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.
CURRENCY_UNIT + "per kB\n"
src/wallet/rpcwallet.cpp
Outdated
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.
\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.
src/wallet/rpcwallet.cpp
Outdated
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.
"either a confirmation target in blocks for automatic fee estimation, or an explicit fee rate (or an absolute fee amount - deprecated)."
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.
not going to tell users about a deprecated arg here, otherwise taking suggestion
src/wallet/rpcwallet.cpp
Outdated
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.
May want to check that it's not null.
d086d25 to
9c92d11
Compare
|
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. |
|
The bumpfee test is failing in the CIs. |
9c92d11 to
c812aba
Compare
|
pushed fixed test |
|
Code review ACK c812aba |
laanwj
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 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 |
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.
"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); |
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.
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 -- ", |
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.
Does this error message need to specify units for the numbers?
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
| return feebumper::Result::OK; | ||
| } | ||
|
|
||
| static CFeeRate EstimateFeeRate(CWallet* wallet, const CWalletTx& wtx, CCoinControl& coin_control, CAmount& old_fee) |
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.
This can be const CWallet& wallet, as this shouldn't be mutable, nor nullable.
|
post merge ACK c812aba |
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
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
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
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
feeRatetofee_rateto reflect updated guidelines.