Conversation
1c10c16 to
34a1562
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9723919. Configure here.
PR ReviewFindings
No blocking correctness findings from this review pass. Consensus Impact
The PR does not change block or transaction validity, but it changes P2MR counter-reservation/signing flow in Review ScopeReviewed issue #142 as the contract, all eight commits and 22 changed files against the actual Deep Checks PerformedTraced preparation, unlock, signing, counter reservation, commit, cancellation, shutdown, wallet unload, and QObject destruction paths. Checked serial and parallel P2MR signing, external-signer PSBT replacement, PQC usage propagation, replacement ancestry, external inputs, competing wallet spends, fee/policy revalidation, and the fixes for every earlier inline finding. Issue FitThe implementation substantially matches #142:
PQC usage presentation remains correctly outside scope. No unrelated consensus or public RPC behavior was added. qbit-Specific ChecksReviewed P2MR serial/parallel counter durability, cancellation after reservation, provider snapshot lifetime, wallet relocking, external-signer command boundaries, replacement-chain metadata, and worker teardown during shutdown/unload. AuxPoW, ASERT, PHOTON, and release-signing surfaces are untouched. Validation ReviewedCurrent CI is green at The author additionally reports focused wallet/Qt tests, Residual Risk
|
|
Follow-up to the written review, with the independent review feedback addressed at
Local validation passed: full native build, 81 distinct wallet/unit cases across focused and full-wallet selections, all 12 Qt suites (75 entries), Fresh Core Checks, Full Validation, and Required Merge Gate are still running on this head; earlier green CI does not validate these latest commits. TSan excludes Qt, and Cocoa wallet tests disable native dialogs. Shutdown after durable counter reservation intentionally waits for signing to finish. PQC usage presentation remains outside #142. All ten existing inline review threads are already resolved. |
Picks up the deterministic Qt shutdown assertions. The wall-clock bound this branch carried, m_shutdown_elapsed_ms < 5000, failed under sanitizer and CentOS debug builds because their overhead exceeds the budget rather than because shutdown regressed; 1.x.x replaced it with sequence markers that record the order of worker completion, dialog destruction and teardown return. Keep both sides of the AppTests assertions: the new ordering checks from 1.x.x and this branch's fee bump ones. Restore the QElapsedTimer include, which is still used by WaitForIrreversibleFeeBumpSigning but was dropped along with the timing bound. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Closing this as shipped rather than abandoned: the work in this PR is on #167 was stacked on this branch and was squash-merged as 4bb6462, which carried every commit from here with it. The squash body lists them — "qt: move P2MR fee bump signing off GUI thread", "qt: harden async fee bump cancellation", "wallet: harden fee bump progress and revalidation", and the rest. That also means this PR can no longer be merged. The tree difference between For the record, since it explains the red CI here: the three failing checks on this branch were never a real defect. All three traced to one job failing A related use-after-free in The branch is left at its merge with |

Summary
Fixes #142.
Fee-bump preparation, signing, and commit previously ran synchronously on the Qt GUI thread, while
feebumper::SignTransaction()heldcs_walletacross the complete signing operation. P2MR cryptographic signing could therefore freeze the GUI and prevent other wallet work from acquiring the wallet lock.This change:
Structured PQC usage data is preserved through the worker result, but user-facing usage presentation remains out of scope for #141.
Testing
Commands and results:
cmake --build build -j6 --target bitcoin_wallet bitcoinqt test_bitcoin test_bitcoin-qt— passed.feebumper_tests/p2mr_signing_releases_wallet_lock— passed with a deterministic post-reservation/pre-crypto latch proving another thread can acquirecs_wallet.feebumper_tests/commit_revalidates_fee_after_signing— passed.feebumper_tests/commit_revalidates_competing_wallet_spend— passed.wallet_tests/sign_transaction_*— four signing progress/cancellation tests passed.wallet_p2mr_batch_reservation_tests— three tests passed.feebumper_tests/external_max_weight_test— passed.ulimit -n 1024 && build/test/functional/test_runner.py --jobs=2 wallet_bumpfee.py feature_rbf.py— both passed.ulimit -n 1024 && QT_QPA_PLATFORM=cocoa QTEST_FUNCTION_TIMEOUT=600000 build/bin/test_qbit-qt— all wallet and application lifecycle suites passed; the binary still reports the unrelated existingRPCNestedTests::rpcNestedTestsexpected-hash mismatch in unchanged code.git diff --check origin/1.x.x...HEAD— passed.Target Branch
mainor a maintainer-requested release branch such as0.1.x.Target:
1.x.x.Risk / Review Notes
Notes:
cs_walletlock held.FillPSBTpath may retaincs_walletwhile an external command runs.bumpfeeretains its existing caller-side wallet lock; this PR targets the Qt lifecycle from Move P2MR fee-bump signing off the qbit-qt GUI thread #142.Docs / Process Impact
Choose exactly one:
libbitcoinpqc Subtree Checklist (if
src/libbitcoinpqcchanged)Qbit-Org/qbit-libbitcoinpqc.contrib/devtools/update-libbitcoinpqc-subtree.sh.test/lint/libbitcoinpqc-subtree-check.shpasses locally.contrib/devtools/update-libbitcoinpqc-subtree.shis intentional and matchesdoc/subtrees/libbitcoinpqc.md.Note
High Risk
Touches wallet fee-bump signing, PQC counter reservation cancellation, and Qt lifecycle/shutdown paths. Incorrect cancellation or revalidation could consume counters, commit stale replacements, or leave the GUI/wallet in a bad state.
Overview
Moves Qt fee-bump preparation, signing, and commit off the GUI thread onto a cloned wallet worker, with a progress dialog and a new
feeBumpedcompletion signal.Cancellation is cooperative only until the durable PQC counter-reservation or external-signer command boundary; after that the operation becomes irreversible and still completes through shutdown/teardown. Commit now revalidates inputs, competing spends, fees, and current relay/mempool policy, and rejects signer changes outside input signature/witness fields.
Adds broad Qt and wallet coverage for responsiveness, cancel races, revalidation failures, external-signer mutation rejection, and model/dialog destruction during an in-flight bump.
Reviewed by Cursor Bugbot for commit f8989e3. Bugbot is set up for automated code reviews on this repo. Configure here.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.