Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1W8qbp-0002zl-VG for bitcoin-development@lists.sourceforge.net; Thu, 30 Jan 2014 12:20:41 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gnomon.org.uk designates 93.93.131.22 as permitted sender) client-ip=93.93.131.22; envelope-from=roy@gnomon.org.uk; helo=darla.gnomon.org.uk; Received: from darla.gnomon.org.uk ([93.93.131.22]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1W8qbo-0000Dd-0I for bitcoin-development@lists.sourceforge.net; Thu, 30 Jan 2014 12:20:41 +0000 Received: from darla.gnomon.org.uk (localhost.gnomon.org.uk [127.0.0.1]) by darla.gnomon.org.uk (8.14.3/8.14.3) with ESMTP id s0UCKHwu077239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 30 Jan 2014 12:20:22 GMT (envelope-from roy@darla.gnomon.org.uk) Received: (from roy@localhost) by darla.gnomon.org.uk (8.14.3/8.14.1/Submit) id s0UCKGfR077238; Thu, 30 Jan 2014 12:20:16 GMT (envelope-from roy) Date: Thu, 30 Jan 2014 12:20:16 +0000 From: Roy Badami To: Chuck Message-ID: <20140130122016.GX38964@giles.gnomon.org.uk> References: <52E9E787.8080304@borboggle.com> <52EA343E.4010208@borboggle.com> <52EA3FAD.5080802@borboggle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52EA3FAD.5080802@borboggle.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -1.9 (-) 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 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1W8qbo-0000Dd-0I Cc: Bitcoin-Dev Subject: Re: [Bitcoin-development] BIP70 message delivery reliability 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: Thu, 30 Jan 2014 12:20:42 -0000 On Thu, Jan 30, 2014 at 07:03:57PM +0700, Chuck wrote: > On 1/30/2014 7:02 PM, Pieter Wuille wrote: > > On Thu, Jan 30, 2014 at 12:59 PM, Mike Hearn wrote: > >> With the way it works in bitcoinj, the tx is only committed to the wallet if > >> the server accepts the Payment message and ACKs it. So the tx would not be > >> retried if there's a failure submitting or some kind of internal server > >> error, and the UI would show that the payment failed. That seems > >> straightforward and how I'd expect things to work as a user. > > That's one right way to do it imho, but not what is suggested or > > required by the specification, and not what bitcoin core master > > currently implements. > > > If you sent the Payment message and the server goes silent after > receiving it, you retry to delivery. However, the merchant can > broadcast the transactions and force them into your wallet anyway. You > could, quite likely, pay and never get an ACK. I think in that case, you absolultely have to invalidate all the transactions in the Payment message by broadcasting a send-to-self transaction as soon as possible; until that point your wallet balance is indeterminate. Otherwise what will happen if the merchant did in fact receive the Payment message, and then processes it (and broadcasts the transaction) after some delay? Then what the user will see is: an apparently failed attempt to pay, leaving their wallet balance unchanged. Then, perhaps many hours later, their wallet balance will appear to spontaneously decrement. roy