fix: require full wallet unlock for PSBT signing - #7663
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. |
|
🕓 Queued for automated review — 52nd in line, estimated start in ~48 h (commit c58379d)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. Walkthrough
Priority: ➖ Normal — Schedule the wallet signing safeguard because mixing-only unlocks must no longer authorize PSBT signing, with functional coverage added for affected send paths. Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to PSBT signing is now withheld for locked and mixing-only wallet states while fully unlocked signing remains available. The supplied coverage confirms incomplete results for mixing-only unlocks, with no remaining merge-readiness risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
… of locked wallet and psbt
…bt.py where it has proper surrounding
Issue being fixed or feature implemented
sendandsendallcan sign transactions while a descriptor wallet is unlocked only for CoinJoin mixing. These RPCs useFillPSBT, whose signing request previously reached the script managers without enforcing the wallet's full-unlock state.What was done?
Gate PSBT signing on full wallet unlock inside
CWallet::FillPSBT, undercs_wallet. Locked and mixing-only wallets can still populate unsigned PSBTs; fully unlocked wallets and unencrypted external signers retain their normal behavior. Preserve the distinction between the number of signatures produced and the capability count requested bysign=falsecallers. CoinJoin's transaction-signing path is unchanged.Extend
wallet_encryption.pyto cover both RPCs with default,psbt=true, andadd_to_wallet=falseoptions. Check fully locked and mixing-only states return no signatures or completed transaction and leave the mempool empty; full unlock permits signed transaction creation.How Has This Been Tested?
make -j8../src/test/test_dash --run_test=psbt_wallet_tests --log_level=message.wallet_encryption.py,wallet_send.py,wallet_sendall.py, andrpc_psbt.py, each with descriptor and legacy wallets.Breaking Changes
Mixing-only unlock no longer authorizes PSBT signing.
send/sendallreturn an incomplete PSBT until the wallet is fully unlocked.Checklist:
This pull request was created by Codex.