Skip to content

psbt: misc fixes and add remaining BIP 174 and BIP 370 test vectors - #839

Open
Sjors wants to merge 8 commits into
bitcoin-core:masterfrom
Sjors:2026/07/psbt
Open

psbt: misc fixes and add remaining BIP 174 and BIP 370 test vectors #839
Sjors wants to merge 8 commits into
bitcoin-core:masterfrom
Sjors:2026/07/psbt

Conversation

@Sjors

@Sjors Sjors commented Jul 10, 2026

Copy link
Copy Markdown
Member

Each fix / hardening commit introduces the test vectors that cover it.

Mostly straight-forward, but psbt: parse the global unsigned tx without witness data is worth a closer look. IIUC it catches up with bitcoin/bips#1099.

@Sjors Sjors mentioned this pull request Jul 10, 2026
Sjors added 8 commits August 1, 2026 20:17
get_unsigned_tx() assigned the computed locktime to a stray
attribute on the PSBT, so the constructed transaction kept
locktime 0.
get_unsigned_tx() asserted that every input has a sequence number,
crashing on the minimal BIP 370 test vector.
The witness-detecting deserializer accepted witness-serialized
unsigned transactions and misread valid ones with no inputs.
A provided unsigned tx with no inputs and outputs is
indistinguishable from the empty placeholder.
The global PSBTv2 fields were already rejected.
compute_lock_time() was previously untested.
The test data now covers every vector from both BIPs; these all
already pass.
@Sjors

Sjors commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

Ready now that #836 landed.

@Sjors
Sjors marked this pull request as ready for review August 1, 2026 18:22
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.

1 participant