wallet: Check only our inputs for multisig wallets #34912

pull Bicaru20 wants to merge 1 commits into bitcoin:master from Bicaru20:2026-02-12-check-sig-owned-in changing 1 files +14 −3
  1. Bicaru20 commented at 2:55 pm on March 24, 2026: none

    When we sign PSBTs via external signers, rigth now we considere it is complete if all the inputs are signed. For multisig wallets, we should only care if the inputs owned by the wallet are signed.

    This PR updates the behaviour so it only check those inputs owned by the wallet. The concrete process is:

    1. Iterate through the PSBT inputs and identify the ones owned by the wallet with DescriptorScriptPubKeyMan::IsMine
    2. If all inputs owned by the wallet are signed we consider the process complet.

    This pr resolves this TODO.

  2. Wallet: Check only our inputs for multisig wallets
    This commit resolves the TODO in ExternalSignerScriptPubKeyMan::FillPSBT.
    We now only check if the inputs own by our wallet are signed.
    
    Co-Authored-By: polespinasa <pol.espinasa@uab.cat>
    abc7173bd0
  3. DrahtBot added the label Wallet on Mar 24, 2026
  4. DrahtBot commented at 2:55 pm on March 24, 2026: contributor

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK achow101, Sjors

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  5. maflcko commented at 3:00 pm on March 24, 2026: member
    Was this LLM generated? What are the steps to test this? What is the output before and after the changes here?
  6. Bicaru20 commented at 4:31 pm on March 24, 2026: none

    Was this LLM generated? What are the steps to test this? What is the output before and after the changes here?

    It is not LLM. I will see if I can add a function test, if not I will edit the description with instructions to test it. In the meantime I convert the PR to draft.

  7. Bicaru20 marked this as a draft on Mar 24, 2026
  8. achow101 commented at 10:20 pm on March 24, 2026: member

    Concept NACK

    The TODO seems wrong to me. complete has always meant whether the PSBT as a whole is fully signed, not whether we have signed everything that we can sign. This is the case even when signing single sig things with the wallet when there are external inputs.

  9. polespinasa commented at 10:36 pm on March 24, 2026: member
    Friendly pinging @Sjors to get more context. I think you added that TODO. Do you remember the reason?
  10. polespinasa commented at 11:13 pm on March 24, 2026: member

    complete has always meant whether the PSBT as a whole is fully signed, not whether we have signed everything that we can sign.

    Was trying to understand this comment in the context of this function and the TODO. I don’t see why we would care about other’s inputs in this function. At the end we will not be able to sign or finalize inputs that are missing other’s signatures. So if all “our” work is done we should be able to skip the rest of the code and return?

    I get that complete means all inputs are signed. Maybe complete is not the correct variable name here and we should also change that?

    Maybe I am just missing something…

  11. Sjors commented at 12:57 pm on March 25, 2026: member

    Concept NACK unless a functional test demonstrates the actual problem.

    I’d rather remove these todos since nobody, including myself, remembers what they’re for: #34920

    Maybe I was thinking of a coinjoin?

  12. maflcko commented at 1:37 pm on March 25, 2026: member
    Closing for now. A new pull request or issue should be opened, once there is a test or text describing the needed behavior change.
  13. maflcko closed this on Mar 25, 2026


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-03-31 12:13 UTC

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