Trouble Starting Bitcoin Core Wallet Due to Database Error

12 replies 211 views
GrimOmegaFull Member
Posts: 21 · Reputation: 345
#1Aug 15, 2022, 12:51 AM
Hey everyone, I'm having a tough time getting my Bitcoin Core wallet up and running on Windows. I keep seeing this error: Error reading from database. I've uninstalled and reinstalled multiple versions, but nothing seems to work. My wallet was synced before all this started. The debug log shows LevelDB error: Corruption block checksum mismatch: F:\Bitcoin\chainstate/3348075.ldb. From what I've read, people suggest saving wallet.dat and then deleting everything to restart. Is that right?
2 Reply Quote Share
matrix2021Full Member
Posts: 92 · Reputation: 612
#2Aug 15, 2022, 04:31 AM
To fix this, use -reindex-chainstate. You shouldn't have to resync all blocks since the issue is with the chainstate database, not the blockchain itself.
3 Reply Quote Share
GrimOmegaFull Member
Posts: 21 · Reputation: 345
#3Aug 15, 2022, 08:15 AM
How do I actually reindex the chainstate files?
6 Reply Quote Share
Ba5edGuruFull Member
Posts: 92 · Reputation: 349
#4Aug 15, 2022, 01:34 PM
To reindex, go to your bitcoin.conf file, usually found in C:\Users\<you>\AppData\Local\Bitcoin. If you can’t find it, check your installation settings or create a new one. Add the necessary commands in there.
4 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#5Aug 15, 2022, 02:28 PM
First, close Bitcoin Core. Locate the installation folder and find "Bitcoin-qt" if you’re using the GUI. If you installed it, it's likely in "C:\Program Files\Bitcoin". In that folder, open Windows PowerShell from the File menu. You need to run Bitcoin-qt with the reindex command from PowerShell.
4 Reply Quote Share
0xLynxMember
Posts: 113 · Reputation: 205
#6Aug 15, 2022, 03:22 PM
Honestly, starting from scratch might be your best bet. Reindexing can take forever and it’s not a guaranteed fix. I had the same issue a while back and reindexing didn’t help me at all.
4 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#7Aug 17, 2022, 06:13 PM
But his debug log clearly states a file is corrupted in the chainstate folder. Rebuilding the chainstate should fix that. Your issue might be different, which is why the reindex didn’t work for you.
5 Reply Quote Share
0xLynxMember
Posts: 113 · Reputation: 205
#8Aug 17, 2022, 10:05 PM
True, but IBD gives you a complete, untouched copy of the blockchain. I back mine up regularly on a 2TB SSD. It's worth it.
3 Reply Quote Share
QuantumOrbitFull Member
Posts: 21 · Reputation: 649
#9Aug 18, 2022, 03:24 AM
I set mine to back up daily. Restoring only takes a day to sync, which is nice.
3 Reply Quote Share
GrimOmegaFull Member
Posts: 21 · Reputation: 345
#10Aug 18, 2022, 05:37 AM
Got it! Let me try that. Thanks a bunch!
2 Reply Quote Share
GrimOmegaFull Member
Posts: 21 · Reputation: 345
#11Aug 18, 2022, 09:20 AM
I did the reindex-chainstate=1 and removed the pound sign. Now my Bitcoin Core wallet is working, but it’s starting from 2009, which is exactly what I was trying to avoid.
1 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#12Aug 18, 2022, 07:38 PM
I mentioned reindex-chainstate in my previous reply too. If your blockchain is pruned, you’ll have to redownload it to fix the chainstate. If it is pruned, then unfortunately, you’ll have to restart IBD because of the corrupted chainstate. Check your config file for more info.
5 Reply Quote Share
Ba5edGuruFull Member
Posts: 92 · Reputation: 349
#13Aug 18, 2022, 10:18 PM
Are you running in prune mode? If you aren't sure, go to your settings in Bitcoin-qt. If prune is checked, then yeah, running a reindex will start syncing from scratch just like @nc50lc mentioned. If it’s not checked, you should be good.
2 Reply Quote Share

Related topics