-
Notifications
You must be signed in to change notification settings - Fork 714
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
[NET] Inv, mempool and validation improvements #2118
[NET] Inv, mempool and validation improvements #2118
Commits on Jan 18, 2021
-
CTxMemPool::removeForBlock now uses RemoveStaged
Coming from btc@7659438a63ef162b4a4f942f86683ae6785f8162
Configuration menu - View commit details
-
Copy full SHA for c30fa16 - Browse repository at this point
Copy the full SHA c30fa16View commit details -
Rename CTxMemPool::remove -> removeRecursive remove is no longer call…
…ed non-recursively, so simplify the logic and eliminate an unnecessary parameter Coming from btc@5de2baa138cda501038a4558bc169b2cfe5b7d6b
Configuration menu - View commit details
-
Copy full SHA for ba32375 - Browse repository at this point
Copy the full SHA ba32375View commit details -
Remove work limit in UpdateForDescendants() The work limit served to …
…prevent the descendant walking algorithm from doing too much work by marking the parent transaction as dirty. However to implement ancestor tracking, it's not possible to similarly mark those descendant transactions as dirty without having to calculate them to begin with. This commit removes the work limit altogether. With appropriate chain limits (-limitdescendantcount) the concern about doing too much work inside this function should be mitigated. Coming from btc@76a76321d2f36992178ddaaf4d023c5e33c14fbf
Configuration menu - View commit details
-
Copy full SHA for 1fa40ac - Browse repository at this point
Copy the full SHA 1fa40acView commit details -
Fix mempool limiting for PrioritiseTransaction
Redo the feerate index to be based on mining score, rather than fee. Update mempool_packages.py to test prioritisetransaction's effect on package scores. Coming from btc@eb306664e786ae43d539fde66f0fbe2a3e89d910
Configuration menu - View commit details
-
Copy full SHA for 8325bb4 - Browse repository at this point
Copy the full SHA 8325bb4View commit details -
Add ancestor tracking to mempool This implements caching of ancestor …
…state to each mempool entry, similar to descendant tracking, but also including caching sigops-with-ancestors (as that metric will be helpful to future code that implements better transaction selection in CreatenewBlock). Coming from btc@72abd2ce3c5ad8157d3a993693df1919a6ad79c3
Configuration menu - View commit details
-
Copy full SHA for 64e84e2 - Browse repository at this point
Copy the full SHA 64e84e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91c6096 - Browse repository at this point
Copy the full SHA 91c6096View commit details -
Check all ancestor state in CTxMemPool::check()
Coming from btc@ce019bf90fe89c1256a89c489795987ef0b8a18f
Configuration menu - View commit details
-
Copy full SHA for 8c0016e - Browse repository at this point
Copy the full SHA 8c0016eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ebfd17 - Browse repository at this point
Copy the full SHA 6ebfd17View commit details -
Eliminate TX trickle bypass, sort TX invs for privacy and priority.
Previously Bitcoin would send 1/4 of transactions out to all peers instantly. This causes high overhead because it makes >80% of INVs size 1. Doing so harms privacy, because it limits the amount of source obscurity a transaction can receive. These randomized broadcasts also disobeyed transaction dependencies and required use of the orphan pool. Because the orphan pool is so small this leads to poor propagation for dependent transactions. When the bypass wasn't in effect, transactions were sent in the order they were received. This avoided creating orphans but undermines privacy fairly significantly. This commit: Eliminates the bypass. The bypass is replaced by halving the average delay for outbound peers. Sorts candidate transactions for INV by their topological depth then by their feerate (then hash); removing the information leakage and providing priority service to higher fee transactions. Limits the amount of transactions sent in a single INV to 7tx/sec (and twice that for outbound); this limits the harm of low fee transaction floods, gives faster relay service to higher fee transactions. The 7 sounds lower than it really is because received advertisements need not be sent, and because the aggregate rate is multipled by the number of peers. Coming from btc@f2d3ba73860e875972738d1da1507124d0971ae5
Configuration menu - View commit details
-
Copy full SHA for 23c9f3e - Browse repository at this point
Copy the full SHA 23c9f3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 191c62e - Browse repository at this point
Copy the full SHA 191c62eView commit details -
mapNextTx: use pointer as key, simplify value
Saves about 10% of application memory usage once the mempool warms up. Since the mempool is DynamicUsage-regulated, this will translate to a larger mempool in the same amount of space. Map value type: eliminate the vin index; no users of the map need to know which input of the transaction is spending the prevout. Map key type: replace the COutPoint with a pointer to a COutPoint. A COutPoint is 36 bytes, but each COutPoint is accessible from the same map entry's value. A trivial DereferencingComparator functor allows indirect map keys, but the resulting syntax is misleading: `map.find(&outpoint)`. Implement an indirectmap that acts as a wrapper to a map that uses a DereferencingComparator, supporting a syntax that accurately reflect the container's semantics: inserts and iterators use pointers since they store pointers and need them to remain constant and dereferenceable, but lookup functions take const references. Coming from btc@9805f4af7ecb6becf8a146bd845fb131ffa625c9
Configuration menu - View commit details
-
Copy full SHA for 7624823 - Browse repository at this point
Copy the full SHA 7624823View commit details -
Don't do mempool lookups for "mempool" command without a filter
Coming from btc@96918a2f0990a8207d7631b8de73af8ae5d24aeb
Configuration menu - View commit details
-
Copy full SHA for 68bc68f - Browse repository at this point
Copy the full SHA 68bc68fView commit details -
Split up and optimize transaction and block inv queues
An adaptation of btc@dc13dcd2bec2613a1cd5e0395b09b449d176146f with a tier two INV vector.
Configuration menu - View commit details
-
Copy full SHA for 9645775 - Browse repository at this point
Copy the full SHA 9645775View commit details -
An adapted version of btc@ed7068302c7490e8061cb3a558a0f83a465beeea
Handle mempool requests in send loop, subject to trickle By eliminating queued entries from the mempool response and responding only at trickle time, this makes the mempool no longer leak transaction arrival order information (as the mempool itself is also sorted)-- at least no more than relay itself leaks it.
Configuration menu - View commit details
-
Copy full SHA for cb4fc6c - Browse repository at this point
Copy the full SHA cb4fc6cView commit details -
An adapted version of btc@b5599147533103efea896a1fc4ff51f2d3ad5808
Move bloom and feerate filtering to just prior to tx sending. This will avoid sending more pointless INVs around updates, and prevents using filter updates to timetag transactions. Also adds locking for fRelayTxes.
Configuration menu - View commit details
-
Copy full SHA for d10583b - Browse repository at this point
Copy the full SHA d10583bView commit details -
Finished the switch CTransaction storage in mempool to CTransactionRe…
…f and introduced the timeLastMempoolReq coming from btc#8080.
Configuration menu - View commit details
-
Copy full SHA for 35bc2a9 - Browse repository at this point
Copy the full SHA 35bc2a9View commit details -
Get rid of CTxMempool::lookup() entirely
Coming from btc@288d85ddf2e0a0c9d25a23db56052883170466d0
Configuration menu - View commit details
-
Copy full SHA for 54cf7c0 - Browse repository at this point
Copy the full SHA 54cf7c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for e51c4b8 - Browse repository at this point
Copy the full SHA e51c4b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f672c2 - Browse repository at this point
Copy the full SHA 4f672c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9979f3d - Browse repository at this point
Copy the full SHA 9979f3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bbc6a9 - Browse repository at this point
Copy the full SHA 6bbc6a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44c635d - Browse repository at this point
Copy the full SHA 44c635dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e52226 - Browse repository at this point
Copy the full SHA 8e52226View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0c2255 - Browse repository at this point
Copy the full SHA f0c2255View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0a0e81 - Browse repository at this point
Copy the full SHA c0a0e81View commit details -
Configuration menu - View commit details
-
Copy full SHA for e60da98 - Browse repository at this point
Copy the full SHA e60da98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d949de - Browse repository at this point
Copy the full SHA 5d949deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f26a4e - Browse repository at this point
Copy the full SHA 4f26a4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c6d45c6 - Browse repository at this point
Copy the full SHA c6d45c6View commit details -
[wallet] fix zapwallettxes interaction with persistent mempool
zapwallettxes previously did not interact well with persistent mempool. zapwallettxes would cause wallet transactions to be zapped, but they would then be reloaded from the mempool on startup. This commit softsets persistmempool to false if zapwallettxes is enabled so transactions are actually zapped.
Configuration menu - View commit details
-
Copy full SHA for 006c503 - Browse repository at this point
Copy the full SHA 006c503View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6d0ad9 - Browse repository at this point
Copy the full SHA d6d0ad9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b9c616 - Browse repository at this point
Copy the full SHA 9b9c616View commit details