Why is my P2SH sigScript field prepended with 0x00?

4

1

I created a P2SH transaction and signed it using coinb.in.

The sigScript field for this transaction is:

    da
      00
      47
        3044
          0220
            33fb7d92f07516a788465dc5e4becabd5a7a5279efd008d004516ca575f00d1d
          0220
            3ad7cd3a4e9a0a5fec9db40b7348681705780e3bfd9bb862ca919342018d2dbb
        01
      48
        3045
          0221
            008a71a625891fca3d693c60881a6e5d946663253b47567d7309ade68208b37e3e
          0220
            1d078abd7d3e49d34c25e8181dbdba02356b1a55e97a3f50d8218381a99978ff
        01
      47
        5221025fd4ecaecef546156b694115406b61e03dec7e36917bb81a68b01b13d7eb289c2102b29cd1868e4b7c23e7c4aaecace46b28678e0138e736ea66848e0f28906cc66552ae

Why does this field contain a preprended 0x00 value?

Thorkil Værge

Posted 2018-05-08T13:48:50.777

Reputation: 637

Answers

6

OP_CHECKMULTISIG contains a bug which consumes one extra element from the stack. Due to this, an additional OP_FALSE (0x00) is pushed for multisig scripts to make the script evaluation valid.

Raghav Sood

Posted 2018-05-08T13:48:50.777

Reputation: 10 897