0

I am trying to Decode the Raw hex data of a Coinbase Block to check my understanding of the DS but I am facing some difficulties in decoding marked by a ? below:

Q1. Can someone please check the existing understanding/interpratation and help explain and fill the gaps (marked by ?)

Q2. Is there a simple standalone program/library in to do the same? I have seen few parsers (though haven't used) but they require the complete blockchain .dat files that i cannot afford to download for this task.

The block is: https://www.blockchain.com/btc/block/485300


0000002053f7ebc735f54ac8d4ebcc1eeb3d3bdea89603bdd27431000000000000000000ff964ec70ea5a5356a04fdb044ca6c59ffda2dd6be02c63d9ea58fb6d46e01991a22bb590b310118f6df26f801010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff3103b46707244d696e656420627920416e74506f6f6c6b2f4542312f4144362f4e59412f332059bb221ab8080000615c0300ffffffff02807c814a000000001976a914660371326d3a2e064c278b20107a65dad847e8a988ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf90120000000000000000000000000000000000000000000000000000000000000000000000000

[PARAMETER]           [VALUE]

[Block Header]
version             - 00000020
Previous Block hash - 53f7ebc735f54ac8d4ebcc1eeb3d3bdea89603bdd27431000000000000000000
Merkel Root         - ff964ec70ea5a5356a04fdb044ca6c59ffda2dd6be02c63d9ea58fb6d46e0199
time                - 1a22bb59
bits                - 1801310B
nonce               - f6df26f8

01 - transaction count

[Tx List]
version                 - 01000000
<?>                     - 0001
input ct                - 01
prev tx                 - 0000000000000000000000000000000000000000000000000000000000000000
prev out n              - ffffffff
coinbase script length  - 31
coinbase script         - 03b46707244d696e656420627920416e74506f6f6c6b2f4542312f4144362f4e59412f332059bb221ab8080000615c0300
sequence                - ffffffff
Output count            - 02
value 1                 - 807c814a00000000
Script 1 length         - 19
Script 1                - 76a914660371326d3a2e064c278b20107a65dad847e8a988ac
value 2                 - 0000000000000000
Script 2 length         - 26
Script 2                - 6a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf9
<?>                     - 0120
witness transaction id  - 000000000000000000000000000000000000000000000000000000000000000000000000
2
  • Q1 segregated witness aka segwit Also to be clear multibyte numbers are little-endian, and you've swapped bits to big-endian but not the others. Aug 25 '21 at 3:50
  • @dave_thompson_085 thank you. updated the structure above for the seg_wit transaction id. just 4 bytes above unclear. can you please clarify those also?
    – J.Doe
    Aug 25 '21 at 9:19
0

This website can answer your question.

Typically, the first question mark refers to flag and the second question mark refers to tx_witnesses

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.