#35286 rpc: add testsubmitpackage for 1p1c test submissions

full analysis

https://github.com/bitcoin/bitcoin/pull/35286 · instagibbs · +957/-64 in 7 files, 1 commits · labels: RPC/REST/ZMQ, Needs rebase · draft

Goal

  • Let wallets and second-layer apps dry-run transaction packages before broadcasting them
  • Helps callers test whether fee bumping or package RBF will succeed and see predicted replacements

Introduces an experimental `testsubmitpackage` RPC method that test-validates a 1-parent-1-child package against mempool policy (including RBF and sibling eviction) without modifying the mempool. It extends package acceptance machinery to support dry-run package evaluation specifically for 1p1c CPFP bundles.

Problem: Wallets and L2 systems like Lightning nodes currently have no way to pre-flight validate package transactions using CPFP before broadcast because `testmempoolaccept` only validates transactions individually, rejecting low-fee parents.

Category: Mempool and policy (#6 of 10)

P3 · new feature

  • P3 because dry-run package checks hook into validation without altering live mempool policies
  • Impact is limited to evaluating package feerates and sibling evictions without modifying state

P3 because it provides a useful dry-run inspection mechanism for 1p1c package acceptance, but does not alter core mempool policy, consensus, or DoS rules. As instagibbs stated in the description, this is an experimental companion to submitpackage that partially addresses #32160.

Membership: Modifies mempool acceptance logic in AcceptPackage and ProcessNewPackage to support dry-run package evaluation and aggregate package feerate accounting without mutating the mempool.

Factors: security/stability 0, bug 0, performance 0, user value 2, leverage 1

Category: RPC / REST / ZMQ (#25 of 52)

P3 · new feature

  • P3 because it adds a test acceptance endpoint requested by users for package validation
  • Downstream adoption is uncertain because it excludes parents that do not need fee bumping

P3 because it introduces a new RPC command serving external wallet developers who need pre-flight fee-bump evaluation. As dergoegge noted, 'it'd be helpful for users that want this to say so explicitly here, to help us decide if we should maintain this', meaning priority remains modest until concrete downstream demand is demonstrated.

Membership: Adds the new testsubmitpackage RPC method to src/rpc/mempool.cpp and registers it in the rawtransactions category.

Factors: security/stability 0, bug 0, performance 0, user value 2, leverage 1

Reviewability: Stale: Needs rebase

  • Needs rebase due to merge conflicts with master
  • Author paused work to assess external user demand before iterating further

The PR has merge conflicts with the current base branch, is marked as draft, and the author has been silent for more than 90 days after pausing work to assess external user demand.

Author status: silent since 2026-06-17; previously noted pausing iteration until more buy-in from prospective users is demonstrated

Open concerns:

  • Whether downstream applications actually want and will use this RPC given restrictions like hard-rejecting self-sufficient parents, raising questions about ongoing maintenance burden (dergoegge)
  • Several code organization suggestions in package acceptance, including helper deduplication and separating dry-run paths (ismaelsadeeq)

Resolved concerns:

  • Clarification of potential scope creep regarding out-of-mempool locktime validation (ajtowns settled with reference to issue #32142)

Agreement: Mild

  • Concept supported for dry-running package submissions (ismaelsadeeq, w0xlt)
  • User demand should be explicitly confirmed before deciding to maintain the endpoint (dergoegge)
  • Paused work to seek user buy-in and noted 1p1c rules may not fit LN parent transactions (instagibbs)

Mild: Concept ACKs from ismaelsadeeq and w0xlt, but dergoegge questions maintenance burden without explicit user demand, awaiting author response

Reviewers support the utility of dry-run package submission for wallets, but the author and dergoegge both noted low visible user demand, leaving a nonblocking maintenance question open and unanswered.

  • 2026-05-29: ismaelsadeeq gives Concept ACK citing user testing workflows
  • 2026-05-29: instagibbs notes lack of positive external feedback and pauses iteration to seek buy-in
  • 2026-07-01: dergoegge notes code looks fine but asks for explicit user interest to justify maintenance

Objections:

ReviewerKindHarmStatusBlockingAuthor repliedQuote
dergoeggemaintenanceOngoing maintenance burden of an experimental RPC if downstream projects do not actually use itopennono2026-07-01: 'The code looks fine to me, but it'd be helpful for users that want this to say so explicitly here, to help us decide if we should maintain this.'

Support:

  • ismaelsadeeq: Users test-run submissions to see if they will get through, making a 1p1c test RPC very useful
  • w0xlt: Concept ACK [not substantive]

Participants: ismaelsadeeq (support), ajtowns (question), w0xlt (support), dergoegge (objection)

State derived from the lists: nonblocking objection open (dergoegge)

Review verdicts (DrahtBot): 0

Dependencies

Enables:

  • Addresses part of issue #32160 for package acceptance test workflows

Files

688 lines under test/bench/ci.

  • test/functional/rpc_testsubmitpackage.py +686/-0
  • src/rpc/mempool.cpp +215/-50
  • src/validation.cpp +46/-13
  • src/validation.h +5/-1
  • src/rpc/client.cpp +3/-0
  • src/test/fuzz/rpc.cpp +1/-0
  • test/functional/test_runner.py +1/-0

Card

This PR adds an experimental testsubmitpackage RPC command to test-validate a 1-parent-1-child transaction bundle against full mempool policy without actually submitting it or mutating the mempool. It aims to solve the missing dry-run pre-flight check for wallets and Lightning nodes performing CPFP fee bumping. While concept-ACKed by two reviewers, the author and another maintainer noted uncertain downstream demand to justify maintaining the new RPC, and the author has paused work to seek external buy-in. Currently stale and in draft, requiring a rebase.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T21:30, confidence high, input hash 42ed1cc5875f99fc