Thursday, November 21, 2024

bitcoin core – Witness program hash mismatch stack dimension is zero

I am attempting to signal a uncooked transaction with personal key on bitcoin core on regtest.
After I’m attempting to signal the transaction I am receiving this error: Witness program hash mismatch. After I debugged my bitcoin-core transaction I observed the stack dimension is zero.

I verified my personal keys are appropriate.

My decode transaction:

{
  "txid": "tx_id",
  "hash": "tx_hash",
  "model": 2,
  "dimension": 157,
  "vsize": 157,
  "weight": 628,
  "locktime": 0,
  "vin": [
    {
      "txid": "tx_in_0",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": amount_out_0,
      "n": 0,
      "scriptPubKey": {
        "asm": "<asm_0>",
        "desc": "<desc_addr_0>,
        "hex": "0014f508fe341dfe0fbbeb7a38b41e7d2681d2376697",
        "address": "<address>",
        "type": "witness_v0_keyhash"
      }
    },
    {
      "value": 0.00000000,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_RETURN b48dfcd241e5894a8a5b8cef6782734481ee180ed3fd9d164e58307527e8f07082b12c5ba8baa3f05c66966334aea0eecbcb8f2bc5d14bfbddc332c1e39ca8c8",
        "desc": "raw(6a40b48dfcd241e5894a8a5b8cef6782734481ee180ed3fd9d164e58307527e8f07082b12c5ba8baa3f05c66966334aea0eecbcb8f2bc5d14bfbddc332c1e39ca8c8)#en45fqnk",
        "hex": "6a40b48dfcd241e5894a8a5b8cef6782734481ee180ed3fd9d164e58307527e8f07082b12c5ba8baa3f05c66966334aea0eecbcb8f2bc5d14bfbddc332c1e39ca8c8",
        "type": "nulldata"
      }
    }
  ]
}

EDIT

The decoded enter transaction is transaction depends on two completely different outputs

{
  "txid": "tx_id",
  "hash": "tx_hash",
  "model": 2,
  "dimension": 370,
  "vsize": 208,
  "weight": 832,
  "locktime": 0,
  "vin": [
    {
      "txid": "tx_id",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "304402204ee1d2b35adfe522517905f8eb3bee9cf91c15c0139673d52ba637aff7f9790d022055930d64c0a5d62f40e8d8fd200898341b7141bef708f8ae9182c1adbe489f6301",
        "02e0b590ccf577215eee2aa121d573fb26b83bd2c397d0446fd27ae3436c83803c"
      ],
      "sequence": 4294967295
    },
    {
      "txid": "e615c045166fb19cf485fb34d246931d3a1acda0d7510efc7bf6d6eee05ad807",
      "vout": 0,
      "scriptSig": {
        "asm": "",
        "hex": ""
      },
      "txinwitness": [
        "304402200788197af3f73245a5e783c325b5ef397a47bcf19ea2b02b48c74c066bcaab5902207199f905b20bde2b8c1b7b359a4e1bdf6ea1c6a9eed6cb8698b04b6df5bfb05f01",
        "02e0b590ccf577215eee2aa121d573fb26b83bd2c397d0446fd27ae3436c83803c"
      ],
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 99.79999001,
      "n": 0,
      "scriptPubKey": {
        "asm": "asm_0",
        "desc": <desc_addr_0>,
        "hex": "0014cd658ab850ca1f743496a16d58762fe7a2c39758",
        "address": "<addr_0>",
        "type": "witness_v0_keyhash"
      }
    },
    {
      "value": 0.20000000,
      "n": 1,
      "scriptPubKey": {
        "asm": asm_1",
        "desc": "<desc_addr_0>",
        "hex": "00145f67b467ab1e01e0c803f26b36ade593f1ae6f2f",
        "address": "<addr_1>",
        "type": "witness_v0_keyhash"
      }
    }
  ]
}

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles