p2p: allow compact blocks during assumeutxo background validation #35374

pull 0xjc65eth wants to merge 1 commits into bitcoin:master from 0xjc65eth:assumeutxo-compact-blocks-background changing 1 files +13 −2
  1. 0xjc65eth commented at 9:19 PM on May 25, 2026: none

    Change Description

    This updates compact block peer selection so an assumeutxo node can request compact block announcements after its active snapshot chainstate is close enough to tip, even while historical background validation is still running.

    Previously, BlockChecked() only selected high-bandwidth compact block peers when IsInitialBlockDownload() was false. During assumeutxo background validation, that can keep compact block relay disabled even though the active chainstate has already synced to the network tip and the mempool can be used for compact block reconstruction.

    The new helper keeps the existing behavior outside of assumeutxo, and only permits compact block announcements during IBD when:

    • the current chainstate is snapshot-based,
    • the snapshot is still marked UNVALIDATED, and
    • CanDirectFetch() says the active tip is close enough to the network tip.

    Fixes #33431.

    Testing

    • git diff --check
    • Attempted CMake configure with cmake -B build -S . -DBUILD_GUI=OFF -DBUILD_BENCH=OFF -DBUILD_FUZZ_BINARY=OFF -DWITH_ZMQ=OFF -DWITH_USDT=OFF -DWITH_MULTIPROCESS=OFF; configure stopped because Boost >= 1.74 is not installed in this local environment.

    The snapshot walks forward while the old chain whispers behind it.

  2. p2p: allow compact blocks during assumeutxo validation c1a96f9e23
  3. DrahtBot added the label P2P on May 25, 2026
  4. DrahtBot commented at 9:20 PM on May 25, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35374.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited commented at 9:44 PM on May 25, 2026: contributor

    NACK

    We don't accept PRs where it is not clear that the author understands the changes. Since the PR description even includes the error output from an LLM that is doubtful. Closing.

  6. sedited closed this on May 25, 2026


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-05-31 17:51 UTC

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