Wallet migration includes rescan #32045

issue Sjors openend this issue on March 12, 2025
  1. Sjors commented at 6:14 pm on March 12, 2025: member

    Users may want to migrate legacy wallets they haven’t used in years. The migration itself is typically very quick, but it’s followed by a rescan (if the wallet is behind).

    Depending on whether the user has -blockfilterindex enabled, this rescan takes somewhere between long and really really long.

    There’s no visual indication, only the logs show what’s going on:

    Ideally the migration should finish and then prompt the user that a rescan is about to happen. That way the user can abort the rescan and resume it some other time if it takes too long.

    Alternatively, the migrate wallet dialog could at least warn that a rescan is (or may be) happening and could take a while.

    Fun aside: block filters don’t work on legacy wallets, so it’s much faster to first migrate and then rescan.

  2. fanquake added the label Wallet on Mar 13, 2025
  3. furszy commented at 6:55 pm on March 13, 2025: member

    Ideally the migration should finish and then prompt the user that a rescan is about to happen. That way the user can abort the rescan and resume it some other time if it takes too long.

    Sadly, we cannot do that right away. The rescan is being triggered by the loading procedure when the wallet is reloaded from disk after migration. We could add a “no scan during init” option (this should also be a new init flag).

    Alternatively, the migrate wallet dialog could at least warn that a rescan is (or may be) happening and could take a while.

    For this to happen, we would need to provide a callback function in the migration method so it can bubble up the progress. But it would only be able to say something like “Migration completed, loading wallet…” because, as mentioned above, rescanning occurs during the loading procedure (unless we also provide the callback to the loading procedure..)

  4. maflcko added the label GUI on Mar 16, 2025
  5. w0xlt commented at 10:43 pm on April 8, 2025: contributor
    I just took a quick look, but adding a boolean parameter to CWallet::Create() that prevents AttachChain() from being called during the migration doesn’t do the trick ?
  6. fanquake commented at 12:36 pm on February 18, 2026: member
    This seems to be a request for a GUI change / feature, so I’ve moved it to: https://github.com/bitcoin-core/gui/issues/930.
  7. fanquake closed this on Feb 18, 2026

  8. achow101 commented at 6:20 pm on February 18, 2026: member
    This is not a GUI issue.
  9. achow101 reopened this on Feb 18, 2026

  10. achow101 removed the label GUI on Feb 18, 2026
  11. fanquake commented at 6:24 pm on February 18, 2026: member
    It’s asking for a visual indication. In the gui?
  12. achow101 commented at 6:26 pm on February 18, 2026: member
    The underlying issue is in wallet migration which can be reached via CLI. The same old wallet migrated with migratewallet would do the rescan and take just as long, with no indication to the user.
  13. fanquake commented at 6:31 pm on February 18, 2026: member
    Sure, but I don’t see how solving that for CLI/the daemon solves it for the GUI (and it’s more than likely someone solving it for CLI, won’t touch GUI code)? Code will have to be added to the GUI, whenever the relevant code is added to the daemon, to expose the required information. Maybe the issue on the code side can be renamed / reworked to make it clear that it isn’t solving anything visual.
  14. achow101 commented at 6:38 pm on February 18, 2026: member

    Yes, code will have to be added to the GUI, but also code will have to be added to the wallet. Just because it has some GUI elements required at some point does not automatically make an issue a GUI issue. There are several wallet PRs which have GUI components with the GUI stuff pulled into a separate PR to the GUI repo. That doesn’t make the issues that they resolve GUI issues. While the initial report is something observed in the GUI, and the requested solution is for something in the GUI, actually solving the issue requires significant changes to the wallet that are inappropriate for the GUI repo.

    You can leave the GUI issue open if you really feel that strongly about it. Leave this one open too, otherwise I’ll forget to come back to it later.

  15. fanquake commented at 6:45 pm on February 18, 2026: member
    Yes, I think should be left open, as we’ve seen constantly, issues solved/features added to the daemon never end up in the GUI, so having issues on both sides make it clear what actually needs doing.

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: 2026-03-07 00:13 UTC

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