[Policy] Child-pays-for-parent Implementation + CoinAge priority removal#2378
Merged
furszy merged 36 commits intoPIVX-Project:masterfrom Jul 14, 2021
Merged
[Policy] Child-pays-for-parent Implementation + CoinAge priority removal#2378furszy merged 36 commits intoPIVX-Project:masterfrom
furszy merged 36 commits intoPIVX-Project:masterfrom
Conversation
178a029 to
1580748
Compare
furszy
reviewed
May 26, 2021
furszy
left a comment
There was a problem hiding this comment.
Looking really nice, light ACK 1580748eda1e649128fdc51c0e4d2025df013ec9 .
Will get deeper.
1580748 to
2ab8cef
Compare
Author
|
Rebased, fixing conflicts. |
2ab8cef to
b29f42c
Compare
Author
|
Rebased. |
c41044c to
ce30647
Compare
Author
|
Rebased |
|
Rebase needed. |
ce30647 to
c9230e7
Compare
Author
|
Rebased again. |
|
will need another rebase. |
c9230e7 to
ac68156
Compare
Author
|
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
Author
|
Fixed |
Fuzzbawls
approved these changes
Jul 14, 2021
furszy
approved these changes
Jul 14, 2021
Comment on lines
+591
to
+594
| 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.
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.
Can decrease this number to our block time so we don't track a much higher number of transactions in policy estimator.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: