Dev Docs Correction: CHECKMULTISIG Requires Sigs In Same Order As PubKeys

As reported by @gsalgado (thanks!), the docs incorrectly state that all
sigs are compared against all pubkeys.  This commit provides a corrected
description, additional details, and references in other parts of the
text where we mention multisig. (Fixes #622)
This commit is contained in:
David A. Harding 2014-10-28 21:33:26 -04:00
parent 82dcaf218a
commit 1ec71148da
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7
3 changed files with 74 additions and 11 deletions

View file

@ -360,11 +360,16 @@ consumes one more value from the stack than indicated by *m*, so the
list of secp256k1 signatures in the signature script must be prefaced with an extra value
(`OP_0`) which will be consumed but not used.
The signature script must provide signatures in the same order as the
corresponding public keys appear in the pubkey script or redeem
script. See the desciption in [`OP_CHECKMULTISIG`][op_checkmultisig]
for details.
{% endautocrossref %}
~~~
Pubkey script: <m> <pubkey> [pubkey] [pubkey...] <n> OP_CHECKMULTISIG
Signature script: OP_0 <sig> [sig] [sig...]
Pubkey script: <m> <A pubkey> [B pubkey] [C pubkey...] <n> OP_CHECKMULTISIG
Signature script: OP_0 <A sig> [B sig] [C sig...]
~~~
{% autocrossref %}
@ -375,8 +380,8 @@ Although its not a separate transaction type, this is a P2SH multisig with 2-
~~~
Pubkey script: OP_HASH160 <Hash160(redeemScript)> OP_EQUAL
Redeem script: <OP_2> <pubkey> <pubkey> <pubkey> <OP_3> OP_CHECKMULTISIG
Signature script: OP_0 <sig> <sig> <redeemScript>
Redeem script: <OP_2> <A pubkey> <B pubkey> <C pubkey> <OP_3> OP_CHECKMULTISIG
Signature script: OP_0 <A sig> <C sig> <redeemScript>
~~~
{% autocrossref %}