After 2 years of being shut down, I am trying to revive my bitcoin full node, while both switching platforms and upgrading to the current version in the process. Everything works but the wallet. The presence of the wallet causes the new node to crash (segfault). The node works when either wallet.dat is missing or when -disablewallet is provided. I do not really need that wallet to be fully imported, just to get the bitcoin associated with it into the an address controlled by the new node.
I read this issue report that blames the version of the berkley db lib files. I compiled bitcoin core locally with the older BDB libs provided via
bitcoin/contrib/install_db4.sh per that issue report, and got the same result. The thing is, since (afaik) the windows platform does not provide an implementation of BDB, I have no idea what headers are correct for the wallet file generated by windows bitcoin core.
I want to avoid deleting and re-downloading the entire blockchain. I did run once with
-disablewallet -assumevalid=0 to verify the entire blockchain. I retain backups of all pre-upgrade files, if it helps.
gdb backtrace pastebin. Note that this run was only a subset of the cli options I normally run with, specifically missing rpc info.
- Windows 7 pro x64 sp1
- bitcoin core gui (qt) 0.16.0
- last synced early December 2018
- BDB version unknown
- datadir sat on slow external hdd (ntfs)
- Debian Buster stable
- bitcoin core daemon 0.21, compiled locally
- syncing now, currently late March 2019
- BDB 4.8.30.NC compiled via included script and detected by configure
- datadir on slow internal sata hdd (ext4)
Is there any way to import an old/differently formatted wallet.dat file into a newer node? Is there perhaps a way to extract the private key info from said old file, so it can be manually imported? Could the old node software possibly create and send a transaction with the entire contents of the old wallet to a new address without fully syncing first? Is it possible the old version of bitcoinn core could fully sync with the modern blockchain?
e: forgot to mention: the db err logfile
/mnt/data/blockchains/btc/blockchain/db.log is empty and retains the last modified date from the first startup of the original node in mid 2017.
e2: after translating the wallet to db version 4.8 as @PieterWuille suggested, the node reindexed and printed a number of lines like
2021-02-18T23:58:08Z [default wallet] Submitting wtx f7b5 to mempool for relay
but after running for a few days, it indexed up to block height just under 500000 and then segfaulted again.