{
 "number": 36126,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36126",
 "title": "wallet, rpc: Implements set key label functionality",
 "author": "polespinasa",
 "author_association": "MEMBER",
 "created_at": "2026-08-31T09:23:32Z",
 "updated_at": "2026-09-16T11:48:18Z",
 "age_days": 17,
 "draft": true,
 "labels": [],
 "milestone": null,
 "base": "master",
 "head_sha": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
 "head_ref": "2026-08-28-setkeylabel",
 "head_repo": "polespinasa/bitcoin",
 "head_history": [
  {
   "t": "2026-08-31T09:34:28Z",
   "sha": "fb1f950b639b1b2547e3f466a83b0acc47ea8d49"
  },
  {
   "t": "2026-08-31T09:40:37Z",
   "sha": "bda5bcc140885dd008bc48f22bbeb1b5a7147829"
  },
  {
   "t": "2026-08-31T10:20:44Z",
   "sha": "8f7162c2f79168edc963755be8b35399b95fde26"
  },
  {
   "t": "2026-08-31T10:45:41Z",
   "sha": "5b3c147968535bb38b2d4b2cf947e2add4a15511"
  },
  {
   "t": "2026-08-31T12:18:53Z",
   "sha": "0009793fb9324545fc6febad7e7f9a664ec88100"
  },
  {
   "t": "2026-08-31T18:30:56Z",
   "sha": "415119f8ba78710022737f009f4f52e1d54a8a96"
  },
  {
   "t": "2026-08-31T18:31:13Z",
   "sha": "2f54fda0e77241b00ffe310e3784b95fc7bc0b50"
  },
  {
   "t": "2026-08-31T20:21:11Z",
   "sha": "cd6740fa15262c9d99b8eef19eaba0a4fbcfa574"
  },
  {
   "t": "2026-08-31T20:24:49Z",
   "sha": "ca3422f696b42edc515a0462407122f4728b4910"
  },
  {
   "t": "2026-08-31T20:25:57Z",
   "sha": "2c6734f9c43b41b8d47c4d4d6d53214f330b0996"
  },
  {
   "t": "2026-08-31T20:49:52Z",
   "sha": "84bb3d9a2e416573c487251eab412206cbd9d2e0"
  },
  {
   "t": "2026-08-31T20:52:36Z",
   "sha": "64e1fc6d9b806ecba3ad2efa5d933213e0078b86"
  },
  {
   "t": "2026-09-01T07:27:10Z",
   "sha": "3cca6a138fc2820bf2e250bfb0977b4479947ff9"
  },
  {
   "t": "2026-09-01T08:58:57Z",
   "sha": "8b47c46832341b85e505d27548c99474b385f392"
  },
  {
   "t": "2026-09-04T10:36:56Z",
   "sha": "5a65c79a3b7520d009fc431f20e172ed1abcc915"
  },
  {
   "t": "2026-09-04T11:11:15Z",
   "sha": "2f1a3d69b2662565c71e1fafde3df2c8717968c6"
  },
  {
   "t": "2026-09-14T19:42:20Z",
   "sha": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4"
  }
 ],
 "additions": 450,
 "deletions": 1,
 "changed_files": 11,
 "commit_count": 11,
 "size_bucket": "L",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_nack": [
     {
      "login": "achow101",
      "url": "https://github.com/bitcoin/bitcoin/pull/36126#issuecomment-5575897296"
     },
     {
      "login": "rkrux",
      "url": "https://github.com/bitcoin/bitcoin/pull/36126#issuecomment-5615886076"
     }
    ],
    "concept_ack": [
     {
      "login": "jeanpablojp",
      "url": "https://github.com/bitcoin/bitcoin/pull/36126#pullrequestreview-5068635849"
     },
     {
      "login": "Eunovo",
      "url": "https://github.com/bitcoin/bitcoin/pull/36126#pullrequestreview-5087710553"
     }
    ],
    "approach_ack": [
     {
      "login": "vicjuma",
      "url": "https://github.com/bitcoin/bitcoin/pull/36126#pullrequestreview-5079387670"
     }
    ]
   },
   "conflicts": [
    {
     "number": 35998,
     "title": "wallet: Handle or explicitly ignore `WalletBatch` write failures",
     "author": "achow101"
    },
    {
     "number": 33034,
     "title": "wallet: Store transactions in a separate sqlite table",
     "author": "achow101"
    },
    {
     "number": 32895,
     "title": "wallet: Prepare for future upgrades by recording versions of last client to open and decrypt",
     "author": "achow101"
    }
   ]
  }
 },
 "acks_parsed": {
  "jeanpablojp": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-08-31T16:10:09Z",
   "stale": false
  },
  "vicjuma": {
   "kind": "approach_ack",
   "hash": null,
   "t": "2026-09-01T14:41:31Z",
   "stale": false
  },
  "Eunovo": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2026-09-02T10:11:36Z",
   "stale": false
  },
  "achow101": {
   "kind": "nack",
   "hash": null,
   "t": "2026-09-07T21:43:14Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 2,
  "approach_ack": 1,
  "nack": 1,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "Eunovo",
   "achow101",
   "davidgumberg",
   "jeanpablojp",
   "maflcko",
   "rkrux",
   "vicjuma"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-09-14T19:42:20Z",
  "last_reviewer_activity": "2026-09-10T11:48:53Z",
  "last_reviewer": "rkrux",
  "author_silent_days": 2,
  "waiting_on_author_days": 0,
  "days_since_update": 1
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": [
   35998,
   33034,
   32895
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "doc/release-notes-36126.md",
  "src/wallet/interfaces.cpp",
  "src/wallet/rpc/addresses.cpp",
  "src/wallet/wallet.cpp",
  "src/wallet/wallet.h",
  "test/functional/wallet_keylabels.py"
 ],
 "body": "Part of https://github.com/bitcoin/bitcoin/issues/35645\n\nAdds a key label record to the wallet database so master keys can be identified by a label.\nAlso adds three new RPC calls, `setkeylabel`, `getkeylabel` and `listkeylabels` which allow to set, read and list all key labels for master keys.\nAlso adds four new interfaces so the GUI can consume those functionality too and list in, for example, a multisig setup labels associated to the keys. See https://gist.github.com/pseudoramdom/4e14d21a93323217cfe016885285b9aa for a visual example.",
 "commits": [
  {
   "sha": "d3fc5689a82d59f068dee8553f175bdba86241af",
   "date": "2026-09-14T19:30:51Z",
   "message": "walletdb: add keylabel record to wallet database\n\nIntroduce a new `keylabel` wallet database record that maps a master key\nfingerprint to an arbitrary label string. This is the persistence layer\nfor per-key labels, stored separately from the per-address name records.\n\nAdd WalletBatch::WriteKeyLabel/EraseKeyLabel, mirroring other Write/Erase functions.\nThe record is keyed by the fingerprint so that a single label covers every\naddress derived from the same root across all descriptor types."
  },
  {
   "sha": "5ebcbdffb47bbaa35af1986a222b6ede2fec84a1",
   "date": "2026-09-14T19:30:56Z",
   "message": "wallet, walletdb: add per-key label state and load keylabel records\n\nAdd CWallet::m_key_labels, a map from master key fingerprint to label that\nmirrors the new `keylabel` DB records. Per-key labels augment, do not\nreplace, the per-address labels in m_address_book and never affect the\nchange/receive heuristic in CAddressBookData::IsChange().\n\nAdds accesors for adding and removing key labels."
  },
  {
   "sha": "2dd739b5e8f50b1f7d22ced8bc80439129e8bf65",
   "date": "2026-09-14T19:30:56Z",
   "message": "rpc, wallet: add setkeylabel RPC\n\nAlso adds DecodeKeyFingerprnt helper function that will be used\nfor multiple RPC introduced in future commits."
  },
  {
   "sha": "626e04a860d2a84b7997ec34759fd2188a222636",
   "date": "2026-09-14T19:31:25Z",
   "message": "wallet: Add a setkeylabel() and delkeylabel() interface for the wallet"
  },
  {
   "sha": "eb8d30abcfc8304f01affba95a2ca16a77d2bf17",
   "date": "2026-09-14T19:31:36Z",
   "message": "rpc, wallet: add getkeylabel RPC"
  },
  {
   "sha": "4f65dfcba7c2de0e8004839ece146617b1ba13c9",
   "date": "2026-09-14T19:31:37Z",
   "message": "wallet Add getKeyLabel() interface for the wallet"
  },
  {
   "sha": "940338273415b54b4ec6ee713f8f80fc0c779c82",
   "date": "2026-09-14T19:31:37Z",
   "message": "rpc, wallet: add listkeylabels RPC"
  },
  {
   "sha": "c81113de43cd3049b571f22b6e2207dfb3cdfe69",
   "date": "2026-09-14T19:31:37Z",
   "message": "wallet: Add getKeyLabels() interface for the wallet"
  },
  {
   "sha": "1faf4a684c9f5bff1624fb4ef6bcbe87f32c0bef",
   "date": "2026-09-14T19:31:38Z",
   "message": "rpc, wallet: add key labels to getaddressinfo RPC"
  },
  {
   "sha": "8eec610db8838c1022b15f9fb3ae77f81f2364df",
   "date": "2026-09-14T19:31:38Z",
   "message": "test: add functional test for wallet key labels"
  },
  {
   "sha": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "date": "2026-09-14T19:31:38Z",
   "message": "rpc, wallet: gethdkeys report keys fingerprint and labels if any"
  }
 ],
 "timeline": [
  {
   "t": "2026-08-31T09:34:28Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "fb1f950b639b1b2547e3f466a83b0acc47ea8d49"
  },
  {
   "t": "2026-08-31T09:40:37Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "bda5bcc140885dd008bc48f22bbeb1b5a7147829"
  },
  {
   "t": "2026-08-31T10:20:44Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "8f7162c2f79168edc963755be8b35399b95fde26"
  },
  {
   "t": "2026-08-31T10:45:41Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "5b3c147968535bb38b2d4b2cf947e2add4a15511"
  },
  {
   "t": "2026-08-31T12:18:53Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100"
  },
  {
   "t": "2026-08-31T14:02:43Z",
   "kind": "review_comment",
   "who": "vicjuma",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "The labels will really help in identifying cosigners, especially. Just 2 questions regarding setting them (`setkeylabel`)\n\n1. Should it allow pre-labelling cosigners' fingerprints (not yet known to the wallet)? - currently it does does\n2. Are two different fingerprints allowed to have the same label? - currently it does"
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "text": "Concept ACK\n\nThe RPCs call `CWallet` directly, so the four new `interfaces::Wallet` methods end up with no caller and no test. The mining RPCs go through `interfaces::Mining`. Worth the same here?\n\nBuilt the ten commits and ran the new test."
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "With both cosigners labelled, `getaddressinfo` on a `wsh(sortedmulti(...))` address returns no key label. Neither does `tr(k,sortedmulti_a(...))` with `k` itself labelled, since `GetKeyForDestination` gives up once a merkle root exists. Plain `tr(k)` works. Is single-key the intended scope, or should this follow the descriptor's origins?"
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/wallet.cpp",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "in_reply_to": null,
   "text": "If single-key is the intended scope, `getaddressinfo` already has `meta->key_origin.fingerprint` in hand when it pushes `hdmasterfingerprint`, and reusing it there leaves this helper with no caller. I tried that and the functional tests touching `getaddressinfo` still pass."
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/interfaces.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "An empty label here writes a blank record, while `setkeylabel` with an empty string removes it. Since `delKeyLabel` already exists, shouldn't the two agree?"
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "in_reply_to": null,
   "text": "With `HW` set on the key, the key label lands at index 0 on a change address, and disappears on an address whose own label is also `HW`. Both cases return `[\"HW\"]` and nothing in the response tells them apart. That label doesn't show up in `listlabels` either, and `getaddressesbylabel` answers `-11 No addresses with label`. Wouldn't a `key_labels` object keyed by fingerprint be simpler, and cover the multisig case too?"
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "test/functional/wallet_keylabels.py",
   "commit": "2f54fda0e77241b00ffe310e3784b95fc7bc0b50",
   "in_reply_to": null,
   "text": "If the array shape stays, this branch has no assertion. I tried these lines, they pass on the head and fail if the suppression goes.\n\n```suggestion\n        assert_equal(wallet.getaddressinfo(addr)[\"labels\"], [\"receiving\", \"my hardware wallet\"])\n\n        # A key label equal to the address label is not repeated.\n        wallet.setlabel(addr, \"my hardware wallet\")\n        assert_equal(wallet.getaddressinfo(addr)[\"labels\"], [\"my hardware wallet\"])\n        wallet.setlabel(addr, \"receiving\")\n```"
  },
  {
   "t": "2026-08-31T16:10:09Z",
   "kind": "review_comment",
   "who": "jeanpablojp",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/wallet.cpp",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "in_reply_to": null,
   "text": "Could this avoid picking a label by set order? Two descriptors declaring different origins over the same scripts both import fine, and the winner flipped between runs that imported in the same order. The ambiguity predates the PR for `hdmasterfingerprint`, but that is a hex string and a label is a name someone chose."
  },
  {
   "t": "2026-08-31T17:49:21Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": 3895147086,
   "text": "Yes to both questions :)\nI don't see why any of those two would be a problem. But I am not closed to change that behavior  if we agree on it."
  },
  {
   "t": "2026-08-31T17:53:46Z",
   "kind": "comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nNo, for the wallet we decided in the past to not mix the RPC and the interfaces.\nSee previous discussions in https://github.com/bitcoin/bitcoin/pull/34861#issuecomment-4138965536 and https://github.com/bitcoin/bitcoin/pull/35436#issuecomment-4720891324 (+ responses below)."
  },
  {
   "t": "2026-08-31T18:17:42Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.cpp",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "in_reply_to": 3896226933,
   "text": "good catch, fixed :)"
  },
  {
   "t": "2026-08-31T18:23:37Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/interfaces.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": 3896226941,
   "text": "IMO the interface consumer is the one who should take care of disable empty labels, or make an empty label call `DelKeyLabel`.\nAt max it could return false if label is an empty string."
  },
  {
   "t": "2026-08-31T18:30:09Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "test/functional/wallet_keylabels.py",
   "commit": "2f54fda0e77241b00ffe310e3784b95fc7bc0b50",
   "in_reply_to": 3896226960,
   "text": "added thx!"
  },
  {
   "t": "2026-08-31T18:30:56Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "415119f8ba78710022737f009f4f52e1d54a8a96"
  },
  {
   "t": "2026-08-31T18:31:13Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "2f54fda0e77241b00ffe310e3784b95fc7bc0b50"
  },
  {
   "t": "2026-08-31T18:39:09Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.cpp",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "in_reply_to": 3896226980,
   "text": "resolving as that function does not exist anymore"
  },
  {
   "t": "2026-08-31T20:21:11Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "cd6740fa15262c9d99b8eef19eaba0a4fbcfa574"
  },
  {
   "t": "2026-08-31T20:24:49Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "ca3422f696b42edc515a0462407122f4728b4910"
  },
  {
   "t": "2026-08-31T20:25:57Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "2c6734f9c43b41b8d47c4d4d6d53214f330b0996"
  },
  {
   "t": "2026-08-31T20:27:22Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": 3896226924,
   "text": "Originally I answered saying single-key is the intended scope, but after thinking it deeply multi-sig makes sense too. Added a per-object key label to `getaddressinfo` so it takes into account multi-keys scripts."
  },
  {
   "t": "2026-08-31T20:27:31Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "0009793fb9324545fc6febad7e7f9a664ec88100",
   "in_reply_to": 3896226952,
   "text": "Fixed"
  },
  {
   "t": "2026-08-31T20:49:52Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "84bb3d9a2e416573c487251eab412206cbd9d2e0"
  },
  {
   "t": "2026-08-31T20:52:36Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "64e1fc6d9b806ecba3ad2efa5d933213e0078b86"
  },
  {
   "t": "2026-09-01T05:39:53Z",
   "kind": "review_comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "path": "doc/release-notes-36126.md",
   "commit": "64e1fc6d9b806ecba3ad2efa5d933213e0078b86",
   "in_reply_to": null,
   "text": "There are a bunch of typos (see the drahtbot LLM comment https://github.com/bitcoin/bitcoin/pull/36126#issuecomment-5476360983), which break `git grep` when searching or at least create confusion or follow-ups. So those should be fixed, I'd say."
  },
  {
   "t": "2026-09-01T07:27:10Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "3cca6a138fc2820bf2e250bfb0977b4479947ff9"
  },
  {
   "t": "2026-09-01T07:28:44Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "doc/release-notes-36126.md",
   "commit": "64e1fc6d9b806ecba3ad2efa5d933213e0078b86",
   "in_reply_to": 3901094289,
   "text": "Proof of humanity \ud83d\ude09\nHehe fixed thanks :)"
  },
  {
   "t": "2026-09-01T08:58:57Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "8b47c46832341b85e505d27548c99474b385f392"
  },
  {
   "t": "2026-09-01T14:37:13Z",
   "kind": "review_comment",
   "who": "vicjuma",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "Regarding multisigs and cosigners, the `getaddressinfo`  returns all the keys for multiple key addresses in the `key_labels` returned json field"
  },
  {
   "t": "2026-09-01T14:41:05Z",
   "kind": "review_comment",
   "who": "vicjuma",
   "assoc": "CONTRIBUTOR",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "Tested the added RPCs, functioning as expected."
  },
  {
   "t": "2026-09-01T14:41:31Z",
   "kind": "review",
   "who": "vicjuma",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "8b47c46832341b85e505d27548c99474b385f392",
   "text": "Approach ACK"
  },
  {
   "t": "2026-09-02T09:08:12Z",
   "kind": "review_comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.h",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "https://github.com/bitcoin/bitcoin/pull/36126/commits/5af8c85bd05d69c8ff61e1c3ed0d2e2a9d4a3072:\n\nI think `m_key_labels`  should not be public. The `CWallet` class is responsible for keeping it in sync with the DB; making it public leaves it open to modification."
  },
  {
   "t": "2026-09-02T09:08:32Z",
   "kind": "review_comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.h",
   "commit": "5a65c79a3b7520d009fc431f20e172ed1abcc915",
   "in_reply_to": null,
   "text": "https://github.com/bitcoin/bitcoin/pull/36126/commits/5af8c85bd05d69c8ff61e1c3ed0d2e2a9d4a3072:\n\nwhy not \"same master key\" instead of \"same root\"?"
  },
  {
   "t": "2026-09-02T10:01:59Z",
   "kind": "review_comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": null,
   "text": "https://github.com/bitcoin/bitcoin/pull/36126/commits/e2c160236b9bd4c76a0ff624d7303b889c78d312:\n\nThis RPC silently overwrites any existing label that the user might have set during a previous multisig setup."
  },
  {
   "t": "2026-09-02T10:11:36Z",
   "kind": "review",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "8b47c46832341b85e505d27548c99474b385f392",
   "text": "Concept ACK https://github.com/bitcoin/bitcoin/pull/36126/commits/8b47c46832341b85e505d27548c99474b385f392:\n\nLooks good; left some comments. I also think the new per-key label should be added to the output of `gethdkeys`."
  },
  {
   "t": "2026-09-04T10:36:56Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "5a65c79a3b7520d009fc431f20e172ed1abcc915"
  },
  {
   "t": "2026-09-04T10:37:36Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.h",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": 3912504823,
   "text": "done"
  },
  {
   "t": "2026-09-04T10:39:55Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/wallet.h",
   "commit": "5a65c79a3b7520d009fc431f20e172ed1abcc915",
   "in_reply_to": 3912507583,
   "text": "done"
  },
  {
   "t": "2026-09-04T10:47:31Z",
   "kind": "review_comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "path": "src/wallet/rpc/addresses.cpp",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
   "in_reply_to": 3912942577,
   "text": "Yes, and that is intentional. `setlabel` works the same way for addresses. I would say that this is a UX concern which should mostly matter for a GUI not an RPC interface."
  },
  {
   "t": "2026-09-04T11:11:15Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "2f1a3d69b2662565c71e1fafde3df2c8717968c6"
  },
  {
   "t": "2026-09-04T11:12:44Z",
   "kind": "comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "text": "Force pushed to address some nits and also re:\n\n[quoted text omitted]\nDone :)"
  },
  {
   "t": "2026-09-07T21:43:14Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "NACK\n\nUnless there was some discussion that I missed, this is not at all what we discussed for key labeling.\n\nThe key labeling that was discussed is for the GUI only to show friendly names for keys during the multisig setup. Once the setup is complete, the labels would not be shown again, and hence do not need to be stored in the wallet.\n\nAlso, DO NOT USE FINGERPRINTS, THEY ARE COLLIDABLE."
  },
  {
   "t": "2026-09-08T22:41:25Z",
   "kind": "comment",
   "who": "davidgumberg",
   "assoc": "MEMBER",
   "text": "Shouldn't the key labels be persisted so that at signing time the user can see what keys have and haven't signed? I don't see a good reason to not persist key labels when it seems useful for UX."
  },
  {
   "t": "2026-09-10T08:52:58Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "Concept ~0 (tending towards NACK)\n\nMaybe there's some benefit in showing labels in the GUI but I don't see much benefit in providing RPCs for setting or viewing key labels (both separately and within the context of address(es) RPCs). An organic use case would be the user creating a multi-sig wallet (2-2 or 2-3 or 3-5) and not be importing descriptors separately in that wallet later, so all the addresses of the wallet would involve the keys used to create the wallet.\n\nI think we should keep it very simple while implementing a guided multi-sig flow and not make the user go through many steps."
  },
  {
   "t": "2026-09-10T10:45:00Z",
   "kind": "comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nIf we are finally adding some type of key labels, then there should be a way of adding, removing and viewing them using the RPC interface. Because if not, then we are adding something invisible for anyone not using the GUI.\n\n[quoted text omitted]\nI agree in that, but I don't think this makes the user go through many steps. The RPC is not an interface thought or designed for a user itself but for other applications to consume, normally users should stick to the GUI (if a good one is provided). That is why this PR also adds an interface for the GUI to consume, the GUI should take care of make all this process-easy.\n\nI think the debate is more about the concept and if we actually want to store key labels, or not. Are they useful to identify multisig participants, see who is missing to sign, who already signed, etc (https://github.com/bitcoin/bitcoin/pull/36126#issuecomment-5592872052). Or if that is unnecessary information that the users can handle outside the wallet itself (https://github.com/bitcoin/bitcoin/pull/36126#issuecomment-5575897296)."
  },
  {
   "t": "2026-09-10T11:48:53Z",
   "kind": "comment",
   "who": "rkrux",
   "assoc": "MEMBER",
   "text": "A more immediate need is for the end-users to have a guided multi-sig flow in the GUI that's easy to follow. Otherwise there already are (though a bit convoluted) ways for the end-users to setup multi-sig in the wallet. Adding key labels _may be_ beneficial for the end-users using the GUI, I don't see why we need to prioritise for applications (RPCs) right now.\n\nAdding the key label _is_ an additional step in a workflow that the GUI doesn't even have right now. That's why my preference to keep things straightforward and get a working multi-sig GUI flow first.\n\nIt is not mandatory to have multiple people participating in the multi-sig. It is not mandatory to have different signing devices as well in the multi-sig. An end user can just want to have multiple keys created by the core wallet to be participating in the multi-sig wallet and they might not want to have to label each key. And in this scenario, they might not care which keys have signed as long as there are enough signatures.\n\nThere's a cost to maintaining features over time, and I would rather us not to have to bear the cost of something that might not be used as much. And hence, my reluctance to add this functionality at this stage."
  },
  {
   "t": "2026-09-10T12:13:52Z",
   "kind": "comment",
   "who": "polespinasa",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThis PR is not prioritizing RPCs, it is adding an interface for the GUI. At the same time it adds the RPC interface to also consume that functionality as I don't see the reason to have multiple PRs for it.\n\n[quoted text omitted]\nDidn't understand that from your first message, I agree, this is not a must to allow multisig with the GUI.\n\nAs said, we should first discuss about if this should be added in the first place as seems that there isn't a consensus regarding the https://github.com/bitcoin/bitcoin/issues/35645 proposal. I though there was and that's why I opened this PR. IMHO it is a useful feature (it's something I've had before in other wallets and appreciated having, see p.e. Sparrow Wallet) and worth the, in my opinion, not to much burden to maintain.\n\nBut at the same time, the PR is not in a rush to get merged, so, for me, it is ok to stay open for a while while prioritizing other multisig PRs.\n\nWill mark as draft for now until we decide if we want to include labels or not."
  },
  {
   "t": "2026-09-14T19:42:20Z",
   "kind": "force_push",
   "who": "polespinasa",
   "commit": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4"
  }
 ],
 "labels_log": [
  {
   "t": "2026-08-31T09:34:57Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-31T13:55:19Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-31T18:31:40Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-31T20:10:06Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-31T20:25:57Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-08-31T22:29:45Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-01T08:59:25Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-01T10:30:47Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-04T11:12:08Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-04T12:19:22Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-14T13:14:18Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-14T20:10:53Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2026-09-10T12:14:04Z",
   "kind": "convert_to_draft",
   "who": "polespinasa"
  }
 ],
 "text_chars": 11636,
 "text_tokens_estimate": 2909,
 "changed_paths": [
  "doc/release-notes-36126.md",
  "src/interfaces/wallet.h",
  "src/wallet/interfaces.cpp",
  "src/wallet/rpc/addresses.cpp",
  "src/wallet/rpc/wallet.cpp",
  "src/wallet/wallet.cpp",
  "src/wallet/wallet.h",
  "src/wallet/walletdb.cpp",
  "src/wallet/walletdb.h",
  "test/functional/test_runner.py",
  "test/functional/wallet_keylabels.py"
 ],
 "files": [
  {
   "path": "doc/release-notes-36126.md",
   "add": 12,
   "del": 0
  },
  {
   "path": "src/interfaces/wallet.h",
   "add": 11,
   "del": 0
  },
  {
   "path": "src/wallet/interfaces.cpp",
   "add": 16,
   "del": 0
  },
  {
   "path": "src/wallet/rpc/addresses.cpp",
   "add": 153,
   "del": 1
  },
  {
   "path": "src/wallet/rpc/wallet.cpp",
   "add": 13,
   "del": 0
  },
  {
   "path": "src/wallet/wallet.cpp",
   "add": 39,
   "del": 0
  },
  {
   "path": "src/wallet/wallet.h",
   "add": 20,
   "del": 0
  },
  {
   "path": "src/wallet/walletdb.cpp",
   "add": 26,
   "del": 0
  },
  {
   "path": "src/wallet/walletdb.h",
   "add": 4,
   "del": 0
  },
  {
   "path": "test/functional/test_runner.py",
   "add": 1,
   "del": 0
  },
  {
   "path": "test/functional/wallet_keylabels.py",
   "add": 155,
   "del": 0
  }
 ],
 "test_lines": 156,
 "git": {
  "head": "f9af8d7e2d7e427d4b657ade0bd9eb844c7f7de4",
  "head_matches_backup": true,
  "base": "cff00c547e7460fa1ec4aa1e38217793593d4263",
  "commits": [
   {
    "sha": "d3fc5689a8",
    "subject": "walletdb: add keylabel record to wallet database",
    "files": 2,
    "add": 15,
    "del": 0
   },
   {
    "sha": "5ebcbdffb4",
    "subject": "wallet, walletdb: add per-key label state and load keylabel records",
    "files": 3,
    "add": 74,
    "del": 0
   },
   {
    "sha": "2dd739b5e8",
    "subject": "rpc, wallet: add setkeylabel RPC",
    "files": 3,
    "add": 60,
    "del": 0
   },
   {
    "sha": "626e04a860",
    "subject": "wallet: Add a setkeylabel() and delkeylabel() interface for the wallet",
    "files": 2,
    "add": 14,
    "del": 0
   },
   {
    "sha": "eb8d30abcf",
    "subject": "rpc, wallet: add getkeylabel RPC",
    "files": 3,
    "add": 39,
    "del": 0
   },
   {
    "sha": "4f65dfcba7",
    "subject": "wallet Add getKeyLabel() interface for the wallet",
    "files": 2,
    "add": 7,
    "del": 0
   },
   {
    "sha": "9403382734",
    "subject": "rpc, wallet: add listkeylabels RPC",
    "files": 3,
    "add": 36,
    "del": 0
   },
   {
    "sha": "c81113de43",
    "subject": "wallet: Add getKeyLabels() interface for the wallet",
    "files": 3,
    "add": 7,
    "del": 1
   },
   {
    "sha": "1faf4a684c",
    "subject": "rpc, wallet: add key labels to getaddressinfo RPC",
    "files": 2,
    "add": 34,
    "del": 1
   },
   {
    "sha": "8eec610db8",
    "subject": "test: add functional test for wallet key labels",
    "files": 2,
    "add": 138,
    "del": 0
   },
   {
    "sha": "f9af8d7e2d",
    "subject": "rpc, wallet: gethdkeys report keys fingerprint and labels if any",
    "files": 3,
    "add": 27,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "7411572feeff3d4c",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}