[Core] MemPool package tracking and limits#1647
Merged
furszy merged 20 commits intoPIVX-Project:masterfrom Jun 14, 2020
Merged
Conversation
49ffb88 to
016291c
Compare
Author
|
Rebased on top of master, now that #1645 has been merged. |
- backports bitcoin/bitcoin@34628a1 Indexes on: - Tx Hash - Fee Rate (fee-per-kb)
016291c to
66b2e39
Compare
Author
|
Rebased |
Author
|
Included cherry-picks 6776, 6896 and 7020 and updated PR description. |
f31051b to
9889ed0
Compare
9889ed0 to
891842e
Compare
Fuzzbawls
reviewed
Jun 13, 2020
Collaborator
Fuzzbawls
left a comment
There was a problem hiding this comment.
Nit: untranslated help message strings
- backports bitcoin/bitcoin@5add7a7 Associate with each CTxMemPoolEntry all the size/fees of descendant mempool transactions. Sort mempool by max(feerate of entry, feerate of descendants). Update statistics on-the-fly as transactions enter or leave the mempool. Also add ancestor and descendant limiting, so that transactions can be rejected if the number or size of unconfirmed ancestors exceeds a target, or if adding a transaction would cause some other mempool entry to have too many (or too large) a set of unconfirmed in- mempool descendants.
- backports bitcoin/bitcoin@49b6fd5 (note the 9x multiplier on (void*)'s for CTxMemPool::DynamicMemoryUsage was accidentally introduced in 5add7a7 but should have waited for this commit which adds the extra index)
- backports bitcoin/bitcoin@241d607
- backports bitcoin/bitcoin@794a8ce After each transaction which is added to mempool, we first call Expire() to remove old transactions, then throwing away the lowest-feerate transactions. After throwing away transactions by feerate, we set the minimum relay fee to the maximum fee transaction-and-dependant-set we removed, plus the default minimum relay fee. After the next block is received, the minimum relay fee is allowed to decrease exponentially. Its halflife defaults to 12 hours, but is decreased to 6 hours if the mempool is smaller than half its maximum size, and 3 hours if the mempool is smaller than a quarter its maximum size. The minimum -maxmempool size is 40*-limitdescendantsize, as it is easy for an attacker to play games with the cheapest -limitdescendantsize transactions. -maxmempool defaults to 300MB. This disables high-priority transaction relay when the min relay fee adjustment is >0 (ie when the mempool is full). When the relay fee adjustment drops below the default minimum relay fee / 2 it is set to 0 (re-enabling priority-based free relay).
- backports bitcoin/bitcoin@0d699fc Current master crashes on OSX with an exception: "boost: mutex lock failed in pthread_mutex_lock: Invalid argument"
- backports bitcoin/bitcoin@971a4e6 Reduce the default limits on maximum number of transactions and the cumulative size of those transactions in both ancestor and descendant packages to 25 txs and 101kb total size.
This is only for unit tests.
891842e to
2105947
Compare
Fuzzbawls
approved these changes
Jun 14, 2020
random-zebra
added a commit
to random-zebra/PIVX
that referenced
this pull request
Jun 24, 2020
Document the changes introduced in: - PIVX-Project#1549: Nuke zPIV from the GUI - PIVX-Project#1586: Minimum value for stake split threshold - PIVX-Project#1633: Bitcoin 0.12-0.14 serialization improvements - PIVX-Project#1645: Implement accurate memory accounting for mempool - PIVX-Project#1647: MemPool package tracking and limits - PIVX-Project#1650: Benchmarking Framework - PIVX-Project#1688: TopBar navigation (sync/peers)
random-zebra
added a commit
that referenced
this pull request
Jun 29, 2020
4819ee7 [Doc] Add/Update some release notes for 4.2 (random-zebra) Pull request description: Document the changes introduced in: - #1549: Nuke zPIV from the GUI - #1586: Minimum value for stake split threshold - #1633: Bitcoin 0.12-0.14 serialization improvements - #1645: Implement accurate memory accounting for mempool - #1647: MemPool package tracking and limits - #1650: Benchmarking Framework - #1688: TopBar navigation (sync/peers) ACKs for top commit: furszy: utACK 4819ee7 Fuzzbawls: ACK 4819ee7 Tree-SHA512: 62ad949ea26a2f877ef0b40ec86616cc8105f81e1fcd380c8162cd93af04a46f1093f878c0668408654f198a0059b240798b83af3bf1d5e6c1c1d8611276a325
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.
built on top of
This PR pulls some updates from upstream in the mempool area, adding the required adjustments for legacy zerocoin txes and updating the functional test suite.
Specifically, here we:
mapTxinto aboost::multi_index_containerthat sorts the mempool on 3 criteria:-maxmempool-checkmempool=Nto customize the frequency of the mempool checkCTxMemPoolEntryfor the unit tests.Backports:
*][
*] excluding bitcoin@9e93640 as our default minimum tx fee rate of 10k satoshis is only 0,00003 USD at the time of writing.