Repository navigation
BIP 174: Add test vectors for additional unsigned tx serialization - #1099
Merged
Merged
Conversation
There are some edge cases with unsigned tx serialization, so this adds test vectors for them. Specifically, an unsigned tx with witness serialization is invalid, a transaction with 0 inputs and 0 outputs is valid, and a transaction with 0 inputs and non-0 outputs is valid.
achow101
added a commit
to bitcoin-core/HWI
that referenced
this pull request
Aug 10, 2026
…st vectors df8c3f5 test: add remaining BIP 174 and BIP 370 test vectors (Sjors Provoost) 1ff27e0 test: add BIP 370 timelock determination vectors (Sjors Provoost) 498e85a psbt: enforce required locktime bounds (Sjors Provoost) 2a431b8 psbt: reject PSBTv2 input and output fields in PSBTv0 (Sjors Provoost) 8a40523 psbt: track whether an unsigned tx key was seen (Sjors Provoost) b34f94a psbt: parse the global unsigned tx without witness data (Sjors Provoost) f0520e7 psbt: assume final sequence when PSBT_IN_SEQUENCE is omitted (Sjors Provoost) 2db24a2 psbt: set locktime on the transaction, not the PSBT (Sjors Provoost) Pull request description: 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. ACKs for top commit: achow101: ACK df8c3f5 Tree-SHA512: 1fedaca5eeceb9c3c5df8ef87041d0ba97be87b876ebe8eadf4173f19e93d370438edb1e8d98a7363e661228bea6f3f094fc91e13e6975a5dfabce475e285303
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are some edge cases with unsigned tx serialization, so this adds
test vectors for them. Specifically, an unsigned tx with witness
serialization is invalid, a transaction with 0 inputs and 0 outputs is
valid, and a transaction with 0 inputs and non-0 outputs is valid.