0

Background how I got here:

I have a very old wallet file in .dat format (from 2017) The backup is as far as I remember just a copy of the wallet file from bitcoin-core's ~/.bitcoin directory.

I tried opening it in "modern" bitcoin-core by:

  1. copying the wallet file into ~/.bitcoin/wallets/walletName/walletName.dat
  2. adding the wallet name to list in ~/.bitcoin/settings.json

Now, upon starting bitcoin-core I get this message:

Error: Failed to load database path '/home/{redacted}/.bitcoin/wallets/OldWallet_1'. Data is not in recognized format.

So, having no meaningful results in google other than pywallet, I decided to try importing it to electron... and discovered that electron doesn't have an option to import bitcoin-core wallets (wtf?). I did find some information about "pywallet", I tried using it to recover information from my .dat file, I had to modify it a bit since my encryption password is really long and has many weird characters in it so passing it as an argument for script execution is incredibly difficult.

I managed to get list of all addresses defined in this file and "encrypted_privkey" for each address.

I didn't manage to get it to decrypt anything, because the script crashes with "Segmentation Fault (core dumped)" (everyone loves C/C++).

The question:

So, my question is, given I know the password to this wallet (I think I also recovered the encryption salt) and I have "encrypted_privkey" list, how do I decrypt them so I can import them in electron?

[edit]

I just tried importing my dashcoin wallet to dash-core, I get the same error message, so it's very likely that something about the wallet file format has changed during the time I wasn't using cryptocurrencies.

If anyone knows how to "upgrade" the file format, please let me know, it'll also solve the problem.

1
  • if this file is from Bitcoin Core you should be able to open it again using the same software. Bitcoin Core will allow you to open the wallet without type the password, download the Bitcoin core version v0.20.1, then you put your wallet.dat into ~/.bitcoin. Nothing else. – Luca Blight May 21 at 23:26
-1

there is command opton in bitcoin core, there you can type "upgradewallet" check if something happens.

1
  • 2
    If bitcoin core can't open the file, it certainly won't be able to upgrade it. – Pieter Wuille May 21 at 23:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.