-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Allow fee estimation to work with lower fees #13990
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
src/policy/fees.cpp
Outdated
: buckets(defaultBuckets), bucketMap(defaultBucketMap) | ||
{ | ||
decay = txstatsSource.decay; | ||
scale = txstatsSource.scale; |
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.
nit: these could go in the initializer list
src/policy/fees.cpp
Outdated
avg.resize(buckets.size()); | ||
|
||
unsigned int src = 0; | ||
for (unsigned int dst = 0; dst < buckets.size(); dst++) { |
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.
nit: ++dst
here and elsewhere
src/policy/fees.cpp
Outdated
} | ||
|
||
src++; | ||
if (src >= txstatsSource.buckets.size()) break; |
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.
nit: can move these conditions into the for
, so that it manages both src
and dst
.
d3956db
to
c1ca0ea
Compare
The really high fee rates were due to not handling the buckets/bucketMap objects correctly, believe that's fixed now. |
031d860
to
7f1e3a4
Compare
Dropped the WIP tag, this should be good to review/nitpick now. I couldn't come up with a reasonable way to add functional tests for this change; if someone has a good idea, suggestions/patches welcome :) Though... I guess just generating an estimates file directly in python, pointing bitcoind at it, and seeing what estimates bitcoind comes up with after upgrading it without ever actually putting txes in the blockchain could work okay... |
7f1e3a4
to
f28cf3c
Compare
Reworked based on a suggestion from @Sjors; could still use some functional tests to check that loading a particular set of fee rates produces an expected set of fee estimates. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. 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. |
Is this work abandoned? |
Concept ACK |
Had stalled this on writing some tests. Having now written a test, it's found a bug, so now trying to fix that... :) |
f28cf3c
to
41b4c64
Compare
9dccf61
to
c68f796
Compare
Rebased, test case added as first commit, should be reviewable. Note that this only makes estimations work for fee rates below 1sat/byte if you ever actually accept fee rates that low into your mempool. To make your mempool accept/relay transactions that cheap requires setting |
Also open a huge surface for privacy leaks |
8c691b3
to
b7b1867
Compare
Seems reasonable, definitely agree that making everything else ready before changing the |
b7b1867
to
46e2b1e
Compare
@ajtowns are you still working on this? |
Makes feature_fee_estimates load a fixed fee_estimates.dat and checks that the estimates given afterwards are also fixed.
46e2b1e
to
d7f903c
Compare
Rebased, but is failing fuzz testing for reasons that aren't immediately obvious, so converted to draft |
🐙 This pull request conflicts with the target branch and needs rebase. |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
1 similar comment
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Lately definitely looks like it is less relevant. Nothing says we can't go back to the situation from a year or two ago where txs with 1 sat/vB would easily confirm in a few hours. |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Closing as up for grabs due to lack of activity. |
Changes the minimum bucket for fee estimation from 1000 satoshi per kilobyte to 4 satoshi per kilobyte, and upgrades any saved fee estimation data.