Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rescan takes many hours when importing existing wallet #743

Closed
Lord-Lange opened this issue Apr 26, 2024 · 8 comments
Closed

Rescan takes many hours when importing existing wallet #743

Lord-Lange opened this issue Apr 26, 2024 · 8 comments
Labels
enhancement New feature or request performance Performance and/or speed improvements question Further information is requested

Comments

@Lord-Lange
Copy link

Expected behavior
When importing an existing wallet, the rescan process should finish within a reasonable timeframe

Actual behavior
When importing an existing wallet, the rescan process does not finish within a reasonable timeframe. The rescan process has been running for multiple hours now and have not finished yet.
Jam open wallet

Steps to reproduce the problem

  1. Create new wallet via Jam
  2. Uninstall Jam
  3. Install Jam again
  4. Import the wallet that you just created

Specifications

  • Version: v0.2.0
  • Platform: UmbrelOS 1.1
  • Browser: Firefox

Additional context

When creating the wallet i wanted to make sure, that I could recover it on via Jam. I unistalled Jam to remove the wallet info. When importing the wallet it has now been stuck rescanning for many hours.

  • I've tried restarting the Jam app to redo the import, but I get the same problem
  • I've tried uninstalling and installing Jam app againg to redo the import, but I get the same problem
@theborakompanioni
Copy link
Collaborator

Hey @Lord-Lange, thanks for your report. 🙏

First, this is Bitcoin Core rescanning the chain. It entirely depends on your hardware (and the starting block height).

What do you consider a "reasonable timeframe" to be?

Anyway, the only thing we can do is display the progress percentage - has been slightly discussed in JoinMarket-Org/joinmarket-clientserver#1461 (comment)
Do you think that is okay?

@theborakompanioni theborakompanioni added question Further information is requested enhancement New feature or request performance Performance and/or speed improvements and removed bug Something isn't working labels Apr 26, 2024
@Lord-Lange
Copy link
Author

Lord-Lange commented Apr 26, 2024

Hey @Lord-Lange, thanks for your report. 🙏

First, this is Bitcoin Core rescanning the chain. It entirely depends on your hardware (and the starting block height).

What do you consider a "reasonable timeframe" to be?

Anyway, the only thing we can do is display the progress percentage - has been slightly discussed in JoinMarket-Org/joinmarket-clientserver#1461 (comment) Do you think that is okay?

Hey @theborakompanioni, thanks for replying so fast!

I chose to write "reasonable timeframe" because I don't know the actual process of the rescan and what is a realistic timeframe. For reference on a raspberry pi 4 with my current internet connection and SSD drive it took 3 or 4 days to install and load a full node in the beginning of the year, which is the hardware that i'm running Umbrel on.

Regarding the "reasonable timeframe" when I have tried recovering a wallet using sparrow on an old laptop, it usually doesn't take more than a few minutes at most. But maybe it's completely different than with Jam?

If the process take much longer than a few minutes or even hours I think it would be nice to see the process, otherwise it's easy to think that something has gone wrong.

@kristapsk
Copy link
Contributor

Looking at JoinMarket Wallet RPC API currently, I see two things that could be improved (besides feedback of progress).

  1. There is no way to specify rescan start date. If user knows when wallet was initially created, he could specify that date and rescan would be faster.

  2. For segwit wallets there is no point of rescaning before segwit activation block, so that could be default instead of genesis.

@theborakompanioni
Copy link
Collaborator

Looking at JoinMarket Wallet RPC API currently, I see two things that could be improved (besides feedback of progress).

1. There is no way to specify rescan start date. If user knows when wallet was initially created, he could specify that date and rescan would be faster.

👍

2. For segwit wallets there is no point of rescaning before segwit activation block, so that could be default instead of genesis.

481824 is the default (in Jam).

@kristapsk
Copy link
Contributor

Ohh, I'm an idiot, you can already specify that in /wallet/<string:walletname>/rescanblockchain/<int:blockheight>.

Does Jam currently ask user for rescan start date when recovering wallet? Guess not and some API that converts date to block height would be helpful?

@theborakompanioni
Copy link
Collaborator

Ohh, I'm an idiot,

No 😉

you can already specify that in /wallet/<string:walletname>/rescanblockchain/<int:blockheight>.

Yes 🙃

Does Jam currently ask user for rescan start date when recovering wallet? Guess not and some API that converts date to block height would be helpful?

Currently, it is plain block height input.
But a datepicker is on the roadmap.

@kristapsk
Copy link
Contributor

JoinMarket-Org/joinmarket-clientserver#1696

@theborakompanioni
Copy link
Collaborator

Closing this issue in favor of #744.

@Lord-Lange Again, thanks for reporting and triggering this improvement. Am very sorry we cannot speed up the process in the first place, but at least provide better visual feedback. Feel free to open another issue if you are not satisfied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Performance and/or speed improvements question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants