<p>I would like to comment on your "mess of stuff"... maybe not the best way to get support, if you don't understand what it is, and define it as such. I decode it here for you:</p>

<pre><code>VERSION
 01000000

SEGWIT (BIP141): this is a segwit tx, marker=00
       (BIP141): flag=01

TX_IN COUNT [var_int]: hex=02, decimal=2
 TX_IN[0]
  TX_IN[0] OutPoint hash (char[32])
  9F96ADE4B41D5433F4EDA31E1738EC2B36F6E7D1420D94A6AF99801A88F7F7FF
  TX_IN[0] OutPoint index (uint32_t)
  hex=00000000, reversed=00000000, decimal=0
  TX_IN[0] Script Length (var_int)
  hex=49, decimal=73
  TX_IN[0] Script Sig (uchar[])
  4830450221008B9D1DC26BA6A9CB62127B02742FA9D754CD3BEBF337F7A55D114C8E5CDD30BE022040529B194BA3F9281A99F2B1C0A19C0489BC22EDE944CCF4ECBAB4CC618EF3ED01 
  TX_IN[0] Sequence (uint32_t)
  EEFFFFFF
 TX_IN[1]
  TX_IN[1] OutPoint hash (char[32])
  8AC60EB9575DB5B2D987E29F301B5B819EA83A5C6579D282D189CC04B8E151EF
  TX_IN[1] OutPoint index (uint32_t)
  hex=01000000, reversed=00000001, decimal=1
  TX_IN[1] Script Length (var_int)
  hex=00, decimal=0
  TX_IN[1] Sequence (uint32_t)
  FFFFFFFF
TX_OUT COUNT, hex=02, decimal=2
 TX_OUT[0]
  TX_OUT[0] Value (uint64_t)
  hex=202CB20600000000, reversed_hex=0000000006B22C20, dec=112340000, bitcoin=1.12340000
  TX_OUT[0] PK_Script Length (var_int)
  hex=19, dec=25
  TX_OUT[0] pk_script (uchar[])
  76A9148280B37DF378DB99F66F85C95A783A76AC7A6D5988AC
 TX_OUT[1]
  TX_OUT[1] Value (uint64_t)
  hex=9093510D00000000, reversed_hex=000000000D519390, dec=223450000, bitcoin=2.23450000
  TX_OUT[1] PK_Script Length (var_int)
  hex=19, dec=25
  TX_OUT[1] pk_script (uchar[])
  76A9143BDE42DBEE7E4DBE6A21B2D50CE2F0167FAA815988AC

WITNESS TXIN[0] stack elements: hex=00, decimal=0
WITNESS TXIN[1] stack elements: hex=02, decimal=2
 WITNESS data[0]:
  47304402203609E17B84F6A7D30C80BFA610B5B4542F32A8A0D5447A12FB1366D7F01CC44A0220573A954C4518331561406F90300E8F3358F51928D43C212A8CAED02DE67EEBEE01
 WITNESS data[1]:
  21025476C2E83188368DA1FF3E292E7ACAFCDB3566BB0AD253F62FC70F07AEEE6357

 LOCK_TIME
11000000
</code></pre>

<p>So the 02 at the beginning indicates two inputs (TX_IN COUNT), and it's witness data is displayed at the end. </p>

CC BY-SA 3.0
2017-10-18T18:34:00.307Z
2017-10-18T18:34:00.307Z
pebwindkraft
<p>Shown in the gray area <a href="https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#native-p2wpkh" rel="nofollow noreferrer">here</a>, describing how to apply, I think, Segwit to a transaction (particularly a Bitcoin Cash tx).  The last section is titled &quot;serialized signed transaction&quot; however it doesn't appear to be the final form of the raw tx that you can copy and paste into a bitcoin cash wallet to use &quot;sendrawtransaction&quot;.  Or is it the final raw tx form in spite of what it appears to be to me?</p>
<p><strong>Example of final copy and paste form of a bitcoin cash tx:</strong>
Tx <a href="http://blockdozer.com/insight/tx/f0b9313fc11ce5ec5ac619f35dcf332530e99d185d8ee79b913bcc0b8b5e6df1" rel="nofollow noreferrer">f0b9313fc11ce5ec5ac619f35dcf332530e99d185d8ee79b913bcc0b8b5e6df1</a></p>
<blockquote>
<p>01000000</p>
<p>01</p>
<p>f5a6acfe637ceb57552e703bd4a3bb7ae10c75e81886646cf4ca641881daa4a3</p>
<p>00000000</p>
<p>6b48304502210088b72059940330faa94940a6f37b1be4d926a4d246abda8a1e6174a3a00659</p>
<p>040220</p>
<p>06e0627d6525afa275c4e730799ac11c037eed2e35a0839afcc62dfe710afb3d</p>
<p>4121</p>
<p>035e366a13be81aaada32f309b289ca26741fd55c582d6d8d394f9be7c7519974f</p>
<p>feffffff</p>
<p>02643fcb1d00000000</p>
<p>1976a9149b52b7016d89c5ad7645a8bbc34719b46131545288ac</p>
<p>0094357700000000</p>
<p>1976a914787b7c14737c3956456f40cf7abfca9b641afd5788ac</p>
<p>00000000</p>
</blockquote>
<p><strong>What the original webpage shows (but not for the same tx):</strong></p>
<blockquote>
<p>01000000</p>
<p>00</p>
<p>01</p>
<p>02</p>
<p>fff7f7881a8099afa6940d42d1e7f6362bec38171ea3edf433541db4e4ad969f</p>
<p>00000000</p>
<p>494830450221008b9d1dc26ba6a9cb62127b02742fa9d754cd3bebf337f7a55d114c8e5cdd30be</p>
<p>0220</p>
<p>40529b194ba3f9281a99f2b1c0a19c0489bc22ede944ccf4ecbab4cc618ef3ed01</p>
<p>eeffffff</p>
<p>ef51e1b804cc89d182d279655c3aa89e815b1b309fe287d9b2b55d57b90ec68a01</p>
<p>00000000</p>
<p>ffffffff</p>
<p>0220</p>
<p>2cb20600000000</p>
<p>1976a9148280b37df378db99f66f85c95a783a76ac7a6d5988ac</p>
<p>9093510d00000000</p>
<p>1976a9143bde42dbee7e4dbe6a21b2d50ce2f0167faa815988ac</p>
<p>000247304402203609e17b84f6a7d30c80bfa610b5b4542f32a8a0d5447a12fb1366d7f01cc44a</p>
<p>0220</p>
<p>573a954c4518331561406f90300e8f3358f51928d43c212a8caed02de67eebee</p>
<p>0121</p>
<p>02</p>
<p>5476c2e83188368da1ff3e292e7acafcdb3566bb0ad253f62fc70f07aeee6357</p>
<p>11000000</p>
</blockquote>
<p>The one from the example website shows the &quot;00&quot; and the &quot;02&quot; being added near the beginning and that huge mess of stuff after the final output is mentioned.  Yet the first example I gave is the raw data straight from a &quot;getrawtransaction&quot; through the bitcoin cash wallet and it does not contain those things and yet is still considered to be valid.  Or is all that other stuff just basically &quot;extra&quot;?</p>

CC BY-SA 3.0
2017-08-17T23:37:20.847Z
Why does it not appear to be the final form of the raw tx?
Pieter Wuille
<raw-transaction><segregated-witness><bitcoin-cash>
What is a "serialized signed transaction"?
Mine
# What is a "serialized signed transaction"?

(Asked by: username_0 on 2017-08-17)

Shown in the gray area [here](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#native-p2wpkh), describing how to apply, I think, Segwit to a transaction (particularly a Bitcoin Cash tx). The last section is titled "serialized signed transaction" however it doesn't appear to be the final form of the raw tx that you can copy and paste into a bitcoin cash wallet to use "sendrawtransaction". Or is it the final raw tx form in spite of what it appears to be to me?

**Example of final copy and paste form of a bitcoin cash tx:**
Tx [f0b9313fc11ce5ec5ac619f35dcf332530e99d185d8ee79b913bcc0b8b5e6df1](http://blockdozer.com/insight/tx/f0b9313fc11ce5ec5ac619f35dcf332530e99d185d8ee79b913bcc0b8b5e6df1)

> 01000000
>
> 01
>
> f5a6acfe637ceb57552e703bd4a3bb7ae10c75e81886646cf4ca641881daa4a3
>
> 00000000
>
> 6b48304502210088b72059940330faa94940a6f37b1be4d926a4d246abda8a1e6174a3a00659
>
> 040220
>
> 06e0627d6525afa275c4e730799ac11c037eed2e35a0839afcc62dfe710afb3d
>
> 4121
>
> 035e366a13be81aaada32f309b289ca26741fd55c582d6d8d394f9be7c7519974f
>
> feffffff
>
> 02643fcb1d00000000
>
> 1976a9149b52b7016d89c5ad7645a8bbc34719b46131545288ac
>
> 0094357700000000
>
> 1976a914787b7c14737c3956456f40cf7abfca9b641afd5788ac
>
> 00000000

**What the original webpage shows (but not for the same tx):**

> 01000000
>
> 00
>
> 01
>
> 02
>
> fff7f7881a8099afa6940d42d1e7f6362bec38171ea3edf433541db4e4ad969f
>
> 00000000
>
> 494830450221008b9d1dc26ba6a9cb62127b02742fa9d754cd3bebf337f7a55d114c8e5cdd30be
>
> 0220
>
> 40529b194ba3f9281a99f2b1c0a19c0489bc22ede944ccf4ecbab4cc618ef3ed01
>
> eeffffff
>
> ef51e1b804cc89d182d279655c3aa89e815b1b309fe287d9b2b55d57b90ec68a01
>
> 00000000
>
> ffffffff
>
> 0220
>
> 2cb20600000000
>
> 1976a9148280b37df378db99f66f85c95a783a76ac7a6d5988ac
>
> 9093510d00000000
>
> 1976a9143bde42dbee7e4dbe6a21b2d50ce2f0167faa815988ac
>
> 000247304402203609e17b84f6a7d30c80bfa610b5b4542f32a8a0d5447a12fb1366d7f01cc44a
>
> 0220
>
> 573a954c4518331561406f90300e8f3358f51928d43c212a8caed02de67eebee
>
> 0121
>
> 02
>
> 5476c2e83188368da1ff3e292e7acafcdb3566bb0ad253f62fc70f07aeee6357
>
> 11000000

The one from the example website shows the "00" and the "02" being added near the beginning and that huge mess of stuff after the final output is mentioned. Yet the first example I gave is the raw data straight from a "getrawtransaction" through the bitcoin cash wallet and it does not contain those things and yet is still considered to be valid. Or is all that other stuff just basically "extra"?

**Tags:** raw-transaction, segregated-witness, bitcoin-cash

> **Comments:**
> **username_1**: Why does it not appear to be the final form of the raw tx?  

---

## 1 answers

### Answer by username_2 on 2017-10-18. Score: 0

I would like to comment on your "mess of stuff"... maybe not the best way to get support, if you don't understand what it is, and define it as such. I decode it here for you:

```
VERSION
 01000000

SEGWIT (BIP141): this is a segwit tx, marker=00
       (BIP141): flag=01

TX_IN COUNT [var_int]: hex=02, decimal=2
 TX_IN[0]
  TX_IN[0] OutPoint hash (char[32])
  9F96ADE4B41D5433F4EDA31E1738EC2B36F6E7D1420D94A6AF99801A88F7F7FF
  TX_IN[0] OutPoint index (uint32_t)
  hex=00000000, reversed=00000000, decimal=0
  TX_IN[0] Script Length (var_int)
  hex=49, decimal=73
  TX_IN[0] Script Sig (uchar[])
  4830450221008B9D1DC26BA6A9CB62127B02742FA9D754CD3BEBF337F7A55D114C8E5CDD30BE022040529B194BA3F9281A99F2B1C0A19C0489BC22EDE944CCF4ECBAB4CC618EF3ED01 
  TX_IN[0] Sequence (uint32_t)
  EEFFFFFF
 TX_IN[1]
  TX_IN[1] OutPoint hash (char[32])
  8AC60EB9575DB5B2D987E29F301B5B819EA83A5C6579D282D189CC04B8E151EF
  TX_IN[1] OutPoint index (uint32_t)
  hex=01000000, reversed=00000001, decimal=1
  TX_IN[1] Script Length (var_int)
  hex=00, decimal=0
  TX_IN[1] Sequence (uint32_t)
  FFFFFFFF
TX_OUT COUNT, hex=02, decimal=2
 TX_OUT[0]
  TX_OUT[0] Value (uint64_t)
  hex=202CB20600000000, reversed_hex=0000000006B22C20, dec=112340000, bitcoin=1.12340000
  TX_OUT[0] PK_Script Length (var_int)
  hex=19, dec=25
  TX_OUT[0] pk_script (uchar[])
  76A9148280B37DF378DB99F66F85C95A783A76AC7A6D5988AC
 TX_OUT[1]
  TX_OUT[1] Value (uint64_t)
  hex=9093510D00000000, reversed_hex=000000000D519390, dec=223450000, bitcoin=2.23450000
  TX_OUT[1] PK_Script Length (var_int)
  hex=19, dec=25
  TX_OUT[1] pk_script (uchar[])
  76A9143BDE42DBEE7E4DBE6A21B2D50CE2F0167FAA815988AC

WITNESS TXIN[0] stack elements: hex=00, decimal=0
WITNESS TXIN[1] stack elements: hex=02, decimal=2
 WITNESS data[0]:
  47304402203609E17B84F6A7D30C80BFA610B5B4542F32A8A0D5447A12FB1366D7F01CC44A0220573A954C4518331561406F90300E8F3358F51928D43C212A8CAED02DE67EEBEE01
 WITNESS data[1]:
  21025476C2E83188368DA1FF3E292E7ACAFCDB3566BB0AD253F62FC70F07AEEE6357

 LOCK_TIME
11000000

```

So the 02 at the beginning indicates two inputs (TX\_IN COUNT), and it's witness data is displayed at the end.


---

