p2p: block propagation is delayed by index and wallet sync #35023

issue mzumsande opened this issue on April 7, 2026
  1. mzumsande commented at 2:31 PM on April 7, 2026: contributor

    When we connect a new block, we send two validation signals in ActivateBestChain(): First BlockConnected() (used by the indexes and wallet), then UpdateBlockTip() (adds to m_blocks_for_header_relay for p2p).

    Since these are processed sequentially by one thread, this means that a node which has optional indexes activated (which involves some non-trivial work in particular for coinstatsindex and blockfilterindex) will first index the block before scheduling to send the header to peers in UpdateBlockTip(). Ditto for wallets.

    This is not great, because fast block propagation is much more important than fast index or wallet sync.

    Fortunately, hb compact block relay is not affected by this and most nodes don't have work-heavy indexes enabled.

    Note that the current behavior, even if setting wrong priorities, is beneficial for the blockfilterindex (see #29655 (comment)) because it avoids races with BIP157-compliant clients. If we'd change the order we should also keep that in mind.

    Opening this as a brainstorming issue what (if anything) should be done about this.

  2. MrSuddenJoy commented at 12:27 PM on April 10, 2026: none

    p2p as we all know it from '90s is almost dead.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me