[pull] master from bitcoin:master#1010
Merged
pull[bot] merged 3 commits intomrpeertopeer:masterfrom Feb 26, 2026
Merged
Conversation
This documents existing behaviour before the change in the following commit: The bloom filter maintained by the txdownload manager tracks recently confirmed transasctions even during ibd. If a peer sends an INV once IBD is over it does not re-request them. Co-authored-by: sedited <[email protected]>
…downloadman This avoids wasting work on calculating bloom filters that aren't consumed during ibd and continuously re-calculated as now blocks get validated. Also update the functional test to document that transactions would now be requested again once out of IBD. Co-authored-by: Lőrinc <[email protected]>
…or txdownloadman e5f0613 net processing: Check if we are in ibd before processing block for txdownloadman (sedited) ce8b692 Add functional test exercising tx downloadman recently confirmed filter (Lőrinc) Pull request description: Calculating the rolling bloom filters for the txorphanage takes some CPU time from the scheduler thread. This can be observed for example in [this flamegraph](https://bitcoin-dev-tools.github.io/benchcoin/results/pr-172/20066462508/mainnet-default-instrumented-base-flamegraph.svg?x=920203898521&y=780), where handling the filter takes about 2.6% of total time (and most of the scheduler thread's time). During ibd the entries in the tx download bloom filter are just continuously rolled over and aren't consumed, since no mempool entries are created by incoming transactions from peers during ibd. The mempool does accept transactions via RPC, or the wallet at the time, however these don't interact with the orphanage and the txdownloadman, because adding anything to those is guarded by IsInitialBlockDownload() checks as well. We're usually latching ibd to false a few blocks before catching up to the tip, so this should also not significantly degrade the performance of the filter once fully caught up. ACKs for top commit: l0rinc: ACK e5f0613 instagibbs: ACK e5f0613 fjahr: Code review ACK e5f0613 Tree-SHA512: d667e677f5723c438cdf5b34f0f9c1ade7cc1b2e98530c23f14384514daa38217c4e7c3b756194b6831b590a487449c4514b52bf0fb461ae8083061722824270
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )