-
Notifications
You must be signed in to change notification settings - Fork 725
[Policy] Child-pays-for-parent Implementation + CoinAge priority removal #2378
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
178a029 to
1580748
Compare
furszy
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.
Looking really nice, light ACK 1580748eda1e649128fdc51c0e4d2025df013ec9 .
Will get deeper.
1580748 to
2ab8cef
Compare
|
Rebased, fixing conflicts. |
2ab8cef to
b29f42c
Compare
|
Rebased. |
c41044c to
ce30647
Compare
|
Rebased |
furszy
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.
re-code ACK ce30647
|
Rebase needed. |
ce30647 to
c9230e7
Compare
|
Rebased again. |
|
will need another rebase. |
c9230e7 to
ac68156
Compare
|
Rebased on master, fixing conflicts, and added last commit for #2469 |
|
Got broken after the rebase, will need to do some changes due the serialization framework changes. |
This was an oversight, where blocks and mempool tracking were ignored during IBD, but transactions that arrived during IBD but were included in blocks after IBD were not ignored.
>>> backports bitcoin/bitcoin@84f7ab0 Fee estimation can just check its own mapMemPoolTxs to determine the same information. Note that now fee estimation for block processing must happen before those transactions are removed, but this shoudl be a speedup.
All decisions about whether the transactions are valid data points are made at the time the transaction arrives. Updating on blocks all the time will now cause stale fee estimates to decay quickly when we restart a node.
Make a more conservative notion of whether the node is caught up to the rest of the network and only count transactions as fee estimation data points if the node is caught up.
"startingpriority" and "currentpriority" are no longer returned in the JSON information about a mempool entry. This affects getmempoolancestors, getmempooldescendants, getmempooolentry, and getrawmempool.
>>> backports bitcoin/bitcoin@f9b9371 This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta). The function prioritiseTransaction is also updated.
>>> backports bitcoin/bitcoin@359e8a0 Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
This fixes compatibility with boost 1.66
Setting minrelaytxfee to 0 will allow all transactions regardless of fee to enter your mempool until it reaches its size limit. However now that mempool limiting is governed by a separate incrementalrelay fee, it is an unnecessary restriction to prevent a minrelaytxfee of 0.
ac68156 to
f5b2e54
Compare
|
Fixed |
Fuzzbawls
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.
utACK f5b2e54
furszy
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.
re-ACK f5b2e54 after rebase and last commit.
left two comments that can be tackled in a follow up PR, merging..
| if (iter->IsShielded()) { | ||
| // Don't add SHIELD transactions if in maintenance (SPORK_20) | ||
| if (sporkManager.IsSporkActive(SPORK_20_SAPLING_MAINTENANCE)) { | ||
| 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.
Now that we are here, we missed to do the same with P2CS transactions. Shouldn't be added into a block if spork 19 is enabled.
| /** If the tip is older than this (in seconds), the node is considered to be in initial block download. */ | ||
| static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60; | ||
| /** Maximum age of our tip for us to be considered current for fee estimation */ | ||
| static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60; |
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.
Can decrease this number to our block time so we don't track a much higher number of transactions in policy estimator.
This PR implements CPFP transaction selection mechanism, which is the simplest "fee bumping technique" (we might want to consider implementing RBF too later on).
The algorithm in
CreateNewBlocknow selects transactions based on their feerate, inclusive of unconfirmed ancestor transactions. This means that a low-fee transaction can become more likely to be selected if a high-fee transaction that spends its outputs is relayed: the fee burned in the "child" transaction, actually pays for the parent tx too (hence the name).This PR also removes completely the (already deprecated) notion of coinage-based priority and "free transactions area".
Changes backported / adapted from: