summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjl2012 <jl2012@xbt.hk>2015-08-08 14:51:17 -0400
committerbitcoindev <bitcoindev@gnusha.org>2015-08-08 18:51:20 +0000
commit035f4f185ec74eacda5eb6130d24920f7b42ddd7 (patch)
treed0e6ec33ea6bd61575a65cc83344252dc7e6013a
parentdcc5067f06fb811003e0c63e13fbafd444a79694 (diff)
downloadpi-bitcoindev-035f4f185ec74eacda5eb6130d24920f7b42ddd7.tar.gz
pi-bitcoindev-035f4f185ec74eacda5eb6130d24920f7b42ddd7.zip
[bitcoin-dev] The use of tx version field in BIP62 and 68
-rw-r--r--82/9b8d9ef5a574f7be19021464ee4f5c179f06f288
1 files changed, 88 insertions, 0 deletions
diff --git a/82/9b8d9ef5a574f7be19021464ee4f5c179f06f2 b/82/9b8d9ef5a574f7be19021464ee4f5c179f06f2
new file mode 100644
index 000000000..c3ef21876
--- /dev/null
+++ b/82/9b8d9ef5a574f7be19021464ee4f5c179f06f2
@@ -0,0 +1,88 @@
+Return-Path: <jl2012@xbt.hk>
+Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
+ [172.17.192.35])
+ by mail.linuxfoundation.org (Postfix) with ESMTPS id 6E181899
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Sat, 8 Aug 2015 18:51:20 +0000 (UTC)
+X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
+Received: from s47.web-hosting.com (s47.web-hosting.com [199.188.200.16])
+ by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5F9BD280
+ for <bitcoin-dev@lists.linuxfoundation.org>;
+ Sat, 8 Aug 2015 18:51:19 +0000 (UTC)
+Received: from localhost ([::1]:53267 helo=server47.web-hosting.com)
+ by server47.web-hosting.com with esmtpa (Exim 4.85)
+ (envelope-from <jl2012@xbt.hk>) id 1ZO9DC-001Uy6-3E
+ for bitcoin-dev@lists.linuxfoundation.org;
+ Sat, 08 Aug 2015 14:51:18 -0400
+MIME-Version: 1.0
+Content-Type: text/plain; charset=US-ASCII;
+ format=flowed
+Content-Transfer-Encoding: 7bit
+Date: Sat, 08 Aug 2015 14:51:17 -0400
+From: jl2012@xbt.hk
+To: bitcoin-dev@lists.linuxfoundation.org
+Message-ID: <bcebe52e7f66f2065d48e089d773156b@xbt.hk>
+X-Sender: jl2012@xbt.hk
+User-Agent: Roundcube Webmail/1.0.5
+X-AntiAbuse: This header was added to track abuse,
+ please include it with any abuse report
+X-AntiAbuse: Primary Hostname - server47.web-hosting.com
+X-AntiAbuse: Original Domain - lists.linuxfoundation.org
+X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
+X-AntiAbuse: Sender Address Domain - xbt.hk
+X-Get-Message-Sender-Via: server47.web-hosting.com: authenticated_id:
+ jl2012@xbt.hk
+X-Source:
+X-Source-Args:
+X-Source-Dir:
+X-From-Rewrite: unmodified, already matched
+X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,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
+Subject: [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 <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: Sat, 08 Aug 2015 18:51:20 -0000
+
+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)
+