summaryrefslogtreecommitdiff
path: root/44/2573baf7fea6594af1bd0e7b5481cf438af45d
blob: fe7621c36eae511ceda1de73e699c01d68e1430d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Return-Path: <joe2015@openmailbox.org>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 6C3D71221
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 30 Dec 2015 05:46:15 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail2.openmailbox.org (mail2.openmailbox.org [62.4.1.33])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 92C0C10E
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 30 Dec 2015 05:46:14 +0000 (UTC)
Received: by mail2.openmailbox.org (Postfix, from userid 1004)
	id 3211B2AC3F25; Wed, 30 Dec 2015 06:46:12 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org;
	s=openmailbox; t=1451454372;
	bh=VFha0Lenq82gxRg+9SNWfvjTdaRJqMjC0Y12hw2R09g=;
	h=Date:From:To:Subject:From;
	b=V7i4IYofQ0o1zvrH8L+rJ2M0sJ7YlRgvOZbwFTMyovJJVRuZCaBggaeLVuhXs+Yr3
	nxkXaLakZWA1ux7gMlkYANtD2eWN/9ZQ3kbyqJCsiasMbg9CUTjevyvwEFogbQjdOc
	VWjv9MdOtuov4FgEcjIiSpMwnBG39qx5bvbrDhb4=
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_LOW,
	RP_MATCHES_RCVD autolearn=ham version=3.3.1
Received: from www.openmailbox.org (openmailbox-b1 [10.91.69.218])
	by mail2.openmailbox.org (Postfix) with ESMTP id 1D78F2AC3F2F
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 30 Dec 2015 06:46:01 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Wed, 30 Dec 2015 13:46:01 +0800
From: joe2015@openmailbox.org
To: bitcoin-dev@lists.linuxfoundation.org
Message-ID: <6fc10e581a81abb76be5cd49275ebf48@openmailbox.org>
X-Sender: joe2015@openmailbox.org
User-Agent: Roundcube Webmail/1.0.6
X-Mailman-Approved-At: Wed, 30 Dec 2015 06:53:51 +0000
Subject: [bitcoin-dev] An implementation of BIP102 as a softfork.
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: Wed, 30 Dec 2015 05:46:15 -0000

Below is a proof-of-concept implementation of BIP102 as a softfork:

https://github.com/ZoomT/bitcoin/tree/2015_2mb_blocksize
https://github.com/jgarzik/bitcoin/compare/2015_2mb_blocksize...ZoomT:2015_2mb_blocksize?diff=split&name=2015_2mb_blocksize

BIP102 is normally a hardfork.  The softfork version (unofficial
codename BIP102s) uses the idea described here:
http://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-December/012073.html

The basic idea is that post-fork blocks are constructed in such a way
they can be mapped to valid blocks under the pre-fork rules.  BIP102s
is a softfork in the sense that post-fork miners are still creating a
valid chain under the old rules, albeit indirectly.

 From the POV of non-upgraded clients, BIP102s circumvents the
block-size limit by moving transaction validation data "outside" of
the block.  This is a similar trick used by Segregated Witness and
Extension Blocks (both softfork proposals).

 From the POV of upgraded clients, the block layout is unchanged,
except:
- A larger 2MB block-size limit (=BIP102);
- The header Merkle root has a new (backwards compatible)
   interpretation;
- The coinbase encodes the Merkle root of the remaining txs.
Aside from this, blocks maintain their original format, i.e. a block
header followed by a vector of transactions.  This keeps the
implementation simple, and is distinct from SW and EB.

Since BIP102s is a softfork it means that:
- A miner majority (e.g. 75%, 95%) force miner consensus (100%).  This
   is not true for a hardfork.
- Fraud risk is significantly reduced (6-conf unlikely depending on
   activation threshold).
This should address some of the concerns with deploying a block-size
increase using a hardfork.

Notes:

- The same basic idea could be adapted to any of the other proposals
   (BIP101, 2-4-8, BIP202, etc.).
- I used Jeff Garzik's BIP102 implementation which is incomplete (?).
   The activation logic is left unchanged.
- I am not a Bitcoin dev so hopefully no embarrassing mistakes in my
   code :-(

--joe