Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XEiYd-0005tQ-Fo for bitcoin-development@lists.sourceforge.net; Tue, 05 Aug 2014 17:29:55 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of pixodegames.com designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; envelope-from=flavien.charlon@pixodegames.com; helo=mail-lb0-f181.google.com; Received: from mail-lb0-f181.google.com ([209.85.217.181]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XEiYb-0003qT-TA for bitcoin-development@lists.sourceforge.net; Tue, 05 Aug 2014 17:29:55 +0000 Received: by mail-lb0-f181.google.com with SMTP id 10so970615lbg.26 for ; Tue, 05 Aug 2014 10:29:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=pRPZ9hVbSvECAY227OCtdrL98hCsRbduz1R7mteWkbI=; b=A/MTNaWPTMX7zYC+vfHzVliUW2H5Jgwu7A4UjAqi8B3iD2DbX9rfoHnAvaqRjbyW3E Zr+xsC/0yjNHEv7sf+ftThUZGjL0bnQtZxq/OoAEefkeipicpXhvzwf2BRibjesEZ2Uy TIi10TevCUgTt54WbJnIhjRLWdTbUXnEESwaFhECDRwGUrBdjFVKwOaxe41Url8ZCbPx kvGq0i8sxcQIXEQcBZEhWPXypAztRKvLXCsrVZDEKGmX6b/h3j59UCKJQnYuE+7cafLq gT3opEX1tRXBMxht7me13LbBHjSx1Z0vfbYzVzn3bATTQ54kVsM7sKKmb3Y0pnEa/uwb k3qQ== X-Gm-Message-State: ALoCoQnfO80jFre6lD0cFb5l1w3hPsc2UQinE9IvLeL67Ar9fK0AE1S9RxkWeKV+h1sOpXl4a42M X-Received: by 10.112.129.9 with SMTP id ns9mr5236894lbb.23.1407258199029; Tue, 05 Aug 2014 10:03:19 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by mx.google.com with ESMTPSA id c7sm1181770laf.2.2014.08.05.10.03.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Aug 2014 10:03:18 -0700 (PDT) Received: by mail-la0-f42.google.com with SMTP id pv20so984349lab.1 for ; Tue, 05 Aug 2014 10:03:18 -0700 (PDT) X-Received: by 10.152.87.82 with SMTP id v18mr5566752laz.17.1407258198490; Tue, 05 Aug 2014 10:03:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.67.10 with HTTP; Tue, 5 Aug 2014 10:02:38 -0700 (PDT) X-Originating-IP: [2a01:110:8:1003:494e:7ce7:f38e:659a] In-Reply-To: <53DC329E.7090206@thinlink.com> References: <53DC329E.7090206@thinlink.com> From: Flavien Charlon Date: Tue, 5 Aug 2014 18:02:38 +0100 Message-ID: To: Tom Harding Content-Type: multipart/alternative; boundary=001a11c2ae8c0752fd04ffe4d506 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 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1XEiYb-0003qT-TA Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] deterministic transaction expiration 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: Tue, 05 Aug 2014 17:29:55 -0000 --001a11c2ae8c0752fd04ffe4d506 Content-Type: text/plain; charset=UTF-8 > It would make more sense to introduce a new script opcode that pushes the current block height onto the operand stack. Then you could implement arbitrary logic about which blocks the transaction can be valid in. This would require that the client revalidate all transactions in its mempool (really, only those making use of this opcode) whenever the chain tip changes. I have to say I like this idea, this would allow someone to prove they can't spend funds before a given date, and vice versa, prove that the funds can't ever be spent after a given date (and this is provably prunable, isn't it?). Of course, there are some risks associated with that, but nobody is forced to use it. > flooding the network with unrelated high fee transactions > in order to push a transaction out to where it can never be mined at > all. This becomes increasingly expensive as the deadline is further away, so not very hard to mitigate. On Sat, Aug 2, 2014 at 1:36 AM, Tom Harding wrote: > On 7/31/2014 5:58 PM, Kaz Wesley wrote: > > 1. start setting nLockTime to the current height by default in newly > > created transactions (or slightly below the current height, for > > reorg-friendliness) > > Reorg-frendliness is the opposite of the rationale behind #2340, which > proposes setting nLockTime at current-height + 1 to prevent > "fee-sniping" reorgs... > > > > 2. once users have had some time to upgrade to clients that set > > nLockTime, start discouraging transactions without nLockTime -- > > possibly with a slightly higher fee required for relay > > 3. start rate-limiting relay of transactions without an nLockTime > > (maybe this alone could be used to achieve [2]) > > 4. add a new IsStandard rule rejecting transactions with an nLockTime > > more than N blocks behind the current tip (for some fixed value N, to > > be determined) > > > > One way to proceed is implement #3753 (mempool janitor) in such a way > that transactions with nLockTime are allowed to live a bit longer in the > mempool (say 500 blocks) than those without (72 hours). In other words, > as a first step, just actually start expiring things from the mempool in > bitcoin core, and leave any relay fee adjustments or rate limiting for > later. The isStandard change would be a good complement to #3753, to > avoid relaying a tx that will soon expire by the nLockTime rule anyway. > > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > --001a11c2ae8c0752fd04ffe4d506 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> It would make more sense to introduce a new scri= pt opcode that pushes the current block height onto the operand stack. Then= you could implement arbitrary logic about which blocks the transaction can= be valid in. This would require that the client revalidate all transaction= s in its mempool (really, only those making use of this opcode) whenever th= e chain tip changes.

I have to say I like this idea, this would allow someon= e to prove they can't spend funds before a given date, and vice versa, = prove that the funds can't ever be spent after a given date=C2=A0(and t= his is provably prunable, isn't it?). Of course, there are some risks a= ssociated with that, but nobody is forced to use it.

> flooding the network with unrelated high fee trans= actions
> in order to push a transaction out to where it can never be= mined at
> all.

This becomes increasingly = expensive as the deadline is further away, so not very hard to mitigate.


On Sat,= Aug 2, 2014 at 1:36 AM, Tom Harding <tomh@thinlink.com> wro= te:
On 7/31/2014 5:58 PM, Kaz Wesley wrote:=
> 1. start setting nLockTime to the current height by default in newly > created transactions (or slightly below the current height, for
> reorg-friendliness)

Reorg-frendliness is the opposite of the rationale behind #2340, whic= h
proposes setting nLockTime at current-height + 1 to prevent
"fee-sniping" reorgs...


> 2. once users have had some time to upgrade to clients that set
> nLockTime, start discouraging transactions without nLockTime --
> possibly with a slightly higher fee required for relay
> 3. start rate-limiting relay of transactions without an nLockTime
> (maybe this alone could be used to achieve [2])
> 4. add a new IsStandard rule rejecting transactions with an nLockTime<= br> > more than N blocks behind the current tip (for some fixed value N, to<= br> > be determined)
>

One way to proceed is implement #3753 (mempool janitor) in such a way=
that transactions with nLockTime are allowed to live a bit longer in the mempool (say 500 blocks) than those without (72 hours). =C2=A0In other word= s,
as a first step, just actually start expiring things from the mempool in bitcoin core, and leave any relay fee adjustments or rate limiting for
later. =C2=A0The isStandard change would be a good complement to #3753, to<= br> avoid relaying a tx that will soon expire by the nLockTime rule anyway.



---------------------------------------------------------------------------= ---
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/b= ds
_______________________________________________
Bitcoin-development mailing list
Bitcoin-develo= pment@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment

--001a11c2ae8c0752fd04ffe4d506--