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

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-03-28 15:12 UTC

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