Review report

bitcoin/bitcoin: PR #36387

1 minor finding · 3 suggestions

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

Findings

Link

[minor] · Public-descriptor assertions inspect response keys instead of descriptors

Both new private=false absence checks examine only the response keys, so they cannot detect tprv in the encrypted wallet's exported descriptors.

Location: test/functional/wallet_listdescriptors.py:40 (head).

Details and suggested fix

listdescriptors() returns an object with wallet_name and descriptors keys. Iterating that object tests those two strings, so both assertions pass regardless of descriptor contents. They replace an exact public-only expected-output check for an encrypted wallet. Locked/unlocked equality still catches private descriptors returned only while unlocked, and a locked wallet cannot decrypt private keys, so the coverage loss is narrow. Check each descriptor string instead: assert all("tprv" not in d["desc"] for d in encrypted_locked_output["descriptors"]), and apply the same correction to the unlocked output.


Optional improvements

Link

[suggestion] · Deprecation wording leaves the GUI encryption scope unclear

The release note describes existing-wallet encryption as deprecated, but the unchanged Qt flow still performs it without the RPC opt-in or a deprecation notice.

Location: src/wallet/rpc/encrypt.cpp:238 (head).

Details and suggested fix

The Qt Encrypt Wallet action remains enabled for unencrypted wallets and reaches CWallet::EncryptWallet through AskPassphraseDialog, WalletModel and the wallet interface, bypassing this RPC-only check. For ordinary nonblank wallets, that operation still replaces active descriptors and makes pre-encryption backups insufficient for newly generated addresses. The dialog warns about passphrase loss and replacing backups, but does not say the operation is discouraged or deprecated. RPC-only deprecation may be intentional, but the release-note sub-bullet describes the operation generally. Limit that wording explicitly to the RPC and state whether the GUI flow is deferred or remains supported. Do not move this gate indiscriminately into CWallet::EncryptWallet, since supported encrypted-at-creation wallets also call it.


Link

[suggestion] · Wallet guide omits existing-wallet migration and backup guidance

The rewritten guide recommends a new encrypted wallet without explaining how to move existing funds, and removes the immediate-backup warning although in-place encryption remains available.

Location: doc/managing-wallets.md:36 (head).

Details and suggested fix

Creating an encrypted wallet does not move funds from an existing unencrypted wallet or change the keys controlling them. Add a short recipe to create the encrypted wallet with createwallet ... passphrase=, move funds to it, and back it up, noting transaction fees and the privacy cost of consolidating inputs. Also retain a sentence requiring an immediate new backup after in-place encryption through the opted-in RPC or GUI: ordinary nonblank wallets generate a fresh seed, so older backups cannot recover funds received at the new addresses. The RPC result and GUI completion dialog still give backup advice, which limits this to a gap in the guide.


Link

[suggestion] · Encryption guide retains a stale wallet-selector explanation

The remaining -rpcwallet example changes a passphrase, but its explanation still calls the target a wallet to be encrypted; the new introductory paragraph also contains a typo.

Location: doc/managing-wallets.md:48 (head).

Details and suggested fix

With the encryptwallet example removed, this sentence now explains only walletpassphrasechange, which operates on an already-encrypted wallet. Say that -rpcwallet selects the wallet whose passphrase is being changed. In the new paragraph on line 36, also change accompolished to accomplished and replace the comma before if encryption is desired with a sentence break.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.