<p>I have got this resource for you may be this could be useful: <a href="https://bitfalls.com/2017/10/03/read-bitcoin-blockchain-data-blockexplorer/" rel="nofollow noreferrer">https://bitfalls.com/2017/10/03/read-bitcoin-blockchain-data-blockexplorer/</a></p>

CC BY-SA 3.0
2017-12-26T11:59:57.993Z
Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. This is to avoid the link going down and the answer becoming useless :)
meshcollider
CC BY-SA 3.0
2017-12-26T04:29:25.530Z
2017-12-26T04:29:25.530Z
saikumar02
<p>I decomposed the tx to make it more visible, the raw tx is this:</p>

<blockquote>
  <p>01000000010000000000000000000000000000000000000000000000000000000000000000FFFFFFFF4D04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73FFFFFFFF0100F2052A01000000434104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC00000000</p>
</blockquote>

<pre><code>VERSION
 01000000

TX_IN COUNT [var_int]: hex=01, decimal=1
 TX_IN[0]
  TX_IN[0] OutPoint hash (char[32])
  0000000000000000000000000000000000000000000000000000000000000000
  TX_IN[0] OutPoint index (uint32_t)
  hex=FFFFFFFF, reversed=FFFFFFFF, decimal=4294967295
  TX_IN[0] Script Length (var_int)
  hex=4D, decimal=77
  TX_IN[0] Coinbase and Sequence
  04FFFF001D0104455468652054696D...
  TX_IN[0] Sequence (uint32_t)
  FFFFFFFF

TX_OUT COUNT, hex=01, decimal=1
 TX_OUT[0]
  TX_OUT[0] Value (uint64_t)
  hex=00F2052A01000000, reversed_hex=000000012A05F200, dec=5000000000, bitcoin=50.00000000
  TX_OUT[0] PK_Script Length (var_int)
  hex=43, dec=67
  TX_OUT[0] pk_script (uchar[])
  4104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC

 LOCK_TIME
00000000
</code></pre>

<p>The field for the previous tx (OutPoint Hash) is set to all zeros, and the next field to  "FFFFFFFF" (where you normally have a value to the previous tx outpoint). So nothing to spent "from". In tx_out the payment goes to a public key, which translates to: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa</p>

CC BY-SA 3.0
2017-12-26T08:52:21.330Z
2017-12-26T08:52:21.330Z
pebwindkraft
<p>The transaction, like the block, is in a serialized format. A description of the format is available on <a href="https://bitcoin.org/en/developer-reference#raw-transaction-format" rel="nofollow noreferrer">bitcoin.org</a></p>

CC BY-SA 3.0
2017-12-26T04:40:03.150Z
2017-12-26T04:40:03.150Z
Ava Chow
<p>Given this example block (it's the genesis block by the way):</p>

<blockquote>
  <p>0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000</p>
</blockquote>

<p>I split it up as described <a href="https://bitcoin.stackexchange.com/questions/35699/what-is-a-block">here</a>:</p>

<pre><code>01000000                                                          // Version
0000000000000000000000000000000000000000000000000000000000000000  // Hash Previous Block
3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a  // Merkle Root
29ab5f49                                                          // Time
ffff001d                                                          // Difficulty
1dac2b7c                                                          // Nonce
01                                                                // Number of Transactions
 Tx1:
 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000
</code></pre>

<p>But how is the transaction Tx1 (in this case) readable? Obviously, it's not a default english clear text. How can I decode it so that I recognize that Satoshi Nakamoto sent 50 BTC as a <em>coin base transaction</em> in this transaction Tx1 for example?</p>

CC BY-SA 3.0
2017-12-25T19:52:54.220Z
Related: https://bitcoin.stackexchange.com/questions/20721/what-is-the-format-of-the-coinbase-transaction
Nick ODell
<transactions><block><coinbase-transaction><genesis-block>
How to read the transaction of a block?
hardfork
# How to read the transaction of a block?

(Asked by: username_0 on 2017-12-25)

Given this example block (it's the genesis block by the way):

> 0100000000000000000000000000000000000000000000000000000000000000000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f49ffff001d1dac2b7c0101000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000

I split it up as described [here](https://bitcoin.stackexchange.com/questions/35699/what-is-a-block):

```
01000000                                                          // Version
0000000000000000000000000000000000000000000000000000000000000000  // Hash Previous Block
3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a  // Merkle Root
29ab5f49                                                          // Time
ffff001d                                                          // Difficulty
1dac2b7c                                                          // Nonce
01                                                                // Number of Transactions
 Tx1:
 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000

```

But how is the transaction Tx1 (in this case) readable? Obviously, it's not a default english clear text. How can I decode it so that I recognize that Satoshi Nakamoto sent 50 BTC as a *coin base transaction* in this transaction Tx1 for example?

**Tags:** transactions, block, coinbase-transaction, genesis-block

> **Comments:**
> **username_1**: Related: https://bitcoin.stackexchange.com/questions/20721/what-is-the-format-of-the-coinbase-transaction  

---

## 3 answers

### Answer by username_5 on 2017-12-26. Score: 4 | Accepted answer

The transaction, like the block, is in a serialized format. A description of the format is available on [bitcoin.org](https://bitcoin.org/en/developer-reference#raw-transaction-format)


---

### Answer by username_2 on 2017-12-26. Score: 2

I have got this resource for you may be this could be useful: <https://bitfalls.com/2017/10/03/read-bitcoin-blockchain-data-blockexplorer/>

> **Comments:**
> **username_3**: Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. This is to avoid the link going down and the answer becoming useless :)  

---

### Answer by username_4 on 2017-12-26. Score: 1

I decomposed the tx to make it more visible, the raw tx is this:

> 01000000010000000000000000000000000000000000000000000000000000000000000000FFFFFFFF4D04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F72206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73FFFFFFFF0100F2052A01000000434104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC00000000

```
VERSION
 01000000

TX_IN COUNT [var_int]: hex=01, decimal=1
 TX_IN[0]
  TX_IN[0] OutPoint hash (char[32])
  0000000000000000000000000000000000000000000000000000000000000000
  TX_IN[0] OutPoint index (uint32_t)
  hex=FFFFFFFF, reversed=FFFFFFFF, decimal=4294967295
  TX_IN[0] Script Length (var_int)
  hex=4D, decimal=77
  TX_IN[0] Coinbase and Sequence
  04FFFF001D0104455468652054696D...
  TX_IN[0] Sequence (uint32_t)
  FFFFFFFF

TX_OUT COUNT, hex=01, decimal=1
 TX_OUT[0]
  TX_OUT[0] Value (uint64_t)
  hex=00F2052A01000000, reversed_hex=000000012A05F200, dec=5000000000, bitcoin=50.00000000
  TX_OUT[0] PK_Script Length (var_int)
  hex=43, dec=67
  TX_OUT[0] pk_script (uchar[])
  4104678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF38C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5FAC

 LOCK_TIME
00000000

```

The field for the previous tx (OutPoint Hash) is set to all zeros, and the next field to "FFFFFFFF" (where you normally have a value to the previous tx outpoint). So nothing to spent "from". In tx\_out the payment goes to a public key, which translates to: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa


---

