Consistenly getting Block magic mismatch error?

1

I have bitcoind running (0.18) in my ubuntu machine and it keeps shutting down due after getting this error:

ERROR: ReadRawBlockFromDisk: Block magic mismatch for CDiskBlockPos(nFile=0, nPos=68821043): 00040000 versus expected f9beb4d9

I restart it and it goes for a couple of hours and then the same error is encountered and it shuts down. How can I fix this?

ooomid

Posted 2019-06-11T16:32:03.510

Reputation: 179

Answers

1

You have a corrupted block file. You will need to delete that file and all higher number files and then redownload the entire blockchain.

The block file that is corrupted is the 0th file, blk0000.dat. Since this is the first block file that Bitcoin Core creates, the easiest thing for you to do is to just delete the entire blocks and chainstate folders in your Bitcoin Core datadir. Then start Bitcoin Core. It will redownload the entire Bitcoin blockchain.

Andrew Chow

Posted 2019-06-11T16:32:03.510

Reputation: 40 910

Oh man, this keeps happening. I've had to reindex multiple times. Maybe reindex was the incorrect thing to do.. I read that it keeps whatever blocks I have in my harddrive and downloads missing blocks. Anyways, will give deleting the whole blocks directory a try. Thanks!ooomid 2019-06-11T16:52:11.990

1If this keeps happening, you likely have a hardware issue (disk corruption, CPU overheating, bad memory, ...). Note that this is possible even when you don't have problems with other software; Bitcoin Core tends to push hardware much more than most things, and is also far more sensitive to certain classes of errors.Pieter Wuille 2019-06-11T17:17:21.707

Thank you for your input senpai! It's currently running on an ancient laptop that probably does overheat. I'm thinking of building a dedicated server.ooomid 2019-06-11T17:41:32.430