From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TFUNr-0007CL-TB for bitcoin-development@lists.sourceforge.net; Sat, 22 Sep 2012 18:24:55 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; envelope-from=timon.elviejo@gmail.com; helo=mail-vc0-f175.google.com; Received: from mail-vc0-f175.google.com ([209.85.220.175]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1TFUNn-000579-49 for bitcoin-development@lists.sourceforge.net; Sat, 22 Sep 2012 18:24:55 +0000 Received: by vcqp1 with SMTP id p1so5498688vcq.34 for ; Sat, 22 Sep 2012 11:24:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.89.168 with SMTP id bp8mr5147135veb.20.1348338285449; Sat, 22 Sep 2012 11:24:45 -0700 (PDT) Received: by 10.220.175.18 with HTTP; Sat, 22 Sep 2012 11:24:45 -0700 (PDT) In-Reply-To: References: Date: Sat, 22 Sep 2012 20:24:45 +0200 Message-ID: From: =?ISO-8859-1?Q?Jorge_Tim=F3n?= To: Jeff Garzik Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (timon.elviejo[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1TFUNn-000579-49 Cc: Bitcoin Development Subject: Re: [Bitcoin-development] Atomic coin swapping? X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Sep 2012 18:24:56 -0000 On 9/22/12, Mike Hearn 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. --=20 Jorge Tim=F3n On 9/22/12, Jeff Garzik wrote: > On Sat, Sep 22, 2012 at 5:10 AM, Jorge Tim=F3n > 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=3D112007.msg1212356#msg1212356 > > -- > Jeff Garzik > exMULTI, Inc. > jgarzik@exmulti.com > --=20 Jorge Tim=F3n