namecoin / namecoin-core

Namecoin full node + wallet based on the current Bitcoin Core codebase.
https://www.namecoin.org/
MIT License
463 stars 147 forks source link

Backup & Restore #298

Open Tradefreak opened 5 years ago

Tradefreak commented 5 years ago

I backuped the database including the wallet.dat of my Namecoin wallet and installed a new operating system. I installed the Namecoin Core again then and copied back the whole Namecoin folder to ..\AppData\Roaming. So far so good. Then I updated several .bit domain names during further configurations of the operating system. The name updates were confirmed completely when I decided to reinstall the operating system once again. But this time I forgot to backup the so actualized wallet. I took (after the second installation) the meanwhile one day old backup, but only a few transactions I have done recently were recognized and added from the blockchain. But a couple of domain names (updated in two not directly consecutive blocks) appeared with the previous remaining blocks before I updated them - despite the fact, that they appear on the blockchain explorer with the full remaining blocks after the name update. Meanwhile they appear with a negative value. Also my balance was zero. To resolve that I started the namecoin-qt.exe with all possible parameters in the CMD console, such as -upgradewallet, -rescan, -reindex, -checkblocks=0 and -reindex-chainstate. But this doesn't work. I sent some coins to my wallet again and tried to update these domains, what results in the error message 'Input tx not found in wallet'.

So my question: Did I get it correct, that for each transaction there is generated a new Namecoin address with my new balance, which is associated with my wallet then? I further conclude, that a Namecoin wallet is not defined by just one address, but by as much addresses, as I made transactions. How is it possible to get the wallet synchronized again with the blockchain where every transaction can be traced? Reinstalling, importing the wallet.dat and redownload of the whole blockchain doesn't work. Are the domains and my previous balance lost? Thx for any advise!

Tradefreak commented 5 years ago

I resolved the issue now according to this advise with the following commands on the CMD Console:

cd C:\Program Files\Namecoin namecoin-qt.exe -salvagewallet

and after the completion of the complete indexing:

namecoin-qt.exe -rescan

What I had to do further is, confirming around three previously already confirmed domain name updates, therefor was nothing charged. Also the previous balance appeared again. So seems so, that only this combination of parameters leads to success. Even the parameter -txindex doesn't work for itself alone. I will let this issue open anyway to find a solution, to avoid complications like that in the future! This might regularly happen, if a backup needs to be used.

yanmaani commented 4 years ago

Duplicate of namecoin/electrum-nmc#237?