Just fired up Bitcoin Core on my MacBook and now it’s downloading the whole blockchain again. I’ve got the right folder set up on my external SSD where I had everything before. I even hit 'reset options' but after a restart, it still ignores the SSD and starts fresh. Anyone got a clue what’s going on?
Why does Bitcoin Core keep downloading the blockchain?
17 replies 266 views
Sounds like Bitcoin Core isn’t seeing the data files for some reason, that’s why it’s re-downloading everything. Check your SSD status and make sure all files are present and not corrupted. You might want to run ewscan or reindex the blockchain data. Also, look at your bitcoin.conf file to verify the 'datadir' setting points to where your blockchain is.
I appreciate it, but this sounds pretty complicated. Is there a simpler way to deal with this? What's a good way to store the blockchain?
Not sure if this’ll help but check if there’s a bitcoin.conf file in the Bitcoin directory. If it’s not there, create one and add the necessary text to make Bitcoin Core save and read from your designated path. Let me know if that does the trick.
Tried that, but now I can’t even start Bitcoin Core. It gives me an error saying "Error reading configuration file: parse error on line 2: -datadir=$HOME/Library/Application Support/Bitcoin/blocks." Any suggestions on what to do? Also, how do I confirm my datadir is set correctly?
Oops, looks like you added the parameter wrong. Just remove the leading dash on 'datadir' in the config file. It should be like 'datadir=yourblockdatafolder'.
Checking the logs could give more insight into what’s happening. Look for the "debug.log" file in your data directory, it might have some clues.
I disagree with that approach. I've been using my external SSD for years without issues. Why's that bad? Can you break it down? Also, double-check that your external SSD has a bitcoin.conf file.
Make sure Bitcoin Core isn’t running, then go to Terminal and create a symbolic link to your blockchain on the SSD. Use the right path for your SSD. After that, restart Bitcoin Core.
@marc3535, you can either create that symbolic link or adjust the datadir in your bitcoin.conf to point to where your blockchain data is.
Nothing seems to work. If I set the datadir to my SSD, Bitcoin Core just starts from scratch again. Terminal is giving me errors too. Gonna have to download the entire blockchain, I guess.
I’m highlighting the concern because external drives can get damaged, and constant plugging/unplugging might lead to problems like you’re facing. Might not be the cause, but it’s a risk.
As I mentioned, checking logs like "debug.log" can guide you. It records the arguments you've set and any errors. If you want, share some of the log content; just don’t include anything private.
That log file is massive though. Don't really want to sift through it all... Now Bitcoin Core seems to be writing.dat files in the chainstate instead of blocks. Does that mean anything? Also, here’s a snippet of my debug.log after the restart.
Your config looks like Bitcoin Core recognizes the setup okay, and it’s saving chainstate. It seems that the syncing is about 25% done. Can you share the output of 'bitcoin-cli getblockchaininfo' to see the current state?
Here’s the output. Any chance it reset by itself? Or is it still syncing?
"chain": "main",
"blocks": 535936,
"headers": 826689,
"bestblockhash": "000000000000000000247fb1af3730f105ebf14b303d1c7eb6282cff46e94815",
"verificationprogress": 0.3645248712057892,
Not much we can compare without the pre-restart logs. It looks like the datadir loaded doesn’t include all blockchain data. There could be an issue with settings or something changed in your Mac.
ben.matrixNewbie
Posts: 3523 · Reputation: 35
#18Jun 23, 2022, 04:00 AM
There are definitely inconsistencies showing. It looks like it’s still trying to sync from an incomplete state. Double-check the config, especially if there are any unusual parameters set.