Analysing the raw block Hex file but I can not find the expected information

0

My goal is to understand better, how transactions and blocks are built raw. For that, I found several questions and answer here on StackExchange, but the best for me was this post: Download single and specific block for study purposes

Then I followed the information in this answer and had a look at this block.

Raw HEX file of the block here.

Now my question is: Why do I not find transaction hash in the raw hex file?

When I am looking for a specific transaction hash (e.g. "909374f0cc117...) I do not find it. I thought each transaction is added to the block. Maybe not the hash of the transaction?

0xjacobb

Posted 2018-03-09T10:06:01.483

Reputation: 11

Answers

1

Each transaction is indeed added to the block, but only its contents, the hash is then derived by hashing the transaction data twice with SHA-256.

This image explains how a block is laid out in hex.

alcio

Posted 2018-03-09T10:06:01.483

Reputation: 1 164

Now I am a little bit confused. There is only the transaction hash, Inputs and Outputs in the file: https://webbtc.com/block/00000000000000000a3ed9a4e25407518aa854f09fa1981adaae9455a91d1966

None of these information in in the raw hex file. In your file, the section after T2 shows, that there must be Input information in the raw file. But is it the Hash(I1-I5) what I should see? What do I miss?

0xjacobb 2018-03-09T11:51:39.013

I don't know how webbtc generates this page, but it looks like they enrich the data present in the block raw hex data. For example, they show the inputs' values when they are not present in the block data.

You should look at the note in red on the image present on the right of I1 for more information about tx hashes. – alcio 2018-03-10T09:53:46.247

If I understand you correct, you would agree with me, that the RAW webbtc file is not totally "original raw" as it should be because of "For example, they show the inputs' values when they are not present in the block data."

As mentioned in I1 on your picture, each transaction hash should be found in the RAW file, but on webbtc it is not the case, correct?

Do you have a better website to analyse RAW Hex files, which are correct? – 0xjacobb 2018-03-12T06:39:52.933

I think Webbtc returns the correct raw block hex data, but enriches the HTML view with extra data. http://srv.yogh.io/#block:last would be a better website for you.

alcio 2018-03-12T10:18:26.957

But if the raw data is correct, I should find the Raw transaction in hex in this data. Or am I wrong? srv.yogh.io is a great website, but what I am looking for is a example of a total, raw hex file like the webbtc.0xjacobb 2018-03-12T12:47:45.173