Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: vayu on July 09, 2017, 09:54:47 PM



Title: lost receiving address after restoring wallet.dat from backup
Post by: vayu on July 09, 2017, 09:54:47 PM
Hi!

I use BitCoin Core 0.13.1
I created an additional receiving address to get payments from NiceHash.
I got one payment and later I had to restore my wallet.dat from backup. Backup was created before I created an additional address, so now I can't see this address in the list.

NiceHash will send me new payment shortly to the same address (I can't change this). Will I receive the payment? What will happen?

Thanks a lot!


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: hexafraction on July 09, 2017, 10:05:04 PM
If your wallet is not hierarchical determinstic (HD), then there's a pool of 100 keys that are pre-generated and stored in the backup, so the next 100 addresses you generate after making your backup will protected as well. If it is an HD wallet, then every address (not just 100) is protected in this way. Try generating an address in your wallet and it should match the one you generated last time.


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: jackg on July 09, 2017, 10:06:52 PM
Hi!

I use BitCoin Core 0.13.1
I created an additional receiving address to get payments from NiceHash.
I got one payment and later I had to restore my wallet.dat from backup. Backup was created before I created an additional address, so now I can't see this address in the list.

NiceHash will send me new payment shortly to the same address (I can't change this). Will I receive the payment? What will happen?

Thanks a lot!


Where was the wallet.dat file created? If it was on one of the later versions of the core then it will have a seed and you can deterministically bring up what your previous recieving address was by just creating new addresses untilit shows up (although this should probably have already been done when you loaded the backup).

If the wallet.dat file was created with an older version of the core then I'm not sure it's possible or if it is then it won't be a simple solution.


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: vayu on July 09, 2017, 10:14:05 PM
If your wallet is not hierarchical determinstic (HD), then there's a pool of 100 keys that are pre-generated and stored in the backup, so the next 100 addresses you generate after making your backup will protected as well. If it is an HD wallet, then every address (not just 100) is protected in this way. Try generating an address in your wallet and it should match the one you generated last time.

Thanks for the idea. I generated a couple of new addresses, but all of them are completely different..

I initially created wallet.dat many years ago with an old bitcoin core version.


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: jackg on July 09, 2017, 10:16:13 PM
If your wallet is not hierarchical determinstic (HD), then there's a pool of 100 keys that are pre-generated and stored in the backup, so the next 100 addresses you generate after making your backup will protected as well. If it is an HD wallet, then every address (not just 100) is protected in this way. Try generating an address in your wallet and it should match the one you generated last time.

Thanks for the idea. I generated a couple of new addresses, but all of them are completely different..

I initially created wallet.dat many years ago with an old bitcoin core version.

It won't have the HD part of it then if it's in Bitcoin Core.
Unless it's one of the 100 addresses that were backed up then you sadly have lost your coins unless there's a reason you lost your file and we could come up with a way to recover it?


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: hexafraction on July 09, 2017, 10:20:54 PM
If your wallet is not hierarchical determinstic (HD), then there's a pool of 100 keys that are pre-generated and stored in the backup, so the next 100 addresses you generate after making your backup will protected as well. If it is an HD wallet, then every address (not just 100) is protected in this way. Try generating an address in your wallet and it should match the one you generated last time.

Thanks for the idea. I generated a couple of new addresses, but all of them are completely different..

I initially created wallet.dat many years ago with an old bitcoin core version.

Unfortunately the address has not been properly backed up then. It was vital that non-HD wallets were backed up regularly, and the documentation didn't stress this clearly enough in my opinion. As jackg mentioned, there might be ways to perform data recovery; you should immediately stop using this computer if there is a chance that the file was deleted, but pieces of it still remain on the hard disk.


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: vayu on July 09, 2017, 10:24:13 PM
UPDATE:

I create a couple of new addresses and necessary one has appeared after several attempts! great!

Thank you, everyone, for your support!


Title: Re: lost receiving address after restoring wallet.dat from backup
Post by: hexafraction on July 09, 2017, 10:27:18 PM
UPDATE:

I create a couple of new addresses and necessary one has appeared after several attempts! great!

Thank you, everyone, for your support!

No problem, happy to have helped. I assumed that the address you were trying to recover was the first one in the pool, it must have been somewhere else in the pool of 100 addresses.