Having issues restoring my Bitcoin wallet

19 replies 64 views
tomgangFull Member
Posts: 44 · Reputation: 314
#1Dec 9, 2020, 07:45 PM
Hey everyone, I’m having a hard time trying to get my wallet back using the 'Restore wallet' feature in Bitcoin Core. The program keeps crashing on me and I can't seem to figure it out. Anyone got any ideas on how to fix this? Appreciate any help!
2 Reply Quote Share
maxi2017Senior Member
Posts: 262 · Reputation: 1550
#2Dec 9, 2020, 09:54 PM
I suggest you try reindex and rescan options. Also, it may be worth checking the error log file.
5 Reply Quote Share
ryan_nodeSenior Member
Posts: 202 · Reputation: 852
#3Dec 10, 2020, 02:09 AM
Please provide the debug.log file.
1 Reply Quote Share
coin_sigmaLegendary
Posts: 1275 · Reputation: 5553
#4Dec 10, 2020, 08:03 AM
Check carefully the wallet file you are trying to restore and maybe the backup wallet file you have is the wallet file generated from the Electrum wallet. Bitcoin core wallet file should look like this "wallet.dat" image below as reference You can usually find this wallet file under "%APPDATA%\Bitcoin" on Windows and “~/.bitcoin/” in Linux.
3 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#5Dec 10, 2020, 10:47 AM
Do you mean reindexing the whole database? It took me more than 2 weeks to complete the synchronization. Is there any other way to solve this problem?
2 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#6Dec 10, 2020, 03:33 PM
Don't do that yet if Core didn't warned you about corrupted chainstate or block index. I hope that you didn't set to "prune" your blockchain because you may have to redownload everything after restoring the wallet depending on how old it is and how much is pruned. You only need to provide the contents of your debug.log file inside your bitcoin data directory for us to see the possible issue. If you're using the default, it's in this location: https://en.bitcoin.it/wiki/Data_directory#Default_Location If it's too long, cut it to the last session - from the last line, then scroll-up to find the first "Bitcoin Core version" that you can find. Paste it inside [code][/code] tags.
3 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#7Dec 10, 2020, 07:17 PM
Here is debug as you instructed.... 2023-12-14T19:26:42Z Bitcoin Core version v25.0.0 (release build) 2023-12-14T19:26:42Z Qt 5.15.5 (static), plugin=windows (static) 2023-12-14T19:26:42Z Static plugins: 2023-12-14T19:26:42Z  QWindowsIntegrationPlugin, version 331520 2023-12-14T19:26:42Z  QWindowsVistaStylePlugin, version 331520 2023-12-14T19:26:42Z Style: windowsvista / QWindowsVistaStyle 2023-12-14T19:26:42Z System: Windows 10 Version 2009, x86_64-little_endian-llp64 2023-12-14T19:26:42Z Screen: \\.\DISPLAY1 960x540, pixel ratio=2.0 2023-12-14T19:26:42Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation 2023-12-14T19:26:42Z Using RdSeed as an additional entropy source 2023-12-14T19:26:42Z Using RdRand as an additional entropy source 2023-12-14T19:26:42Z Default data directory C:\Users\USER\AppData\Roaming\Bitcoin 2023-12-14T19:26:42Z Using data directory C:\Users\USER\AppData\Roaming\Bitcoin 2023-12-14T19:26:42Z Config file: C:\Users\USER\AppData\Roaming\Bitcoin\bitcoin.conf (not found, skipping) 2023-12-14T19:26:42Z Setting file arg: prune = "2861" 2023-12-14T19:26:42Z Setting file arg: wallet = ["vb","test"] 2023-12-14T19:26:42Z Using at most 125 automatic connections (2048 file descriptors available) 2023-12-14T19:26:42Z GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely…" 2023-12-14T19:26:42Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 2023-12-14T19:26:42Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements 2023-12-14T19:26:42Z Script verification uses 3 additional threads 2023-12-14T19:26:42Z scheduler thread start 2023-12-14T19:26:42Z Using wallet directory C:\Users\USER\AppData\Roaming\Bitcoin\wallets 2023-12-14T19:26:42Z init message: Verifying wallet(s)… 2023-12-14T19:26:42Z Warning: Skipping -wallet path that doesn't exist. Failed to load database path 'C:\Users\USER\AppData\Roaming\Bitcoin\wallets\vb'. Path does not exist. 2023-12-14T19:26:44Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010) 2023-12-14T19:26:44Z Using wallet C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\wallet.dat 2023-12-14T19:26:44Z BerkeleyEnvironment::Open: LogDir=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\database ErrorFile=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\db.log 2023-12-14T19:26:44Z Using /16 prefix for IP bucketing 2023-12-14T19:26:44Z init message: Loading P2P addresses… 2023-12-14T19:26:45Z Loaded 66272 addresses from peers.dat  324ms 2023-12-14T19:26:45Z init message: Loading banlist… 2023-12-14T19:26:45Z SetNetworkActive: true 2023-12-14T19:26:45Z Cache configuration: 2023-12-14T19:26:45Z * Using 2.0 MiB for block index database 2023-12-14T19:26:45Z * Using 8.0 MiB for chain state database 2023-12-14T19:26:45Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2023-12-14T19:26:45Z init message: Loading block index… 2023-12-14T19:26:45Z Assuming ancestors of block 000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632 have valid signatures. 2023-12-14T19:26:45Z Setting nMinimumChainWork=000000000000000000000000000000000000000044a50fe819c39ad624021859 2023-12-14T19:26:45Z Prune configured to target 2861 MiB on disk for block and undo files. 2023-12-14T19:26:45Z Opening LevelDB in C:\Users\USER\AppData\Roaming\Bitcoin\blocks\index 2023-12-14T19:26:45Z Opened LevelDB successfully 2023-12-14T19:26:45Z Using obfuscation key for C:\Users\USER\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000 2023-12-14T19:26:49Z LoadBlockIndexDB: last block file = 3993 2023-12-14T19:26:49Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=66, size=105297807, heights=820831...821134, time=2023-12-12...2023-12-14) 2023-12-14T19:26:49Z Checking all blk files are present... 2023-12-14T19:26:49Z LoadBlockIndexDB(): Block files have previously been pruned 2023-12-14T19:26:50Z Initializing chainstate Chainstate [ibd] @ height -1 (null) 2023-12-14T19:26:50Z Opening LevelDB in C:\Users\USER\AppData\Roaming\Bitcoin\chainstate 2023-12-14T19:26:50Z Opened LevelDB successfully 2023-12-14T19:26:50Z Using obfuscation key for C:\Users\USER\AppData\Roaming\Bitcoin\chainstate: d3c5ee961da3db55 2023-12-14T19:26:51Z Loaded best chain: hashBestChain=00000000000000000000d747d4109e45ac92b22d1af0b710faf5c0f7dd76ec6f height=821045 date=2023-12-13T19:36:31Z progress=0.999663 2023-12-14T19:26:51Z [snapshot] allocating all cache to the IBD chainstate 2023-12-14T19:26:51Z Opening LevelDB in C:\Users\USER\AppData\Roaming\Bitcoin\chainstate 2023-12-14T19:26:51Z Opened LevelDB successfully 2023-12-14T19:26:51Z Using obfuscation key for C:\Users\USER\AppData\Roaming\Bitcoin\chainstate: d3c5ee961da3db55 2023-12-14T19:26:51Z [Chainstate [ibd] @ height 821045 (00000000000000000000d747d4109e45ac92b22d1af0b710faf5c0f7dd76ec6f)] resized coinsdb cache to 8.0 MiB 2023-12-14T19:26:51Z [Chainstate [ibd] @ height 821045 (00000000000000000000d747d4109e45ac92b22d1af0b710faf5c0f7dd76ec6f)] resized coinstip cache to 440.0 MiB 2023-12-14T19:26:51Z init message: Verifying blocks… 2023-12-14T19:26:51Z Verifying last 6 blocks at level 3 2023-12-14T19:26:51Z Verification progress: 0% 2023-12-14T19:26:51Z Verification progress: 16% 2023-12-14T19:26:52Z Verification progress: 33% 2023-12-14T19:26:52Z Verification progress: 50% 2023-12-14T19:26:53Z Verification progress: 66% 2023-12-14T19:26:53Z Verification progress: 83% 2023-12-14T19:26:54Z Verification progress: 99% 2023-12-14T19:26:54Z Verification: No coin database inconsistencies in last 6 blocks (23544 transactions) 2023-12-14T19:26:54Z  block index            8993ms 2023-12-14T19:26:54Z init message: Loading wallet… 2023-12-14T19:26:54Z BerkeleyEnvironment::Open: LogDir=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\database ErrorFile=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\db.log 2023-12-14T19:26:54Z [test] Wallet file version = 10500, last client version = 250000 2023-12-14T19:26:54Z [test] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0 2023-12-14T19:26:54Z [test] Wallet completed loading in              70ms 2023-12-14T19:26:54Z [test] setKeyPool.size() = 2000 2023-12-14T19:26:54Z [test] mapWallet.size() = 0 2023-12-14T19:26:54Z [test] m_address_book.size() = 0 2023-12-14T19:26:54Z init message: Pruning blockstore… 2023-12-14T19:26:54Z Leaving InitialBlockDownload (latching to false) 2023-12-14T19:26:54Z block tree size = 821195 2023-12-14T19:26:54Z nBestHeight = 821045 2023-12-14T19:26:54Z loadblk thread start 2023-12-14T19:26:54Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there, 0 waiting for initial broadcast 2023-12-14T19:26:54Z loadblk thread exit 2023-12-14T19:26:54Z torcontrol thread start 2023-12-14T19:26:54Z Bound to 127.0.0.1:8334 2023-12-14T19:26:54Z Bound to [::]:8333 2023-12-14T19:26:54Z Bound to 0.0.0.0:8333 2023-12-14T19:26:54Z 0 block-relay-only anchors will be tried for connections. 2023-12-14T19:26:54Z init message: Starting network threads… 2023-12-14T19:26:54Z net thread start 2023-12-14T19:26:54Z dnsseed thread start 2023-12-14T19:26:54Z addcon thread start 2023-12-14T19:26:54Z opencon thread start 2023-12-14T19:26:54Z msghand thread start 2023-12-14T19:26:54Z Waiting 300 seconds before querying DNS seeds. 2023-12-14T19:26:54Z init message: Done loading 2023-12-14T19:26:54Z GUI: Platform customization: "windows" 2023-12-14T19:26:55Z New outbound peer connected: version: 70016, blocks=821196, peer=0 (outbound-full-relay) 2023-12-14T19:26:56Z Saw new header hash=000000000000000000037ce90e6a6ae83cb19832d4af2d7dd27f9003335f71df height=821195 2023-12-14T19:26:56Z Saw new header hash=000000000000000000041d7eb1661ec990dd1c91e47b94e4799a35e7a20f5a85 height=821196 2023-12-14T19:27:18Z New outbound peer connected: version: 70016, blocks=821196, peer=1 (outbound-full-relay) 2023-12-14T19:27:24Z New outbound peer c
0 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#8Dec 11, 2020, 12:57 AM
Your node seems to be running without issues aside from a missing "vb" wallet that is still loaded in your "settings.json" file. Have you reproduced the crash in this last session? It has a note that the previous session was closed unexpectedly. If no, find the logs of the session when the issue happened (that would be the logs above it) Follow these instructions in case it's hard to find the right logs: Close Bitcoin Core, rename your debug.log into something like "debug-old.log".Start Bitcoin Core and repeat the steps that you've done that'll lead to a crash. (take note of any error that you get)Now, a new debug.log file should be in the data directory, and share it. BTW, to fix the warning about "Skipping -wallet path that doesn't exist": edit your 'settings.json' file and remove the name/path to that missing 'vb' wallet leaving only your available 'test' wallet. Your settings.json's contents should look like this after removing "vb",: It also tells that your blockchain is set to be pruned to 2861MiB which could be an issue in case you successfully restored the wallet file. Disabling it will require you to redownload and verify the blockchain from start.
3 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#9Dec 11, 2020, 03:04 AM
Here is the last session debug log while restoring the wallet, Core crashed without any error reporting... I set it to prune 3 GB but why it's showing 2861 MB I've no idea. I checked ErrorFile=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\bluebird\db.log But it's empty.....there is nothing 2023-12-15T07:53:00Z Bitcoin Core version v25.0.0 (release build) 2023-12-15T07:53:00Z Qt 5.15.5 (static), plugin=windows (static) 2023-12-15T07:53:00Z Static plugins: 2023-12-15T07:53:00Z  QWindowsIntegrationPlugin, version 331520 2023-12-15T07:53:00Z  QWindowsVistaStylePlugin, version 331520 2023-12-15T07:53:00Z Style: windowsvista / QWindowsVistaStyle 2023-12-15T07:53:00Z System: Windows 10 Version 2009, x86_64-little_endian-llp64 2023-12-15T07:53:00Z Screen: \\.\DISPLAY1 960x540, pixel ratio=2.0 2023-12-15T07:53:01Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation 2023-12-15T07:53:01Z Using RdSeed as an additional entropy source 2023-12-15T07:53:01Z Using RdRand as an additional entropy source 2023-12-15T07:53:01Z Default data directory C:\Users\USER\AppData\Roaming\Bitcoin 2023-12-15T07:53:01Z Using data directory C:\Users\USER\AppData\Roaming\Bitcoin 2023-12-15T07:53:01Z Config file: C:\Users\USER\AppData\Roaming\Bitcoin\bitcoin.conf (not found, skipping) 2023-12-15T07:53:01Z Setting file arg: prune = "2861" 2023-12-15T07:53:01Z Setting file arg: wallet = ["test"] 2023-12-15T07:53:01Z Using at most 125 automatic connections (2048 file descriptors available) 2023-12-15T07:53:01Z GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely…" 2023-12-15T07:53:01Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 2023-12-15T07:53:01Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements 2023-12-15T07:53:01Z Script verification uses 3 additional threads 2023-12-15T07:53:01Z scheduler thread start 2023-12-15T07:53:01Z Using wallet directory C:\Users\USER\AppData\Roaming\Bitcoin\wallets 2023-12-15T07:53:01Z init message: Verifying wallet(s)… 2023-12-15T07:53:01Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010) 2023-12-15T07:53:01Z Using wallet C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\wallet.dat 2023-12-15T07:53:01Z BerkeleyEnvironment::Open: LogDir=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\database ErrorFile=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\db.log 2023-12-15T07:53:01Z Using /16 prefix for IP bucketing 2023-12-15T07:53:01Z init message: Loading P2P addresses… 2023-12-15T07:53:01Z Loaded 66285 addresses from peers.dat  499ms 2023-12-15T07:53:01Z init message: Loading banlist… 2023-12-15T07:53:01Z SetNetworkActive: true 2023-12-15T07:53:02Z Cache configuration: 2023-12-15T07:53:02Z * Using 2.0 MiB for block index database 2023-12-15T07:53:02Z * Using 8.0 MiB for chain state database 2023-12-15T07:53:02Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2023-12-15T07:53:02Z init message: Loading block index… 2023-12-15T07:53:02Z Assuming ancestors of block 000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632 have valid signatures. 2023-12-15T07:53:02Z Setting nMinimumChainWork=000000000000000000000000000000000000000044a50fe819c39ad624021859 2023-12-15T07:53:02Z Prune configured to target 2861 MiB on disk for block and undo files. 2023-12-15T07:53:02Z Opening LevelDB in C:\Users\USER\AppData\Roaming\Bitcoin\blocks\index 2023-12-15T07:53:02Z Opened LevelDB successfully 2023-12-15T07:53:02Z Using obfuscation key for C:\Users\USER\AppData\Roaming\Bitcoin\blocks\index: 0000000000000000 2023-12-15T07:53:07Z LoadBlockIndexDB: last block file = 3994 2023-12-15T07:53:07Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=55, size=84557848, heights=821077...821197, time=2023-12-14...2023-12-14) 2023-12-15T07:53:07Z Checking all blk files are present... 2023-12-15T07:53:07Z LoadBlockIndexDB(): Block files have previously been pruned 2023-12-15T07:53:09Z Initializing chainstate Chainstate [ibd] @ height -1 (null) 2023-12-15T07:53:09Z Opening LevelDB in C:\Users\USER\AppData\Roaming\Bitcoin\chainstate 2023-12-15T07:53:09Z Opened LevelDB successfully 2023-12-15T07:53:09Z Using obfuscation key for C:\Users\USER\AppData\Roaming\Bitcoin\chainstate: d3c5ee961da3db55 2023-12-15T07:53:10Z Loaded best chain: hashBestChain=000000000000000000028f645ef86ca3c9dba92283ad41fdcdfe7b931d6b77c2 height=821197 date=2023-12-14T19:33:22Z progress=0.999826 2023-12-15T07:53:10Z [snapshot] allocating all cache to the IBD chainstate 2023-12-15T07:53:10Z Opening LevelDB in C:\Users\USER\AppData\Roaming\Bitcoin\chainstate 2023-12-15T07:53:10Z Opened LevelDB successfully 2023-12-15T07:53:10Z Using obfuscation key for C:\Users\USER\AppData\Roaming\Bitcoin\chainstate: d3c5ee961da3db55 2023-12-15T07:53:10Z [Chainstate [ibd] @ height 821197 (000000000000000000028f645ef86ca3c9dba92283ad41fdcdfe7b931d6b77c2)] resized coinsdb cache to 8.0 MiB 2023-12-15T07:53:10Z [Chainstate [ibd] @ height 821197 (000000000000000000028f645ef86ca3c9dba92283ad41fdcdfe7b931d6b77c2)] resized coinstip cache to 440.0 MiB 2023-12-15T07:53:10Z init message: Verifying blocks… 2023-12-15T07:53:10Z Verifying last 6 blocks at level 3 2023-12-15T07:53:10Z Verification progress: 0% 2023-12-15T07:53:12Z Verification progress: 16% 2023-12-15T07:53:14Z Verification progress: 33% 2023-12-15T07:53:15Z Verification progress: 50% 2023-12-15T07:53:16Z Verification progress: 66% 2023-12-15T07:53:17Z Verification progress: 83% 2023-12-15T07:53:18Z Verification progress: 99% 2023-12-15T07:53:18Z Verification: No coin database inconsistencies in last 6 blocks (22747 transactions) 2023-12-15T07:53:18Z  block index           16379ms 2023-12-15T07:53:18Z init message: Loading wallet… 2023-12-15T07:53:18Z BerkeleyEnvironment::Open: LogDir=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\database ErrorFile=C:\Users\USER\AppData\Roaming\Bitcoin\wallets\test\db.log 2023-12-15T07:53:18Z [test] Wallet file version = 10500, last client version = 250000 2023-12-15T07:53:18Z [test] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0 2023-12-15T07:53:18Z [test] Wallet completed loading in              62ms 2023-12-15T07:53:18Z [test] setKeyPool.size() = 2000 2023-12-15T07:53:18Z [test] mapWallet.size() = 0 2023-12-15T07:53:18Z [test] m_address_book.size() = 0 2023-12-15T07:53:18Z init message: Pruning blockstore… 2023-12-15T07:53:18Z Leaving InitialBlockDownload (latching to false) 2023-12-15T07:53:18Z block tree size = 821198 2023-12-15T07:53:18Z nBestHeight = 821197 2023-12-15T07:53:18Z loadblk thread start 2023-12-15T07:53:18Z torcontrol thread start 2023-12-15T07:53:18Z Bound to 127.0.0.1:8334 2023-12-15T07:53:18Z Bound to [::]:8333 2023-12-15T07:53:18Z Bound to 0.0.0.0:8333 2023-12-15T07:53:18Z Loaded 2 addresses from "anchors.dat" 2023-12-15T07:53:18Z 2 block-relay-only anchors will be tried for connections. 2023-12-15T07:53:18Z init message: Starting network threads… 2023-12-15T07:53:18Z net thread start 2023-12-15T07:53:18Z dnsseed thread start 2023-12-15T07:53:18Z Waiting 300 seconds before querying DNS seeds. 2023-12-15T07:53:18Z addcon thread start 2023-12-15T07:53:18Z opencon thread start 2023-12-15T07:53:18Z msghand thread start 2023-12-15T07:53:18Z init message: Done loading 2023-12-15T07:53:18Z GUI: Platform customization: "windows" 2023-12-15T07:53:19Z New outbound peer connected: version: 70016, blocks=821268, peer=0 (block-relay-only) 2023-12-15T07:53:19Z Saw new header hash=0000000000000000000422851e20a8bdba2eac5e7e186dbd29d25ae4e4a74fd6 height=821198 2023-12-15T07:53:19Z Saw new header hash=000000000000000000025dee97cbf174a95f0869fe6be50ce25eb3f2830d3380 height=821199 2023-12-15T07:53:19Z Saw new header hash=00000000000000000001a7608064c41287ef0b9375339169d0fd53f531a3fb72 height=821200 2023-12-15T07:53:19Z Saw new header hash=000000000000000000022a2622a0f47698fadf2fee
3 Reply Quote Share
colddiamondHero Member
Posts: 623 · Reputation: 2467
#10Dec 11, 2020, 07:27 AM
On mobile but if you are running a pruned node you can't restore an old wallet since it has to rescan the entire blockchain. If that is not what you are doing you can ignore this. -Dave
3 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#11Dec 11, 2020, 04:35 PM
Yes, I'm trying to restore an old wallet in the pruned node. Is it possible? Or do I need an unpruned node and download the whole blockchain?
2 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#12Dec 11, 2020, 10:26 PM
Seem like it's cut without showing errors in the logs either but the wallet directory is already created. I tried to reproduce the issue with a pruned node of 2GiB setting and it also crashed but the wallet is restored to the desired wallet directory (wallet name). Since it's already there, can you see 'bluebird' wallet in "File->Open Wallet" menu in your case? If it's there, the wallet can be loaded but since your blockchain is pruned and the wallet is very old, it may result with an error related to pruning. If that's the case, you may have to disable "prune block storage" setting, then --reindex to be able to load and rescan old wallets without those issues.
0 Reply Quote Share
colddiamondHero Member
Posts: 623 · Reputation: 2467
#13Dec 12, 2020, 02:01 AM
https://bitcointalk.org/index.php?topic=5213552.0 You need a full node to import a wallet. If you search around there are people that have done it with a pruned node by jumping tough hoops but it's really not worth it. -Dave
3 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#14Dec 12, 2020, 03:45 AM
Yes, it's there but when I try to open the wallet it shows some kind of error 'Wallet file verification failed. "C:\Users\USER\AppData\Roaming\Bitcoin\wallets\bluebird\wallet.dat" corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup. Here is the db.log of wallet file unknown has LSN 2/601053, past end of log at 1/28 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment Page 0: metadata page corrupted Page 0: could not check metadata page wallet.dat: DB_VERIFY_BAD: Database verification failed file unknown has LSN 2/601053, past end of log at 1/28 Commonly caused by moving a database from one database environment to another without clearing the database LSNs, or by removing all of the log files from a database environment Page 0: metadata page corrupted Page 0: could not check metadata page wallet.dat: DB_VERIFY_BAD: Database verification failed Is there any other solution to solve the problem without reindexing the whole blockchain? Thank you!
2 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#15Dec 12, 2020, 03:57 AM
Now that's an error unrelated to the previous one. In my test, restorewallet crashed with the same behavior even if the wallet isn't corrupted. Upon opening the wallet file, it resulted with the "beyond pruned blocks" error instead but the wallet is intact. You can try the suggested tool which is located in "daemon" or "bin" folder inside bitcoin's installation directory. (Default: C:/Program Files/Bitcoin) To use it (make sure that you still have the original wallet.dat file just in case 'salvagewallet' messed-up "bluebird" wallet): Browse to the directory where bitcoin-wallet.exe is located.Hold SHIFT and right-click on an empty space inside that folder (while nothing is selected); in the drop-down menu, select "Open PowerShell window here".In PowerShell, type: ./bitcoin-wallet.exe --wallet="bluebird" salvage and it'll try to salvage that restored wallet.If it's successful, the corruption error should be replaced with the prune-related error instead.If not successful, I'm afraid that it's a job for data recovery professionals. Overall, the main issue is: the wallet file that you're trying to restore could be corrupted, -reindex isn't the solution to it. And even if you successfully salvaged the corrupted wallet, you can't rescan it with a pruned blockchain without re-downloading the blockchain. Not in Bitcoin Core, rescanning an old wallet requires the blocks to be intact in your drive (no pruning) or if it's not possible to store the whole blockchain due to drive space issue, you should reindex your node while the wallet is loaded. The other solution is to export its private keys once it's salvaged and loaded on a fresh Bitcoin Core (offline) then import them to other clients.
4 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#16Dec 12, 2020, 04:34 AM
Thank you so much! I'll try to do the procedures as per your instructions and will let you know what happens. Thanks again.
0 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#17Dec 12, 2020, 12:23 PM
No problem, I'd like to also add that there's a chance that the original wallet isn't actually corrupted and the corruption of the restored "bluebird" wallet was just a result of the sudden crash. If that's the case, you can try to Install Bitcoin Core on a separate "air-gap" PC and restore and load a copy of the original wallet.dat file there. The wallet isn't actually corrupted if it loads, then you can export its private keys from dumpwallet command or if it's a descriptor wallet, export its master private key via listdescriptors true You may also want to consider restoring just the addresses or extended public key (xpub) to Electrum to create a watching-only wallet. From there, you can create transactions that you can import to the offline Bitcoin Core to sign with your private keys. Then the signed finalized transaction can be exported back to Electrum to broadcast. It's a cold-storage setup which is safer than loading (and unlocking) the wallet.dat file on an online PC.
2 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#18Dec 12, 2020, 12:58 PM
Hi, I'm downloading the bitcoin core full node. Now it's at 94% but suddenly I got an error and it keeps repeating the error when I start bitcoin core again. Is there any solution to eliminate the error? Here is the debug log....... 2023-12-20T12:52:40Z Bitcoin Core version v25.0.0 (release build) 2023-12-20T12:52:40Z Qt 5.15.5 (static), plugin=windows (static) 2023-12-20T12:52:40Z Static plugins: 2023-12-20T12:52:40Z  QWindowsIntegrationPlugin, version 331520 2023-12-20T12:52:40Z  QWindowsVistaStylePlugin, version 331520 2023-12-20T12:52:40Z Style: windowsvista / QWindowsVistaStyle 2023-12-20T12:52:40Z System: Windows 10 Version 2009, x86_64-little_endian-llp64 2023-12-20T12:52:40Z Screen: \\.\DISPLAY2 1280x1024, pixel ratio=1.0 2023-12-20T12:52:40Z Screen: \\.\DISPLAY1 1280x1024, pixel ratio=1.0 2023-12-20T12:52:41Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation 2023-12-20T12:52:41Z Using RdRand as an additional entropy source 2023-12-20T12:52:41Z Default data directory C:\Users\aurof\AppData\Roaming\Bitcoin 2023-12-20T12:52:41Z Using data directory P:\Bitcoin core 2023-12-20T12:52:41Z Config file: P:\Bitcoin core\bitcoin.conf (not found, skipping) 2023-12-20T12:52:41Z Setting file arg: wallet = ["Bluebird"] 2023-12-20T12:52:41Z Using at most 125 automatic connections (2048 file descriptors available) 2023-12-20T12:52:41Z Using 16 MiB out of 16 MiB requested for signature cache, able to store 524288 elements 2023-12-20T12:52:41Z GUI: "registerShutdownBlockReason: Successfully registered: Bitcoin Core didn't yet exit safely…" 2023-12-20T12:52:41Z Using 16 MiB out of 16 MiB requested for script execution cache, able to store 524288 elements 2023-12-20T12:52:41Z Script verification uses 3 additional threads 2023-12-20T12:52:41Z scheduler thread start 2023-12-20T12:52:41Z Using wallet directory P:\Bitcoin core 2023-12-20T12:52:41Z init message: Verifying wallet(s)… 2023-12-20T12:52:41Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010) 2023-12-20T12:52:41Z Using wallet P:\Bitcoin core\Bluebird\wallet.dat 2023-12-20T12:52:41Z BerkeleyEnvironment::Open: LogDir=P:\Bitcoin core\Bluebird\database ErrorFile=P:\Bitcoin core\Bluebird\db.log 2023-12-20T12:52:41Z Using /16 prefix for IP bucketing 2023-12-20T12:52:41Z init message: Loading P2P addresses… 2023-12-20T12:52:42Z Loaded 65342 addresses from peers.dat  351ms 2023-12-20T12:52:42Z init message: Loading banlist… 2023-12-20T12:52:42Z SetNetworkActive: true 2023-12-20T12:52:42Z Cache configuration: 2023-12-20T12:52:42Z * Using 2.0 MiB for block index database 2023-12-20T12:52:42Z * Using 8.0 MiB for chain state database 2023-12-20T12:52:42Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2023-12-20T12:52:42Z init message: Loading block index… 2023-12-20T12:52:42Z Assuming ancestors of block 000000000000000000035c3f0d31e71a5ee24c5aaf3354689f65bd7b07dee632 have valid signatures. 2023-12-20T12:52:42Z Setting nMinimumChainWork=000000000000000000000000000000000000000044a50fe819c39ad624021859 2023-12-20T12:52:42Z Opening LevelDB in P:\Bitcoin core\blocks\index 2023-12-20T12:52:42Z Opened LevelDB successfully 2023-12-20T12:52:42Z Using obfuscation key for P:\Bitcoin core\blocks\index: 0000000000000000 2023-12-20T12:52:47Z LoadBlockIndexDB: last block file = 3690 2023-12-20T12:52:47Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=62, size=106127654, heights=796206...797032, time=2023-06-27...2023-07-03) 2023-12-20T12:52:47Z Checking all blk files are present... 2023-12-20T12:52:49Z Initializing chainstate Chainstate [ibd] @ height -1 (null) 2023-12-20T12:52:49Z Opening LevelDB in P:\Bitcoin core\chainstate 2023-12-20T12:52:49Z Opened LevelDB successfully 2023-12-20T12:52:49Z Using obfuscation key for P:\Bitcoin core\chainstate: a1769642d8fc3782 2023-12-20T12:52:49Z Loaded best chain: hashBestChain=0000000000000000000202812fc73c2c33a1985e35900b1f8c87c55e14c29e54 height=796627 date=2023-06-30T23:33:43Z progress=0.940055 2023-12-20T12:52:49Z [snapshot] allocating all cache to the IBD chainstate 2023-12-20T12:52:49Z Opening LevelDB in P:\Bitcoin core\chainstate 2023-12-20T12:52:50Z Opened LevelDB successfully 2023-12-20T12:52:50Z Using obfuscation key for P:\Bitcoin core\chainstate: a1769642d8fc3782 2023-12-20T12:52:50Z [Chainstate [ibd] @ height 796627 (0000000000000000000202812fc73c2c33a1985e35900b1f8c87c55e14c29e54)] resized coinsdb cache to 8.0 MiB 2023-12-20T12:52:50Z [Chainstate [ibd] @ height 796627 (0000000000000000000202812fc73c2c33a1985e35900b1f8c87c55e14c29e54)] resized coinstip cache to 440.0 MiB 2023-12-20T12:52:50Z init message: Verifying blocks… 2023-12-20T12:52:50Z Verifying last 6 blocks at level 3 2023-12-20T12:52:50Z Verification progress: 0% 2023-12-20T12:52:51Z Verification progress: 16% 2023-12-20T12:52:52Z Verification progress: 33% 2023-12-20T12:52:53Z Verification progress: 50% 2023-12-20T12:52:54Z Verification progress: 66% 2023-12-20T12:52:55Z Verification progress: 83% 2023-12-20T12:52:56Z Verification progress: 99% 2023-12-20T12:52:56Z Verification: No coin database inconsistencies in last 6 blocks (15492 transactions) 2023-12-20T12:52:56Z  block index           14682ms 2023-12-20T12:52:56Z init message: Loading wallet… 2023-12-20T12:52:56Z BerkeleyEnvironment::Open: LogDir=P:\Bitcoin core\Bluebird\database ErrorFile=P:\Bitcoin core\Bluebird\db.log 2023-12-20T12:52:56Z [Bluebird] Wallet file version = 10500, last client version = 250000 2023-12-20T12:52:56Z [Bluebird] Keys: 1010 plaintext, 0 encrypted, 1010 w/ metadata, 1010 total. Unknown wallet records: 0 2023-12-20T12:52:57Z [Bluebird] Wallet completed loading in             566ms 2023-12-20T12:52:57Z [Bluebird] setKeyPool.size() = 1000 2023-12-20T12:52:57Z [Bluebird] mapWallet.size() = 0 2023-12-20T12:52:57Z [Bluebird] m_address_book.size() = 9 2023-12-20T12:52:57Z Setting NODE_NETWORK on non-prune mode 2023-12-20T12:52:57Z block tree size = 822077 2023-12-20T12:52:57Z nBestHeight = 796627 2023-12-20T12:52:57Z loadblk thread start 2023-12-20T12:52:57Z torcontrol thread start 2023-12-20T12:52:57Z Bound to 127.0.0.1:8334 2023-12-20T12:52:57Z Bound to [::]:8333 2023-12-20T12:52:57Z Bound to 0.0.0.0:8333 2023-12-20T12:52:57Z 0 block-relay-only anchors will be tried for connections. 2023-12-20T12:52:57Z init message: Starting network threads… 2023-12-20T12:52:57Z net thread start 2023-12-20T12:52:57Z dnsseed thread start 2023-12-20T12:52:57Z Waiting 300 seconds before querying DNS seeds. 2023-12-20T12:52:57Z addcon thread start 2023-12-20T12:52:57Z opencon thread start 2023-12-20T12:52:57Z msghand thread start 2023-12-20T12:52:58Z UpdateTip: new best=00000000000000000002fb7330fbd753dcb8e75c7120dd85bf2bdd15d12c0ce8 height=796628 version=0x27ffe000 log2_work=94.273089 tx=858573933 date='2023-06-30T23:43:47Z' progress=0.940057 cache=1.9MiB(13672txo) 2023-12-20T12:52:59Z UpdateTip: new best=00000000000000000003dc0e41e49c58f9cbbc3ce42dca3c19bef33b9bcd00b7 height=796629 version=0x20c00000 log2_work=94.273102 tx=858576921 date='2023-06-30T23:54:24Z' progress=0.940060 cache=4.0MiB(28700txo) 2023-12-20T12:52:59Z UpdateTip: new best=00000000000000000004c61455531d94a11243d18823dd6f7dfb5550c01034a1 height=796630 version=0x20400000 log2_work=94.273115 tx=858579406 date='2023-07-01T00:14:48Z' progress=0.940065 cache=6.2MiB(43328txo) 2023-12-20T12:53:00Z UpdateTip: new best=00000000000000000004aa9d2ddfd2ce04ed2797308fd29d146a49086c402767 height=796631 version=0x20012000 log2_work=94.273128 tx=858580182 date='2023-07-01T00:15:34Z' progress=0.940065 cache=7.3MiB(52427txo) 2023-12-20T12:53:01Z UpdateTip: new best=00000000000000000002fcb6df884ec43906ba9b4dbc656a1618556c3cc14fc6 height=796632 version=0x20a00004 log2_work=94.273142 tx=858582511 date='2023-07-01T00:29:16Z' progress=0.940068 cache=8.8MiB(64135txo) 2023-12-20T12:53:02Z UpdateTip: new best=000000000000000000040a142cc528c6b4d13916f3d323b0b3a412db170d89ba height=796633 version=0x20016000 log2_work=94.273155 tx=858585172 da
0 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#19Dec 12, 2020, 03:16 PM
Your full node has a corrupted UTXO Set (chainstate), you'll have to start it with --reindex-chainstate to fix that. It wont redownload the blockchain since it's not set to prune but it may take a quite while depending on the hardware. (but it's faster than -reindex) FYI, most of the time, it's caused by "unsafe" shutdown of either Bitcoin Core or the PC. So be sure to close it the right way, if it's frozen, wait for it to respond or use bitcoin-cli stop to shut it down. Bitcoin Core usually freezes while syncing specially when the data directory is stored in a slow hard drive, but even if it's frozen, it's working in the background so don't force-close it while it's frozen.
0 Reply Quote Share
tomgangFull Member
Posts: 44 · Reputation: 314
#20Dec 12, 2020, 04:04 PM
Thank you so much! I've already started --reindex-chainstate and it's working.
5 Reply Quote Share
?Reply
Sign in to reply to this topic

Related topics