From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WDe9h-0007Cw-IP for bitcoin-development@lists.sourceforge.net; Wed, 12 Feb 2014 18:03:29 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; envelope-from=gmaxwell@gmail.com; helo=mail-lb0-f171.google.com; Received: from mail-lb0-f171.google.com ([209.85.217.171]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WDe9f-0004RV-NN for bitcoin-development@lists.sourceforge.net; Wed, 12 Feb 2014 18:03:29 +0000 Received: by mail-lb0-f171.google.com with SMTP id c11so7545933lbj.30 for ; Wed, 12 Feb 2014 10:03:21 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.27.193 with SMTP id v1mr32560614lag.4.1392228201127; Wed, 12 Feb 2014 10:03:21 -0800 (PST) Received: by 10.112.198.34 with HTTP; Wed, 12 Feb 2014 10:03:21 -0800 (PST) In-Reply-To: References: <20140210030048.GB31925@savin> Date: Wed, 12 Feb 2014 10:03:21 -0800 Message-ID: From: Gregory Maxwell To: =?UTF-8?Q?Rune_Kj=C3=A6r_Svendsen?= Content-Type: text/plain; charset=UTF-8 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 (gmaxwell[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: 1WDe9f-0004RV-NN Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] [RFC] [BIP proposal] Dealing with malleability 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: Wed, 12 Feb 2014 18:03:29 -0000 On Wed, Feb 12, 2014 at 7:12 AM, Rune Kj=C3=A6r Svendsen wrote: > Instead of trying to remove the possibility of transaction > malleability, would it make sense to define a new, "canonical > transaction hash/ID" (cTxID), which would be a hash of the part of the > transaction data which we know is not malleable, and have clients use > this cTxID internally, thus making the traditional transaction hash > irrelevant for a client to function correctly? This is fine and good. But it only scratches the surface of the problems created by malleability, especially for fancier transaction protocols. Mutation allows you to invalidate a chain of unconfirmed transaction by mutating the parent. This breaks any protocol which depends on creating a precomputed nlocked time refund transaction. So a canonical ID can be used to prevent some buggy behavior it doesn't actually fix the problem. Fortunately the non-fixed parts aren't too critical today. On Wed, Feb 12, 2014 at 8:22 AM, Alan Reiner wrote: > I think the solution is simply to encourage Bitcoin software developers t= o > design their software to use this static ID, instead of the full transact= ion > hash. If MtGox had talked those IDs instead of the TX ID, their softwa= re > would've correctly identified the mutated transactions and there would be > no problem. This is incorrect. MtGox was automatically issuing replacement transactions resulting in double payments. When you attempt to replace/reissue/cancel a transaction you __MUST__ double-spend the original transaction. If the original transaction has not been conflicted then it is possible someone will pull the original transaction out of a hat and both your replacement and the original will be confirmed. It is not safe at any time to look to see if the original has been confirmed yet, and if not reissue=E2=80=94 not because mutation may mean you're looking in the wrong place=E2=80=94 but because th= e state of the world could change nano-seconds after you looked. If you do double-spend the original then there is no chance that both will go through, you'll have atomic exclusion and only one transaction or the other will be confirmed.