You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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..)
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 ?
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.
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.
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.
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.
Chiming in here :)
Maybe this does not fix the issue at all, after #35266 it is possible to migrate without rescaning. It also disables the auto-load setting for the wallet being migrated, so it will not load after restart (by default).
Obviously to use the wallet it will need to be loaded and that will trigger a rescan.
This is only applies to CLI for now, I will work on adding a GUI button to disable load after migration.
Activity
furszy commentedon Mar 13, 2025
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).
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..)
w0xlt commentedon Apr 8, 2025
I just took a quick look, but adding a boolean parameter to
CWallet::Create()that preventsAttachChain()from being called during the migration doesn't do the trick ?fanquake commentedon Feb 18, 2026
This seems to be a request for a GUI change / feature, so I've moved it to: bitcoin-core/gui#930.
achow101 commentedon Feb 18, 2026
This is not a GUI issue.
fanquake commentedon Feb 18, 2026
It's asking for a visual indication. In the gui?
achow101 commentedon Feb 18, 2026
The underlying issue is in wallet migration which can be reached via CLI. The same old wallet migrated with
migratewalletwould do the rescan and take just as long, with no indication to the user.fanquake commentedon Feb 18, 2026
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.
achow101 commentedon Feb 18, 2026
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.
fanquake commentedon Feb 18, 2026
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.
polespinasa commentedon Jun 26, 2026
Chiming in here :)
Maybe this does not fix the issue at all, after #35266 it is possible to migrate without rescaning. It also disables the auto-load setting for the wallet being migrated, so it will not load after restart (by default).
Obviously to use the wallet it will need to be loaded and that will trigger a rescan.
This is only applies to CLI for now, I will work on adding a GUI button to disable load after migration.