-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Make CFeeRate
work with uint64_t
sizes
#23633
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
Make CFeeRate
work with uint64_t
sizes
#23633
Conversation
Please don't @ mention people in PR descriptions. They'll get github notifications every time j-random-altcoin cherry-picks them. |
Concept ACK, but please link to the commit that you are reverting |
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. |
Fixed. Sorry for that. |
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.
I'm not sure this is a good idea. A block can only be at the very most 4 MB today, which uint32_t
is more than sufficient for. Does the "fee rate" across ancestors/descendants actually matter for sizes larger than this? It doesn't make sense for miners to take fees they won't get into consideration...
If anything, perhaps we should revisit where we get the combined fee rates, and make sure we ignore anything that wouldn't fit in a block?
References:
|
Perhaps the GetSizeWith* functions need to limit their scope to at most a single block of transactions. But then we also need to calculate the combined fee with that same scope. Ugh. |
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Closing this as it has not had any activity in a while. If you are interested in continuing work on this, please leave a comment so that it can be reopened. |
txmempool.h
contains functions:uint64_t GetSizeWithDescendants() const
uint64_t GetSizeWithAncestors() const
A return value (i.e.
uint64_t
) of these functions can be used to instantiateCFeeRate
. In the current master branch, this would require a cast touint32_t
becauseCFeeRate
has the following constructor:bitcoin/src/policy/feerate.cpp
Line 12 in 29074ba
This PR attempts to remove the need for the casting.
The PR's commit is cherry-picked from sipa's https://github.com/sipa/bitcoin/commits/202111_mempoolfr branch (see #21422 (comment)) which improves #21422.
The PR is currently a draft as I get:
during compilation.
Anyway, I would like to get some early feedback if the PR makes sense to you or not.