Return-Path: <rusty@ozlabs.org> Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 9F14FE9A for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 27 Aug 2015 03:08:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 08AF3102 for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 27 Aug 2015 03:08:57 +0000 (UTC) Received: by ozlabs.org (Postfix, from userid 1011) id DC0FE1401EF; Thu, 27 Aug 2015 13:08:54 +1000 (AEST) From: Rusty Russell <rusty@rustcorp.com.au> To: Btc Drak <btcdrak@gmail.com>, jl2012@xbt.hk In-Reply-To: <CADJgMzsLU5tQDLp0NWDwE6S476PdwvrOWOpn8oQ+5JPyoyi8gQ@mail.gmail.com> References: <CADJgMztgE_GkbrsP7zCEHNPA3P6T=aSFfhkcN-q=gVhWP0vKXg@mail.gmail.com> <CADJgMzv8G3EqLBwEYRHJZ+fO_Jwzy0koi2pJ_iNRkXmoVarGcg@mail.gmail.com> <CABm2gDod9z6ksgaCv86qFCyKLTQSL3+oNns+__5H77hVhs05DQ@mail.gmail.com> <CAOG=w-sbOcaogkic2i4A5eZnBQ79LUibsGy0dyKyvQg53ktY1Q@mail.gmail.com> <55DA6470.9040301@thinlink.com> <CAAS2fgQKQpHu-nC1uSrigDx2JLUt64p-LqidVmiuULDE0MJCFQ@mail.gmail.com> <85537faedb1e601d243e3edb666fa844@xbt.hk> <CAOG=w-vXFcq1bCkviWOK8nh5wz77tYy9hbLXCn8nGLzNRTSgOw@mail.gmail.com> <d7ba4da921d3ab55dc774dbd78c21744@xbt.hk> <CADJgMzsLU5tQDLp0NWDwE6S476PdwvrOWOpn8oQ+5JPyoyi8gQ@mail.gmail.com> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 27 Aug 2015 12:38:42 +0930 Message-ID: <87k2shig1x.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org> Subject: Re: [bitcoin-dev] [BIP-draft] CHECKSEQUENCEVERIFY - An opcode for relative locktime X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion <bitcoin-dev.lists.linuxfoundation.org> List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe> List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/> List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org> List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help> List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe> X-List-Received-Date: Thu, 27 Aug 2015 03:08:58 -0000 Btc Drak via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> writes: > This BIP has been assigned BIP112 by the BIP repository maintainer. I > have updated the pull request accordingly. > > Regarding the suggestion to cannibalise version, by your own > disadvantage list, we would lose fine grained control over txins which > neuters the usefulness considerably. Also using version is also ugly > because there isn't a semantic association with what we are trying to > do, whereas, sequence is associated with transaction finality and is > thus the more appropriate and logical field to use. OK, having implemented lightning test code against the initial proposal, I can give the following anecdata: - I screwed up inversion in my initial implementation. Please kill it. - 256 second granularity would be be fine in deployment, but a bit painful for testing (I currently use 60 seconds, and "sleep 61"). 64 would work better for me, and works roughly as minutes. - 1 year should be sufficient as a max; my current handwave is <= 1 day per lightning hop, max 12 hops, though we have no deployment data. - We should immediately deploy an IsStandard() rule which insists that nSequence is 0xFFFFFFFF or 0, so nobody screws themselves when we soft fork and they had random junk in there. Aside: I'd also like to have nLockTime apply even if nSequence != 0xFFFFFFFF (another mistake I made). So I'd like an IsStandard() rule to say it nLockTime be 0 if an nSequence != 0xFFFFFFFF. Would that screw anyone currently? Thanks, Rusty.