Skip to content

bip174: add combiner test vector for PSBT_IN_SIGHASH_TYPE - #2275

Merged
murchandamus merged 5 commits into
bitcoin:masterfrom
Sjors:2026/09/psbt-sighash
Sep 23, 2026
Merged

murchandamus merged 5 commits into
bitcoin:masterfrom
Sjors:2026/09/psbt-sighash

Conversation

@Sjors

@Sjors Sjors commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Add a vector that would have caught bitcoin/bitcoin#36076.

Additionally, #2075 clarified that Combine is not commutative, however the actual test vectors are. The first commit clarifies that the existing test vectors should be run in both orders, while leaving room for exceptions if we ever need to standardize conflict resolution.

The Combiner section is updated to say combining is commutative unless
the PSBTs have conflicting fields. None of the current combiner test
vectors contain such fields.

@murchandamus murchandamus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK. @achow101?

@murchandamus murchandamus added Proposed BIP modification PR by non-owner to update BIP content Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Sep 9, 2026
Comment thread bip-0174.mediawiki Resolved
Comment thread bip-0174.mediawiki Resolved
Add a vector where only one of the two PSBTs has the
PSBT_IN_SIGHASH_TYPE field.

See bitcoin/bitcoin#36076
@Sjors
Sjors force-pushed the 2026/09/psbt-sighash branch from 1399ae4 to 0bae693 Compare September 10, 2026 06:43
@Sjors

Sjors commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Trimmed the text and just copy-pasted both PSBTs, instead of trying to point to them (the vectors are not numbered or named).

rezakhosravi971-bit

This comment was marked as spam.

@rezakhosravi971-bit

This comment has been minimized.

@murchandamus murchandamus left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and seems to address all of @achow101’s feedback. Could you please add a Changelog entry that mentions the new test vectors, and bump the PATCH version in Changelog and Version header?

While you do that, could you kindly also add mention of the Commutativity clarification we merged? I overlooked the missing Changelog there. (Otherwise, I can do it later myself.)

@murchandamus murchandamus added PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author and removed Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Sep 22, 2026
@Sjors

Sjors commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

I overlooked the missing Changelog there.

Added a commit (bumping to 1.4.3).

Could you please add a Changelog entry

Done (bumping to 1.4.4)

@murchandamus murchandamus removed the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Sep 23, 2026
Comment thread bip-0174.mediawiki Resolved

@murchandamus murchandamus left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed indentation across all test vectors, otherwise LGTM. Thanks for adding the Changelog entries, @Sjors, thanks for review, @achow101.

@murchandamus
murchandamus merged commit fc1b9f4 into bitcoin:master Sep 23, 2026
4 checks passed
@Sjors
Sjors deleted the 2026/09/psbt-sighash branch September 23, 2026 18:00
sedited pushed a commit to bitcoin/bitcoin that referenced this pull request Oct 5, 2026
sedited added a commit to bitcoin/bitcoin that referenced this pull request Oct 5, 2026
6fa2f39 test: add BIP174 invalid value size vector (Sjors Provoost)
029bc15 test: add BIP174 sighash combiner vector (Sjors Provoost)

Pull request description:

  Add the two new test vectors from:

  - bitcoin/bips#2275
  - bitcoin/bips#1971

  bitcoin/bips#2275 additionally requires _existing_ `Combine` vectors to run in both orders, so we do that here too.

ACKs for top commit:
  brunoerg:
    reACK 6fa2f39
  aaron-leeb:
    reACK [6fa2f39](6fa2f39)
  sedited:
    ACK 6fa2f39

Tree-SHA512: 5a07026cadbe0551728ac30e9b20212f94e322a2ab31a31a84c86320fc95d2ada82a12e7c2a50c7cd7c12ad202036fdc45b6ad4fc820a8d6f2cd71c87476a6f5
Kino1994 pushed a commit to Kino1994/bitcoin-full-history that referenced this pull request Oct 12, 2026
Kino1994 pushed a commit to Kino1994/bitcoin-full-history that referenced this pull request Oct 12, 2026
6fa2f3974cbb69fb2086a8f89d300deec4486662 test: add BIP174 invalid value size vector (Sjors Provoost)
029bc15f2cb575ad4e19d99338cd133a4140e66f test: add BIP174 sighash combiner vector (Sjors Provoost)

Pull request description:

  Add the two new test vectors from:

  - bitcoin/bips#2275
  - bitcoin/bips#1971

  bitcoin/bips#2275 additionally requires _existing_ `Combine` vectors to run in both orders, so we do that here too.

ACKs for top commit:
  brunoerg:
    reACK 6fa2f3974cbb69fb2086a8f89d300deec4486662
  aaron-leeb:
    reACK [6fa2f39](bitcoin/bitcoin@6fa2f39)
  sedited:
    ACK 6fa2f3974cbb69fb2086a8f89d300deec4486662

Tree-SHA512: 5a07026cadbe0551728ac30e9b20212f94e322a2ab31a31a84c86320fc95d2ada82a12e7c2a50c7cd7c12ad202036fdc45b6ad4fc820a8d6f2cd71c87476a6f5
ajtowns pushed a commit to ajtowns/bitcoin that referenced this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Proposed BIP modification PR by non-owner to update BIP content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants