I am trying to read the value against block hash in level DB of Bitcoin node database - Block/index. For Genesis block, I get 88 bytes which I want to parse. I tried to follow instructions in https://bitcoin.stackexchange.com/questions/67515/format-of-a-block-keys-contents-in-bitcoinds-leveldb but wasnt able to do that successfully as the first 4 bytes should be version but I get an invalid version.

I tried obfuscating the whole value as well but still the first 4 bytes does not give me a valid version. I must be doing something wrong but not able to identify that.

Value I get (in hex string)


Additional resource I tried - Link

Note: I am using c# to read and parse the data.

1 Answer 1


Found the logic for parsing the block index here

  • This logic for parsing is up to date already. If you need to know how to parse RAW data, you can try my parser github.com/ragestack/blockchain-parser May 11, 2021 at 9:17
  • @DenisLeonov, your code talks about parsing the bat files however my question is on Block index
    – Ankit
    May 12, 2021 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.