net: Do not add transaction reported as TX_CONSENSUS to the extrapool #36734

pull polespinasa wants to merge 1 commits into bitcoin:master from polespinasa:2026-11-02-excludeconsensusinvalidtxsfromextrapool changing 2 files +3 −2
  1. polespinasa commented at 9:02 PM on November 2, 2026: member

    The extrapool is only used to help reconstruct compact blocks with transactions that for some reason do not fit in our mempool, including consensus invalid transactions.

    This small PR excludes the ones initially reported as TX_CONSENSUS from being added to the extrapool, without performing additional validation, as they are not useful to reconstruct consensus valid blocks.

    Note that this path does not exclude all consensus invalid transactions. Consensus invalid transactions rejected under other categories remain unaffected and are still added to the extrapool. For example an invalid signature can be reported as TX_NOT_STANDARD during mempool script checks, or remain undetected if validation stops earlier for some other reason such as insufficient fees.

    Note that transactions with unknown inputs (orphans) are not treated as consensus invalid as validity cannot be fully determined.

    Avoiding all consensus invalid transactions to be included into the extrapool might not be worth the complexity and validation cost, potentially some extra-script verification steps would be needed.

    A possible future improvement could be to manage policy-rejected transactions and transactions removed through replacement separately. But this is outside the scope of this PR, which intends to be a small and simple patch.

  2. net: Do not add consensus invalid transactions to extrapool 7bc757ce87
  3. DrahtBot added the label P2P on Nov 2, 2026
  4. DrahtBot commented at 9:02 PM on November 2, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK ismaelsadeeq, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. polespinasa renamed this:
    net: Do not add consensus invalid transactions to the extrapool
    net: Do not add transaction reported as TX_CONSENSUS to the extrapool
    on Nov 2, 2026
  6. instagibbs commented at 11:00 PM on November 2, 2026: member

    concept ack

  7. ismaelsadeeq approved
  8. ismaelsadeeq commented at 9:46 AM on November 3, 2026: member

    ACK 7bc757ce87bfb5f654a4039e453c7f1fdbd744cf

  9. sedited approved
  10. sedited commented at 12:42 PM on November 6, 2026: contributor

    ACK 7bc757ce87bfb5f654a4039e453c7f1fdbd744cf

  11. sedited requested review from darosior on Nov 6, 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-11-15 02:51 UTC

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