Internal bug detected: FinalizeAndExtractPSBT(psbtx_copy, mtx) #32849

issue ekrembal openend this issue on July 1, 2025
  1. ekrembal commented at 1:57 pm on July 1, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    0bitcoin-cli -testnet4 descriptorprocesspsbt cHNidP8BAF4CAAAAAfrAU8xRZDY7er/kAUGzVtup++LN4otxeOtANj9Tw8xYAAAAAAD9////AeAPlwAAAAAAIlEgmQIRpk7kW78uK6z/DBX37H4Pi4OLy3Fau0pXquQSXLUAAAAAAAEBK4CWmAAAAAAAIlEg5cugS+vKVwm3OSTEr0sIVU/ahEJzIS6iXjsvWNwJ0VUBAwSDAAAAAQhDAUFATOMkSjzzD+7k1AnzZgJ+G+sDZXX5ob0tlQ9mZIseDe73u4fU6SPKdtxve2Wm/mVNrRIP5cPEnkcMv0BJ2iIWgyEWtJa/uuFJh4F8U9WSvgqmbEXHuURDwfdFUTc/nONNI0YZAP/2NCNWAACAAAAAgAAAAIAAAAAAAAAAAAEXILSWv7rhSYeBfFPVkr4KpmxFx7lEQ8H3RVE3P5zjTSNGAAA= "[\"tr([fff63423/86'/0'/0']tpubDDfvptb1GNdu4TRUUNf9bwsFFpHADAmwaB3uoC8ukv5JMsYPzEc3E6yg4w8t49Wq7jtL8LC3VPmuhXoSJxpamWDPfphAz3Fioki3WerwH3Y/0/0)#twc4a4lc\"]"
    1error code: -1
    2error message:
    3Internal bug detected: FinalizeAndExtractPSBT(psbtx_copy, mtx)
    4rpc/rawtransaction.cpp:1986 (operator())
    5Bitcoin Core v29.0.0
    6Please report this issue here: https://github.com/bitcoin/bitcoin/issues
    

    Expected behaviour

    This should give an error maybe stating that the signature inside the final_scriptwitness is an invalid schnorr signature. Please note that the signature inside the psbt uses SIGHASH_SINGLE | ANYONECANPAY flag

    Steps to reproduce

    The same command should work on any local regtest or testnet4.

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Pre-built binaries

    What version of Bitcoin Core are you using?

    v29.0.0

    Operating system and version

    macOS Sequoia 15.1.1

    Machine specifications

    No response

  2. maflcko commented at 5:55 am on July 2, 2025: member
  3. maflcko added the label Bug on Jul 2, 2025
  4. maflcko added the label RPC/REST/ZMQ on Jul 2, 2025
  5. b-l-u-e commented at 7:48 am on July 5, 2025: none
    I can confirm this bug exists in Bitcoin Core v29.0.0. I’ve reproduced it and found the root cause: the CHECK_NONFATAL assertion in src/rpc/rawtransaction.cpp around line 1986 triggers an internal bug when FinalizeAndExtractPSBT encounters invalid Schnorr signatures. The fix is to replace the CHECK_NONFATAL with proper error handling that throws a JSONRPCError with a clear message instead of crashing. I’ll submit a PR with the fix shortly.
  6. ?
    user_blocked bitcoin
  7. bitcoin deleted a comment on Jul 16, 2025

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: 2025-07-31 06:13 UTC

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