{
 "number": 36005,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36005",
 "title": "rpc, descriptor: warn when multipath expansion clones single-path key expressions",
 "author": "pythcoiner",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-08-18T04:19:52Z",
 "updated_at": "2026-09-09T16:17:17Z",
 "age_days": 30,
 "draft": false,
 "labels": [
  "Needs rebase"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92",
 "head_ref": "multipath-clone-warning",
 "head_repo": "pythcoiner/bitcoin",
 "head_history": [
  {
   "t": "2026-08-18T04:20:50Z",
   "sha": "3628dccf1cca4cd7f79513a50e328f69a49daf76"
  },
  {
   "t": "2026-08-18T05:00:43Z",
   "sha": "cf98aaa510f0a03d9616a2b68fa735ff4c84892a"
  },
  {
   "t": "2026-08-18T05:02:15Z",
   "sha": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92"
  }
 ],
 "additions": 145,
 "deletions": 10,
 "changed_files": 8,
 "commit_count": 4,
 "size_bucket": "M",
 "mergeable_state": "dirty",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "ack": [
     {
      "login": "jeanpablojp",
      "url": "https://github.com/bitcoin/bitcoin/pull/36005#pullrequestreview-4984346283"
     }
    ]
   },
   "conflicts": [
    {
     "number": 36133,
     "title": "wallet: store multipath descriptor",
     "author": "Sjors"
    },
    {
     "number": 36116,
     "title": "iwyu: Fix warnings in `src/rpc` and treat them as errors",
     "author": "hebasto"
    },
    {
     "number": 31668,
     "title": "Added rescan option for import descriptors",
     "author": "saikiran57"
    }
   ]
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "jeanpablojp"
  ]
 },
 "signals": {
  "needs_rebase": true,
  "ci_failed": false,
  "mergeable_state": "dirty",
  "last_author_activity": "2026-08-18T05:02:15Z",
  "last_reviewer_activity": "2026-08-20T15:14:05Z",
  "last_reviewer": "jeanpablojp",
  "author_silent_days": 30,
  "waiting_on_author_days": 28,
  "days_since_update": 7
 },
 "refs": {
  "mentioned": [
   35985
  ],
  "depends_on": [],
  "fixes": [
   35985
  ],
  "linked_issues": [
   {
    "number": 35985,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "importdescriptors: multipath expansion silently reuses key material across branches"
   }
  ],
  "references": [
   {
    "number": 35985,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "importdescriptors: multipath expansion silently reuses key material across branches"
   }
  ],
  "conflicts": [
   36133,
   36116,
   31668
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/test/descriptor_tests.cpp"
 ],
 "body": "This PR:\n  - deduplicate warnings pushed with `PushWarnings` in RPC calls\n  - warn when single-path key expressions or tr() subscripts are cloned into every multipath expansion; surfaced by `importdescriptors` and by a new `warnings` field on `getdescriptorinfo` (which also exposes the existing miniscript `older()` warnings)\n\nCloning internal to musig() is not warned: both `musig(A,B)/<0;1>/*` and `musig(A/<1;2>,B)` derive a distinct aggregate key per branch, so nothing observable is reused.\n\ncloses #35985",
 "commits": [
  {
   "sha": "9363ed59f2800df83ccb81f0cf6318dacfeead70",
   "date": "2026-08-18T04:16:06Z",
   "message": "rpc: deduplicate warnings in PushWarnings"
  },
  {
   "sha": "29c8cfdfb462890a335cffa2d5d060e0cbee584a",
   "date": "2026-08-18T04:16:13Z",
   "message": "descriptor: warn when single-path key expressions are cloned into multipath branches"
  },
  {
   "sha": "0e6891b4241428259a0fcce9bcbd6bbc37d8c472",
   "date": "2026-08-18T05:01:52Z",
   "message": "rpc: return descriptor warnings from getdescriptorinfo"
  },
  {
   "sha": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92",
   "date": "2026-08-18T05:01:58Z",
   "message": "doc: add release notes for #36005"
  }
 ],
 "timeline": [
  {
   "t": "2026-08-18T04:20:50Z",
   "kind": "force_push",
   "who": "pythcoiner",
   "commit": "3628dccf1cca4cd7f79513a50e328f69a49daf76"
  },
  {
   "t": "2026-08-18T05:00:43Z",
   "kind": "force_push",
   "who": "pythcoiner",
   "commit": "cf98aaa510f0a03d9616a2b68fa735ff4c84892a"
  },
  {
   "t": "2026-08-18T05:02:15Z",
   "kind": "force_push",
   "who": "pythcoiner",
   "commit": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92"
  },
  {
   "t": "2026-08-20T15:14:04Z",
   "kind": "review",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92",
   "text": "tACK 13ef865f84fc5d0f7073e11a6b4167b2dcd45e92\n\nBuilt and ran the unit tests plus `rpc_getdescriptorinfo.py` and `wallet_importdescriptors.py`. I dropped each of the four `multipath_cloned = true` lines one at a time and each one fails on a different descriptor in the new unit test, and reverting only the `PushWarnings` dedup fails both functional tests."
  },
  {
   "t": "2026-08-20T15:14:05Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "src/test/descriptor_tests.cpp",
   "commit": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92",
   "in_reply_to": null,
   "text": "nit: this only allows one warning. I hit both with `wsh(and_v(v:pk(A/<0;1>/*),and_v(v:pk(B/0/*),older(65536))))`, which nothing covers at the moment. Worth adding one?"
  }
 ],
 "labels_log": [
  {
   "t": "2026-08-18T04:21:28Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-18T05:47:20Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-18T06:18:54Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-18T06:44:52Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-09T16:17:16Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-08-18T04:23:45Z",
   "kind": "ready_for_review",
   "who": "pythcoiner"
  }
 ],
 "text_chars": 1335,
 "text_tokens_estimate": 333,
 "changed_paths": [
  "doc/release-notes-36005.md",
  "src/rpc/output_script.cpp",
  "src/rpc/util.cpp",
  "src/rpc/util.h",
  "src/script/descriptor.cpp",
  "src/test/descriptor_tests.cpp",
  "test/functional/rpc_getdescriptorinfo.py",
  "test/functional/wallet_importdescriptors.py"
 ],
 "files": [
  {
   "path": "doc/release-notes-36005.md",
   "add": 15,
   "del": 0
  },
  {
   "path": "src/rpc/output_script.cpp",
   "add": 12,
   "del": 0
  },
  {
   "path": "src/rpc/util.cpp",
   "add": 9,
   "del": 3
  },
  {
   "path": "src/rpc/util.h",
   "add": 2,
   "del": 1
  },
  {
   "path": "src/script/descriptor.cpp",
   "add": 19,
   "del": 5
  },
  {
   "path": "src/test/descriptor_tests.cpp",
   "add": 54,
   "del": 0
  },
  {
   "path": "test/functional/rpc_getdescriptorinfo.py",
   "add": 12,
   "del": 1
  },
  {
   "path": "test/functional/wallet_importdescriptors.py",
   "add": 22,
   "del": 0
  }
 ],
 "test_lines": 89,
 "git": {
  "head": "13ef865f84fc5d0f7073e11a6b4167b2dcd45e92",
  "head_matches_backup": true,
  "base": "f72537037d3350e2974efd760eaa7b04f820880c",
  "commits": [
   {
    "sha": "9363ed59f2",
    "subject": "rpc: deduplicate warnings in PushWarnings",
    "files": 3,
    "add": 23,
    "del": 4
   },
   {
    "sha": "29c8cfdfb4",
    "subject": "descriptor: warn when single-path key expressions are cloned into multipath branches",
    "files": 3,
    "add": 83,
    "del": 5
   },
   {
    "sha": "0e6891b424",
    "subject": "rpc: return descriptor warnings from getdescriptorinfo",
    "files": 2,
    "add": 24,
    "del": 1
   },
   {
    "sha": "13ef865f84",
    "subject": "doc: add release notes for #36005",
    "files": 1,
    "add": 15,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "c1d8f2ee1c61fe5b",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}