wallet, rpc: Add analyzedescriptor for multisig setups #36885

Open
pablomartin4btc wants to merge 13 commits from analyze-descriptor into master AGit
pablomartin4btc commented 2026-11-16 05:48:12 +00:00 (Migrated from github.com)

Part of the multisig setup work tracked in #35645. Based on #35918 (the first 3 commits).

Before importing a multisig descriptor received from a coordinator, each participant needs to check that it is the setup they agreed on: a k-of-n where any k cosigners can spend and nothing else can, that their own key is in it, and that they all derived the same first addresses (receive and change). Today nothing in Core reports what a descriptor commits to, so tools had to parse the descriptor string by hand, as the multisig wizard in #36325 (now closed) did.

This PR adds that check in three layers:

  1. Inspection (commits by w0xlt, with small changes listed below): GetKeyInfo(), GetKeyInventory() and GetPolicy() describe a parsed descriptor's key expressions, where each key is used, and how they combine. getdescriptorinfo gains a verbose option that returns them as keys and policy.
  2. Multisig analysis, no wallet: AnalyzeDescriptor() tells whether a descriptor is a recognized k-of-n setup, and if not, why. getdescriptorinfo verbose returns it as analysis, so it works even with -disablewallet.
  3. Wallet part: interfaces::Wallet::analyzeDescriptor (for the GUI) and the analyzedescriptor wallet RPC add which keys the wallet holds, whether it can sign, and the first address of each path (receive and change). They accept any descriptor, single-sig included; analysis.recognized tells whether it is a recognized k-of-n.

Recognized setups are wsh(multi)/wsh(sortedmulti), and tr(K,multi_a)/tr(K,sortedmulti_a) with a single leaf, where K is the BIP 341 NUMS point or a musig() of at least k distinct cosigners. Every cosigner must be an extended key other than the NUMS point, with an unhardened ranged derivation that can derive addresses, no musig() participant may need a hardened derivation step, and no two cosigners or participants may be found to be the same key. Anything else is still analyzed and returned, with recognized: false and the list of issues: the analysis warns, it never refuses a descriptor.

Example, run by one of the three cosigners:

$ bitcoin-cli -rpcwallet=alice analyzedescriptor "wsh(sortedmulti(2,[a1b2c3d4/48h/1h/0h/2h]tpub.../<0;1>/*,...))"
{
  "keys": [
    { "role": "ecdsa", "type": "bip32", "xpub": "tpub...", "derivation": "/0/*",
      "origin": { "master_fingerprint": "a1b2c3d4", "path": "m/48h/1h/0h/2h" }, "wallet": "mine" },
    { ..., "wallet": "not_mine" },
    { ..., "wallet": "not_mine" }
  ],
  "analysis": { "recognized": true, "shape": "wsh_multi", "sorted": true, "threshold": 2, "cosigners": [0, 1, 2], "issues": [] },
  "can_sign": true,
  "first_addresses": ["bcrt1q...", "bcrt1q..."],
  "hasprivatekeys": false
}

A locked wallet is not an error: a cosigner key with a hardened origin path can't be checked without the private key, so it is reported as "unknown", and can_sign is left out unless another key is already known to be the wallet's. This holds even when the wallet also has that key without its private key (e.g. an imported watch-only copy of its own xpub). "unknown" only appears when the wallet is locked, so the caller can always ask the user to unlock and retry. Everything else (analysis, first_addresses) is still returned. Only the candidate private key is decrypted, and none when the key is one of the wallet's HD keys itself.

A plain public key, as getaddressinfo or createmultisig use, is matched the same way through its origin: the one in the descriptor, or the one the wallet recorded when it derived the key (read with the new DescriptorScriptPubKeyMan::GetPubKeyOrigin(), which needs no private key). A plain public key the wallet has but can't sign for (from an imported watch-only descriptor, or another cosigner's key in a multisig it imported) is watch_only. Keys the wallet holds only as musig() participants are matched too, although gethdkeys doesn't list them. An origin doesn't have to start at a key the wallet holds: if the wallet imported only an account xprv with its master's origin (e.g. [fp/48h/1h/0h/2h]tprv...), a key whose origin starts with that one is matched by deriving the rest of the path from the account key.

Commits

Commit Author
1‑3 #35918 pseudoramdom
4‑7 key/policy inspection, getdescriptorinfo verbose w0xlt (see changes below)
8 script: add AnalyzeDescriptor() for multisig setups co-authored with w0xlt
9 rpc: move descriptor key JSON helpers to a shared file move-only
10 rpc: add multisig analysis to getdescriptorinfo verbose
11 wallet: add analyzeDescriptor to the wallet interface co-authored with w0xlt
12 wallet, rpc: add analyzedescriptor co-authored with w0xlt
13 doc: add release note for #36885

Changes made to the inspection commits (4-7)

The inspection commits come from w0xlt's descriptor inspection branch. These changes were made on top, for w0xlt to review and agree with or not (this section will be removed once agreed):

  • script: expose key expression structure (was "expose structured key program data")
    • Use m_root_extkey instead of *GetRootExtPubKey().
    • The derivation test also covers /0h/* and /1/*h, checking the last-hardened and derived caches.
    • wide += ')' instead of ")" in the participant test (clang-tidy performance-prefer-single-char-overloads).
  • script: identify descriptor key occurrences
    • KeyRole() is pure virtual; descriptors without key arguments (addr, raw, sh, wsh) say so explicitly with NONFATAL_UNREACHABLE().
    • Comment noting that frame is invalidated by the following push_back.
    • The walletload test mock is reduced to return {}.
  • script: expose descriptor policy nodes
    • The header documents the two forms of the same construct (descriptor function vs Miniscript fragment).
    • Assert → CHECK_NONFATAL; explicit static_cast<uint32_t> for the threshold; /*value=*/0 named on the addr()/raw() nodes.
    • The fuzz target checks where each child role may appear (tap leaves only under tr, script only under sh/wsh, the Taproot internal key only on tr, the output key only on rawtr).
  • rpc: add verbose option to getdescriptorinfo
    • The multipath note moved to the verbose argument help; the policy help explains both forms.
    • Tests for an origin without a path and for MuSig participant origins.

Open question: script/descriptor_analysis.h describes and gives no verdict, while script/descriptor_analyzer.h gives the verdict; the names are easy to mix up. Rename the first to script/descriptor_inspection.h?

Design choices

  • An unrecognized descriptor claims no setup: no threshold, cosigners, sorting or key path. For example wsh(sortedmulti(2,A,A,C)) is not a 2-of-3, since A alone can spend. Each issue lists the key IDs involved instead.
  • The same xpub with different paths in two cosigner slots is a repeated_key (so is the same public key with another chain code, ignoring parity), as is an xpub and its own unhardened child xpub (checked by deriving it, whatever the child's chain code or parity), and so are slots linked through a chain of these. BIP 388 allows the same key with disjoint paths in general policies, but in a k-of-n it lets one holder fill two slots.
  • A Taproot key path is either nums or musig. Any other internal key, or a musig() of fewer than k distinct cosigners or with an outsider, is key_path_spendable: it lets someone spend without k cosigners. A musig() participant with a hardened derivation step (the other cosigners couldn't derive the key) is reported as hardened_derivation on that participant, and a repeated participant (same root key, or same derived key) as repeated_key.
  • A cosigner, musig() participant or Taproot internal key that can't derive addresses at all (e.g. an xpub claiming the maximum BIP32 depth, or a musig() followed by more than 255 derivation steps) is not_derivable.
  • A cosigner that is the NUMS point, as a key or as an xpub, is unspendable_key: no one can sign for it, so a 2-of-2 with it could never be spent.
  • For a multipath descriptor every path is analyzed and must be the same setup (branches_differ otherwise), and the issues of every path are returned. keys and policy describe the first path, and first_addresses lists index 0 of every path, so participants comparing them also catch a different change path. This is a quick check only: descriptors with the same first addresses and analysis can still differ later (e.g. multi() and sortedmulti() of the same keys), so to confirm a shared setup, participants compare the descriptors themselves. For combo(), that is its first address in deriveaddresses (P2PKH).
  • hasprivatekeys (as in getdescriptorinfo) tells whether the descriptor contains private keys: whoever holds it can sign for those keys, so a descriptor received from a coordinator shouldn't have any. It isn't an issue, since importing one's own xprv this way is normal, so recognized doesn't look at private keys. Those keys never make a key mine.
  • can_sign means the wallet holds the private key for at least one key of the descriptor, whatever its shape. Whether it is a recognized k-of-n is a separate answer, analysis.recognized.

The functional test scenarios of #36325 were adapted here. The analysis differs from that wizard in a few places:

  • wsh(multi(...)) is recognized, with sorted: false: it is a valid k-of-n, and requiring sortedmulti was the wizard's own policy.
  • A musig() key path of at least k distinct cosigners is recognized: those cosigners can already spend through the leaf.
  • A single-path descriptor (/0/*) is recognized; multipath_expansion already shows whether it is multipath.

Known limits

  • A child xpub is found through its parent fingerprint and child number, which whoever writes the descriptor controls. One that is hardened, more than one level down, or whose metadata was changed can't be linked to its parent without the private key, so it is not reported as a repeated_key. Likewise, only the NUMS point itself is an unspendable_key: any other key no one can sign for (e.g. a child of it) looks like a normal key. No check can show that different keys belong to different people: each cosigner should confirm with analyzedescriptor that their own key is mine.
  • An extended key is mine only if a descriptor holding it also holds its private key, as in gethdkeys. If the wallet holds the private key alone in another descriptor (e.g. imported as a WIF in pk()), the key is watch_only and can_sign is false. That matches what the wallet can do: each descriptor signs with its own keys, and none has both the private key and the chain code.
  • A plain public key without an origin is only found if the wallet has already derived it (used addresses and the keypool lookahead), the same range getaddressinfo knows about.
  • No warning is given when the wallet alone holds enough keys to meet the threshold (e.g. two accounts of one wallet as two cosigners). The per-key wallet field shows it: count the keys marked mine.
  • can_sign doesn't count keys held on an external signer, since the wallet doesn't hold their private keys: a hardware-wallet user's own cosigner key shows as watch_only or not_mine. The wallet can't tell which keys the device holds.
  • Cosigners whose origins share a master fingerprint likely come from the same seed, but this isn't reported: the fingerprint is unverified (it can be left out or edited), and one person may hold two keys on purpose. keys shows each origin.

A release note is included (doc/release-notes-36885.md).

Part of the multisig setup work tracked in #35645. Based on #35918 (the first 3 commits). Before importing a multisig descriptor received from a coordinator, each participant needs to check that it is the setup they agreed on: a k-of-n where any k cosigners can spend and nothing else can, that their own key is in it, and that they all derived the same first addresses (receive and change). Today nothing in Core reports what a descriptor commits to, so tools had to parse the descriptor string by hand, as the multisig wizard in #36325 (now closed) did. This PR adds that check in three layers: 1. **Inspection** (commits by w0xlt, with small changes listed below): `GetKeyInfo()`, `GetKeyInventory()` and `GetPolicy()` describe a parsed descriptor's key expressions, where each key is used, and how they combine. `getdescriptorinfo` gains a `verbose` option that returns them as `keys` and `policy`. 2. **Multisig analysis, no wallet:** `AnalyzeDescriptor()` tells whether a descriptor is a recognized k-of-n setup, and if not, why. `getdescriptorinfo verbose` returns it as `analysis`, so it works even with `-disablewallet`. 3. **Wallet part:** `interfaces::Wallet::analyzeDescriptor` (for the GUI) and the `analyzedescriptor` wallet RPC add which keys the wallet holds, whether it can sign, and the first address of each path (receive and change). They accept any descriptor, single-sig included; `analysis.recognized` tells whether it is a recognized k-of-n. Recognized setups are `wsh(multi)`/`wsh(sortedmulti)`, and `tr(K,multi_a)`/`tr(K,sortedmulti_a)` with a single leaf, where `K` is the BIP 341 NUMS point or a `musig()` of at least k distinct cosigners. Every cosigner must be an extended key other than the NUMS point, with an unhardened ranged derivation that can derive addresses, no `musig()` participant may need a hardened derivation step, and no two cosigners or participants may be found to be the same key. Anything else is still analyzed and returned, with `recognized: false` and the list of issues: the analysis warns, it never refuses a descriptor. Example, run by one of the three cosigners: ``` $ bitcoin-cli -rpcwallet=alice analyzedescriptor "wsh(sortedmulti(2,[a1b2c3d4/48h/1h/0h/2h]tpub.../<0;1>/*,...))" { "keys": [ { "role": "ecdsa", "type": "bip32", "xpub": "tpub...", "derivation": "/0/*", "origin": { "master_fingerprint": "a1b2c3d4", "path": "m/48h/1h/0h/2h" }, "wallet": "mine" }, { ..., "wallet": "not_mine" }, { ..., "wallet": "not_mine" } ], "analysis": { "recognized": true, "shape": "wsh_multi", "sorted": true, "threshold": 2, "cosigners": [0, 1, 2], "issues": [] }, "can_sign": true, "first_addresses": ["bcrt1q...", "bcrt1q..."], "hasprivatekeys": false } ``` A **locked wallet** is not an error: a cosigner key with a hardened origin path can't be checked without the private key, so it is reported as `"unknown"`, and `can_sign` is left out unless another key is already known to be the wallet's. This holds even when the wallet also has that key without its private key (e.g. an imported watch-only copy of its own xpub). `"unknown"` only appears when the wallet is locked, so the caller can always ask the user to unlock and retry. Everything else (`analysis`, `first_addresses`) is still returned. Only the candidate private key is decrypted, and none when the key is one of the wallet's HD keys itself. A plain public key, as `getaddressinfo` or `createmultisig` use, is matched the same way through its origin: the one in the descriptor, or the one the wallet recorded when it derived the key (read with the new `DescriptorScriptPubKeyMan::GetPubKeyOrigin()`, which needs no private key). A plain public key the wallet has but can't sign for (from an imported watch-only descriptor, or another cosigner's key in a multisig it imported) is `watch_only`. Keys the wallet holds only as `musig()` participants are matched too, although `gethdkeys` doesn't list them. An origin doesn't have to start at a key the wallet holds: if the wallet imported only an account xprv with its master's origin (e.g. `[fp/48h/1h/0h/2h]tprv...`), a key whose origin starts with that one is matched by deriving the rest of the path from the account key. #### Commits | | Commit | Author | |---|---|---| | 1‑3 | #35918 | pseudoramdom | | 4‑7 | key/policy inspection, `getdescriptorinfo verbose` | w0xlt (see changes below) | | 8 | `script: add AnalyzeDescriptor() for multisig setups` | co-authored with w0xlt | | 9 | `rpc: move descriptor key JSON helpers to a shared file` | move-only | | 10 | `rpc: add multisig analysis to getdescriptorinfo verbose` | | | 11 | `wallet: add analyzeDescriptor to the wallet interface` | co-authored with w0xlt | | 12 | `wallet, rpc: add analyzedescriptor` | co-authored with w0xlt | | 13 | `doc: add release note for #36885` | | #### Changes made to the inspection commits (4-7) The inspection commits come from w0xlt's descriptor inspection [branch](https://github.com/bitcoin/bitcoin/compare/master...w0xlt:bitcoin:feature/descriptor-key-inspection-simplified). These changes were made on top, for w0xlt to review and agree with or not (this section will be removed once agreed): - *script: expose key expression structure* (was "expose structured key program data") - Use `m_root_extkey` instead of `*GetRootExtPubKey()`. - The derivation test also covers `/0h/*` and `/1/*h`, checking the last-hardened and derived caches. - `wide += ')'` instead of `")"` in the participant test (clang-tidy `performance-prefer-single-char-overloads`). - *script: identify descriptor key occurrences* - `KeyRole()` is pure virtual; descriptors without key arguments (`addr`, `raw`, `sh`, `wsh`) say so explicitly with `NONFATAL_UNREACHABLE()`. - Comment noting that `frame` is invalidated by the following `push_back`. - The walletload test mock is reduced to `return {}`. - *script: expose descriptor policy nodes* - The header documents the two forms of the same construct (descriptor function vs Miniscript fragment). - `Assert` → `CHECK_NONFATAL`; explicit `static_cast<uint32_t>` for the threshold; `/*value=*/0` named on the `addr()`/`raw()` nodes. - The fuzz target checks where each child role may appear (tap leaves only under `tr`, `script` only under `sh`/`wsh`, the Taproot internal key only on `tr`, the output key only on `rawtr`). - *rpc: add verbose option to getdescriptorinfo* - The multipath note moved to the `verbose` argument help; the `policy` help explains both forms. - Tests for an origin without a path and for MuSig participant origins. Open question: `script/descriptor_analysis.h` describes and gives no verdict, while `script/descriptor_analyzer.h` gives the verdict; the names are easy to mix up. Rename the first to `script/descriptor_inspection.h`? #### Design choices - An unrecognized descriptor claims no setup: no threshold, cosigners, sorting or key path. For example `wsh(sortedmulti(2,A,A,C))` is not a 2-of-3, since A alone can spend. Each issue lists the key IDs involved instead. - The same xpub with different paths in two cosigner slots is a `repeated_key` (so is the same public key with another chain code, ignoring parity), as is an xpub and its own unhardened child xpub (checked by deriving it, whatever the child's chain code or parity), and so are slots linked through a chain of these. BIP 388 allows the same key with disjoint paths in general policies, but in a k-of-n it lets one holder fill two slots. - A Taproot key path is either `nums` or `musig`. Any other internal key, or a `musig()` of fewer than k distinct cosigners or with an outsider, is `key_path_spendable`: it lets someone spend without k cosigners. A `musig()` participant with a hardened derivation step (the other cosigners couldn't derive the key) is reported as `hardened_derivation` on that participant, and a repeated participant (same root key, or same derived key) as `repeated_key`. - A cosigner, `musig()` participant or Taproot internal key that can't derive addresses at all (e.g. an xpub claiming the maximum BIP32 depth, or a `musig()` followed by more than 255 derivation steps) is `not_derivable`. - A cosigner that is the NUMS point, as a key or as an xpub, is `unspendable_key`: no one can sign for it, so a 2-of-2 with it could never be spent. - For a multipath descriptor every path is analyzed and must be the same setup (`branches_differ` otherwise), and the issues of every path are returned. `keys` and `policy` describe the first path, and `first_addresses` lists index 0 of every path, so participants comparing them also catch a different change path. This is a quick check only: descriptors with the same first addresses and analysis can still differ later (e.g. `multi()` and `sortedmulti()` of the same keys), so to confirm a shared setup, participants compare the descriptors themselves. For `combo()`, that is its first address in `deriveaddresses` (P2PKH). - `hasprivatekeys` (as in `getdescriptorinfo`) tells whether the descriptor contains private keys: whoever holds it can sign for those keys, so a descriptor received from a coordinator shouldn't have any. It isn't an issue, since importing one's own xprv this way is normal, so `recognized` doesn't look at private keys. Those keys never make a key `mine`. - `can_sign` means the wallet holds the private key for at least one key of the descriptor, whatever its shape. Whether it is a recognized k-of-n is a separate answer, `analysis.recognized`. The functional test scenarios of #36325 were adapted here. The analysis differs from that wizard in a few places: - `wsh(multi(...))` is recognized, with `sorted: false`: it is a valid k-of-n, and requiring `sortedmulti` was the wizard's own policy. - A `musig()` key path of at least k distinct cosigners is recognized: those cosigners can already spend through the leaf. - A single-path descriptor (`/0/*`) is recognized; `multipath_expansion` already shows whether it is multipath. #### Known limits - A child xpub is found through its parent fingerprint and child number, which whoever writes the descriptor controls. One that is hardened, more than one level down, or whose metadata was changed can't be linked to its parent without the private key, so it is not reported as a `repeated_key`. Likewise, only the NUMS point itself is an `unspendable_key`: any other key no one can sign for (e.g. a child of it) looks like a normal key. No check can show that different keys belong to different people: each cosigner should confirm with `analyzedescriptor` that their own key is `mine`. - An extended key is `mine` only if a descriptor holding it also holds its private key, as in `gethdkeys`. If the wallet holds the private key alone in another descriptor (e.g. imported as a WIF in `pk()`), the key is `watch_only` and `can_sign` is false. That matches what the wallet can do: each descriptor signs with its own keys, and none has both the private key and the chain code. - A plain public key without an origin is only found if the wallet has already derived it (used addresses and the keypool lookahead), the same range `getaddressinfo` knows about. - No warning is given when the wallet alone holds enough keys to meet the threshold (e.g. two accounts of one wallet as two cosigners). The per-key `wallet` field shows it: count the keys marked `mine`. - `can_sign` doesn't count keys held on an external signer, since the wallet doesn't hold their private keys: a hardware-wallet user's own cosigner key shows as `watch_only` or `not_mine`. The wallet can't tell which keys the device holds. - Cosigners whose origins share a master fingerprint likely come from the same seed, but this isn't reported: the fingerprint is unverified (it can be left out or edited), and one person may hold two keys on purpose. `keys` shows each origin. A release note is included (`doc/release-notes-36885.md`).
DrahtBot commented 2026-11-16 05:48:22 +00:00 (Migrated from github.com)

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

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
Approach ACK w0xlt

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36710 (test: Replace hardcoded extended keys with ExtendedKey helpers by nebula-21)
  • #36648 (descriptor, rpc, wallet: do not echo key material in error messages by fametrano)
  • #36167 (build: Enable -Wunused by fanquake)
  • #36154 (wallet: fill PSBT_GLOBAL_XPUB by jeanpablojp)
  • #36122 (BIP460: CISA for Taproot key path spends by fjahr)
  • #36070 (wallet: Add deriveHDKey interface by PraneethGunas)
  • #36005 (rpc, descriptor: warn when multipath expansion clones single-path key expressions by pythcoiner)
  • #35918 (descriptor: Expose key expression parsing by pseudoramdom)
  • #35444 (wallet: make descriptor SPKM mutex non-recursive by w0xlt)
  • #35377 (wallet: Allow importing of descriptors without private keys when the wallet has the private keys by achow101)
  • #35302 (Silent Payments: Sending (take 2) by Eunovo)
  • #34520 (refactor: Add nodiscard to functions returning bool+mutable ref by maflcko)

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.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36885 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36885.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36885#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | Approach ACK | [w0xlt](https://github.com/bitcoin/bitcoin/pull/36885#issuecomment-6958264055) | 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: * [#36710](https://github.com/bitcoin/bitcoin/pull/36710) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36710.svg"></sub> (test: Replace hardcoded extended keys with ExtendedKey helpers by nebula-21) * [#36648](https://github.com/bitcoin/bitcoin/pull/36648) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36648.svg"></sub> (descriptor, rpc, wallet: do not echo key material in error messages by fametrano) * [#36167](https://github.com/bitcoin/bitcoin/pull/36167) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36167.svg"></sub> (build: Enable `-Wunused` by fanquake) * [#36154](https://github.com/bitcoin/bitcoin/pull/36154) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36154.svg"></sub> (wallet: fill PSBT_GLOBAL_XPUB by jeanpablojp) * [#36122](https://github.com/bitcoin/bitcoin/pull/36122) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36122.svg"></sub> (BIP460: CISA for Taproot key path spends by fjahr) * [#36070](https://github.com/bitcoin/bitcoin/pull/36070) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36070.svg"></sub> (wallet: Add deriveHDKey interface by PraneethGunas) * [#36005](https://github.com/bitcoin/bitcoin/pull/36005) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36005.svg"></sub> (rpc, descriptor: warn when multipath expansion clones single-path key expressions by pythcoiner) * [#35918](https://github.com/bitcoin/bitcoin/pull/35918) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35918.svg"></sub> (descriptor: Expose key expression parsing by pseudoramdom) * [#35444](https://github.com/bitcoin/bitcoin/pull/35444) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35444.svg"></sub> (wallet: make descriptor SPKM mutex non-recursive by w0xlt) * [#35377](https://github.com/bitcoin/bitcoin/pull/35377) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35377.svg"></sub> (wallet: Allow importing of descriptors without private keys when the wallet has the private keys by achow101) * [#35302](https://github.com/bitcoin/bitcoin/pull/35302) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35302.svg"></sub> (Silent Payments: Sending (take 2) by Eunovo) * [#34520](https://github.com/bitcoin/bitcoin/pull/34520) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34520.svg"></sub> (refactor: Add [[nodiscard]] to functions returning bool+mutable ref by maflcko) 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-->
First-time contributor

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive linked from the Review report for their assessments.

🟠 Minor · Wallet analysis does not flag hardened cosigner keys controlled by one seed

An unlocked wallet can recognize a nominal 2-of-3 containing two hardened account keys from its own seed, with only two mine entries revealing shared control; consumer reliance on the clean verdict is unconfirmed.

Location: src/wallet/descriptor_analyzer.cpp:207 (head).

🟠 Minor · analyzedescriptor leaves private descriptors in Qt console history

A private descriptor passed to analyzedescriptor remains unredacted in the Qt console's session scrollback and in-memory history, continuing an existing gap in descriptor RPCs.

Location: src/wallet/rpc/wallet.cpp:1129 (head).

🔵 Suggestion · Wallet analysis omits public descriptor strings for the recommended comparison

The interface recommends comparing complete descriptors but returns no public serialization, leaving a GUI using it to parse the input again; RPC callers can work around this with getdescriptorinfo.

Location: src/wallet/rpc/wallet.cpp:1109 (head).

🔵 Suggestion · HD candidate discovery repeats the wallet-wide traversal

WalletHDKeys() visits the same descriptor managers through GetHDPubKeys(All) and then their inventories, although those inventories already contain every required BIP32 root.

Location: src/wallet/descriptor_analyzer.cpp:163 (head).

Review coverage was incomplete.


Reviewed: be7a2d1cfd97 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:806938d40e279b6d701b2e78128bb1a09b55193a0b697245a1dce6241d3081c1:3607c760b63c01fb7f1f349adfc3fd0614b148a7df02e42f2f0edc2d448925a1 --> <!-- ralph-base:dd96035e031edf56fcf66a09d443f257a346af1f --> <!-- ralph-head:be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93 --> <!-- ralph-case:9f94afe2e0c6fb4c2f7fdcf59f52a9b3fccf5510f186c799169b968840c5cc55 --> Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive linked from the Review report for their assessments. **🟠 Minor · Wallet analysis does not flag hardened cosigner keys controlled by one seed** An unlocked wallet can recognize a nominal 2-of-3 containing two hardened account keys from its own seed, with only two `mine` entries revealing shared control; consumer reliance on the clean verdict is unconfirmed. Location: [`src/wallet/descriptor_analyzer.cpp:207`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93/src/wallet/descriptor_analyzer.cpp#L207>) (head). **🟠 Minor · `analyzedescriptor` leaves private descriptors in Qt console history** A private descriptor passed to `analyzedescriptor` remains unredacted in the Qt console's session scrollback and in-memory history, continuing an existing gap in descriptor RPCs. Location: [`src/wallet/rpc/wallet.cpp:1129`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93/src/wallet/rpc/wallet.cpp#L1129>) (head). **🔵 Suggestion · Wallet analysis omits public descriptor strings for the recommended comparison** The interface recommends comparing complete descriptors but returns no public serialization, leaving a GUI using it to parse the input again; RPC callers can work around this with `getdescriptorinfo`. Location: [`src/wallet/rpc/wallet.cpp:1109`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93/src/wallet/rpc/wallet.cpp#L1109>) (head). **🔵 Suggestion · HD candidate discovery repeats the wallet-wide traversal** `WalletHDKeys()` visits the same descriptor managers through `GetHDPubKeys(All)` and then their inventories, although those inventories already contain every required BIP32 root. Location: [`src/wallet/descriptor_analyzer.cpp:163`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93/src/wallet/descriptor_analyzer.cpp#L163>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`be7a2d1cfd97`](<https://git.fish.foo/bitcoin/bitcoin/commit/be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93>) · [Review report](<https://review.fish.foo/report/36885-be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93-3234-14.html>) · [Previous reports](<https://review.fish.foo/traces/36885/>) [permalink](<https://review.fish.foo/report/36885-be7a2d1cfd97cf3ff5e7682a2ec79d6fc1907b93-3234-14.html>)
w0xlt commented 2026-11-17 19:15:40 +00:00 (Migrated from github.com)

Approach ACK

Approach ACK
DrahtBot commented 2026-11-18 15:50:56 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task iwyu: https://github.com/bitcoin/bitcoin/actions/runs/44330374279/job/134892869102
LLM reason (✨ experimental): CI failed because the IWYU lint check modified src/script/descriptor_analyzer.cpp, leaving a diff that caused git diff --exit-code to fail.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `iwyu`: https://github.com/bitcoin/bitcoin/actions/runs/44330374279/job/134892869102</sub> <sub>LLM reason (✨ experimental): CI failed because the IWYU lint check modified `src/script/descriptor_analyzer.cpp`, leaving a diff that caused `git diff --exit-code` to fail.</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
DrahtBot commented 2026-11-25 22:56:41 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task Alpine (musl): https://github.com/bitcoin/bitcoin/actions/runs/45706057177/job/139528199943
LLM reason (✨ experimental): CI failed to build test_bitcoin: -Werror=range-loop-construct rejects binding const std::string& to temporary strings in descriptor_analyzer_tests.cpp:329.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `Alpine (musl)`: https://github.com/bitcoin/bitcoin/actions/runs/45706057177/job/139528199943</sub> <sub>LLM reason (✨ experimental): CI failed to build `test_bitcoin`: `-Werror=range-loop-construct` rejects binding `const std::string&` to temporary strings in `descriptor_analyzer_tests.cpp:329`.</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
pablomartin4btc commented 2026-11-30 01:12:57 +00:00 (Migrated from github.com)

-Updates:

  • dd636a5856 → be7a2d1cfd, rebased onto master 3e4c803da8 (it had the secp256k1 CMake 4.5 fix from #36890, which the "Windows native, fuzz" job needed). Commits 1–5 and 7 are unchanged; the commits after 8 were reordered (see below), and a release note was added as commit 13.
  • Addressed findings from several rounds of Ralph:
    • Analysis (getdescriptorinfo verbose and analyzedescriptor)

      • musig() participants: one that needs a hardened derivation step is reported as hardened_derivation, and a repeated one (same root key, or deriving the same key) as repeated_key, on the participant IDs.
      • repeated_key now also catches:
        • an xpub next to its own unhardened direct child xpub (checked by deriving it, whatever the child's chain code or parity);
        • the same public key in two xpubs, whatever their chain codes and ignoring parity;
        • slots linked through a chain of repeated keys.

      The help says which related keys can be detected, and that each cosigner should still confirm their own key is mine. A direct child xpub is found through its parent fingerprint and child number.

      • New issue not_derivable: a cosigner, musig() participant or Taproot internal key that can't derive addresses (e.g. an xpub claiming the maximum BIP32 depth, or a musig() followed by more than 255 derivation steps).
      • New issue unspendable_key: a cosigner that is the NUMS point, as a key or as an xpub (no one can sign for it).
      • For a multipath descriptor, the issues of every path are returned, not only the first path's.
      • Repeated keys are now grouped with lookups instead of comparing every pair. A musig() can have any number of participants, and a large one took time quadratic in their count (32,000 participants: 0.95s → 0.24s for getdescriptorinfo verbose; the plain call takes 0.17s). A child xpub is also derived only from the first of the xpubs sharing a root key, since any number of them can share a fingerprint with different chain codes (500 such parents and 499 children: 4.22s → 0.12s). I can add a benchmark if reviewers want one.
    • Wallet (analyzedescriptor / interfaces::Wallet::analyzeDescriptor)

      • first_address is now first_addresses: index 0 of every path (receive and change), so a descriptor with a different change path no longer looks identical. It uses private keys given in the descriptor. For combo() it is the P2PKH address, the first one deriveaddresses lists (before, it was left out, since the first script is P2PK). The help says they are a quick check only: descriptors with the same first addresses and analysis can still differ later (e.g. multi() and sortedmulti() of the same keys), so to confirm a shared setup, compare the descriptors themselves.
      • New hasprivatekeys (as in getdescriptorinfo): a received descriptor with a cosigner's xprv lets anyone holding it sign for that key. It isn't reported as an issue, since importing one's own xprv this way is normal, and the recognized help says private keys aren't looked at. Those keys never make a key mine (tested).
      • A plain public key the wallet derived (e.g. from getnewaddress/getaddressinfo) is matched through its origin: either the one in the descriptor or the one the wallet recorded (new DescriptorScriptPubKeyMan::GetPubKeyOrigin(), no private key needed). If the wallet has it without its private key, it is watch_only.
      • Keys the wallet holds only as musig() participants are matched.
      • A key below an account xprv the wallet imported with its master's origin is matched by deriving the rest of its origin path from the account key. Before, the wallet's own receive keys were watch_only in that case, and xpubs below the account were not_mine. This was listed as a known limit, which is now removed.
      • Taproot constant keys match with either parity (02/03/x-only).
      • A key that is one of the wallet's HD keys is matched first, so no private key is decrypted for it. Before, a master holding the same account could be decrypted to derive it.
      • "unknown" only appears when the wallet is locked, and a locked wallet keeps it even when it also has the key without its private key. An HD key without its private key gives not_mine and can_sign: false.
      • The can_sign help and CanSign() doc say "recognized k-of-n" instead of "safe k-of-n". They also say that keys held on an external signer don't count, since the wallet doesn't hold their private keys (added to the known limits).
      • Clarified the key_path_spendable help. The analyzedescriptor help says, like getdescriptorinfo, that keys describes the first path and that the format is experimental.
    • Not changed (added to the known limits)

      • No warning when the wallet alone meets the threshold; the per-key wallet field shows it. There is also no warning for cosigners sharing an origin fingerprint: the fingerprint is unverified, and sharing one can be intended.
      • An xpub whose private key the wallet holds only in another descriptor (e.g. a WIF imported alone in pk()) is watch_only with can_sign: false. This is the same rule as has_private in gethdkeys, and it is what the wallet can actually do, since each descriptor signs with its own keys. A functional test checks it with walletprocesspsbt.
      • The arguments of analyzedescriptor stay in the Qt console history, as they do for getdescriptorinfo and deriveaddresses, it should go into historyFilter as they can contain BIP32 extended private keys (xprv) or WIF private keys. Thinking to add them here in a separate commit.
    • Also

      • Fixed a crash: an xpub next to its own hardened child xpub made the direct-child check call public derivation with a hardened index, which asserts. Hardened children are now skipped, since they can't be derived from the xpub. Unit and functional tests added.
      • The descriptor_parse fuzz targets now run the analysis and check its invariants (including that no issue is reported twice).
      • Reordered the commits so the key JSON helpers move to rpc/descriptor_util.cpp first (move-only, commit 9). The analysis helpers are then added there directly, instead of being added to rpc/output_script.cpp and moved later. The final code is the same.
      • Fixed CI failures on GCC and IWYU from an intermediate push.
      • After #36387, encryptwallet needs -deprecatedrpc, so the locked-wallet test now creates its wallet with a passphrase.
      • Used named arguments for integer literals, and assert_not_equal, where the LLM linter suggested them.
      • Covered the corecheck gaps with new tests: matching through an unhardened origin path on a locked wallet, a locked wallet with both a mine and an unknown key (can_sign true), and first_addresses left out when only a later path can't be derived. Other new tests: an xpub with a different depth, parent fingerprint and child number is still the wallet's key, but one with a different chain code isn't; a key repeated only on the change path is found; the unsorted multi_a case is recognized.
      • Added the release note (commit 13) and updated the PR description accordingly (general, design choices, known limits, example output).
-<ins>_**Updates**_</ins>: - dd636a5856 → be7a2d1cfd, rebased onto master 3e4c803da8 (it had the `secp256k1` CMake 4.5 fix from #36890, which the "Windows native, fuzz" job needed). Commits 1–5 and 7 are unchanged; the commits after 8 were reordered (see below), and a release note was added as commit 13. - Addressed findings from several rounds of [Ralph](https://git.fish.foo/bitcoin/bitcoin/pulls/36885): - **Analysis (`getdescriptorinfo verbose` and `analyzedescriptor`)** - `musig()` participants: one that needs a hardened derivation step is reported as `hardened_derivation`, and a repeated one (same root key, or deriving the same key) as `repeated_key`, on the participant IDs. - `repeated_key` now also catches: - an xpub next to its own unhardened direct child xpub (checked by deriving it, whatever the child's chain code or parity); - the same public key in two xpubs, whatever their chain codes and ignoring parity; - slots linked through a chain of repeated keys. The help says which related keys can be detected, and that each cosigner should still confirm their own key is `mine`. A direct child xpub is found through its parent fingerprint and child number. - New issue `not_derivable`: a cosigner, `musig()` participant or Taproot internal key that can't derive addresses (e.g. an xpub claiming the maximum BIP32 depth, or a `musig()` followed by more than 255 derivation steps). - New issue `unspendable_key`: a cosigner that is the NUMS point, as a key or as an xpub (no one can sign for it). - For a multipath descriptor, the issues of every path are returned, not only the first path's. - Repeated keys are now grouped with lookups instead of comparing every pair. A `musig()` can have any number of participants, and a large one took time quadratic in their count (32,000 participants: 0.95s → 0.24s for `getdescriptorinfo verbose`; the plain call takes 0.17s). A child xpub is also derived only from the first of the xpubs sharing a root key, since any number of them can share a fingerprint with different chain codes (500 such parents and 499 children: 4.22s → 0.12s). I can add a benchmark if reviewers want one. - **Wallet (`analyzedescriptor` / `interfaces::Wallet::analyzeDescriptor`)** - `first_address` is now `first_addresses`: index 0 of every path (receive and change), so a descriptor with a different change path no longer looks identical. It uses private keys given in the descriptor. For `combo()` it is the P2PKH address, the first one `deriveaddresses` lists (before, it was left out, since the first script is P2PK). The help says they are a quick check only: descriptors with the same first addresses and analysis can still differ later (e.g. `multi()` and `sortedmulti()` of the same keys), so to confirm a shared setup, compare the descriptors themselves. - New `hasprivatekeys` (as in `getdescriptorinfo`): a received descriptor with a cosigner's xprv lets anyone holding it sign for that key. It isn't reported as an issue, since importing one's own xprv this way is normal, and the `recognized` help says private keys aren't looked at. Those keys never make a key `mine` (tested). - A plain public key the wallet derived (e.g. from `getnewaddress`/`getaddressinfo`) is matched through its origin: either the one in the descriptor or the one the wallet recorded (new `DescriptorScriptPubKeyMan::GetPubKeyOrigin()`, no private key needed). If the wallet has it without its private key, it is `watch_only`. - Keys the wallet holds only as `musig()` participants are matched. - A key below an account xprv the wallet imported with its master's origin is matched by deriving the rest of its origin path from the account key. Before, the wallet's own receive keys were `watch_only` in that case, and xpubs below the account were `not_mine`. This was listed as a known limit, which is now removed. - Taproot constant keys match with either parity (`02`/`03`/x-only). - A key that is one of the wallet's HD keys is matched first, so no private key is decrypted for it. Before, a master holding the same account could be decrypted to derive it. - `"unknown"` only appears when the wallet is locked, and a locked wallet keeps it even when it also has the key without its private key. An HD key without its private key gives `not_mine` and `can_sign: false`. - The `can_sign` help and `CanSign()` doc say "recognized k-of-n" instead of "safe k-of-n". They also say that keys held on an external signer don't count, since the wallet doesn't hold their private keys (added to the known limits). - Clarified the `key_path_spendable` help. The `analyzedescriptor` help says, like `getdescriptorinfo`, that `keys` describes the first path and that the format is experimental. - **Not changed (added to the known limits)** - No warning when the wallet alone meets the threshold; the per-key `wallet` field shows it. There is also no warning for cosigners sharing an origin fingerprint: the fingerprint is unverified, and sharing one can be intended. - An xpub whose private key the wallet holds only in another descriptor (e.g. a WIF imported alone in `pk()`) is `watch_only` with `can_sign: false`. This is the same rule as `has_private` in `gethdkeys`, and it is what the wallet can actually do, since each descriptor signs with its own keys. A functional test checks it with `walletprocesspsbt`. - The arguments of `analyzedescriptor` stay in the Qt console history, as they do for `getdescriptorinfo` and `deriveaddresses`, it should go into `historyFilter` as they can contain BIP32 extended private keys (xprv) or WIF private keys. Thinking to add them here in a separate commit. - **Also** - Fixed a crash: an xpub next to its own hardened child xpub made the direct-child check call public derivation with a hardened index, which asserts. Hardened children are now skipped, since they can't be derived from the xpub. Unit and functional tests added. - The `descriptor_parse` fuzz targets now run the analysis and check its invariants (including that no issue is reported twice). - Reordered the commits so the key JSON helpers move to `rpc/descriptor_util.cpp` first (move-only, commit 9). The analysis helpers are then added there directly, instead of being added to `rpc/output_script.cpp` and moved later. The final code is the same. - Fixed CI failures on GCC and IWYU from an intermediate push. - After #36387, `encryptwallet` needs `-deprecatedrpc`, so the locked-wallet test now creates its wallet with a passphrase. - Used named arguments for integer literals, and `assert_not_equal`, where the LLM linter suggested them. - Covered the corecheck gaps with new tests: matching through an unhardened origin path on a locked wallet, a locked wallet with both a `mine` and an `unknown` key (`can_sign` true), and `first_addresses` left out when only a later path can't be derived. Other new tests: an xpub with a different depth, parent fingerprint and child number is still the wallet's key, but one with a different chain code isn't; a key repeated only on the change path is found; the unsorted `multi_a` case is recognized. - Added the release note (commit 13) and updated the PR description accordingly (general, design choices, known limits, example output).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36885
No description provided.