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

Performing reindex and wallet rescans #107

Closed
garethtdavies opened this issue Feb 16, 2019 · 12 comments
Closed

Performing reindex and wallet rescans #107

garethtdavies opened this issue Feb 16, 2019 · 12 comments

Comments

@garethtdavies
Copy link
Contributor

There are two options that are regularly recommended to solve issues those being starting up zcashd with --rescan (solves a lot of balance and missing transaction issues) and starting zcashd with --reindex (for those times when nothing else seems to work...)

In writing docs for this, it is hard to do this in practice when using zec-qt-wallet. For example, the Mac app doesn't give access to the embedded zcashd (or I can't find it 😄).

Even on say Windows, for those users who want to use a GUI it is possibly a little daunting to have to run an external zcashd this way, as well as complicated to explain.

That's a long way of saying, can we get support for doing a rescan and/or reindex. In principle, I would imagine this could work for any zcash.conf config option but those two are the most important. I'm thinking a simple(ish) workaround would be to have an option say "Perform a wallet rescan on startup" that when checked adds the line to zcash.conf which only persists through a single startup as of course, you don't want this running on every launch.

There might be better ways of implementing this and am open to any ideas!

@adityapk00
Copy link
Collaborator

This is a good idea. I'll try and implement it next week.

Incidentally, the MacOS embedded zcashd is in zec-qt-wallet.app/Contents/MacOS/zcashd

@garethtdavies
Copy link
Contributor Author

Incidentally, the MacOS embedded zcashd is in zec-qt-wallet.app/Contents/MacOS/zcashd

Aha, awesome thanks. zcashd wasn't showing up in my find command as I needed to run as sudo. That's great as now at least I can have some consistent docs showing how to do it, even if it is a bit convoluted at present 👍

adityapk00 added a commit that referenced this issue Mar 19, 2019
Add "troubleshooting" options to do rescan/reindex from UI
@adityapk00
Copy link
Collaborator

Hey @garethtdavies , @rex4539
I just added a new section in the Settings page where users can do a rescan and/or reindex. Since I've seen you help a lot of people work through these problems, I'd love to get your feedback on whether this will work for people before I release it .

(Note that it's not released yet, you'll have to build from source to see it). Let me know if you need a binary, I can build one as well.

@garethtdavies
Copy link
Contributor Author

@adityapk00 could you throw up a MacOS build here to test as I seem to have borked my local QT install so that'll be quicker 😄

@garethtdavies
Copy link
Contributor Author

Scratch that, it was a simple fix and I've built it locally.

@garethtdavies
Copy link
Contributor Author

Actually, a MacOS build would be helpful as while I can run the updated version I'm having issues starting the embedded zcashd - perhaps due to the renaming?

@rex4539
Copy link
Contributor

rex4539 commented Mar 20, 2019

I tested the rescan functionality which is fairly quick.

It works as described in the troubleshooting notes.

One thing that would be extremely helpful is to add a progress indicator (bar or text update). I would imagine this is fairly simple to do by polling the progress in debug.log

@adityapk00
Copy link
Collaborator

Sorry, I missed the last update, @garethtdavies . Here's the Mac dmg.

Good idea about the progress bar. I'll try to read it from the debug.log
macOS-zecwallet-v0.6.2-preview.dmg.zip

@garethtdavies
Copy link
Contributor Author

garethtdavies commented Mar 21, 2019

I think you should only enable this option if running the embedded zcashd. If someone is already running an external zcashd then it can be assumed they are capable of starting with an extra flag. I also connect to a remote node via SSH port forwarding and it adds to the file on the local machine so this approach is error-prone.

It also removes the confusing wording on the ZecWallet popup about also needing to restart zcashd as presumably this will be done automatically when closing/reopening ZecWallet.

CleanShot 2019-03-20 at 20 31 32@2x

@garethtdavies
Copy link
Contributor Author

On the rescan text I'd also say this may take several hours as it can also be pretty quick...

@adityapk00
Copy link
Collaborator

Hmm, that's a good point. I hadn't considered the remote scenario, in which case this is clearly doing something stupid.

You're right, it should probably be only for the embedded zcashd

@adityapk00
Copy link
Collaborator

Fixed in 0.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants