Bitcoin Forum
May 02, 2024, 07:09:20 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core v27.0 Error reading from database  (Read 139 times)
decryptit (OP)
Member
**
Offline Offline

Activity: 100
Merit: 15


View Profile
April 18, 2024, 06:59:38 PM
Merited by vapourminer (1), satscraper (1)
 #1

Hi all,

I am having issues with starting my Bitcoin Core wallet on a Windows. I keep getting error stating: Error reading from database.

I've tried to uninstall and reinstall different BC version, still the same error and the wallet won't start. It was previously fully synced.

At the bottom of the debug log, it shows LevelDB error: Corruption block checksum mismatch: F:\Bitcoin\chainstate/3348075.ldb.

From reading on a couple of other posts with similar problem, it looks like the recommendation was to save the wallet.dat and delete and restart everything.

My question is, is it possible to delete the 3348075.ldb from the chainstate folder and restart from there? Would that help minimize having to resync the entire blockchain again?

Thank you.
1714633760
Hero Member
*
Offline Offline

Posts: 1714633760

View Profile Personal Message (Offline)

Ignore
1714633760
Reply with quote  #2

1714633760
Report to moderator
1714633760
Hero Member
*
Offline Offline

Posts: 1714633760

View Profile Personal Message (Offline)

Ignore
1714633760
Reply with quote  #2

1714633760
Report to moderator
1714633760
Hero Member
*
Offline Offline

Posts: 1714633760

View Profile Personal Message (Offline)

Ignore
1714633760
Reply with quote  #2

1714633760
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714633760
Hero Member
*
Offline Offline

Posts: 1714633760

View Profile Personal Message (Offline)

Ignore
1714633760
Reply with quote  #2

1714633760
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6576


Just writing some code


View Profile WWW
April 18, 2024, 07:18:34 PM
Merited by pooya87 (4), LoyceV (4), ABCbits (2), vapourminer (1)
 #2

Starting with -reindex-chainstate should be good enough, you won't need to resync all of the blocks as the corruption is in the chainstate database and not the blockchain.

My question is, is it possible to delete the 3348075.ldb from the chainstate folder and restart from there? Would that help minimize having to resync the entire blockchain again?
No. LevelDB lays out its database in a particular way and deleting any of its files is a surefire way to have even more corruption. The data there is not necessarily stored sequentially.

decryptit (OP)
Member
**
Offline Offline

Activity: 100
Merit: 15


View Profile
April 18, 2024, 07:24:39 PM
 #3

How do I do the reindex-chainstate files?

Starting with -reindex-chainstate should be good enough, you won't need to resync all of the blocks as the corruption is in the chainstate database and not the blockchain.

My question is, is it possible to delete the 3348075.ldb from the chainstate folder and restart from there? Would that help minimize having to resync the entire blockchain again?
No. LevelDB lays out its database in a particular way and deleting any of its files is a surefire way to have even more corruption. The data there is not necessarily stored sequentially.
promise444c5
Full Member
***
Offline Offline

Activity: 280
Merit: 131


Keep Promises !


View Profile
April 18, 2024, 11:05:21 PM
 #4

How do I do the reindex-chainstate files?
Inorder to perform reindex
Navigate to your bitcoin.conf file , by default  located in 
C:\Users\<you>\AppData\Local\Bitcoin
Else, check the part selected while installing ,if you don't have it create one.
Insert
Code:
 reindex-chainstate=1

nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
April 19, 2024, 04:55:00 AM
Merited by vapourminer (2)
 #5

How do I do the reindex-chainstate files?
First, close Bitcoin Core.
Find Bitcoin Core's installation folder, look for "Bitcoin-qt" if you're using the GUI, else in daemon folder. (if you've used the installer, it defaults to "C:\Program Files\Bitcoin")
While inside that folder, click Windows Explorer's "File" menu and select "Open Windows PowerShell" that will select the current folder as your working directory.
The working directory should be displayed in PowerShell, e.g.: PS C:\Program Files\Bitcoin>

In PowerShell, enter this to start Bitcoin-qt with the mentioned command line arg:
Code:
./bitcoin-qt --reindex-chainstate
That'll start Bitcoin Core and tell it to rebuild the chainstate.
Take note that it will take quite some time but it will not re-download blocks that you already have, unless your blockchain is "pruned".


If you decided to follow the instructions above, you MUST remove that entry in your bitcoin.conf after your node is done with it.
Or else, it will reindex-chainstate every time you restart the client.

Also, the default data directory is in the "Roaming" appdata directory instead of "local".
So it should be in: C:\Users\<YOUR_USERNAME>\AppData\Roaming\Bitcoin ; Shortcut: %appdata%/bitcoin
But if you've set the datadir in F:/ with the GUI's "Welcome Screen", you should use/create the bitcoin.conf file there.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
satscraper
Hero Member
*****
Offline Offline

Activity: 728
Merit: 1338


Cashback 15%


View Profile
April 19, 2024, 07:03:36 AM
Last edit: April 19, 2024, 07:14:44 AM by satscraper
 #6


From reading on a couple of other posts with similar problem, it looks like the recommendation was to save the wallet.dat and delete and restart everything.


Probably to start from the  scratch is the best advice you have found so far as reindex-chainstate takes the painful time and doesn't guarantee that it will cope with the problem.

A few months ago I found myself in the similar situation and reindex-chainste didn't help thus I wasted the time trying to use it to avoid IBD.

When starting from scratch don't forget to put down into bitcoin.conf the following entries: dbcache=1/4 RAM  (for 8 GB  dbcache=2048, while for 16 GB dbcache=4096) and blocksonly=1 to sync a bit faster.

BTW, v. 27.0 completes its  halt operations much faster then my previous 26.0


.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
April 19, 2024, 07:14:55 AM
 #7

Probably to start from the  scratch is the best advice you have found so far as reindex-chainstate takes the painful time and doesn't guarantee that it will cope with the problem.
But the debug.log entry shows otherwise.
It specifically written that a file in his chainstate folder is corrupted that should be fixed by rebuilding the chainstate as mentioned by achow101.
Your previous case may not be related to chainstate corruption that's why the command didn't worked.

And the time it takes to --reindex-chainstate may not be fast but not as slow as --reindex or IBD.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
satscraper
Hero Member
*****
Offline Offline

Activity: 728
Merit: 1338


Cashback 15%


View Profile
April 19, 2024, 08:10:21 AM
Last edit: April 19, 2024, 08:34:45 AM by satscraper
 #8

And the time it takes to --reindex-chainstate may not be fast but not as slow as --reindex or IBD.

Agreed, but IBD secures full guarantee of pure untouched  copy of blockchain at your possession.

After my case I'm sold on the keeping of backup copy of the blockchain. I have acquired  2TB SSD and attach it to my node from time to time to keep this backup active.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
snerd
Newbie
*
Online Online

Activity: 17
Merit: 1


View Profile WWW
April 19, 2024, 08:21:33 PM
Merited by vapourminer (1)
 #9

And the time it takes to --reindex-chainstate may not be fast but not as slow as --reindex or IBD.

Agreed, but IBD secures full guarantee of pure untouched  copy of blockchain at your possession.

After my case I'm sold on the keeping of backup copy of the blockchain. I have acquired  2TB SSD and attach it to my node from time to time to keep this backup active.
I set a folder backup to run once a day. Restoring will leave only one day to sync.
decryptit (OP)
Member
**
Offline Offline

Activity: 100
Merit: 15


View Profile
April 24, 2024, 03:15:14 AM
 #10

How do I do the reindex-chainstate files?
Inorder to perform reindex
Navigate to your bitcoin.conf file , by default  located in 
C:\Users\<you>\AppData\Local\Bitcoin
Else, check the part selected while installing ,if you don't have it create one.
Insert
Code:
 reindex-chainstate=1


I see. Let me try this one. Thanks.
decryptit (OP)
Member
**
Offline Offline

Activity: 100
Merit: 15


View Profile
April 24, 2024, 03:42:45 AM
 #11

How do I do the reindex-chainstate files?
Inorder to perform reindex
Navigate to your bitcoin.conf file , by default  located in 
C:\Users\<you>\AppData\Local\Bitcoin
Else, check the part selected while installing ,if you don't have it create one.
Insert
Code:
 reindex-chainstate=1


I see. Let me try this one. Thanks.

So I did the reindex-chainstate=1 and removed the pound sign. Now Bitcoin Core wallet is running again, but now it's starting back from 2009, which was the reason I was afraid I'd have to do.
nc50lc
Legendary
*
Offline Offline

Activity: 2394
Merit: 5578


Self-proclaimed Genius


View Profile
April 24, 2024, 04:11:14 AM
Merited by vapourminer (2)
 #12

-snip-
So I did the reindex-chainstate=1 and removed the pound sign. Now Bitcoin Core wallet is running again, but now it's starting back from 2009, which was the reason I was afraid I'd have to do.
I made a note about reindex-chainstate in my reply just below his.
To rephrase that, if your blockchain is pruned, it'll have to redownload the blockchain to rebuild the chainstate.
If it is pruned, I'm afraid that you don't have any choice but to restart IBD due to having a corrupted chainstate and pruned blockchain.
Also, read the other important notes since you've used the config file method.

Or is your blockchain not pruned?
Because it will seemingly do IBD but it's just processing the existing blocks on your disk.
Are you using Bitcoin-qt (with GUI)? Does it show "Processing Blocks on disk", if so, that's just "reindexing"... not downloading.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
promise444c5
Full Member
***
Offline Offline

Activity: 280
Merit: 131


Keep Promises !


View Profile
April 24, 2024, 06:48:32 PM
Merited by vapourminer (2)
 #13



So I did the reindex-chainstate=1 and removed the pound sign. Now Bitcoin Core wallet is running again, but now it's starting back from 2009, which was the reason I was afraid I'd have to do.
Are you using a prune mode ?? Or you don't  know how to check ??
If yes (you don't know if it's  pruned )
For bitcoin-qtwith GUI go to your
settings>options
You should see your prune settings like this


if it's checked ✔️  then you  are pruned and running  re-index will probably  start the whole sync process  from the beginning  just as @nc50lc posted in his comment
If not then  read this again
Quote
Or is your blockchain not pruned?
Because it will seemingly do IBD but it's just processing the existing blocks on your disk.
Are you using Bitcoin-qt (with GUI)? Does it show "Processing Blocks on disk", if so, that's just "reindexing"... not downloading.


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!