P2SH to P2PK transaction – mandatory-script-verify-flag-failed (Opcode lacking or not understood) (error 26)

on

|

views

and

comments


I’m making an attempt to spend a P2SH UTXO based mostly on a redeem script that requires no signatures and easily wants the right enter to equal the OP_HASH160 digest within the corresponding P2SH locking script.

My unlocking script pushes 17 bytes onto the stack (0x11) that are the next 17 bytes that represent the “secret” quantity to get the right hash.

The decoded uncooked tx is the next (with the 17 byte secret quantity eliminated):

"txid": "0ba564fc00cbeada33ccded7f4e45f17bfff69c8f8a38132dc715de0d905b857",
"hash": "0ba564fc00cbeada33ccded7f4e45f17bfff69c8f8a38132dc715de0d905b857",
"model": 1,
"dimension": 113,
"vsize": 113,
"weight": 452,
"locktime": 0,
"vin": [
  {
    "txid": "f8e5dfe32a57872d58cee6f3eb32ec0277f3563306ae623109ea651fd9dc8087",
    "vout": 1,
    "scriptSig": {
      "asm": "<17 byte redeem script>",
      "hex": "11<17 byte redeem script>"
    },
    "sequence": 4294967295
  }
],
"vout": [
  {
    "value": 0.00002000,
    "n": 0,
    "scriptPubKey": {
      "asm": "02de153317307164e7c9918791c7787d9833a3a8201bdff880e631e490cf9a087c      OP_CHECKSIG",
      "desc": "pk(02de153317307164e7c9918791c7787d9833a3a8201bdff880e631e490cf9a087c)#epafp6sh",
      "hex": "2102de153317307164e7c9918791c7787d9833a3a8201bdff880e631e490cf9a087cac",
      "type": "pubkey"
    }
  }
]
}

I can not see any errors nevertheless “sendrawtransaction” offers me the error: error code: -26 error message: mandatory-script-verify-flag-failed (Opcode lacking or not understood)

I had thought possibly this was a non-standard tx and subsequently would not be legitimate until submitted on to miner*, nevertheless it was my understanding that P2SH allowed the liberty to submit arbitrary redeem scripts, supplied the unlocking script is legitimate and the redeem script equals the redeem script hash within the locking script.

*bitcoin-cli decodescript for my unlocking script hex does give me Kind:nonstandard

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here