Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WDeZI-0001ZD-8s for bitcoin-development@lists.sourceforge.net; Wed, 12 Feb 2014 18:29:56 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.216.51 as permitted sender) client-ip=209.85.216.51; envelope-from=etotheipi@gmail.com; helo=mail-qa0-f51.google.com; Received: from mail-qa0-f51.google.com ([209.85.216.51]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1WDeZG-0006XK-5d for bitcoin-development@lists.sourceforge.net; Wed, 12 Feb 2014 18:29:56 +0000 Received: by mail-qa0-f51.google.com with SMTP id f11so14334806qae.24 for ; Wed, 12 Feb 2014 10:29:48 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.224.11.136 with SMTP id t8mr68624387qat.26.1392229283444; Wed, 12 Feb 2014 10:21:23 -0800 (PST) Received: by 10.229.66.67 with HTTP; Wed, 12 Feb 2014 10:21:23 -0800 (PST) Received: by 10.229.66.67 with HTTP; Wed, 12 Feb 2014 10:21:23 -0800 (PST) In-Reply-To: References: <20140210030048.GB31925@savin> Date: Wed, 12 Feb 2014 13:21:23 -0500 Message-ID: From: Alan Reiner To: Gregory Maxwell Content-Type: multipart/alternative; boundary=001a11c2c2b8e45dff04f239a3ad X-Spam-Score: -0.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 (etotheipi[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -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: 1WDeZG-0006XK-5d 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:29:56 -0000 --001a11c2c2b8e45dff04f239a3ad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable We're talking about two slightly different things. If their system had tracked by inputs and outputs (or some kind of static ID) , their system wouldn't have been issuing refunds/replacements/cancellations in the first place. I agree with you that the reissuing code should also guarantee that both TX can't be valid... But really their system should do both. Without the I/O based tracking their bookkeeping will be off, regardless of the reissuing code, because they can't properly associate outgoing transactions with customer accounts/actions. Sent from my overpriced smartphone On Feb 12, 2014 1:06 PM, "Gregory Maxwell" wrote: On Wed, Feb 12, 2014 at 7:12 AM, Rune Kj=E6r 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 transaction > hash. If MtGox had talked those IDs instead of the TX ID, their software > 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-- not because mutation may mean you're looking in the wrong place-- but because the 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. ---------------------------------------------------------------------------= --- Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=3D124407151&iu=3D/4140/ostg.c= lktrk _______________________________________________ Bitcoin-development mailing list Bitcoin-development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bitcoin-development --001a11c2c2b8e45dff04f239a3ad Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

We're talking about two slightly different things. = If their system had tracked by inputs and outputs (or some kind of static = ID) , their system wouldn't have been issuing refunds/replacements/canc= ellations in the first place.

I agree with you that the reissuing code should also guarant= ee that both TX can't be valid... But really their system should do bot= h.   Without the I/O based tracking their bookkeeping will be off= , regardless of the reissuing code,  because they can't properly a= ssociate outgoing transactions with customer accounts/actions.

Sent from my overpriced smartphone

On Feb 12, 2014 1:06 PM, "Gregory Maxwell&q= uot; <gmaxwell@gmail.com> w= rote:
On Wed, Feb 12, 2014 at 7:12 AM, Rune Kj=E6r Sve= ndsen <runesvend@gmail.com>= ; 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 o= f the
> transaction data which we know is not malleable, and have clients use<= br> > 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 <etotheipi@gmail.com> wrote:
> I think the solution is simply to encourage Bitcoin software developer= s to
> design their software to use this static ID, instead of the full trans= action
> hash.    If MtGox had talked those IDs instead of the TX ID,= their software
> would've correctly identified the mutated transactions and there w= ould be
> no problem.

This is incorrect.  MtGox was automatically issuing replacement<= br> 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— not because
mutation may mean you're looking in the wrong place— but because = the
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<= br> or the other will be confirmed.

---------------------------------------------------------------------------= ---
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gam= pad/clk?id=3D124407151&iu=3D/4140/ostg.clktrk
_______________________________________________
Bitcoin-development mailing list
Bitcoin-develo= pment@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment
--001a11c2c2b8e45dff04f239a3ad--