public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Gavin Andresen <gavinandresen@gmail•com>
To: Mike Hearn <mike@plan99•net>
Cc: Bitcoin Dev <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] [PULL] Add scriptPubKey enforced sendescrow and redeemescrow API calls
Date: Wed, 22 Jun 2011 10:08:05 -0400	[thread overview]
Message-ID: <BANLkTikkBoHBr8z6Uv7oGU_KuT0bvgx3HA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=FTLnU-riNVYssnR9FLdcEeZX7gOS6Zdv1f_XDcJoSSg@mail.gmail.com>

On Wed, Jun 22, 2011 at 9:24 AM, Mike Hearn <mike@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/



  parent reply	other threads:[~2011-06-22 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16  4:53 bgroff
2011-06-22 13:24 ` Mike Hearn
2011-06-22 13:42   ` Mike Hearn
2011-06-22 16:01     ` bgroff
2011-06-22 14:08   ` Gavin Andresen [this message]
2011-06-22 14:49     ` Mike Hearn
2011-06-22 15:32       ` Gavin Andresen
2011-06-22 16:02         ` Mike Hearn
2011-06-22 16:23         ` bgroff
2011-06-22 19:33           ` bgroff
2011-06-22 20:44         ` bgroff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTikkBoHBr8z6Uv7oGU_KuT0bvgx3HA@mail.gmail.com \
    --to=gavinandresen@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=mike@plan99$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox