Skip to content

Conversation

@willcl-ark
Copy link
Member

@willcl-ark willcl-ark commented Jun 26, 2024

Closes: #30294

Looking for approach (N)ACK.

Previously setting the bip32derivs flag to false with the walletprocesspsbt RPC correctly does not include bip32_derivs for inputs in the PSBT, but does include bip32_derivs for outputs.

User may want to actively strip all bip32 derivation paths from a PSBT for privacy reasons however. It may make sense to do this after signing your inputs and outputs during a manual coinjoin as demonstrated in the BIP174 example.

To me, this makes more sense to include in the Combiner PSBT role. It's then separated from signing done by the Signers.

Therefore add functionality to combinepsbt permitting stripping of all bip32_derivation paths found in all provided psbts' inputs and outputs.

As this RPC can be called with a single PSBT, it can be used to strip derivation paths from a PSBT with any number of participants.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 26, 2024

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

Code Coverage & Benchmarks

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

Reviews

See the guideline for information on the review process.

Type Reviewers
Approach NACK achow101

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #32784 (wallet: derivehdkey RPC to get xpub at arbitrary path by Sjors)

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.

LLM Linter (✨ experimental)

Possible typos and grammar issues:

  • “out inputs and outputs” -> “inputs and outputs” [“out” is extraneous and confuses the phrase]
  • “these those that are not empty” -> “those that are not empty” [duplicate demonstratives]

drahtbot_id_4_m

@fanquake
Copy link
Member

Looking for approach (N)ACK.

Maybe @achow101 ? Otherwise given no interest in this in 8 months, maybe we should just close.

Previously setting bip32derivs to false with walletprocesspsbt does not
include bip32_derivs for inputs, but does include bip32_derivs for
outputs.

User may want to strip all bip32 derivation paths for privacy reasons
however. It may make sense to do this after signing your inputs and
outputs during a manual coinjoin for example.

Therefore add functionality to `combinepsbt` permitting stripping of
all bip32_derivation paths found in all provided psbts.

As this RPC can be called with a single psbt, it can be used to strip
derivation paths from any psbt.
These asserts check that when calling `combinepsbt` RPC with
`stripderivs=true`, all derivation paths are stripped from all inputs
and outputs.
@willcl-ark willcl-ark force-pushed the psbt-strip-derivs-combine branch from f3e2a7f to be9246e Compare June 25, 2025 19:28
@achow101 achow101 self-requested a review October 22, 2025 15:16
@willcl-ark willcl-ark changed the title WIP: Permit Combiner to strip bip32_deriv information Permit Combiner to strip bip32_deriv information Oct 22, 2025
@willcl-ark willcl-ark marked this pull request as ready for review October 22, 2025 15:18
@achow101
Copy link
Member

Approach NACK

I don't think it's up to the combiner to strip this information. If a signer wants to preserve their own privacy, then they should remove it prior to sending the PSBT to any of their counterparties, or the combiner. I think it would be better to have the strip functionality be in walletprocesspsbt, and signers can pass their PSBT back through that if they want to strip the derivation paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting bip32derivs to false with walletprocesspsbt includes bip32_derivs for outputs.

4 participants