Restore old 2018/19 Wallet.dat with Zcash Node

Hi guys,

I’ve installed and fully synced a Zcash 6.0.0 Full Node on Ubuntu and am looking to hopefully recover funds from my old wallet.dat.

The first problem I have is I can’t physically find a wallet.dat created by this node, but if I do ./src/zcash-cli getwalletinfo it shows me there is a 0.0000 balance and some details as if the wallet is there. I’ve done a file search and still can’t find a wallet.dat anywhere. There must be something I’ve not done??

Secondly, since I’ve been out the game a very long time (I just got busy and never wanted to extract any money out of Zcash) my wallet.dat I believe is from 2019 but the sheilded address I have in there starts with ZC which mean’s its an old Sprout key as far as I am aware.

I tried to import the key into YWallet but it just comes up with an error, and I can’t find the address on any block explorer, which has me worried!

I have 47 ZEC in that address so I’m really hoping it can recovered and I haven’t lost it all :frowning:

1 Like

[%HOMEPATH%\AppData\Roaming\Zcash]

I wrote this awhile ago, not sure if it its still accurate:

1 Like

Thank you, yes this is how I did it before on the windows Node I had, but since this is now deprecated and I have Linux node, I cannot find the default wallet.dat that it has created to then replace with my old one.

On Linux it should be in:

/home/<user>/.zcash/

1 Like

It’s just not there, I cannot fathom why.

In /home/user/zcash/src/wallet there are plenty of wallet files such as wallet.h and wallet.cpp but no wallet.dat

is different from

/home/<user>/zcash

The .zcash is a hidden directory.
You may access it via the terminal with cd and use ls to list the directory contents.

cd ~/.zcash
ls
3 Likes

Thank you James!!! I really appreciate you pointing that out, I wasn’t aware it was hidden!

Okay guys I’m going to swap out the wallet.dat, wish me luck!

After shutting down your node and swapping out the wallet.dat, you will almost certainly need to start your node with the -reindex flag (to fix the wallet’s view of the network), which will take a while. (Once you’ve done that, if you shut down the node again then make sure to not keep the -reindex flag on the next start or it will start reindexing from scratch a second time.)

2 Likes

Thank you very much guys! You’ve been a big help for this noob :smiley:

Just to manage expectations, the syncing can take days to complete. But your funds should be safe.

1 Like

Thank you, yes I was expecting it to take a few days.

My first sync (before I transferred the wallet in) was just under 3 days, however now I’ve put the new wallet in and done -reindex, it seems to have stalled at 66% and be going very slowly (block height 18350000ish, downloading about 1 block per second which at this rate will take 600 days lol) which is frustrating, trying to diagnose now.

You are likely hitting the time of the spam attack, it will appear frozen but it is working.

Unfortunately Zcashd sync is not multi threaded so you have to wait for it to crunch through.

1 Like

Thanks Shawn, it’s just weird how it didn’t seem to do this the first time, or maybe I just missed it, I’ll try to remain patient! :slight_smile:

If you have enough memory, you can try the following:

With the default setting (450, units are MB), it took 6.5 hours to reach height 283k. With dbcache increased to 8000, it reached that height in 42 minutes. It’s always better to increase the dbcache setting if you’re not memory-constrained

example in zcash.conf:

dbcache=1024

Ohhhh I will try that! Thank you.

1 Like

Okay guys I’m still at 66% downloaded 24 hours later, I think the issue might be bigger than we thought…

No issue, it takes time. Let it finish

1 Like

Blocks 1.8 M to about 2.2M will be the slowest. It will get quite a bit faster again after then.

1 Like

Sorry to spam gents, I apologise if I’m being a nuisance but, when I did this the first time it was nothing like this. It’s just since I changed my wallet.dat file and did reindex.

To not move even 1% in 24hrs seems crazy to me when it synced the full blockchain in 3 days the first time. It’s done 8,000 blocks in that time, to get to 2.2m it will be ~50 days at this pace.

Unless it’s something to do with the addresses in my wallet being old (zc addresses)??