-
Notifications
You must be signed in to change notification settings - Fork 717
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
[Core] New fee estimation code #1641
[Core] New fee estimation code #1641
Conversation
This class groups transactions that have been confirmed in blocks into buckets, based on either their fee or their priority. Then for each bucket, the class calculates what percentage of the transactions were confirmed within various numbers of blocks. It does this by keeping an exponentially decaying moving history for each bucket and confirm block count of the percentage of transactions in that bucket that were confirmed within that number of blocks. -Eliminate txs which didn't have all inputs available at entry from fee/pri calcs -Add dynamic breakpoints and tracking of confirmation delays in mempool transactions -Remove old CMinerPolicyEstimator and CBlockAverage code -Pass a flag to the estimation code, using IsInitialBlockDownload as a proxy for when we are still catching up and we shouldn't be counting how many blocks it takes for transactions to be included. -Add a policyestimator unit test
HasZerocoinSpendInputs returns true for either public or private zc spends
backports bitcoin/bitcoin@abd8b76 and bitcoin/53238ff0b1085352e4aaa796d0e473551e573143
commenting out the smartFee checks for now
Thanks for the feedback @NoobieDev12. Unit and functional tests have been added to verify the execution of the new estimation code under different conditions. As for the specific issues you highlight:
yep, not related: this is due to the bug fixed by #1611
It is not meant to be. When you change the fee you are still sending the same amount, from the same inputs, so you have the same |
Concept ACK, and code looks ok. going to spool up a client to leave running overnight to check runtime effect (not hoping for much, but doesn't hurt) |
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 4038de4
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 4038de4 and merging
368665e Implement accurate memory accounting for mempool (random-zebra) Pull request description: Based on top of: - [x] #1641 This continues the work of #1531 adding memory accounting for the mempool. Backports bitcoin#6410. Original description: > This implements accurate memory usage accounting for the mempool. It is only exposed through getmempoolinfo for now, but could be used for limiting the resource requirements too (bitcoin#6281). ACKs for top commit: furszy: pretty nice, tested ACK 368665e Fuzzbawls: ACK 368665e Tree-SHA512: f1dd0e98af58133255db02ae57f20c5d1c0b210610bf6e6c99a112c8c74c0e83e0ae05fd22a933cc4db0eaca36b5f45fa27231879809b348ba0dba034e176767
This introduces the new fee and priority estimation code described here https://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg06405.html.
Instead of calculating the median fee for each possible number of blocks needed to confirm, the new code divides the possible fee rates into buckets (spaced logarithmically) and keeps track of the number of blocks needed to confirm for each transaction in each bucket.
Backports:
except for the functional test (
smartfees.py
) which is based on an older version of the framework.Instead I've restored a more recent
feature_fee_estimation.py
(commenting out the check forestimatesmartfee
which can be reintroduced once bitcoin#6134 is backported).Additional commits exclude zerocoins txes from the estimates calculation, as they have fixed fee/priority.