## How to dissect or decode a BTC transaction?

0

I used a packet capture to capture the transaction of bitcoin, and I got the following:

By using https://live.blockcypher.com/btc/decodetx/, the data was decoded as below:

{
"block_height": -1,
"block_index": -1,
"confirmations": 0,
"double_spend": false,
"fees": 0,
"hash": "d206bcb3b556ab886aca6a55656047b865bb5b06d96f70e34dd4be76d2121f0a",
"inputs": [
{
"age": 0,
"output_index": 2854343883,
"prev_hash": "2504414200001046000303160000007e000000000000016a44fcc78c0000000e",
"script_type": "empty",
"sequence": 0
},
{
"age": 0,
"output_index": -1,
"script_type": "empty",
"sequence": 0
},
{
"age": 0,
"output_index": -1,
"script_type": "empty",
"sequence": 0
},
{
"age": 0,
"output_index": -1,
"script_type": "empty",
"sequence": 0
}
],
"opt_in_rbf": true,
"outputs": [],
"preference": "low",
"relayed_by": "3.80.82.172",
"size": 380,
"total": 0,
"ver": 197398,
"vin_sz": 4,
"vout_sz": 0
}


Does anyone know where I can read about how the data gets decoded?

Thanks

1 – MCCCS – 2019-04-22T13:36:21.333

1

Is that data serialization specific to BlockCypher? Raw transactions generally look like this -- The bottom of the page shows decoding. Perhaps the packet you've captured is used for something else?

1@CarolWard That is a possibility. I believe Blockcypher attempted to make some sense out of it using their arbitrary system, but it's really not valid. The script on the first input is ridiculously invalid and the hash d206bcb3b556ab886aca6a55656047b865bb5b06d96f70e34dd4be76d2121f0a doesn't appear to exist on either testnet or mainnet. – KappaDev – 2019-04-23T12:53:53.420