Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1USOzC-00042s-Lv for bitcoin-development@lists.sourceforge.net; Wed, 17 Apr 2013 09:49:06 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.219.43 as permitted sender) client-ip=209.85.219.43; envelope-from=mh.in.england@gmail.com; helo=mail-oa0-f43.google.com; Received: from mail-oa0-f43.google.com ([209.85.219.43]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1USOzB-0006LY-Jg for bitcoin-development@lists.sourceforge.net; Wed, 17 Apr 2013 09:49:06 +0000 Received: by mail-oa0-f43.google.com with SMTP id l10so1396650oag.16 for ; Wed, 17 Apr 2013 02:49:00 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.96.105 with SMTP id dr9mr1273453oeb.59.1366192139573; Wed, 17 Apr 2013 02:48:59 -0700 (PDT) Sender: mh.in.england@gmail.com Received: by 10.76.167.169 with HTTP; Wed, 17 Apr 2013 02:48:59 -0700 (PDT) In-Reply-To: <453bfc69-b2ab-4992-9807-55270fbda0db@email.android.com> References: <453bfc69-b2ab-4992-9807-55270fbda0db@email.android.com> Date: Wed, 17 Apr 2013 11:48:59 +0200 X-Google-Sender-Auth: NDfWdiTrWMEWwfznjFarjjeLZeM Message-ID: From: Mike Hearn To: Peter Todd Content-Type: multipart/alternative; boundary=089e012280f22ca3f504da8b6588 X-Spam-Score: -0.5 (/) 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 (mh.in.england[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message 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: 1USOzB-0006LY-Jg Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] Anti DoS for tx replacement 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, 17 Apr 2013 09:49:06 -0000 --089e012280f22ca3f504da8b6588 Content-Type: text/plain; charset=UTF-8 When this system was first being discussed, Gavin was concerned that miner incentives were to ignore replacements because it meant extra work and the replacement might have equal or lower fees than before (or indeed, no fees). He proposed two solutions: one is to progressively raise the fee on each replacement. The other is to specify lock time in terms of blocks and then step it backwards once for each replacement, thus ensuring that by replacing the transaction you get to claim any attached fee earlier. It should be apparent that both solutions can be implemented by whichever application is running the contract - the core Bitcoin network and software is agnostic either way. Now, Gavin and I disagreed on whether this would actually be necessary. As I already pointed out, both solutions seriously reduce the utility of HFT because they limit how often you can update the contract. Instead of an online game billing you per second, maybe it can only do it per minute or per 10 minutes with the lock time solution because otherwise you run out of blocks, and with ever-increasing fees perhaps the contract becomes too expensive to justify after a while. So it'd be nice if this ended up not being necessary. Experience indicates that rational miners typically don't pursue a short-termist profit-at-any-cost agenda - free transactions have always been included in blocks, miners include transactions even though you could avoid a lot of complexity by just not including any at all, etc. Some miners like BTC Guild have actually sacrificed significant amounts of money for the good of the system. You can see this in terms of rational self interest - miners earn Bitcoins thus it's in their interest for Bitcoins to be as useful as possible, as that is what gives them value. Or you can see it in terms of ideologically-driven altruism. Or both. If I were to implement an application that used tx replacement, I would probably start with replacements that don't change the fees and don't count down the lock time field. We can then observe whether miners bother changing their software to behave differently, or whether the inherent utility of the application is enough to convince them to play by the default rules. Ideally at least one application made possible by this feature is a "killer app" - something so useful / unique / compelling that people want to obtain Bitcoin just to use it. If someone can find such an app, then rational miners should want tx replacement to work as reliably as possible because it boosts the value of their earnings. There are some other misc details - reactivation requires that we bump the protocol version and start relaying non-final transactions to new nodes again. Those nodes should relay replacements but not let them enter wallets unless/until the wallet software itself can handle them better, for instance, by communicating via APIs anticipated confirmation times. This is something for individual wallet APIs to handle on their own, and just ignoring non-final transactions is a perfectly workable approach for Bitcoin-Qt. --089e012280f22ca3f504da8b6588 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
When this system was first being discussed, Gavin was conc= erned that miner incentives were to ignore replacements because it meant ex= tra work and the replacement might have equal or lower fees than before (or= indeed, no fees). He proposed two solutions: one is to progressively raise= the fee on each replacement. The other is to specify lock time in terms of= blocks and then step it backwards once for each replacement, thus ensuring= that by replacing the transaction you get to claim any attached fee earlie= r.

It should be apparent that both solutions can be imple= mented by whichever application is running the contract - the core Bitcoin = network and software is agnostic either way.

Now, Gavin and I disagreed on whether this would actually be nec= essary. As I already pointed out, both solutions seriously reduce the utili= ty of HFT because they limit how often you can update the contract. Instead= of an online game billing you per second, maybe it can only do it per minu= te or per 10 minutes with the lock time solution because otherwise you run = out of blocks, and with ever-increasing fees perhaps the contract becomes t= oo expensive to justify after a while.

So it'd be nice if this ended up not be= ing necessary. Experience indicates that rational miners typically don'= t pursue a short-termist profit-at-any-cost agenda - free transactions have= always been included in blocks, miners include transactions even though yo= u could avoid a lot of complexity by just not including any at all, etc. So= me miners like BTC Guild have actually sacrificed significant amounts of mo= ney for the good of the system. You can see this in terms of rational self = interest - miners earn Bitcoins thus it's in their interest for Bitcoin= s to be as useful as possible, as that is what gives them value. Or you can= see it in terms of ideologically-driven altruism. Or both.

If I were to implement an application that = used tx replacement, I would probably start with replacements that don'= t change the fees and don't count down the lock time field. We can then= observe whether miners bother changing their software to behave differentl= y, or whether the inherent utility of the application is enough to convince= them to play by the default rules. Ideally at least one application made p= ossible by this feature is a "killer app" - something so useful /= unique / compelling that people want to obtain Bitcoin just to use it. If = someone can find such an app, then rational miners should want tx replaceme= nt to work as reliably as possible because it boosts the value of their ear= nings.

There are some other misc details - reactiv= ation requires that we bump the protocol version and start relaying non-fin= al transactions to new nodes again. Those nodes should relay replacements b= ut not let them enter wallets unless/until the wallet software itself can h= andle them better, for instance, by communicating via APIs anticipated conf= irmation times. This is something for individual wallet APIs to handle on t= heir own, and just ignoring non-final transactions is a perfectly workable = approach for Bitcoin-Qt.
--089e012280f22ca3f504da8b6588--