Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra taproot fields when finalizing PSBT #1310

Merged
merged 2 commits into from
Mar 22, 2024

Commits on Feb 23, 2024

  1. test(psbt): Fixup test_psbt_multiple_internalkey_signers

    to verify the signature of the input and ensure the right internal
    key is used to sign. This fixes a shortcoming of a previous
    version of the test that relied on the result of `finalize_psbt`
    but would have erroneously allowed signing with the wrong key.
    ValuedMammal committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    8c78a42 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. fix(bdk): Remove extra taproot fields when finalizing Psbt

    We currently allow removing `partial_sigs` from a finalized Psbt,
    which is relevant to non-taproot inputs, however taproot related Psbt
    fields were left in place despite the recommendation of BIP371 to remove
    them once the `final_script_witness` is constructed. This can cause
    confusion for parsers that encounter extra taproot metadata in an
    already satisfied input.
    
    Fix this by introducing a new member to SignOptions
    `remove_taproot_extras`, which when true will remove extra taproot
    related data from a Psbt upon successful finalization. This change
    makes removal of all taproot extras the default but configurable.
    
    test(wallet): Add test
    `test_taproot_remove_tapfields_after_finalize_sign_option`
    that checks various fields have been cleared for taproot
    Psbt `Input`s and `Output`s according to BIP371.
    ValuedMammal committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    5840ce4 View commit details
    Browse the repository at this point in the history