You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve batched, parallel signing when a transaction spans P2MR descriptors #155
Is there an existing issue for this?
I searched open/closed work. #140/#145 concern PSBT threading and defer batching; #142/#146 concern fee-bump threading. None covers the existing transaction planner's provider boundary.
Current behaviour
At 70fea84f5becfb57463247af09790df5ddd424f8, wallet.cpp:2519 constructs a provider per manager but line 2576 passes each the full transaction. sign.cpp:928 abandons the parallel plan on a foreign unsigned input. The first provider then signs its inputs serially; later providers may batch once earlier inputs are complete.
Expected behaviour
Each provider batches the inputs it can complete, while overall completion, foreign-input errors and durable usage accounting remain correct.
Steps to reproduce
Trace the pinned provider loop and planner failure path for a transaction spanning receive/change descriptors. Static accounting for 25+25 single-signature inputs gives 25 individual reservation commits plus one batch, compared with two descriptor batches. No runtime timing was measured.
Acceptance
Through the real wallet entry point, verify batching for both descriptors, exact reserved ranges and a valid final transaction. Cover cancellation and failures before/after reservation, ensure no unreserved signing, preserve consumed counters and correct progress/error reporting. Do not require cross-manager atomic commits or identical witness bytes.
Consensus implications: None; witness validity and usage safety remain unchanged.
How did you obtain qbit? Other — source review. What version of qbit are you using? Source pin above. Operating system and version / Machine specifications: Not applicable; no runtime reproduction.
Fixed on 1.x.x by #163 (merge 787504bdfe). Closing by hand because merges into a non-default branch do not fire closing keywords. Acceptance at a6442d28f9:
Batching for both descriptors through the real wallet entry point, with exact reserved ranges and an independently verified final transaction: wallet_p2mr_parallel_signing_tests/MixedManagersUseTwoDurableBatches (one durable commit per descriptor, observed at the database boundary by descriptor id) and MixedManagersPreserveSighashContext.
Foreign inputs are never signed by the wrong provider and keep their errors, so a provider-local batch cannot report whole-transaction success: MixedManagersKeepForeignInputErrors, MixedManagersRecognizeSatisfiedForeignLeaf; the classification lives in src/script/sign.cpp (is_foreign_to_provider).
Cancellation and failure before and after each descriptor's reservation, no unreserved signing, consumed counters preserved, progress monotonic: MixedManagersHonorReservationBoundary, MixedManagersPreserveDurableCountersOnFailure, plus the existing P2MRWalletParallel* boundary cases.
Serial-versus-parallel comparison for the mixed case: P2MRWalletMixedManagerSerialParallelABBenchmark.
Known and unchanged: a provider that does fall back to serial signing still re-signs already-complete P2MR inputs it owns; transactions mixing P2MR and non-P2MR inputs still sign serially. All three gates were green on the merge commit. Closing.
Activity
wallet: batch P2MR counters per descriptor in mixed spends
test: pre-sign unowned P2MR input serially in sighash case
wallet: batch P2MR counters across mixed descriptors (#163)
kiwidream commentedon Sep 23, 2026
Fixed on
1.x.xby #163 (merge787504bdfe). Closing by hand because merges into a non-default branch do not fire closing keywords. Acceptance ata6442d28f9:wallet_p2mr_parallel_signing_tests/MixedManagersUseTwoDurableBatches(one durable commit per descriptor, observed at the database boundary by descriptor id) andMixedManagersPreserveSighashContext.MixedManagersKeepForeignInputErrors,MixedManagersRecognizeSatisfiedForeignLeaf; the classification lives insrc/script/sign.cpp(is_foreign_to_provider).MixedManagersHonorReservationBoundary,MixedManagersPreserveDurableCountersOnFailure, plus the existingP2MRWalletParallel*boundary cases.P2MRWalletMixedManagerSerialParallelABBenchmark.Known and unchanged: a provider that does fall back to serial signing still re-signs already-complete P2MR inputs it owns; transactions mixing P2MR and non-P2MR inputs still sign serially. All three gates were green on the merge commit. Closing.
wallet: batch P2MR counters across mixed descriptors (#163)