Skip to content

[pull] master from bitcoin:master#1010

Merged
pull[bot] merged 3 commits intomrpeertopeer:masterfrom
bitcoin:master
Feb 26, 2026
Merged

[pull] master from bitcoin:master#1010
pull[bot] merged 3 commits intomrpeertopeer:masterfrom
bitcoin:master

Conversation

@pull
Copy link

@pull pull bot commented Feb 26, 2026

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 : )

l0rinc and others added 3 commits February 22, 2026 13:03
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
@pull pull bot locked and limited conversation to collaborators Feb 26, 2026
@pull pull bot added the ⤵️ pull label Feb 26, 2026
@pull pull bot merged commit af99643 into mrpeertopeer:master Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants