rpc: preserve global xpubs and proprietary fields in joinpsbts #35516

pull thomasbuilds wants to merge 2 commits into bitcoin:master from thomasbuilds:fix-joinpsbts-drop-globals changing 2 files +27 −20
  1. thomasbuilds commented at 7:12 PM on June 11, 2026: contributor

    joinpsbts collects the global xpubs of all the joined PSBTs into merged_psbt, but returns a separately constructed shuffled_psbt into which only the inputs, outputs, and unknown fields are copied. The collected PSBT_GLOBAL_XPUB records are silently dropped, and PSBT_GLOBAL_PROPRIETARY records are not collected at all.

    The xpub collection was added in #17034, which was written against a joinpsbts that still returned merged_psbt, but was merged after #16512 had introduced the shuffled_psbt rebuild, so the collected xpubs have never reached the result.

    Shuffle the inputs and outputs of merged_psbt in place instead of rebuilding a new PSBT, so that all global data is preserved, and union the global proprietary records in the merge loop, matching the combinepsbt behavior from #34893.

  2. rpc: preserve global xpubs and proprietary fields in joinpsbts
    joinpsbts collects the global xpubs of all the joined PSBTs into
    merged_psbt, but returns a separately constructed shuffled_psbt into
    which only the inputs, outputs, and unknown fields are copied. The
    collected PSBT_GLOBAL_XPUB records are silently dropped, and
    PSBT_GLOBAL_PROPRIETARY records are not collected at all.
    
    The xpub collection was added in #17034, which was written against a
    joinpsbts that still returned merged_psbt, but was merged after #16512
    had introduced the shuffled_psbt rebuild, so the collected xpubs have
    never reached the result.
    
    Shuffle the inputs and outputs of merged_psbt in place instead of
    rebuilding a new PSBT, so that all global data is preserved, and union
    the global proprietary records in the merge loop, matching the
    combinepsbt behavior from #34893.
    31f23167b3
  3. test: check joinpsbts preserves global xpubs and proprietary fields faa2500a88
  4. DrahtBot added the label RPC/REST/ZMQ on Jun 11, 2026
  5. DrahtBot commented at 7:12 PM on June 11, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35516.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK achow101

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35100 (rpc: Merge joinpsbts locktimes correctly by nervana21)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  6. fanquake commented at 12:35 PM on June 12, 2026: member
  7. achow101 commented at 9:49 PM on June 12, 2026: member

    Concept ACK


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-13 21:30 UTC

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