#36126 wallet, rpc: Implements set key label functionality
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36126 wallet, rpc: Implements set key label functionality | Needs rebase | 0 -2 | Blocked | 294 + 156 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
This pull request introduces key labeling to the wallet database, mapping master key fingerprints to arbitrary label strings. It adds three new RPCs (setkeylabel, getkeylabel, listkeylabels), exposes key labels in getaddressinfo and gethdkeys, and adds corresponding methods to interfaces::Wallet.
Problem: In multisig setups or setups with multiple signing devices, users and GUIs cannot easily track which master key corresponds to which physical device or cosigner.
Reviewability
Ready · Needs rebase
Conflicts with master; review the logic now, the rebase is mechanical.
Agreement
Blocked
objection that needs a change, nobody has replied (achow101)
Thread notes: Initial record. achow101 and rkrux raised blocking concept objections against storing key labels in the wallet and exposing them via RPC, leading the author to convert the PR to draft; earlier technical feedback from jeanpablojp and Eunovo was resolved. / Initial record for PR 36126. Open blocking objections from achow101 (NACK on DB persistence and fingerprint collidability) and rkrux (maintenance overhead before guided GUI multisig) prompted the author to convert the PR to draft, despite Conce
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| jeanpablojp (contributor) | objection, scope | getaddressinfo did not return key labels for multisig script addresses | fixed · fix pushed · v1, not yet re-checked | answered | yes | 2026-08-31: 'With both cosigners labelled, getaddressinfo on a wsh(sortedmulti(...)) address returns no key label.' Status from: 2026-08-31: polespinasa: 'Added a per-object key label to getaddressinfo so it takes into account multi-keys scripts.' |
| Eunovo (member) | objection, safety | making m_key_labels public leaves it exposed to modification and out-of-sync states with the database | fixed · fix pushed · v1, not yet re-checked | answered | yes | 2026-09-02: 'The CWallet class is responsible for keeping it in sync with the DB; making it public leaves it open to modification.' Status from: 2026-09-04: polespinasa: 'done' |
| achow101 (member) | objection, approach | storing key labels in the wallet database is unnecessary because labels were intended only for temporary display during multisig GUI setup | open · v1, not yet re-checked | changed | no | 2026-09-07: 'The 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.' |
| rkrux (member) | objection, maintenance | incurs ongoing maintenance costs for RPCs that offer little benefit while complicating multisig setup workflows | answered · reply on record; standing not assessed yet · v1, not yet re-checked | changed | yes | 2026-09-10: '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).' |
Support:
- jeanpablojp (contributor) (Concept ACK, 2026-08-31): Built the ten commits and ran the new test.
- vicjuma (contributor) (Approach ACK, 2026-09-01): Approach ACK
- Eunovo (member) (Concept ACK, 2026-09-02): Looks good; left some comments. I also think the new per-key label should be added to the output of gethdkeys.
- davidgumberg (member) (2026-09-08): 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.
Participants:
- jeanpablojp (contributor, support, 7 statements 2026-08-31 to 2026-08-31): Concept ACK; raised issues regarding multisig key label support in getaddressinfo, which author resolved
- vicjuma (contributor, support, 4 statements 2026-08-31 to 2026-09-01): Approach ACK; tested RPCs and noted labels help identify cosigners
- maflcko (member, neutral, 1 statements 2026-09-01 to 2026-09-01): noted typos in release notes
- Eunovo (member, support, 4 statements 2026-09-02 to 2026-09-02): Concept ACK; suggested encapsulating m_key_labels inside CWallet, which author implemented
- achow101 (member, objection, 1 statements 2026-09-07 to 2026-09-07): NACK; argued key labels are GUI-only and should not be stored in the wallet DB, and warned against using collidable fingerprints
- davidgumberg (member, support, 1 statements 2026-09-08 to 2026-09-08): advocated for persisting key labels to improve signing UX
- rkrux (member, objection, 2 statements 2026-09-10 to 2026-09-10): Concept ~0 tending towards NACK; cited ongoing maintenance burden and unnecessary workflow complexity for RPC key labels
Dependencies
Enables:
- #35645 (multisig setup GUI tracking)
Files
156 lines under test/bench/ci.
- test/functional/wallet_keylabels.py +155/-0
- src/wallet/rpc/addresses.cpp +153/-1
- src/wallet/wallet.cpp +39/-0
- src/wallet/walletdb.cpp +26/-0
- src/wallet/wallet.h +20/-0
- src/wallet/interfaces.cpp +16/-0
- src/wallet/rpc/wallet.cpp +13/-0
- doc/release-notes-36126.md +12/-0
- src/interfaces/wallet.h +11/-0
- src/wallet/walletdb.h +4/-0
- test/functional/test_runner.py +1/-0
Card
The short text the ranking pass compares across PRs.
This PR adds a keylabel record to the wallet database and exposes RPCs (setkeylabel, getkeylabel, listkeylabels) to label master keys by their fingerprint. It aims to improve usability for multisig and hardware wallet setups by identifying cosigners across addresses. achow101 NACKed the PR over the decision to persist labels in the database and the collision risk of 4-byte key fingerprints. Review is paused as the author placed the PR in draft until design consensus is reached.
Data
thread read through 2026-09-10 (35 statements), head f9af8d7e2d
Discussion read under schema 1 rules: suggestions and questions may be missing, and an objection may combine several harms (schema history).
labels: Needs rebase · draft
Categories
Wallet
P3 · new feature (ranking pass: Moved down: convenience labelling whose persistence design is still contested.)
Key labeling provides a clear UX convenience for multi-signing setups by mapping master key fingerprints to cosigner or hardware device names. Tracking device identities is helpful for multisig workflows, but it is a deferrable feature enhancement.
Membership: Changes walletdb, wallet methods, and wallet RPCs to persist and query key labels.
Factors: security/stability 0, bug 0, performance 0, user value 1, leverage 1