BIP-375: correct labeled test vectors to include labeled-spend key in PSBT_OUT_SP_V0_INFO #2207

pull macgyver13 wants to merge 2 commits into bitcoin:master from macgyver13:bip375-labeled-spend changing 3 files +38 −25
  1. macgyver13 commented at 3:46 PM on July 7, 2026: contributor

    Includes two changes to align the labeled test vectors and validation reference with BIP-375:

    • Sort silent payment codes lexicographically then by output index before assigning k values.
    • PSBT_OUT_SP_V0_INFO should carry the labeled-spend public key, not the base-spend public key.

    Changed vectors:

    • can finalize: one P2WPKH input / two mixed outputs - labeled sp output and BIP 32 change
    • can finalize: one input / two sp outputs - output 0 has no label / output 1 uses label=0 convention for sp change
    • can finalize: three sp outputs (same scan key) - output 0 uses label=1, outputs 1 and 2 uses label=2 (same spend key)

    Test Runner Output

    Summary: 41 passed, 0 failed
    
  2. BIP-375: update labeled test vectors
    Now PSBT_OUT_SP_V0_INFO provides labeled-spend public key not the base-spend
    public key.
    
    Modify test vector with labeled-spend key to the same recipient from:
    two sp outputs - output 0 uses label=3 / output 1 uses label=1
    to:
    three sp outputs (same scan key) - output 0 uses label=1, outputs 1 and 2 uses label=2 (same spend key)
    This vector excercises the BIP375 sorting outputs with same scan key properly.
    
    The next commit will fix the validation logic and address this failing test.
    
    bump ChangeLog to 0.1.2
    5225829fe3
  3. BIP-375: update validation to match sorting outputs with same scan key
    Fix output script validation for silent payment output ordering when multiple 
    outputs share the same scan key (labeled addresses of one recipient).
    8f7b632f67
  4. macgyver13 marked this as ready for review on Jul 7, 2026
  5. murchandamus commented at 11:00 PM on July 7, 2026: member

    cc BIP Owners for review: @andrewtoth, @achow101, @josibake

  6. murchandamus added the label Proposed BIP modification on Jul 7, 2026
  7. murchandamus added the label Pending acceptance on Jul 7, 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-07-08 16:10 UTC

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