1 minor finding · 3 suggestions
Earlier concerns neither republished nor resolved: 2 major findings · 2 minor findings · 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Pre-finalized request inputs cause signer-response rejection
A signer that echoes a pre-finalized foreign input now makes collaborative walletprocesspsbt fail where base accepted it; the mock preserves those fields, but HWI/device behavior is unconfirmed.
Location: src/external_signer.cpp:170 (head).
Details and suggested fix
Consider a joint PSBT with a finalized foreign input and an unsigned device input carrying matching key origins. Core sends both inputs to the signer. The mock's walletprocesspsbt(finalize=False) preserves the foreign input's final fields, but the new whole-response check rejects them with "Signer returned a PSBT with finalized inputs". Base accepted the same response and could finalize the remaining input. Stripping those fields in the signer works because Merge retains the originals, but requires existing signers to change. After establishing matching transaction identity and input counts, reject only inputs that become finalized in the response, and narrow the documentation rule accordingly. Add a regression test with a pre-finalized foreign input beside an unsigned device input.
Optional improvements
[suggestion] · Signer API omits the accepted sighash types
The signtx contract does not tell signer implementers that responses declaring or containing NONE or SINGLE signatures are now rejected.
Location: doc/external-signer.md:153 (head).
Details and suggested fix
The phrase "so Bitcoin Core can check their sighash types" explains why signatures must remain non-final, but not which types pass. Add an explicit response requirement that signatures must commit to all outputs. State that NONE and SINGLE, with or without ANYONECANPAY, are rejected whether declared or present in signatures, while DEFAULT, ALL, and ALL|ANYONECANPAY are allowed. This documents the existing check without changing behavior.
[suggestion] · Unsafe-sighash tests miss Taproot script-path signatures
Removing the m_tap_script_sigs scan would leave the new functional sighash assertions unchanged because the mock only produces Taproot key-path signatures.
Location: src/external_signer.cpp:108 (head).
Details and suggested fix
The mock imports tr(key) descriptors without script leaves, so its bech32m cases never populate m_tap_script_sigs. Add a descriptor with a script leaf and exercise a script-path signature using NONE or SINGLE. Remove the declared PSBT_IN_SIGHASH_TYPE, as the existing hidden modes do, and assert the unsafe-sighash log message. Otherwise the declaration check would mask a missing script-signature check. This adds coverage for the currently correct branch.
[suggestion] · Stricter signer response rules lack an upgrade notice
The new signtx checks can reject previously accepted custom-signer responses, but no release note announces the compatibility change; HWI reportedly does not finalize.
Location: doc/external-signer.md:151 (head).
Details and suggested fix
Responses with a different PSBT version, finalized inputs, or declared or signed NONE/SINGLE sighashes now cause EXTERNAL_SIGNER_FAILED instead of being accepted wholesale. Add a short doc/release-notes-<name>.md describing these stricter response requirements and linking to doc/external-signer.md. This follows the API-change guidance in doc/developer-notes.md and gives integration maintainers an upgrade notice, analogous to the existing PSBTv2 compatibility note.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [major]: Check unsafe signatures after merging the signer response
- [minor]: Reject PSBTv2 responses that add a different input sequence
- [suggestion]: Remove unused
<map>and<set>includes - [major]: Recheck the transaction after merging PSBTv2 fields
- [minor]: Do not retain unverified signer signatures in the caller's PSBT