[Bitcoin-development] [PULL] Add scriptPubKey enforced sendescrow and redeemescrow API calls

Gavin Andresen gavinandresen at gmail.com
Wed Jun 22 14:08:05 UTC 2011


On Wed, Jun 22, 2011 at 9:24 AM, Mike Hearn <mike at plan99.net> wrote:
> I think you can just use an output script of
>   2 <K1> <K2> <K3> 3 CHECKMULTISIGVERIFY

I think it is time to start experimenting with MULTISIG transactions on testnet.

Mike:  Did Satoshi ever tell you what he was thinking for the best way
to implement MULTISIG transactions?
I'm wondering if hard-coding new standard script templates in
script.cpp Solver():

 vTemplates.push_back(CScript() << OP_1 << OP_PUBKEY << OP_PUBKEY <<
OP_2 << OP_CHECKMULTISIGVERIFY);
 vTemplates.push_back(CScript() << OP_2 << OP_PUBKEY << OP_PUBKEY <<
OP_2 << OP_CHECKMULTISIGVERIFY);
 vTemplates.push_back(CScript() << OP_1 << OP_PUBKEY << OP_PUBKEY <<
OP_PUBKEY << OP_3 << OP_CHECKMULTISIGVERIFY);
 vTemplates.push_back(CScript() << OP_2 << OP_PUBKEY << OP_PUBKEY <<
OP_PUBKEY << OP_3 << OP_CHECKMULTISIGVERIFY);
 vTemplates.push_back(CScript() << OP_3 << OP_PUBKEY << OP_PUBKEY <<
OP_PUBKEY << OP_3 << OP_CHECKMULTISIGVERIFY);

... would be the right approach to support 1/2 of 2 and 1/2/3 of 3
signatures.  It'd be nice if there were generic
OP_N << OP_PUBKEY_N << OP_N  ... template matching opcodes, but there aren't.

I'm also wondering if it makes sense to just support 2-of-2 (for
validate-on-multiple-devices) and 2-of-3 (for escrow) for now.

I think all of these could use a new type of bitcoin payment address;
it might make sense for THAT to be generic, maybe containing:
 version byte
 m
 n
 hash of xor of all n public keys
 checksum

I'm most interested in the 2-of-2 case; I think merchants and
exchanges need bitcoin deposit/payment addresses that they can make
secure by requiring a 2-step signature process for spending those
funds.

-- 
--
Gavin Andresen
http://clearcoin.com/




More information about the bitcoin-dev mailing list