<p>That block file is corrupted. You will have to delete blk00622.dat and any higher numbered blk*.dat file and rev00622.dat and any higher numbered rev*.dat file. Then you will need to reindex. This should fix the issue as the corrupted blocks will be redownloaded.</p>

CC BY-SA 3.0
2017-06-13T07:12:54.160Z
2017-06-13T07:12:54.160Z
Ava Chow
<p>Blockparsers fail if downloading of blockchain is not completed.</p>

<p>Make sure you download all blockchain then try your blockparser.</p>

CC BY-SA 3.0
2016-10-29T01:58:22.923Z
2016-10-29T01:58:22.923Z
Sh Sh
<p>I've recently written my own blockchain parser. It works well (yay!) up to a certain block and then fails because the data read is pure nonsense.</p>

<p>I've tracked down the error away from my code to the data on the disc and I get the same result if I parse the file only using a sheet of paper and a hex editor. Even after deleting the file and executing <code> bitcoind -reindex </code> I still get the same erroneous results.</p>

<p>My question is if anybody can reproduce this or if my data is still corrupted somehow. Maybe I just need to delete <em>all</em> files and let bitcoind create them again?</p>

<p>My findings:</p>

<ul>
<li>blk00622.dat causes the trouble</li>
<li>Problem still exists after deleting blk00622.dat and running <code>bitcoind -reindex</code> (according to <code>diff</code> the new file equals the old one) </li>
<li>The last ok block is block #428949 (at file address 0x7B748DF). 
I have no problem parsing it with my hex editor, I get the same results as shown here: <a href="https://blockchain.info/de/block-index/1144703" rel="nofollow">https://blockchain.info/de/block-index/1144703</a></li>
<li>The erroneous block begins at file address 0x7C68AB3</li>
<li>It starts with <code> F9 BE B4 D9 41 0F 0F 00 F9 BE B4 D9</code>*</li>
</ul>

<p><code>F9 BE B4 D9</code> is the block's magic number and <code>41 0F 0F 00</code> is the block size. The strange thing here is that the following version number again equals the magic number (which makes me thing that maybe my data is still corrupt). The remaining data of the block makes no sense, 
for example the time field points to 03/04/1948 ..</p>

<p>Edit: Please see the comments below for an URL to the file (I am not allowed to put more than 2 links in here unfortunately).</p>

<p>Thanks!</p>

<p>*see <a href="https://en.bitcoin.it/wiki/Block" rel="nofollow">https://en.bitcoin.it/wiki/Block</a></p>

CC BY-SA 3.0
2016-09-30T18:54:15.573Z
Maybe it would help if you could post a copy of the offending blk00622.dat somewhere?
Nate Eldredge
CC BY-SA 3.0
2016-09-30T20:18:52.530Z
The file is available at: https://userpages.uni-koblenz.de/~hheinz/btc/blk00622.dat
user41830
CC BY-SA 3.0
2016-10-01T14:01:20.557Z
It does seem like that file is corrupted.  I don't understand how it can be recreated exactly the same.  Note that reindexing itself won't recreate the file; it would have to come from redownloading those blocks from the network. I would wonder if you are really looking at the files that you think you are.
Nate Eldredge
CC BY-SA 3.0
2016-10-02T14:12:27.247Z
Thanks for taking a look. Unfortunately I deleted my shell history file so I can not guarantee that I did not make a mistake. I now ran bitcoind again with with an other `-datadir` and now the new file differs from the old one.
user41830
<blockchain><bitcoind><raw-data>
special block version or is my data corrupt?
user41830
# special block version or is my data corrupt?

(Asked by: username_0 on 2016-09-30)

I've recently written my own blockchain parser. It works well (yay!) up to a certain block and then fails because the data read is pure nonsense.

I've tracked down the error away from my code to the data on the disc and I get the same result if I parse the file only using a sheet of paper and a hex editor. Even after deleting the file and executing  `bitcoind -reindex`  I still get the same erroneous results.

My question is if anybody can reproduce this or if my data is still corrupted somehow. Maybe I just need to delete *all* files and let bitcoind create them again?

My findings:

* blk00622.dat causes the trouble
* Problem still exists after deleting blk00622.dat and running `bitcoind -reindex` (according to `diff` the new file equals the old one)
* The last ok block is block #428949 (at file address 0x7B748DF).
  I have no problem parsing it with my hex editor, I get the same results as shown here: <https://blockchain.info/de/block-index/1144703>
* The erroneous block begins at file address 0x7C68AB3
* It starts with  `F9 BE B4 D9 41 0F 0F 00 F9 BE B4 D9`\*

`F9 BE B4 D9` is the block's magic number and `41 0F 0F 00` is the block size. The strange thing here is that the following version number again equals the magic number (which makes me thing that maybe my data is still corrupt). The remaining data of the block makes no sense,
for example the time field points to 03/04/1948 ..

Edit: Please see the comments below for an URL to the file (I am not allowed to put more than 2 links in here unfortunately).

Thanks!

\*see <https://en.bitcoin.it/wiki/Block>

**Tags:** blockchain, bitcoind, raw-data

> **Comments:**
> **username_1**: Maybe it would help if you could post a copy of the offending blk00622.dat somewhere?  
> **username_0**: The file is available at: https://userpages.uni-koblenz.de/~hheinz/btc/blk00622.dat  
> **username_1**: It does seem like that file is corrupted.  I don't understand how it can be recreated exactly the same.  Note that reindexing itself won't recreate the file; it would have to come from redownloading those blocks from the network. I would wonder if you are really looking at the files that you think you are.  
> **username_0**: Thanks for taking a look. Unfortunately I deleted my shell history file so I can not guarantee that I did not make a mistake. I now ran bitcoind again with with an other `-datadir` and now the new file differs from the old one.  

---

## 2 answers

### Answer by username_2 on 2017-06-13. Score: 1

That block file is corrupted. You will have to delete blk00622.dat and any higher numbered blk\*.dat file and rev00622.dat and any higher numbered rev\*.dat file. Then you will need to reindex. This should fix the issue as the corrupted blocks will be redownloaded.


---

### Answer by username_3 on 2016-10-29. Score: 0

Blockparsers fail if downloading of blockchain is not completed.

Make sure you download all blockchain then try your blockparser.


---

