<p>As indicated by the logs, your chainstate database is corrupt. You can fix this without re-doing IBD by restarting your node with <code>-reindex-chainstate</code>. For more information on the differences between <code>-reindex</code> and <code>-reindex-chainstate</code>, check out <a href="https://bitcoin.stackexchange.com/questions/60709/when-should-i-use-reindex-chainstate-and-when-reindex">When should I use -reindex-chainstate and when -reindex</a></p>
<p>From the comments, it seems you are using <code>bitcoin-qt</code> on Windows. I don't have access to a windows machine, but the command you need to run is something like the following:</p>
<pre><code>&lt;Path\to\bitcoin\executables&gt;\bitcoin-qt.exe -reindex-chainstate
</code></pre>

CC BY-SA 4.0
2023-02-23T08:27:29.263Z
2023-02-23T08:27:29.263Z
josie
<p>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.</p>
<p>When I rebooted and started Bitcoin Core again, it shows &quot;Error Reading from Database&quot; and close itself. I repeated the process and it's the same.</p>
<p>I have checked on the debug file and seems like there is a corruption of data mismatch.</p>
<p>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</p>
<p>2023-02-23T02:59:18Z LevelDB read failure: Corruption: block checksum mismatch: G:\BITCOIN\chainstate/333875.ldb</p>
<p>2023-02-23T02:59:18Z Fatal LevelDB error: Corruption: block checksum mismatch: G:\BITCOIN\chainstate/333875.ldb</p>
<p>2023-02-23T02:59:18Z You can use -debug=leveldb to get more complete diagnostic messages</p>
<p>2023-02-23T02:59:18Z Error: Error reading from database, shutting down.</p>
<p>2023-02-23T03:00:54Z Error reading from database: Fatal LevelDB error: Corruption: block checksum mismatch: G:\BITCOIN\chainstate/333875.ldb</p>
<p>Thank you!!!!!</p>

CC BY-SA 4.0
2023-02-23T03:26:28.457Z
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
CC BY-SA 4.0
2023-02-23T03:36:17.850Z
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
CC BY-SA 4.0
2023-02-23T03:41:33.243Z
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
CC BY-SA 4.0
2023-02-23T03:53:35.947Z
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
CC BY-SA 4.0
2023-02-23T04:03:24.043Z
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
CC BY-SA 4.0
2023-02-23T04:10:14.773Z
Yes sir!!! Gonna try this now, finger crossed!! But I have a silly question, apparently I'm not very familiar with cmd and typing "C:\WINDOWS\system32>bitcoin-qt -reindex" return as not recognizable command. It shows the same error after I changed to the bitcoin-core folder (G:\bitcoin-24.0.1>bitcoin-qt -reindex). Which directory should I run this command on? XD
flysheep
CC BY-SA 4.0
2023-02-23T04:21:26.950Z
I suggest to read through this: https://bitcoin.stackexchange.com/questions/60709/when-should-i-use-reindex-chainstate-and-when-reindex
Before continuing so you know what these commands do. Also Im not really familiar with the process on windows however this seems to be the way to do it https://coinguides.org/rescan-reindex-wallet/
Poseidon
CC BY-SA 4.0
2023-02-23T06:56:42.720Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/143102/discussion-between-flysheep-and-poseidon).
flysheep
<bitcoin-core>
Error Reading from Database While Downloading Bitcoin Core Initial Block
flysheep
# Error Reading from Database While Downloading Bitcoin Core Initial Block

(Asked by: username_0 on 2023-02-23)

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!!!!!

**Tags:** bitcoin-core

> **Comments:**
> **username_1**: 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.  
> **username_0**: Hey username_1! 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!  
> **username_1**: 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.  
> **username_0**: 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?  
> **username_1**: 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.  
> **username_0**: Yes sir!!! Gonna try this now, finger crossed!! But I have a silly question, apparently I'm not very familiar with cmd and typing "C:\WINDOWS\system32>bitcoin-qt -reindex" return as not recognizable command. It shows the same error after I changed to the bitcoin-core folder (G:\bitcoin-24.0.1>bitcoin-qt -reindex). Which directory should I run this command on? XD  
> **username_1**: I suggest to read through this: https://bitcoin.stackexchange.com/questions/60709/when-should-i-use-reindex-chainstate-and-when-reindex Before continuing so you know what these commands do. Also Im not really familiar with the process on windows however this seems to be the way to do it https://coinguides.org/rescan-reindex-wallet/  
> **username_0**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/143102/discussion-between-username_0-and-username_1).  

---

## 1 answers

### Answer by username_2 on 2023-02-23. Score: 5

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](https://bitcoin.stackexchange.com/questions/60709/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

```


---

