public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: "Jorge Timón" <timon.elviejo@gmail•com>
To: Jeff Garzik <jgarzik@exmulti•com>
Cc: Bitcoin Development <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] Atomic coin swapping?
Date: Sat, 22 Sep 2012 20:24:45 +0200	[thread overview]
Message-ID: <CAGQP0AHwLCa3oMkXOTyMEMQ2mAwLH057krz+PBm57Jwa_K1a_Q@mail.gmail.com> (raw)
In-Reply-To: <CA+8xBpdJ9uCn4Du75mUmb6J7n+WAjQ+GY3LsAg5EESsWqfD8GQ@mail.gmail.com>

On 9/22/12, Mike Hearn <mike@plan99•net> wrote:
>>
>> Why "Signing the input scripts as well would obviously make it
>> impossible to construct a transaction"?
>
>
> As it states in the source code, signatures cannot sign themselves.  If
> scriptSigs were included in the data that is being signed, the act of
> inserting the newly calculated signature for one input would break the
> signatures for all the others.

I see. By "input scripts" I thought you meant scriptPubKey rather than
scriptSigs. We only need to sign scriptPubKey. Right, Jeff?

> Yes, SIGHASH_ALL was the crucial piece I was missing.

Great, there's no need for an additional SIGHASH.
I guess you're implementing the simple case you describe first.
Do you plan to implement the more general case with n participants
instead of only 2 (a Ripple transaction)?
That would be awesome.

-- 
Jorge Timón



On 9/22/12, Jeff Garzik <jgarzik@exmulti•com> wrote:
> On Sat, Sep 22, 2012 at 5:10 AM, Jorge Timón <timon.elviejo@gmail•com>
> wrote:
>> I'm very interested in this. I was expecting transitive/multi-hop
>> transactions (Ripple) with colored coins, and I don't understand why
>> is not possible.
>>
>> From https://en.bitcoin.it/wiki/Contracts
>>
>> ---
>> SIGHASH_ALL: This is the default. It indicates that everything about
>
> Yes, SIGHASH_ALL was the crucial piece I was missing.
>
> I have updated the post to add a concrete example with as much detail
> as necessary for programmers to recreate.  Review requested:
> https://bitcointalk.org/index.php?topic=112007.msg1212356#msg1212356
>
> --
> Jeff Garzik
> exMULTI, Inc.
> jgarzik@exmulti•com
>


-- 
Jorge Timón



      reply	other threads:[~2012-09-22 18:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-22  7:28 Jeff Garzik
2012-09-22  9:10 ` Jorge Timón
2012-09-22 11:04   ` Mike Hearn
2012-09-22 17:05   ` Mike Hearn
2012-09-22 17:09   ` Jeff Garzik
2012-09-22 18:24     ` Jorge Timón [this message]

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=CAGQP0AHwLCa3oMkXOTyMEMQ2mAwLH057krz+PBm57Jwa_K1a_Q@mail.gmail.com \
    --to=timon.elviejo@gmail$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=jgarzik@exmulti$(echo .)com \
    /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