BIP174: Specify PSBT_IN_PREVIOUS_TXID serialization order #2001

pull Shadouts wants to merge 2 commits into bitcoin:master from Shadouts:specify-endianness-of-prev-txid changing 2 files +2 −2
  1. Shadouts commented at 7:04 pm on October 9, 2025: contributor

    This change updates descriptions for the PSBT_IN_PREVIOUS_TXID field to specify serialization order.

    It was not straightforward the order with which to store the txid in a psbt. It’s not clearly specified in the spec, and there are not many resources or parsers to aid in debugging PSBTv2. I found the BIP370 test vector “Case: PSBTv0 but with PSBT_IN_PREVIOUS_TXID.” seems to imply that the order of this txid value in PSBT_IN_PREVIOUS_TXID should match network serialization order.

    I’m torn on if “little endian” is the correct phrase to use here in conjunction with “txid”. I usually think of a “txid” as the big endian, human-presented order of a txn hash, but maybe it’s okay to use interchangeably.

  2. specify PSBT_IN_PREVIOUS_TXID serialization order 8b74cf054e
  3. murchandamus renamed this:
    Specify PSBT_IN_PREVIOUS_TXID serialization order
    BIP174: Specify PSBT_IN_PREVIOUS_TXID serialization order
    on Oct 9, 2025
  4. murchandamus added the label Proposed BIP modification on Oct 9, 2025
  5. murchandamus added the label Pending acceptance on Oct 9, 2025
  6. murchandamus commented at 9:54 pm on October 9, 2025: contributor
    cc: @achow101
  7. achow101 commented at 7:10 pm on December 8, 2025: member
    “Little endian” is ambiguous; I’ve used “little endian” to describe the byte swapped form that is displayed to users. The byte order is the same as everywhere else in Bitcoin as it is the direct output from hashing.
  8. murchandamus commented at 7:36 pm on December 8, 2025: contributor
    It sounds like this change will not be accepted as is. Please find a way to rephrase that, @Shadouts.
  9. murchandamus added the label PR Author action required on Dec 8, 2025
  10. fix: remove ambiguous use of endianness language 249919cbc6
  11. Shadouts commented at 6:47 pm on December 18, 2025: contributor

    “Little endian” is ambiguous; I’ve used “little endian” to describe the byte swapped form that is displayed to users. The byte order is the same as everywhere else in Bitcoin as it is the direct output from hashing.

    Agreed. Endianness with regard to hash output can be ambiguous. I’ve updated the text removing mention of “endian” while still clearing up the order ambiguity.

    32 byte txid in standard byte order, not display byte order, of the previous transaction whose output at PSBT_IN_OUTPUT_INDEX is being spent.

  12. Shadouts requested review from murchandamus on Dec 18, 2025
  13. achow101 commented at 6:41 pm on January 14, 2026: member
    ACK, but please squash
  14. murchandamus merged this on Jan 14, 2026
  15. murchandamus closed this on Jan 14, 2026

  16. murchandamus removed the label Pending acceptance on Jan 14, 2026
  17. murchandamus removed the label PR Author action required on Jan 14, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-16 16:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me