wallet: Remove ISMINE_WATCHONLY and watchonly from RPCs #32618

pull achow101 wants to merge 10 commits into bitcoin:master from achow101:delete-ismine-watchonly changing 23 files +230 −269
  1. achow101 commented at 7:33 pm on May 26, 2025: member

    Descriptor wallets do not use the watchonly behavior as it is not possible to mix watchonly and non-watchonly in a descriptor wallet. With legacy wallets now removed, all of the watchonly handling and reporting code is no longer needed. This PR removes watchonly options and results from the RPCs and the handling of watchonly things from the wallet’s internals.

    With all of the watchonly things removed, ISMINE_WATCH_ONLY is removed as well.

    Split from #32523

    Depends on #32594 for tests that are easier to read

  2. DrahtBot commented at 7:33 pm on May 26, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32618.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #29062 (Wallet: (Refactor) GetBalance to calculate used balance by BrandonOdiwuor)
    • #27865 (wallet: Track no-longer-spendable TXOs separately by achow101)
    • #27286 (wallet: Keep track of the wallet’s own transaction outputs in memory by achow101)
    • #25269 (wallet: re-activate “AmountWithFeeExceedsBalance” error by furszy)

    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.

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • aspostrophe -> apostrophe [“aspostrophe” is a misspelling of “apostrophe”]

    drahtbot_id_4_m

  3. DrahtBot added the label Wallet on May 26, 2025
  4. achow101 force-pushed on May 26, 2025
  5. achow101 force-pushed on May 27, 2025
  6. DrahtBot added the label Needs rebase on Jun 4, 2025
  7. achow101 force-pushed on Jun 4, 2025
  8. achow101 force-pushed on Jun 4, 2025
  9. wallet, rpc: Push the normalized parent descriptor
    Instead of providing the descriptor string as stored in the db, use the
    normalized descriptor as is done for getaddressinfo's parent_desc field.
    23786370f1
  10. test: Enable default wallet for wallet_descriptor.py 2f8c4fe47e
  11. test: Verify parent_desc in RPCs
    getaddressinfo, listunspent, listtransactions, listsinceblock, and
    gettransaction all include parent_desc(s). Make sure that these are
    consistent with each other, as well as being in normalized form.
    2a6cb6e0b7
  12. test: Watchonly wallets should estimate larger size
    Test that when a watchonly wallet and the wallet with private keys fund
    the same tx, the watchonly wallet should use a higher fee since it
    should be estimating the size to be larger as it assumes the signer
    cannot grind the R value.
    5b5cdfbf12
  13. wallet: Wallets without private keys cannot grind R 895adf60e6
  14. wallet: Remove watchonly balances
    Descriptor wallets do not have mixed mine and watchonly, so there is no
    need to report a watchonly balance.
    b352e2f747
  15. wallet, rpc: Remove watchonly from RPCs
    Descriptor wallets don't have a conception of watchonly within a wallet,
    so remove all of these options and results from the RPCs
    a96bf0adc3
  16. wallet, spend: Remove fWatchOnly from CCoinControl
    Descriptor wallets do not have a concept of watchonly within a wallet,
    so remove the watchonly option from coin control.
    72ddc38ce1
  17. wallet: Remove ISMINE_WATCH_ONLY
    ISMINE_WATCH_ONLY has been removed from all places it was being used,
    and migration does not need ISMINE_WATCH_ONLY, so remove the enum.
    217674522f
  18. doc: Release note for removed watchonly parameters and results 69c6a2abc3
  19. DrahtBot removed the label Needs rebase on Jun 5, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-12 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me