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?

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.

  • Now I am a little bit confused. There is only the transaction hash, Inputs and Outputs in the file: webbtc.com/block/… 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 Mar 9 '18 at 11:51
  • 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 Mar 10 '18 at 9:53
  • 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 Mar 12 '18 at 6:39
  • I think Webbtc returns the correct raw block hex data, but enriches the HTML view with extra data. srv.yogh.io/#block:last would be a better website for you. – alcio Mar 12 '18 at 10:18
  • 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 Mar 12 '18 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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