rpc: deprecate iswatchonly field of getaddressinfo #36864

Manually merged
w0xlt merged 2 commits from rpc-getaddressinfo-deprecate-iswatchonly into master 2026-11-19 11:36:06 +00:00 AGit
w0xlt commented 2026-11-14 04:28:53 +00:00 (Migrated from github.com)

Since #32618, getaddressinfo returns iswatchonly: false for every address. It was kept and marked "(DEPRECATED)" so it could be removed later without surprising users (review comment), but it was never put behind -deprecatedrpc. The v30 release notes also say it was already removed from all RPCs, which isn't true for getaddressinfo.

This returns it only with -deprecatedrpc=iswatchonly, like startingheight in getpeerinfo (#34197), so it can be removed in the next release.

Since #32618, `getaddressinfo` returns `iswatchonly: false` for every address. It was kept and marked "(DEPRECATED)" so it could be removed later without surprising users ([review comment](https://github.com/bitcoin/bitcoin/pull/32618#discussion_r2180720302)), but it was never put behind `-deprecatedrpc`. The v30 release notes also say it was already removed from all RPCs, which isn't true for `getaddressinfo`. This returns it only with `-deprecatedrpc=iswatchonly`, like `startingheight` in `getpeerinfo` (#34197), so it can be removed in the next release.
DrahtBot commented 2026-11-14 04:29:02 +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
ACK jonatack, maflcko, seduless

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:

  • #36387 (wallet: rpc: Deprecate encryptwallet RPC for encrypting existing wallets. by davidgumberg)

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/36864 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36864.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36864#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 | | ---- | --------- | | ACK | [jonatack](https://github.com/bitcoin/bitcoin/pull/36864#pullrequestreview-5906307583), [maflcko](https://github.com/bitcoin/bitcoin/pull/36864#issuecomment-6909984780), [seduless](https://github.com/bitcoin/bitcoin/pull/36864#pullrequestreview-5925231533) | 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: * [#36387](https://github.com/bitcoin/bitcoin/pull/36387) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36387.svg"></sub> (wallet: rpc: Deprecate `encryptwallet` RPC for encrypting existing wallets. by davidgumberg) 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

No verified findings are available from this review.

Review coverage was incomplete.


Reviewed: 5b2f979c9e47 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:6a916fa059320c1e3f0a79c4f7490636461ad967153b8442c21450419af74010:24633968ff336fb935794e53e586f29b4eaaa2a15575a2c0392a2c8b9ace382c --> <!-- ralph-base:a527a0077a0fcae913188410214efe98021c0cca --> <!-- ralph-head:5b2f979c9e474a641b90902c3a87dee93c8f2899 --> <!-- ralph-case:0859b8a2e3fd9aca1bf88bd1bc64096a2b74c29a1598c86df7eca4bdeb490945 --> No verified findings are available from this review. Review coverage was incomplete. <!-- Review tier: standard --> --- Reviewed: [`5b2f979c9e47`](<https://git.fish.foo/bitcoin/bitcoin/commit/5b2f979c9e474a641b90902c3a87dee93c8f2899>) · [Review report](<https://review.fish.foo/report/36864-5b2f979c9e474a641b90902c3a87dee93c8f2899-2670-1.html>) · [Previous reports](<https://review.fish.foo/traces/36864/>) [permalink](<https://review.fish.foo/report/36864-5b2f979c9e474a641b90902c3a87dee93c8f2899-2670-1.html>)
fanquake commented 2026-11-14 09:23:39 +00:00 (Migrated from github.com)

cc @maflcko @willcl-ark

cc @maflcko @willcl-ark
jonatack (Migrated from github.com) reviewed 2026-11-14 18:22:58 +00:00
jonatack (Migrated from github.com) left a comment

ACK 5b2f979c9e

Feel free to ignore the nits.

ACK 5b2f979c9e474a641b90902c3a87dee93c8f2899 Feel free to ignore the nits.
jonatack (Migrated from github.com) commented 2026-11-14 18:21:48 +00:00

nit

- RPC `getaddressinfo` no longer returns the `iswatchonly` field, unless
nit ```suggestion - RPC `getaddressinfo` no longer returns the `iswatchonly` field, unless ```
jonatack (Migrated from github.com) commented 2026-11-14 18:22:40 +00:00

nit

  always returned `false` since https://github.com/bitcoin/bitcoin/pull/32618 in v30 and will be fully removed in the next major
nit ```suggestion always returned `false` since https://github.com/bitcoin/bitcoin/pull/32618 in v30 and will be fully removed in the next major ```
jonatack (Migrated from github.com) commented 2026-11-14 18:19:28 +00:00

Possibly helpful for users to add something like:

(Use the private_keys_enabled field of RPC getwalletinfo to know if a wallet is watch-only.)

Possibly helpful for users to add something like: (Use the `private_keys_enabled` field of RPC `getwalletinfo` to know if a wallet is watch-only.)
maflcko commented 2026-11-16 07:15:01 +00:00 (Migrated from github.com)

but it was never put behind -deprecatedrpc.

I presume this was intentional, because there was no rush to remove it and break parsers. (The others were already optional and removed "themselves")

lgtm ACK 5b2f979c9e

Seems fine to do now.

> but it was never put behind `-deprecatedrpc`. I presume this was intentional, because there was no rush to remove it and break parsers. (The others were already optional and removed "themselves") lgtm ACK 5b2f979c9e474a641b90902c3a87dee93c8f2899 Seems fine to do now.
seduless (Migrated from github.com) reviewed 2026-11-16 18:25:52 +00:00
seduless (Migrated from github.com) left a comment

Tested ACK 5b2f979c9e

Tested ACK 5b2f979c9e474a641b90902c3a87dee93c8f2899
seduless (Migrated from github.com) reviewed 2026-11-16 18:26:21 +00:00
seduless (Migrated from github.com) commented 2026-11-16 18:26:21 +00:00

If you do another push, leaving a comment (e.g. # deprecation dummy test similar to #36855) makes it clear this is removable with the flag.

If you do another push, leaving a comment (e.g. `# deprecation dummy test` similar to [`#36855`](https://github.com/bitcoin/bitcoin/pull/36855/files#diff-6063f8ddd08c253b3eb129d24f0d8f78611907ae7243b4fb6dfdcc38dc0ebc40R58)) makes it clear this is removable with the flag.
maflcko (Migrated from github.com) reviewed 2026-11-17 09:25:34 +00:00
maflcko (Migrated from github.com) commented 2026-11-17 09:25:34 +00:00

I think it should be pretty obvious already without the comment. Recall the docs for this field say: "Always returns false"

I think it should be pretty obvious already without the comment. Recall the docs for this field say: "Always returns false"
maflcko commented 2026-11-19 10:37:05 +00:00 (Migrated from github.com)

rfm, or does it need more review?

rfm, or does it need more review?
fanquake commented 2026-11-19 10:59:53 +00:00 (Migrated from github.com)

It conflicts with #36387, which I thought might get another review and then merged (the same conflict why I hadn't merged #36868), however I think at this point we can merge both and #36387 can be re-rebased.

It conflicts with #36387, which I thought might get another review and then merged (the same conflict why I hadn't merged #36868), however I think at this point we can merge both and #36387 can be re-rebased.
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!36864
No description provided.