Skip to content

PSBTv0: Update Simple Signer Algorithm for SegWitv0 inputs#1430

Merged
kallewoof merged 1 commit intobitcoin:masterfrom
bigspider:psbtv0-fix-signing-algo
Mar 8, 2023
Merged

PSBTv0: Update Simple Signer Algorithm for SegWitv0 inputs#1430
kallewoof merged 1 commit intobitcoin:masterfrom
bigspider:psbtv0-fix-signing-algo

Conversation

@bigspider
Copy link
Copy Markdown
Contributor

The Simple Signer Algorithm is not updated to the fact that SegWitv0 inputs are now typically expected to have both the non-witness-utxo and the witness-utxo field (instead of the ealier requirement of omitting the non-witness-utxo).

By reverting the order of the checks, it is at least semantically correct.

Possible TODOs for followups:

  • Update for segwitv1 signing
  • Recommend checking the non-witness-utxo for segwitv0 inputs.

It is no longer expected that SegWitV0 inputs have no witness-utxo field.
Reverting the order of checks avoids this assumption (while still relying on the mandatory lack of witness-utxo for legacy inputs).
@bigspider bigspider changed the title Update Simple Signer Algorithm for SegWitv0 inputs PSBTv0: Update Simple Signer Algorithm for SegWitv0 inputs Mar 4, 2023
@achow101
Copy link
Copy Markdown
Member

achow101 commented Mar 6, 2023

ACK e538fa8

@kallewoof kallewoof merged commit 4e4db8b into bitcoin:master Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants