Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 213899C for ; Sat, 8 Aug 2015 18:56:34 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 748AD1BB for ; Sat, 8 Aug 2015 18:56:33 +0000 (UTC) Received: by igk11 with SMTP id 11so49378705igk.1 for ; Sat, 08 Aug 2015 11:56:33 -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:date :message-id:subject:from:to:cc:content-type; bh=feYxGM/pRqp0480ruYrKB23wA3/mVlKK7U2pSulBWo0=; b=N3goBB3G+eozxeXrCQxgwm8AorKtfiEaisemz44Xe51/JRHNYwbcDiH/V3FyPWyk0C o3HaShhkhOwmnGwuVdmfX8etdogqyT4OL+Oy/zk93onaPQs7WTFgYX9QIcvgtEqul2cp 71RxcAyCZQlx8Y7/rAT3z99GBmIvFn0WIkelBmr2ZucxZ7RR8uEUj8Mo997Ubb6Ixck9 MqbZnHpWPQrVpOUA5PFTqMrGiWq1fggYeQMudoEpZYOazGbRELNixeKv+TgDzqJA6fuq /6Ao7c3hkfxtgVrCKzJ0w8Wv92VmCcQMuSojACovmPRpkAiwpu+/9MOlb7fvC9tkm0HN aJ3Q== X-Gm-Message-State: ALoCoQlr/KNjC0FtTkP0uebw7V4HSAE/iom0cvVDjuPDKfFkgoJ7AB83yMR7h+lIGhzt68PO+KXV MIME-Version: 1.0 X-Received: by 10.50.112.229 with SMTP id it5mr4383676igb.46.1439060192897; Sat, 08 Aug 2015 11:56:32 -0700 (PDT) Received: by 10.107.158.140 with HTTP; Sat, 8 Aug 2015 11:56:32 -0700 (PDT) X-Originating-IP: [172.56.17.136] Received: by 10.107.158.140 with HTTP; Sat, 8 Aug 2015 11:56:32 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 Aug 2015 11:56:32 -0700 Message-ID: From: Mark Friedenbach To: jl2012@xbt.hk Content-Type: multipart/alternative; boundary=089e0118417e9bc66c051cd14f1a X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW 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] The use of tx version field in BIP62 and 68 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: Sat, 08 Aug 2015 18:56:34 -0000 --089e0118417e9bc66c051cd14f1a Content-Type: text/plain; charset=UTF-8 It is not a bug that you are unable to selectively choose these features with higher version numbers. The version selection is in there at all because there is a possibility that there exists already signed transactions which would violate these new rules. We wouldn't want these transactions to become unspendable. However moving forward there is no reason to selectively pick and choose which of these new consensus rules you want to apply your transaction. On Aug 8, 2015 11:51 AM, "jl2012 via bitcoin-dev" < bitcoin-dev@lists.linuxfoundation.org> wrote: > BIP68 rules and some of the BIP62 rules are applied only if the tx version > is >=2 and >=3 respectively. Therefore, it is not possible to create a tx > which follows BIP62 but not BIP68. If we introduce v4 tx later, BIP62 and > BIP68 will all become mandatory. > > Some rules, e.g. "scriptPubKey evaluation will be required to result in a > single non-zero value" in BIP62, will cause trouble when we try to > introduce a new script system with softfork. > > I suggest to divide the tx version field into 2 parts: the higher 4 bits > and lower 28 bits. > > BIP62 is active for a tx if its highest bits are 0000, and the second > lowest bit is 1. > > BIP68 is active for a tx if its highest bits are 0000, and the third > lowest bit is 1. > > So it will be easier for us to re-purpose the nSequence, or to take > advantage of malleability in the future. If this is adopted, the nSequence > high bit requirement in BIP68 becomes unnecessary as we could easily switch > it off. > > The low bits will allow 28 independent BIPs and should be ample for many > years. When they are exhausted, we can switch the high bits to a different > number (1-15) and redefine the meaning of low bits. By that time, some of > the 28 BIPs might have become obsoleted or could be merged. > > (I'm not sure if there are other draft BIPs with similar interpretation of > tx version but the comments above should also apply to them) > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > --089e0118417e9bc66c051cd14f1a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

It is not a bug that you are unable to selectively choose th= ese features with higher version numbers. The version selection is in there= at all because there is a possibility that there exists already signed tra= nsactions which would violate these new rules. We wouldn't want these t= ransactions to become unspendable. However moving forward there is no reaso= n to selectively pick and choose which of these new consensus rules you wan= t to apply your transaction.

On Aug 8, 2015 11:51 AM, "jl2012 via bitcoi= n-dev" <bi= tcoin-dev@lists.linuxfoundation.org> wrote:
=
BIP68 rules and some of the BIP62 rules are = applied only if the tx version is >=3D2 and >=3D3 respectively. There= fore, it is not possible to create a tx which follows BIP62 but not BIP68. = If we introduce v4 tx later, BIP62 and BIP68 will all become mandatory.

Some rules, e.g. "scriptPubKey evaluation will be required to result i= n a single non-zero value" in BIP62, will cause trouble when we try to= introduce a new script system with softfork.

I suggest to divide the tx version field into 2 parts: the higher 4 bits an= d lower 28 bits.

BIP62 is active for a tx if its highest bits are 0000, and the second lowes= t bit is 1.

BIP68 is active for a tx if its highest bits are 0000, and the third lowest= bit is 1.

So it will be easier for us to re-purpose the nSequence, or to take advanta= ge of malleability in the future. If this is adopted, the nSequence high bi= t requirement in BIP68 becomes unnecessary as we could easily switch it off= .

The low bits will allow 28 independent BIPs and should be ample for many ye= ars. When they are exhausted, we can switch the high bits to a different nu= mber (1-15) and redefine the meaning of low bits. By that time, some of the= 28 BIPs might have become obsoleted or could be merged.

(I'm not sure if there are other draft BIPs with similar interpretation= of tx version but the comments above should also apply to them)
_______________________________________________
bitcoin-dev mailing list
= bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mail= man/listinfo/bitcoin-dev
--089e0118417e9bc66c051cd14f1a--