1

I updated my bitcoin core to version 0.16.0, previously I was using v0.15.1. I created an application to send some BTC using listunspent -> createrawtransaction-> signrawtransaction -> sendrawtransaction I got this error on v.0.16.0 while using sendrawtransaction :

64: non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation)

But my app working normaly on version 0.15.1 What is actually going on on version 0.16.0 that makes my transaction error

I decoded my raw transaction, to see if anything is wrong, I am using BTC testnet

array:2 [
  "status" => true
  "result" => array:8 [
    "txid" => "261c30c9c167b079c45c5ea706617635eb477b9cb601b7c7addbd6fedc2c14d9"
    "hash" => "261c30c9c167b079c45c5ea706617635eb477b9cb601b7c7addbd6fedc2c14d9"
    "version" => 2
    "size" => 197
    "vsize" => 197
    "locktime" => 0
    "vin" => array:3 [
      0 => array:4 [
        "txid" => "d4fcae2238c7edde389c3e1d28ddd67570931c72982312fbae3292c6eb7b7620"
        "vout" => 0
        "scriptSig" => array:2 [
          "asm" => ""
          "hex" => ""
        ]
        "sequence" => 4294967295
      ]
      1 => array:4 [
        "txid" => "5e759bcccc5123e9fbad740b57a1571a5950e867619dfd4cbbe6786dd50ab054"
        "vout" => 0
        "scriptSig" => array:2 [
          "asm" => ""
          "hex" => ""
        ]
        "sequence" => 4294967295
      ]
      2 => array:4 [
        "txid" => "d1be0d65d5338c9bc4b51b14f6adee7f88e56d0f9625c92646e16aa86e7c6a71"
        "vout" => 1
        "scriptSig" => array:2 [
          "asm" => ""
          "hex" => ""
        ]
        "sequence" => 4294967295
      ]
    ]
    "vout" => array:2 [
      0 => array:3 [
        "value" => 1.0
        "n" => 0
        "scriptPubKey" => array:5 [
          "asm" => "OP_HASH160 7ba3562975f6203987c03b40dd84e010948af2e4 OP_EQUAL"
          "hex" => "a9147ba3562975f6203987c03b40dd84e010948af2e487"
          "reqSigs" => 1
          "type" => "scripthash"
          "addresses" => array:1 [
            0 => "2N4WxmhixnDF6x2gmJSjgoX28RMSd6oCaMr"
          ]
        ]
      ]
      1 => array:3 [
        "value" => 6.01032205
        "n" => 1
        "scriptPubKey" => array:5 [
          "asm" => "OP_HASH160 b449a4b595e856c16eba7d7168ac5fdcc552fbbf OP_EQUAL"
          "hex" => "a914b449a4b595e856c16eba7d7168ac5fdcc552fbbf87"
          "reqSigs" => 1
          "type" => "scripthash"
          "addresses" => array:1 [
            0 => "2N9gVqeSJnLKPGRJJa2gKXUPy5bT331sxNo"
          ]
        ]
      ]
    ]
  ]
]
  • That error just means the signature is invalid. Did signrawtransaction succeed and produce a fully signed transaction? – Pieter Wuille Mar 27 '18 at 3:10
  • yes it's succeed on raw transaction. And I forgot to mention, v.0.16.0 need redeemScript on signrawtransaction, on v.0.15.1 I don't need that, it's that the culprit ? – Billy Adelphia Mar 27 '18 at 3:15
  • If you're spending outputs on P2SH-P2WPK addresses (which are default on Bitcoin Core 0.16) you need a redeemscript to sign, yes. Are you perhaps supplying an incorrect one? – Pieter Wuille Mar 27 '18 at 3:17
  • I am sure I supplied the correct one, can you check my decoded rawtransaction above ? I provide one using testnet transaction – Billy Adelphia Mar 27 '18 at 3:33
  • The scriptSigs of your transaction are completely empty which means that no redeemScript was provided nor are there any signatures. – Andrew Chow Mar 27 '18 at 4:51
-2

I encountered the same issue, to resolve I resorted to starting the bitcoind daemon using the following flag:

-deprecatedrpc=signrawtransaction

I am now looking for a better solution.

  • In v0.17 / master, signrawtransaction was split into signrawtransavtionwithkey and signrawtransactionwithwallet. This is not OP's problem. – Pieter Wuille Apr 2 '18 at 16:22
  • @peterwuille signrawtransactionwithwallet there is a typo in your comment (the v should be a c) (it won't let me suggest an edit) – PW Kad Jan 18 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.