descriptor: warn about multipath key reuse #36004

pull Dontbyshai wants to merge 1 commits into bitcoin:master from Dontbyshai:fix-35985 changing 4 files +103 −29
  1. Dontbyshai commented at 4:19 AM on August 18, 2026: none

    This PR adds a warning when a multipath descriptor causes a non-multipath key to be cloned across multiple branches.

    For example, a descriptor such as:

    wsh(multi(2,A/<0;1>/,B/0/))

    currently reuses the same B/0/* key material across the generated branches.

    The existing behavior is kept: these descriptors remain valid and are not rejected. The change only exposes a warning through getdescriptorinfo.

    The warning is only triggered when a key provider is actually cloned to match a multipath expression. Cloning subdescriptors in tr() does not trigger the warning.

    Tests:

    • Added descriptor unit tests covering multipath key cloning.
    • Added coverage for tr() internal-key vs subdescriptor cloning.
    • Added a functional test for the getdescriptorinfo warning.
    • Ran the descriptor unit tests and rpc_getdescriptorinfo.py successfully.

    Fixes #35985

  2. descriptor: warn about multipath key reuse 8e516f303e
  3. DrahtBot added the label Descriptors on Aug 18, 2026
  4. DrahtBot commented at 4:19 AM on August 18, 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/36004.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko commented at 5:08 AM on August 18, 2026: member

    Dupe of #36005, please instead review that one

  6. maflcko closed this on Aug 18, 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-08-21 04:51 UTC

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