rpc: add testsubmitpackage for 1p1c test submissions #35286

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:2026-05-testsubmitpackage_2 changing 7 files +957 −64
  1. instagibbs commented at 6:16 PM on May 13, 2026: member

    A test-only companion to submitpackage that validates a strict 1p1c [parent, child] bundle without mutating the mempool. Intended as a wallet pre-flight check for CPFP fee-bumping packages.

    Enables rbf and sibling eviction evaluation, just like submitpackage.

    Diverging behaviors from submitpackage:

    Hard rejects packages that aren't exactly 2 txs in a child-with-parents topology, and parents that pass individual acceptance (caller should use testsubmitpackage on parent alone for that).


    To do this "properly" without rejecting the self-sufficient parents (and not giving surprising results that don't match reality), we would need fairly extensive changes to mempool acceptance logic, more book-keeping to unroll test-accepted subpackage state (while risking mutating the mempool in brittle ways), and possibly other changes.

    This is a partial addressing of #32160, hopefully addressing most of the missing functionality people are requesting.

  2. DrahtBot added the label RPC/REST/ZMQ on May 13, 2026
  3. DrahtBot commented at 6:16 PM on May 13, 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/35286.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32800 (rpc: Distinguish between vsize and sigop adjusted mempool vsize by musaHaruna)
    • #29700 (kernel, refactor: return error status on all fatal errors by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible places where comparison-specific test macros should replace generic comparisons:

    • [test/functional/rpc_testsubmitpackage.py] assert parent_A.wtxid_hex != parent_B.wtxid_hex, ( -> assert_not_equal(parent_A.wtxid_hex, parent_B.wtxid_hex)
    • [test/functional/rpc_testsubmitpackage.py] assert set(eff) == {parent["wtxid"], child["wtxid"]}, eff -> assert_equal(set(eff), {parent["wtxid"], child["wtxid"]})
    • [test/functional/rpc_testsubmitpackage.py] assert set(child_entry["fees"]["effective-includes"]) == {parent["wtxid"], child["wtxid"]} -> assert_equal(set(child_entry["fees"]["effective-includes"]), {parent["wtxid"], child["wtxid"]})

    <sup>2026-05-13 18:48:06</sup>

  4. instagibbs commented at 6:17 PM on May 13, 2026: member

    cc @ajtowns @ismaelsadeeq as discussed, let's focus on concept / approach ACKs first, name is clearly up for debate, etc etc

  5. rpc: add testsubmitpackage for 1p1c test submissions
    A test-only companion to submitpackage that validates a strict 1p1c
    [parent, child] bundle without mutating the mempool. Intended as a
    wallet pre-flight check for CPFP fee-bumping packages.
    
    Enables rbf and sibling eviction evaluation, just like
    submitblock.
    
    Diverging behaviors from submitpackage:
    
    Hard rejects packages that aren't exactly 2 txs in a child-with-parents
    topology, and parents that pass individual acceptance (caller should
    use testsubmitpackage on parent alone for that).
    a723ef365c
  6. instagibbs force-pushed on May 13, 2026
  7. DrahtBot added the label CI failed on May 13, 2026
  8. DrahtBot commented at 6:49 PM on May 13, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task Windows native, fuzz, VS: https://github.com/bitcoin/bitcoin/actions/runs/25817910490/job/75851154109</sub> <sub>LLM reason (✨ experimental): Fuzz RPC tests failed because the RPC command testsubmitpackage was not registered in RPC_COMMANDS_SAFE_FOR_FUZZING/RPC_COMMANDS_NOT_SAFE_FOR_FUZZING (per src/test/fuzz/rpc.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>

  9. DrahtBot removed the label CI failed on May 13, 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-17 15:12 UTC

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