summaryrefslogtreecommitdiff
path: root/e1/e006fc8a4fe961766366e35690f98a38d139bd
blob: 5cdfda678a0ce9b9b0103cadf5e32f03b5b13ef8 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Return-Path: <james.hilliard1@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id CECAFD32
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 24 Feb 2016 05:52:34 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com
	[209.85.215.50])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id E442CAB
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Wed, 24 Feb 2016 05:52:33 +0000 (UTC)
Received: by mail-lf0-f50.google.com with SMTP id l143so4879603lfe.2
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 23 Feb 2016 21:52:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:date:message-id:subject:from:to:content-type;
	bh=aVMWj7w4JftQ1zzI9F6lSsq89feKDLnFKHUaCT9s+jk=;
	b=fjcF+UtKR23IF7wm9KeJQ3ojYy8XnH+M9Wr8ahYv7A7dpecWACo2iywNd24AeU+r/I
	5Y7xkaigfkR8FmI1q2V0bLCFehxndMLqoYLsoVPIwt1FvNpXOTZdo8mXf3KX/T8OcjmB
	RWcfDvW9xAAWx9OZ7Cg3bkv0zD/1Axk3XoL0NcmAp7/75UGkia2uABoFRlD2rHp4VbzG
	sjwaqwesW5YehvUSwJBWD8D3KsuK21tCjRmMDbkSwd10MmVbKImyBw7Qd5+ukHh81rNz
	WmRrfoXCdx256Nfgty5LyERk0tB61Ppc8E2VEAD0tSJgTeczojiQak77bXdnUsUvOgZN
	E8JQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20130820;
	h=x-gm-message-state:mime-version:date:message-id:subject:from:to
	:content-type;
	bh=aVMWj7w4JftQ1zzI9F6lSsq89feKDLnFKHUaCT9s+jk=;
	b=hxI0DJHE0/2LVlMFJj8T7FLKCjbgv2P0Yew3ha4Q5eDMFBXGteCuf8rfYBioxzdoMj
	u96KREc/eWrMALzXaocOinr6mEpTyMoXBeZnuIqH4PvXjam/y5vQEZP2vsgemaER9krJ
	JvMYU67/s8KGh42Yw3oFB0yqp8QfNrvabiQzOWLSCjLCYqnkuUp/hYmYw+3B9Vnh3McQ
	mS35LMpROXjSE3NyL/3Rd0riEmiDbz5DsseGOsDdXp31vpBBYYgbtQ3v1Nwos43b7jTo
	E10PmET0yLDTsqIDXebJMiVCxeTLgx7sB1jKklrM5G6g91Cza81gIARpasVxTGpKO8Q/
	5S9w==
X-Gm-Message-State: AG10YOTuS+wqvEUp+O5Skd0uGyuSB11egP1zcK7t9nbhpssBUAnfmWajwemo/px0UDQw712Mf0AFAdAFJyjWhw==
MIME-Version: 1.0
X-Received: by 10.25.28.195 with SMTP id c186mr11195110lfc.22.1456293152264;
	Tue, 23 Feb 2016 21:52:32 -0800 (PST)
Received: by 10.112.215.3 with HTTP; Tue, 23 Feb 2016 21:52:32 -0800 (PST)
Date: Tue, 23 Feb 2016 23:52:32 -0600
Message-ID: <CADvTj4ovkoQPYWMs7j6tCqh2205OUm-xXY=fx11FQBjOkTeMjA@mail.gmail.com>
From: James Hilliard <james.hilliard1@gmail.com>
To: bitcoin-dev@lists.linuxfoundation.org
Content-Type: text/plain; charset=UTF-8
X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,
	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
X-Mailman-Approved-At: Wed, 24 Feb 2016 08:01:09 +0000
Subject: [bitcoin-dev] Multi-Stage Merge-Mine Headers Hard-Fork BIP
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, 24 Feb 2016 05:52:34 -0000

https://github.com/bitcoin/bips/pull/340

BIP: ?
Title: 2016 Multi-Stage Merge-Mine Headers Hard-Fork
Author: James Hilliard <james.hilliard1@gmail.com>
Status: Draft
Type: Standards Track
Created: 2016-02-23

==Abstract==

Use a staged hard fork to implement a headers format change that is
merge mine incompatible along with a timewarp to kill the previous
chain.

==Specification==

We use a block version flag to activate this fork when 3900 out of the
previous 4032 blocks have this the version flag set. This flag locks
in both of the below stages at the same time.

Merge Mine Stage: The initial hard fork is implemented using a merge
mine which requires that the original pre-fork chain be mined with a
generation transaction that creates no new coins in addition to not
containing any transactions. Additionally we have a consensus rule
that requires that ntime be manipulated on the original chain to
artificially increase difficulty and hold back the original chain so
that all non-upgraded clients can never catch up with current time.
The artificial ntime is implemented as a consensus rule for blocks in
the new chain.

Headers Change Stage: This is the final stage of the hard fork where
the header format is made incompatible with merge mining, this is
activated ~50,000 blocks after the Merge Mine Stage and only at the
start of the 2016 block difficulty boundary.

==Motivation==

There are serious issues with pooled mining such as block withhold
attacks that can only be fixed by making major changes to the headers
format.

There are a number of other desirable header format changes that can
only be made in a non-merge mine compatible way.

There is a high risk of there being two viable chains if we don't have
a way to permanently disable the original chain.

==Rationale==

Our solution is to use a two stage hard fork with a single lock in period.

The first stage is designed to kill off the previous chain by holding
back ntime to artificially increase network difficulty on the original
chain to the point where it would be extremely difficult to mine the
2016 blocks needed to trigger a difficulty adjustment. This also makes
it obvious to unupgraded clients that they are not syncing properly
and need to upgrade.

By locking in both stages at the same time we ensure that any clients
merge mining are also locked in for the headers change stage so that
the original chain is dead by the time the headers change takes place.

We timewarp over a year of merge mining to massively increase the
difficulty on the original chain to the point that it would be
incredibly expensive to reduce the difficulty enough that the chain
would be able to get caught up to current time.

==Backward Compatibility==

This hardfork will permanently disable all nodes, both full and light,
which do not explicitly add support for it.
However, their security will not be compromised due to the implementation.
To migrate, all nodes must choose to upgrade, and miners must express
supermajority support.

==Reference Implementation==

TODO