Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e98c88fb4e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c8e658b80
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b45d02848
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A parallel signing provider used to fall back to serial signing for its whole descriptor as soon as it met an input it could not plan, such as an input owned by another descriptor. A transaction spending from the external and internal P2MR descriptors therefore made one durable counter commit per signature for the first descriptor. Plan strictly foreign inputs (no complete plan, no invalid existing P2MR signature, and no signable key in any leaf the provider sees) as skipped: they get no jobs, stay untouched and keep an error at their original index, so a provider never reports the transaction complete while one exists. Every other planning bailout keeps its serial fallback. A provider whose own inputs are all complete and that only sees foreign inputs reports failure instead of falling back to serial signing, which would re-sign the complete inputs and reserve fresh counters. Signing progress seeds only complete inputs so the completed count stays monotonic across descriptors. Cancellation now applies to the whole wallet signing operation: once the caller declines, later callbacks decline too, so the next descriptor stops before its reservation boundary and "Signing cancelled" is preserved. Counters an earlier descriptor committed stay consumed; a retry of the same transaction reuses its witnesses. Refs #155 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MixedManagersPreserveSighashContext completes its unowned input with a constructed provider before the wallet signs. Doing that through the parallel planner made the fixture depend on the code under test, so a planner regression failed the fixture instead of the wallet signing assertions. Sign the fixture input serially. Refs #155 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Verify unknown foreign leaves with the complete spent-output context before classifying them as incomplete. Cover a valid nonstandard leaf during a batch and a no-work retry.
Read live coins and mempool spenders from the same snapshot before committing a replacement. Reject conflicts whose wallet notifications are pending while allowing the original replacement lineage. Cover unseen mempool conflicts, spent wallet coins, and normal replacement.
Hoist the fee-bump commit results into named locals so the assertion macro's repeated expansion does not read a moved-from transaction. Reserve the spent-output vectors before the loops that fill them.
A backward reorg during asynchronous signing can leave the replacement's anti-fee-sniping nLockTime ahead of the tip. Revalidation covered coins, fees, size, and chain limits, so the wallet recorded the replacement and marked the original replaced while the broadcast failed. Check finality against the current tip using the rule the mempool applies on accept.
4a475ae to
f542422
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
Preserve batched, parallel P2MR signing when a transaction spends from more than one P2MR descriptor (for example internal and external change). Closes #155. Depends on #146; merge this PR after #146. This branch includes the earlier #146 implementation merged with
1.x.x; the issue-specific review range starts atc72d548640. The current #146 tip also has a later Qt test cleanup, which is not included here.SIGHASH_SINGLEwithout an output, owned but not completely plannable) keeps its serial fallback, so partial signatures and error text are unchanged.Testing
e98c88fb4e, 207 cases pass acrosspqc_tests,script_p2mr_tests,wallet_p2mr_parallel_signing_tests,wallet_p2mr_batch_reservation_tests,wallet_tests,feebumper_tests,scriptpubkeyman_tests, andwalletdb_tests, including qt: move P2MR fee bump signing off the GUI thread #146's reservation-boundary tests. The full 1,275-case suite passed before the observer follow-up.e98c88fb4e.CPQCKey::Signcalls are ordered against durable database commits.Measurements
These measurements were collected at
b7f0fcebf6, before the primitive-observer follow-up; its overhead has not been measured.Three paired processes per arm (A/B, B/A, A/B), on an Apple M5 Max, 18 cores, macOS 26.4, Apple clang 17, Release. Each mixed transaction spends 25 internal and 25 external inputs with four configured workers per provider. Baseline compiles out the foreign-input skip; candidate retains it. All six processes exited 0 and independently verified every completed transaction.
With the recorder attached, the candidate made exactly one durable commit per descriptor, reserving 25 counters each; baseline made 25 serial commits for one descriptor plus one batch for the other. The external-only control used one commit in both arms. These are shared-host measurements using an in-memory test database; real-storage cost and production speedup remain unmeasured. Hook-on and hook-off samples do not isolate instrumentation overhead.
Target Branch
mainor a maintainer-requested release branch such as0.1.x. (Targets1.x.xas requested by the maintainer; stacked on qt: move P2MR fee bump signing off the GUI thread #146.)Risk / Review Notes
Notes: wallet signing. Required invariants: no signature before durable reservation and no counter reuse. A scoped, null-by-default observer now checks actual signing calls against earlier successful reservations and rejects repeated counter use. Installation and removal require quiescent signing threads; callbacks are synchronized in wallet tests. The cryptographic backend is unchanged. Whole-transaction completion and refusal of serial retries after reservation failure were verified by coordinator mutation checks. Known pre-existing limitation, unchanged: when a provider does fall back to serial signing, the serial loop re-signs already-complete P2MR inputs it owns and consumes fresh counters. Transactions mixing P2MR and non-P2MR inputs still sign serially.
Docs / Process Impact
Choose exactly one:
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Review follow-up
wallet_bumpfee.py, and Docker lint all passed. The dependency on qt: move P2MR fee bump signing off the GUI thread #146 remains.