• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

All coins lost, Error message importing old Darkcoin wallet: all transaction at 0.000

x-posting status update on this sent via email:

I compiled very very old version and was able to do -salvagewallet on the d.dat. I'm not quite sure if anything was actually recovered or wiped out because now wallet should have nothing but encrypted keys if it worked well. So now it can't find any transactions because it needs to find out public keys out of private keys first and for that wallet have to be 1) unlocked 2) rescanned. I'm sending you that salvaged wallet.dat and "exe" I compiled though I'm not sure if it will work on non-developer machine or not. Try walletpassphrase on it, hopefully you'll be able to unlock it if there is actually any info left at all.

Basically, that's it for now. There are tools to recover private keys from corrupted wallets on a very low level (literally by reading raw data and extracting some useful bits) and I made one to work with dash long time ago but it works for unencrypted wallet only. Tools that work for encrypted wallets are there for bitcoin too iirc but I wasn't able to make them work for dash back in these days. Converting them will take some time.

So bottom line for all my investigation and attempts to compile with different db versions etc. for now: most likely wallet was already corrupted at the time of the backup and probably it was corrupted exactly on the final wallet shutdown when qt flushed some garbage to wallet.dat (could easily be the fault of db lib and not the qt wallet itself btw). This makes me remember the very old IT rule: "Always verify your backups. If you make some backups but you don't verify them - you don't make any backups".
 
x-posting status update on this sent via email:



So bottom line for all my investigation and attempts to compile with different db versions etc. for now: most likely wallet was already corrupted at the time of the backup and probably it was corrupted exactly on the final wallet shutdown when qt flushed some garbage to wallet.dat (could easily be the fault of db lib and not the qt wallet itself btw). This makes me remember the very old IT rule: "Always verify your backups. If you make some backups but you don't verify them - you don't make any backups".

Tx for looking into this

any general thoughts on
"how to verify backups" ?
 
Tx for looking into this

any general thoughts on
"how to verify backups" ?
Well, I think as simple as this.
For plain backups: copy wallet.dat from your backup and try to open the (qt) wallet again: if all goes well - the copy (backup) should be fine too.
If you zip it: try to unzip it, copy it to the datadir folder and open the (qt) wallet.
If you encrypted wallet.dat or zip - try to decrypt.
etc, etc, etc.
So "verifying" is basically "what if I needed it right now? is it actually working?" i.e. you actually reverse the whole process of backup and try to get access to your data instead of relying on the fact that this process should be reversible.

Another good practice is also to have a copy of the software that was capable to work with that data at the time of backup i.e. the (qt) wallet software in this case. The worst scenario I can think of in this case is that the wallet software could no longer be runnable in your current (by current I mean sometimes in the future) OS but you can easily solve this issue by using virtual OS image so this should be no big deal really.

And finally, one must understand that wallet.dat itself is a quite dangerous way to store large amounts of funds - it's a database file storing private keys plus many more this particular software's data in the way this particular software can read it. It's ok to have some funds stored in an easy way some software may provide you but if you have really large amount I would suggest to have most of the funds to be stored on some (predefined) address(es) in such a way so that you can get access to it on any other software which has implemented the same core protocol. For example private key(s) for these addresses can be encrypted via bip38 and printed on a piece of paper. Or even better - you create private keys via seed first so that they can be recreated later. Or anything else you can think of that relies on the protocol and not on the implementation. Just like for real cash - you don't walk everywhere with all your funds in your pocket, you store most part of them safe somewhere and have only a bit of them which is enough for day to day life in your pocket. If you lost your (real physical) wallet with some cash in it - that would be quite sad but most of your funds will be safe.
 
Well, I think as simple as this.
For plain backups: copy wallet.dat from your backup and try to open the (qt) wallet again: if all goes well - the copy (backup) should be fine too.
If you zip it: try to unzip it, copy it to the datadir folder and open the (qt) wallet.
If you encrypted wallet.dat or zip - try to decrypt.
etc, etc, etc.
So "verifying" is basically "what if I needed it right now? is it actually working?" i.e. you actually reverse the whole process of backup and try to get access to your data instead of relying on the fact that this process should be reversible.

Another good practice is also to have a copy of the software that was capable to work with that data at the time of backup i.e. the (qt) wallet software in this case. The worst scenario I can think of in this case is that the wallet software could no longer be runnable in your current (by current I mean sometimes in the future) OS but you can easily solve this issue by using virtual OS image so this should be no big deal really.

And finally, one must understand that wallet.dat itself is a quite dangerous way to store large amounts of funds - it's a database file storing private keys plus many more this particular software's data in the way this particular software can read it. It's ok to have some funds stored in an easy way some software may provide you but if you have really large amount I would suggest to have most of the funds to be stored on some (predefined) address(es) in such a way so that you can get access to it on any other software which has implemented the same core protocol. For example private key(s) for these addresses can be encrypted via bip38 and printed on a piece of paper. Or even better - you create private keys via seed first so that they can be recreated later. Or anything else you can think of that relies on the protocol and not on the implementation. Just like for real cash - you don't walk everywhere with all your funds in your pocket, you store most part of them safe somewhere and have only a bit of them which is enough for day to day life in your pocket. If you lost your (real physical) wallet with some cash in it - that would be quite sad but most of your funds will be safe.

Tx man
I will try to integrate that to the wiki
 
Damn, sorry to hear that, really surprised it was that badly corrupted. Worth keeping a copy though, tools for wallet repair will keep improving and with a bit of luck it could turn out to be a windfall someday.
 
So, I tryed with the salvage wallet, and I can't unlocked it.
My fear that the small bug was in fact a bigger problem was confirmed. The wallet should be only slightly corrupted since all transactions are listed, but it's seems to be enough for the wallet to change the passphrase (don't know how it's encrypted in the file, but may-be a minor corruption could alter it if it's like the sha256 check...)

I have 2 solutions: wait for new tools, or try to recover data from my ssd drive that suffer electric injury (may be the data are safe in chips behind some kind of fuse...)
We are talcking of 300 Darckoin here, so we will see.
Back in the days, I'm not sure paper wallet was available. I first decided to keep funds online on exchenge...We know what happened. I then decided to keep them on wallet, and make 2 backups: one on my second HDD, one on that cheap usb key given by my boss.
Then some fire in my computer (caused by the lack of ground in my electric plug in my new home) destroyed my backup HDD (it sets on fire) and my ssd (overtense probably). When I look at my usb-key, I found that the files are corrupted...

If I was less paranoid and put my files on the cloud or on some webmail...
Anyway, thanks for your time and answer.
 
I have backups in 10 different places, one is in the cloud and other is in my private VPS server.
Of course all data is compressed and super heavy encrypted.

Plus i have my home servers and primary PC all behind UPS,
so i have electrical protection and 30 min power if power goes down or power network spikes.

This is just my system for example for others.
 
..
We are talcking of 300 Darckoin here, so we will see.
...
341.40 to be precise :rolleyes:

isAgT93.png


I was really disappointed that I wasn't able to recover at least encrypted part of it and I started to look at hex level. Found this "30 81 D3 02 01 01 04 20" and was like :what: I guess DB flush failed in the middle of the encryption process and this was the reason for wallet corruption. But luckily this was also the reason that your private keys were actually kept unencrypted all this time and this little script https://gist.github.com/UdjinM6/07f1feae8b7495c67480 was able to grab them bit by bit. :cool:

Where should I send them to? :smile:
 
Seriously, congratulation for your work and of course thank you...
I'm as surprised as my Dash are available again as the fact that some people hand me a hand and gave me some of there time here.

Anyway, having the corrupted part in that place finally is a nice evente :)

I'll try to make it right this time, and create a wallet with some private key I can remember.
This site allow to convert some kind of phrase in private-keys?
https://paper.dash.org/?culture=fr
 
Seriously, congratulation for your work and of course thank you...
I'm as surprised as my Dash are available again as the fact that some people hand me a hand and gave me some of there time here.

Anyway, having the corrupted part in that place finally is a nice evente :)

I'll try to make it right this time, and create a wallet with some private key I can remember.
This site allow to convert some kind of phrase in private-keys?
https://paper.dash.org/?culture=fr

Yes, it is called "Brain Wallet". But I wouldn't recommend it unless you choose a really long string. To stay secure I would say you need 8+ words 5+ letter each and it should not be a common phrase. Because of the fact that brainwallets are simply sha256(passphrase) there are already dictionaries for thousands or maybe even millions of possible phrases and it's relatively easy to find private key simply by finding the same hash in such table.

As I already mentioned it's much safer to use bip38 encrypted wallet ("Paper Wallet" tab) because key is generated randomly as it would normally and only then it's encrypted via passphrase. It's simply impossible to create a dictionary for that case. You can read more there https://bitcoinpaperwallet.com/bip38-password-encrypted-wallets/ for example - it's a nice guide with few very good warnings like I was giving above e.g. "Before sending any funds to a BIP38-encrypted wallet, first do a test make sure you are able to decrypt the printed private key back to ordinary WIF format." ;) You can make sure you can decrypt it by entering encrypted key and passphrase on "Wallet Details" tab. I would recommend to play with that tool a bit to make yourself familiar with it and also to make sure that it's all convertible and encryption/decryption gives you adequate results.

EDIT: brute-forcing bip38 for short and common passphrases like "123", "qwerty" etc. is still possible however so choose passphrase wisely.
 
Last edited by a moderator:
Hi,
I think I'll investigate latter on thoses advanced tools, trying with very-small amounts.

For now I create 3 backups, one on the cloud, and I write the privatekey on a paper, so if I understand correctly, I'll need only that privkey and my address to create a new wallet in the future in case I loose all my files?

And by the way, here is my address on that forum, another way of spamming backups...
XgGmcDsnc3vtF9dxzyvMaCkBBzdY2vsfy1
Best regards.
 
Hi,
I think I'll investigate latter on thoses advanced tools, trying with very-small amounts.

For now I create 3 backups, one on the cloud, and I write the privatekey on a paper, so if I understand correctly, I'll need only that privkey and my address to create a new wallet in the future in case I loose all my files?

And by the way, here is my address on that forum, another way of spamming backups...
XgGmcDsnc3vtF9dxzyvMaCkBBzdY2vsfy1
Best regards.
All you need is private key, address will be generated out of private key automagically on its import into the new wallet (see "help importprivkey" command in Tools -> Debug console).
Just sent 1 DASH http://explorer.dash.org/tx/950b64feaf965344b9124afa5248c7b163b1a206797051f7c1175ec3e90ce42b , confirm that all is good pls and I'll send the rest of it. :smile:
 
  • Like
Reactions: bou
UdjinM6 Nice job on the recovery mate :).

Fully knowing this may be a stupid question: Can't the wallet.dat file be opened as a .txt file and the key info (be it encrypted or not) moved over to a fresh wallet.dat file in cases where the key itself is not corrupted? I remember reading something about this back in 2012 or so but I never tried it myself.

Pablo.
 
UdjinM6 Nice job on the recovery mate :).

Fully knowing this may be a stupid question: Can't the wallet.dat file be opened as a .txt file and the key info (be it encrypted or not) moved over to a fresh wallet.dat file in cases where the key itself is not corrupted? I remember reading something about this back in 2012 or so but I never tried it myself.

Pablo.
Not quite as a .txt file but you can copy private keys bits which normally follow some predefined sequence of field name bits, just use some hex editor or script. That's exactly what https://gist.github.com/UdjinM6/07f1feae8b7495c67480 does in first step https://gist.github.com/UdjinM6/07f1feae8b7495c67480#file-bitwalletrecover-py-L61-L62
 
You'd see a few fields in plain text if you tried opening the wallet file in a text editor, things like "ckey" and "fromaccount" but they wouldn't be obvious as most of it would come out as garbage (if the editor doesn't crap out trying to view it). Funny looking through that garbage sometimes though as you often pick up on patterns, in one editor here dashes "key" string starts with a smiley and heart for example :) Greg Maxwell says you shouldn't do that though and should treat the wallet file as a black box and only access it using the proper tools... can't say I agree with him but certainly view it read only or on a backup with a regular text editor.
 
All you need is private key, address will be generated out of private key automagically on its import into the new wallet (see "help importprivkey" command in Tools -> Debug console).
Just sent 1 DASH http://explorer.dash.org/tx/950b64feaf965344b9124afa5248c7b163b1a206797051f7c1175ec3e90ce42b , confirm that all is good pls and I'll send the rest of it. :smile:
The 1 dash is well received, thanks.

I have another question:
if I understand correctly, my passphrase is used to get my privatekey from a wallet.
So if I make an import private key in a new wallet, will my wallet be protected with my passphrase or not?
If someone get access to my private-key, will he have access to my coins or will they still be protected with my passphrase?

Best regards (and apologies for my english...)
 
The 1 dash is well received, thanks.
...
Cool! Here is the rest of it http://explorer.dash.org/tx/7f6e5aa8b83f80f54c3c37c9999c0ed856357caaef72ac42bc8022a338643dac
Screen Shot 2016-04-02 at 11.28.26.png


...
if I understand correctly, my passphrase is used to get my privatekey from a wallet.
So if I make an import private key in a new wallet, will my wallet be protected with my passphrase or not?
If someone get access to my private-key, will he have access to my coins or will they still be protected with my passphrase?
...
If we are talking about the way private key is stored in wallet.dat then it's only protected in an encrypted wallet. When you dump your private key wallet decrypts it so it's not protected anymore and if you import it in another (but this time unencrypted) wallet it will not be protected too. The way to have it protected in plain text is bip38 I mentioned above but the sad part is that wallet can't work with bip38 and to import it you have to decrypt bip38 encrypted key too. And yes, anyone having access to you unencrypted private key will be able to send coins wherever he likes. That's actually how I sent you "your" coins (technically they are not yours from the moment I have access to your private keys, if I was a thief or a hacker who've got you private keys you would never have any access to them anymore few seconds after I've got the key).
 
341.40 to be precise :rolleyes:

isAgT93.png


I was really disappointed that I wasn't able to recover at least encrypted part of it and I started to look at hex level. Found this "30 81 D3 02 01 01 04 20" and was like :what: I guess DB flush failed in the middle of the encryption process and this was the reason for wallet corruption. But luckily this was also the reason that your private keys were actually kept unencrypted all this time and this little script https://gist.github.com/UdjinM6/07f1feae8b7495c67480 was able to grab them bit by bit. :cool:

Where should I send them to? :smile:
UdjinM6 you're the magic maker. Proud to have you as a DASH core dev!
 
Back
Top