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 +239 −270
  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. 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.
    c147969c61
  3. test: Enable default wallet for wallet_descriptor.py 4d9ae52836
  4. 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.
    a1a029e98d
  5. 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.
    4c2de93dce
  6. wallet: Wallets without private keys cannot grind R 6bbd0ef3d3
  7. wallet: Remove watchonly balances
    Descriptor wallets do not have mixed mine and watchonly, so there is no
    need to report a watchonly balance.
    0ad9e4a714
  8. 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:

    • #32607 (rpc: Note in fundrawtransaction doc, fee rate is for package by benthecarman)
    • #32594 (wallet, rpc: Return normalized descriptor in parent_descs by achow101)
    • #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.

  9. DrahtBot added the label Wallet on May 26, 2025
  10. achow101 force-pushed on May 26, 2025
  11. 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
    fc6ec9a844
  12. 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.
    ede0b93350
  13. 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.
    e7c536cec7
  14. doc: Release note for removed watchonly parameters and results 9e5f934d47
  15. achow101 force-pushed on May 27, 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-05-30 00:13 UTC

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