Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 9F14FE9A for ; 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 ; 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 To: Btc Drak , jl2012@xbt.hk In-Reply-To: References: <55DA6470.9040301@thinlink.com> <85537faedb1e601d243e3edb666fa844@xbt.hk> 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Aug 2015 03:08:58 -0000 Btc Drak via bitcoin-dev 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.