[Bitcoin-development] Atomic coin swapping?

Jorge Timón timon.elviejo at gmail.com
Sat Sep 22 18:24:45 UTC 2012


On 9/22/12, Mike Hearn <mike at 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 at exmulti.com> wrote:
> On Sat, Sep 22, 2012 at 5:10 AM, Jorge Timón <timon.elviejo at 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 at exmulti.com
>


-- 
Jorge Timón




More information about the bitcoin-dev mailing list