Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Unable to send raw transaction: Signature must be zero for failed CHECK(MULTI)SIG operation #35

@SashaZezulinsky

Description

@SashaZezulinsky

When I send a raw transaction I get an error:
16: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)

Raw transaction that I send:
0200000001d18e181dc31f713573785c4434b70c415b407e200959f10d24a5eee72a4bae3401000000da00473044022038b7aaf811db578a0b62b1ff69f7b2a6054cd9b770275b292ff63bb6b6faa96902202ffa91a950c8976722284a0bcd3ad9c54e11e441f9f632c3dd76f9174f1d0c0a01483045022100a3c48312f94652269b6e23b3e48ead21b788a2d162205d9ba4c01c9cddfc9ea70220772828f03307eaf90cc17f12f2f97e8424ff5f5311839b4095f775813cb2dada014752210283910b39cc9fab5ca7ad622dbe4a09e13ce53232b8695f96315c6e90c64c526e2103e88f91c7e130cc2f760d82b8135af8ec493860b0943649c65e0daf8b3b5a945552aeffffffff01962af4050000000017a9146fb7855fc9f0fcad63dacb27103f3ee6089b65408700000000

This raw transaction decoded:

{
  "txid": "e63230d2b56bec46ab1273f0962f0fce43248fb1acbd7214be5a319b53fc170e",
  "hash": "e63230d2b56bec46ab1273f0962f0fce43248fb1acbd7214be5a319b53fc170e",
  "version": 2,
  "size": 301,
  "vsize": 301,
  "locktime": 0,
  "vin": [
    {
      "txid": "34ae4b2ae7eea5240df15909207e405b410cb734445c787335711fc31d188ed1",
      "vout": 1,
      "scriptSig": {
        "asm": "0 3044022038b7aaf811db578a0b62b1ff69f7b2a6054cd9b770275b292ff63bb6b6faa96902202ffa91a950c8976722284a0bcd3ad9c54e11e441f9f632c3dd76f9174f1d0c0a[ALL] 3045022100a3c48312f94652269b6e23b3e48ead21b788a2d162205d9ba4c01c9cddfc9ea70220772828f03307eaf90cc17f12f2f97e8424ff5f5311839b4095f775813cb2dada[ALL] 52210283910b39cc9fab5ca7ad622dbe4a09e13ce53232b8695f96315c6e90c64c526e2103e88f91c7e130cc2f760d82b8135af8ec493860b0943649c65e0daf8b3b5a945552ae",
        "hex": "00473044022038b7aaf811db578a0b62b1ff69f7b2a6054cd9b770275b292ff63bb6b6faa96902202ffa91a950c8976722284a0bcd3ad9c54e11e441f9f632c3dd76f9174f1d0c0a01483045022100a3c48312f94652269b6e23b3e48ead21b788a2d162205d9ba4c01c9cddfc9ea70220772828f03307eaf90cc17f12f2f97e8424ff5f5311839b4095f775813cb2dada014752210283910b39cc9fab5ca7ad622dbe4a09e13ce53232b8695f96315c6e90c64c526e2103e88f91c7e130cc2f760d82b8135af8ec493860b0943649c65e0daf8b3b5a945552ae"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.99887766,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 6fb7855fc9f0fcad63dacb27103f3ee6089b6540 OP_EQUAL",
        "hex": "a9146fb7855fc9f0fcad63dacb27103f3ee6089b654087",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2N3RvqqdX1ou9brMRThsr9hdJpHXPkDGXt9"
        ]
      }
    }
  ]
}

UTX that raw transaction tries to spend:
34ae4b2ae7eea5240df15909207e405b410cb734445c787335711fc31d188ed1

UTX pubKey script section:
a9146fb7855fc9f0fcad63dacb27103f3ee6089b654087

ScriptSig:
00473044022038b7aaf811db578a0b62b1ff69f7b2a6054cd9b770275b292ff63bb6b6faa96902202ffa91a950c8976722284a0bcd3ad9c54e11e441f9f632c3dd76f9174f1d0c0a01483045022100a3c48312f94652269b6e23b3e48ead21b788a2d162205d9ba4c01c9cddfc9ea70220772828f03307eaf90cc17f12f2f97e8424ff5f5311839b4095f775813cb2dada014752210283910b39cc9fab5ca7ad622dbe4a09e13ce53232b8695f96315c6e90c64c526e2103e88f91c7e130cc2f760d82b8135af8ec493860b0943649c65e0daf8b3b5a945552ae

When I debug a script with online debugger it executes well: http://paulkernfeld.com/bse/
Online debugger is unhappy about last opcode 0x87 OP_EQUAL, but it may be the debugger limitation only:
a9146fb7855fc9f0fcad63dacb27103f3ee6089b654087

What is wrong with my raw transaction that I try to broadcast?
Why does OP_CHECKMULTISIG fail?

I think that OP_CHECKMULTISIG comes from redeemScript:

52210283910b39cc9fab5ca7ad622dbe4a09e13ce53232b8695f96315c6e90c64c526e2103e88f91c7e130cc2f760d82b8135af8ec493860b0943649c65e0daf8b3b5a945552ae

The redeemScript decoded:
2 0283910b39cc9fab5ca7ad622dbe4a09e13ce53232b8695f96315c6e90c64c526e 03e88f91c7e130cc2f760d82b8135af8ec493860b0943649c65e0daf8b3b5a9455 2 OP_CHECKMULTISIG

I played with signatures order but it didn't help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions