0

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)

8be750000b0100080100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c

Additional resource I tried - Link

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

1 Answer 1

0

Found the logic for parsing the block index here

2
  • 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 that you have read and understand our privacy policy and code of conduct.

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