psbt: update PSBTv2 modifiable flags after signing #36479

pull gjija wants to merge 1 commits into bitcoin:master from gjija:psbtv2-tx-modifiable-signing changing 2 files +205 −0
  1. gjija commented at 6:36 PM on October 8, 2026: none

    Signing a PSBTv2 currently leaves its transaction modifiable flags unchanged. This can tell other software that inputs or outputs can still be changed even when those changes would invalidate the signature. The flag indicating a SIGHASH_SINGLE signature can also be missing. This change updates the flags when a signature is added, according to its sighash type and BIP370. It handles partial signatures too. Calls that only exchange MuSig2 nonces or add no signature leave the flags unchanged. The regression tests cover different sighash types, P2WPKH, Taproot, multisig, and MuSig2 signing, along with PSBTv0 and missing-field controls.

    Testing:

    • Full rpc_psbt.py passed.
    • CTest: 377 passed, 1 skipped because its external test data was unavailable.
  2. psbt: update modifiable flags after signing
    Apply the BIP370 transaction modifiable flag restrictions when a real signature is added. Count ECDSA, Taproot, and MuSig2 partial signatures so incomplete signing updates the flags while nonce-only and no-op calls preserve them.
    
    Add regression coverage for the sighash matrix, default sighashes, finalization, PSBTv0, omitted flags, and partial multisig, Tapscript, and MuSig2 signing.
    1b332d0aee
  3. DrahtBot added the label PSBT on Oct 8, 2026
  4. DrahtBot commented at 6:36 PM on October 8, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited commented at 7:40 PM on October 8, 2026: contributor

    To preserve the time of reviewers, this project requires authors to understand the code they are submitting. Given that the description seems to be mostly LLM generated, I don't think that is the case, so I am closing this again.

  6. sedited closed this on Oct 8, 2026

Labels

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-10-11 13:51 UTC

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