1

I'm a total newbie who's into Bitcoin. I was in the middle of downloading Bitcoin core(78%) when my computer just freeze for hours that I have to force shutdown without closing the Bitcoin Core properly.

When I rebooted and started Bitcoin Core again, it shows "Error Reading from Database" and close itself. I repeated the process and it's the same.

I have checked on the debug file and seems like there is a corruption of data mismatch.

Does anyone have experience with this situation? Please help me, it took me 5 days to reach this download progress, and I definitely would appreciate to not start all over again T.T

2023-02-23T02:59:18Z LevelDB read failure: Corruption: block checksum mismatch: G:\BITCOIN\chainstate/333875.ldb

2023-02-23T02:59:18Z Fatal LevelDB error: Corruption: block checksum mismatch: G:\BITCOIN\chainstate/333875.ldb

2023-02-23T02:59:18Z You can use -debug=leveldb to get more complete diagnostic messages

2023-02-23T02:59:18Z Error: Error reading from database, shutting down.

2023-02-23T03:00:54Z Error reading from database: Fatal LevelDB error: Corruption: block checksum mismatch: G:\BITCOIN\chainstate/333875.ldb

Thank you!!!!!

8
  • According to this error the specific chainstate object 333875.ldb is corrupt, perhaps removing it and any chainstate objects after it( if there are any) might allow the node to proceed beyond this point. Proceed cautiously as I cant be sure this will solve it. Only remove 333875 or higher anything lower theoretically was already checked to be not corrupt by your node. In general issues like this are unfortunately common when setting up a node for the first time, you will learn to have a setup process that ensures you do not run into crashes and can maintain high up-time with practice.
    – Poseidon
    Feb 23, 2023 at 3:26
  • Hey Poseidon! Appreciate your quick reply with the suggestion and advice regarding how to better prepare for setting up Bitcoin Core for the first time! I saw in some forum stating that reindex the wallet from cmd might help. (bitcoin-qt -reindex). Do you think I can run it without making things worse? Thanks again!
    – flysheep
    Feb 23, 2023 at 3:36
  • Well technically running it when you have a corrupted chain state wont make it 'worse' it will just replicate the error if you don't alter anything. The re-index command may work, from what I assume you were still downloading the chain while it got corrupted which means the wallet likely wasn't syncing yet unless I am mistaken. If the wallet syncs in parallel with the block download that command might work. Otherwise I suspect that this 333875.ldb file is the most recent file in your G:\BITCOIN\chainstate\ folder, if thats the case I think just removing 333875.ldb then restarting may work.
    – Poseidon
    Feb 23, 2023 at 3:41
  • Thanks for enlighten me, it's very helpful for a newbie like me! I just did a quick check on the chainstate folder and found that the recent file is 334183, instead of 333875. What does it mean?
    – flysheep
    Feb 23, 2023 at 3:53
  • So that means that more state files were downloaded after the corrupted one some how. Try to run the wallet reindex command first as that cannot hurt, if it doesnt work try to delete all the recent chainstate files until you reach 333874l.db which you should be able to keep. After deleting 334183 - 333875 restart the node. If you have funds with the private key there make sure to make backups of the privatekey wallet data before deleting anything just to be safe. Either way proceed cautiously.
    – Poseidon
    Feb 23, 2023 at 4:03

1 Answer 1

4

As indicated by the logs, your chainstate database is corrupt. You can fix this without re-doing IBD by restarting your node with -reindex-chainstate. For more information on the differences between -reindex and -reindex-chainstate, check out When should I use -reindex-chainstate and when -reindex

From the comments, it seems you are using bitcoin-qt on Windows. I don't have access to a windows machine, but the command you need to run is something like the following:

<Path\to\bitcoin\executables>\bitcoin-qt.exe -reindex-chainstate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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