Wednesday, December 25, 2024

bitcoin core – Uncooked Transaction decoding fails on signet however decodes superb in BlockCypher decoder

Sort of transaction:
p2wpkh transaction making a multisig (p2wsh) on signet.

Error:TX will need to have atleast one inputs.

Output on on-line decoder

{
    "addresses": [
        "tb1q94nuuw96ye4x3u8hc3nga8g02kzvdknug49ucgmgh70l7yqn29ts56cl57",
        "tb1q6ajhfx4xvscts4m9hhk7ujy0tl3us25wu97pkv"
    ],
    "block_height": -1,
    "block_index": -1,
    "confirmations": 0,
    "double_spend": false,
    "charges": 0,
    "hash": "0fa2e7ac35739d727d1298922906127cdfe04040b98051f06314dc137d319a41",
    "inputs": [
        {
            "age": 0,
            "output_index": 365,
            "prev_hash": "e748d035309c2f7312176789f6fbe77a20582733817ed66b19fc675bfc1c4208",
            "script_type": "empty",
            "sequence": 4294967295
        }
    ],
    "lock_time": 2888877058,
    "outputs": [
        {
            "addresses": [
                "tb1q94nuuw96ye4x3u8hc3nga8g02kzvdknug49ucgmgh70l7yqn29ts56cl57"
            ],
            "script": "00202d67ce38ba266a68f0f7c4668e9d0f5584c6da7c454bcc2368bf9fff10135157",
            "script_type": "pay-to-witness-script-hash",
            "worth": 1000000
        },
        {
            "addresses": [
                "tb1q6ajhfx4xvscts4m9hhk7ujy0tl3us25wu97pkv"
            ],
            "script": "0014d765749aa66430b85765bdedee488f5fe3c82a8e",
            "script_type": "pay-to-witness-pubkey-hash",
            "worth": 8093449
        }
    ],
    "desire": "low",
    "acquired": "2024-02-09T10:13:35.159062502Z",
    "relayed_by": "3.235.156.159",
    "measurement": 202,
    "complete": 9093449,
    "ver": 2,
    "vin_sz": 1,
    "vout_sz": 2,
    "vsize": 145
}

Handbook decoding

nVersion
02000000

marker
00

flag
01

txin
01
08421cfc5b67fc196bd67e81332758207ae7fbf689671712732f9c3035d048e7 // 32 bytes (txid reversed little endian)
6d010000
00
ffffffff

txout
02
40420f0000000000 
22 00202d67ce38ba266a68f0f7c4668e9d0f5584c6da7c454bcc2368bf9fff10135157 // 34 bytes script  
097f7b0000000000
16 0014d765749aa66430b85765bdedee488f5fe3c82a8e // scriptpubkey for change

witness
02
473045022100a5faff9808555961e9ff213550b365ef86b993e07116fe445f27594f96f8798c022067571f9e0050f6c7e50057dd0e628613dffe1b573f48697019b6aa0fe97d658e01
2102c430ac1cb8ea090e63d171df5502ed5815ba579c6b38dd13e069e96816e4d247

nLocktime
00000000

Output of an accepted transaction

{
    "addresses": [
        "tb1qzeuvnr6u39npxdaxmhhxwwn68w5rplwet350nr",
        "tb1qk3qesjjnpztf2fs3r80haq9uddnw495f96w9tk5mdxyz8htuxu9qcwcurs"
    ],
    "block_height": -1,
    "block_index": -1,
    "confirmations": 0,
    "double_spend": false,
    "charges": 0,
    "hash": "33128f3a32d65c30f5bb4d4c2419f4c4e5c9c601e091c180e17592bda0ad10b3",
    "inputs": [
        {
            "age": 0,
            "output_index": 0,
            "prev_hash": "71e6a41254dc239a285e5cbf5cded15e099e18989b10ee10e23daed9e5fe052f",
            "script_type": "empty",
            "sequence": 4294967295
        }
    ],
    "outputs": [
        {
            "addresses": [
                "tb1qk3qesjjnpztf2fs3r80haq9uddnw495f96w9tk5mdxyz8htuxu9qcwcurs"
            ],
            "script": "0020b441984a53089695261119df7e80bc6b66ea96892e9c55da9b698823dd7c370a",
            "script_type": "pay-to-witness-script-hash",
            "worth": 1000000
        },
        {
            "addresses": [
                "tb1qzeuvnr6u39npxdaxmhhxwwn68w5rplwet350nr"
            ],
            "script": "00141678c98f5c89661337a6ddee673a7a3ba830fdd9",
            "script_type": "pay-to-witness-pubkey-hash",
            "worth": 888318652
        }
    ],
    "desire": "low",
    "acquired": "2024-02-09T10:17:43.206930294Z",
    "relayed_by": "18.213.115.114",
    "measurement": 235,
    "complete": 889318652,
    "ver": 2,
    "vin_sz": 1,
    "vout_sz": 2,
    "vsize": 153
}

Uncooked transaction

0200000000010108421cfc5b67fc196bd67e81332758207ae7fbf689671712732f9c3035d048e76d01000000ffffffff0240420f00000000002200202d67ce38ba266a68f0f7c4668e9d0f5584c6da7c454bcc2368bf9fff10135157097f7b0000000000160014d765749aa66430b85765bdedee488f5fe3c82a8e02473045022100a5faff9808555961e9ff213550b365ef86b993e07116fe445f27594f96f8798c022067571f9e0050f6c7e50057dd0e628613dffe1b573f48697019b6aa0fe97d658e012102c430ac1cb8ea090e63d171df5502ed5815ba579c6b38dd13e069e96816e4d24700000000

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles