rpc: analyzepsbt should explicitly check for an invalid taproot_key_path_sig #33320

issue Sjors opened this issue on September 5, 2025
  1. Sjors commented at 12:37 PM on September 5, 2025: member

    While testing #29675 my final combined PSBT ended up having an invalid taproot_key_path_sig, which I found out by logging the sigdata.complete value at the end of ProduceSignature.

    We should of course never produce such an invalid value and I'll continue digging for the root cause. But external applications could do this too.

    Currently analyzepsbt will give a useless "next": "updater" status when this happens.

    We should instead display an error.

    Not sure what the best approach would be.

  2. Sjors commented at 12:42 PM on September 5, 2025: member

    FWIW this particular situation happened because a ledger signed one of the script paths and my WIP branch for HWI ended up putting that signature in the key path.

  3. fanquake added the label RPC/REST/ZMQ on Sep 5, 2025
  4. overcookedpanda referenced this in commit 27af927367 on Mar 6, 2026
  5. overcookedpanda referenced this in commit 1f4ea8d0cb on Mar 8, 2026
  6. overcookedpanda referenced this in commit 7f01b6c996 on Mar 9, 2026
  7. overcookedpanda referenced this in commit 5410093290 on Mar 9, 2026
  8. overcookedpanda referenced this in commit bc28eefa7c on Mar 11, 2026
  9. RyanKung commented at 10:15 PM on September 10, 2026: none

    HWI misclassified a script-path signature, so src/node/psbt.cpp::AnalyzePSBT sees an invalid key-path signature and falls back to UPDATER.

    I don’t think this requires a fix: UPDATER is the fallback for incomplete inputs that cannot be classified as merely missing signatures. Changing this logic would require additional failure states and significantly complicate the analysis.

    ref: https://github.com/bitcoin-core/HWI/commit/fc206450e71cf07b2211a06d606ca7567bcc9170


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-24 10:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me