test: cover orphan reconsideration interruptibility #36262

pull ViniciusCestarii wants to merge 1 commits into bitcoin:master from ViniciusCestarii:test-orphan_reconsideration_interruptible changing 1 files +72 −0
  1. ViniciusCestarii commented at 3:03 PM on September 15, 2026: contributor

    Add test checking that ProcessOrphanTx reconsiders at most one orphan per ProcessMessages(). This test prevents regression of CVE-2024-52914 which currently no existing test checks.

    The test kills 2 mutants found with https://github.com/ViniciusCestarii/mutant-harness:

    <details> <summary>1. Remove <code>return true</code> after an orphan is accepted</summary>

    --- a/src/net_processing.cpp
    +++ b/src/net_processing.cpp
    @@ -3494,7 +3494,6 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
             if (result.m_result_type == MempoolAcceptResult::ResultType::VALID) {
                 LogDebug(BCLog::TXPACKAGES, "   accepted orphan tx %s (wtxid=%s)\n", orphanHash.ToString(), orphan_wtxid.ToString());
                 ProcessValidTx(peer.m_id, porphanTx, result.m_replaced_transactions);
    -            return true;
             } else if (state.GetResult() != TxValidationResult::TX_MISSING_INPUTS) {
    

    </details>

    <details> <summary>2. Remove <code>return true</code> after an orphan is rejected for a reason other than <code>TX_MISSING_INPUTS</code></summary>

    --- a/src/net_processing.cpp
    +++ b/src/net_processing.cpp
    @@ -3508,7 +3508,6 @@ bool PeerManagerImpl::ProcessOrphanTx(Peer& peer)
              state.GetResult() != TxValidationResult::TX_RESULT_UNSET)) {
                     ProcessInvalidTx(peer.m_id, porphanTx, state, /*first_time_failure=*/false);
                 }
    -            return true;
             }
         }
    

    </details>

  2. DrahtBot added the label Tests on Sep 15, 2026
  3. DrahtBot commented at 3:03 PM on September 15, 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/36262.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    Type Reviewers
    Concept ACK instagibbs, enirox001

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

  4. DrahtBot added the label CI failed on Sep 15, 2026
  5. DrahtBot commented at 4:04 PM on September 15, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task macOS-cross to arm64: https://github.com/bitcoin/bitcoin/actions/runs/34985864523/job/104437664650</sub> <sub>LLM reason (✨ experimental): CI failed because the build stopped on a Clang -Wthread-safety-analysis error (mutex g_msgproc_mutex not held exclusively) in denialofservice_tests.cpp.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  6. ViniciusCestarii marked this as a draft on Sep 15, 2026
  7. test: cover orphan reconsideration interruptibility 1ad8b857fa
  8. ViniciusCestarii force-pushed on Sep 15, 2026
  9. ViniciusCestarii marked this as ready for review on Sep 15, 2026
  10. DrahtBot removed the label CI failed on Sep 15, 2026
  11. instagibbs commented at 1:14 PM on September 16, 2026: member

    concept ACK

  12. enirox001 commented at 7:53 AM on September 21, 2026: contributor

    Concept ACK


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-09-23 13:51 UTC

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