bip152: Should we be disconnecting peers for blocks with "null" tx? #36576

issue instagibbs opened this issue on October 19, 2026
  1. instagibbs commented at 3:32 PM on October 19, 2026: member

    In InitData, we run checks against prefilled txns to see if the tx are IsNull, which means zero inputs and outputs. If this check fails, we mark the attempt as READ_STATUS_INVALID, then disconnect the peer.

    This seems contrary to BIP152 which is here: https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki#cmpctblock . The checks listed in the BIP don't seem to cover this or are at last unclear: "A node MUST NOT send a cmpctblock message without having validated that the header properly commits to each transaction in the block, and properly builds on top of the existing, fully-validated chain with a valid proof-of-work either as a part of the current most-work valid chain, or building directly on top of it. A node MAY send a cmpctblock before validating that each transaction in the block validly spends existing UTXO set entries."

    Similarly, it's not entirely clear if we should be disconnecting due to completely empty blocks, which bip152 doesn't seem to suggest.

    Core doesn't send either of these, because it runs CheckBlock before forwarding.

    Opening an issue so this can be documented at least, because changing our behavior to not disconnect could result in us asking for full blocks we definitely wouldn't want anyways.

    Pondering from reviewing #35321 which extends misbehavior to the unprompted case as well.

  2. fanquake commented at 9:41 AM on October 21, 2026: member

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-10-21 20:51 UTC

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