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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
Return-Path: <tier.nolan@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
[172.17.192.35])
by mail.linuxfoundation.org (Postfix) with ESMTPS id 6A54A707
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 23 Jul 2015 17:59:42 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com
[209.85.220.181])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AFE87E9
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 23 Jul 2015 17:59:41 +0000 (UTC)
Received: by qkbm65 with SMTP id m65so124196697qkb.2
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 23 Jul 2015 10:59:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:cc
:content-type; bh=vnoAKik+/9LcgGtUiaMzeeAGxffBxSfJdZZ/Es0yD+U=;
b=QjJpG7NoRdgVIQw/lrin7IvQxfZQiP52hLWBI+wIDj02RQHtX/BW91JOxWds7uVE/I
9Y6Xo0gz38nofInqVQrds7ErlMbEqXl0wNuSjAQhOwgdY2WS77m7cYclFU+CQiws3zXu
bULfnGZupCuHTjkceh8tJ+9aFy1h1pcU+JtgL/ooBG7cE8kcg31IRM3Pzg7l4AF61B14
ka5cb9w039asWD6F8vhj4ICKcAD1urdjhBH4U/TqlU+qz6/j5NL0Jwee5OOSMDBmw6lf
xMlNKA+htJ+McQ2t3S9Ukz7d1Me/4otMURc4EcTxTijJQqSIqPK8VyHj5jvrqP7meFpp
zBnw==
MIME-Version: 1.0
X-Received: by 10.140.86.137 with SMTP id p9mr14182606qgd.89.1437674380419;
Thu, 23 Jul 2015 10:59:40 -0700 (PDT)
Received: by 10.140.93.162 with HTTP; Thu, 23 Jul 2015 10:59:40 -0700 (PDT)
In-Reply-To: <20150723162321.Horde.bphh__8AhyXa_m-YAYpiyw1@server47.web-hosting.com>
References: <20150723162321.Horde.bphh__8AhyXa_m-YAYpiyw1@server47.web-hosting.com>
Date: Thu, 23 Jul 2015 18:59:40 +0100
Message-ID: <CAE-z3OWZGsSS2s1OZU5ScH7C4BcOtCb9mcz62TA7HZQe_=y0uA@mail.gmail.com>
From: Tier Nolan <tier.nolan@gmail.com>
Cc: "bitcoin-dev@lists.linuxfoundation.org"
<bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary=001a11c12436bf673e051b8ea6f3
X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MISSING_HEADERS,
RCVD_IN_DNSWL_LOW autolearn=no version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
smtp1.linux-foundation.org
Subject: Re: [bitcoin-dev] BIP draft: Hardfork bit
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: Thu, 23 Jul 2015 17:59:42 -0000
--001a11c12436bf673e051b8ea6f3
Content-Type: text/plain; charset=UTF-8
On Thu, Jul 23, 2015 at 5:23 PM, jl2012 via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:
> 2) Full nodes and SPV nodes following original consensus rules may not be
> aware of the deployment of a hardfork. They may stick to an
> economic-minority fork and unknowingly accept devalued legacy tokens.
>
This change means that they are kicked off the main chain immediately when
the fork activates.
The change is itself a hard fork. Clients have be updated to get the
benefits.
3) In the case which the original consensus rules are also valid under the
> new consensus rules, users following the new chain may unexpectedly reorg
> back to the original chain if it grows faster than the new one. People may
> find their confirmed transactions becoming unconfirmed and lose money.
>
I don't understand the situation here. Is the assumption of a group of
miners suddenly switching (for example, they realise that they didn't
intend to support the new rules)?
>
> Flag block is constructed in a way that nodes with the original consensus
> rules must reject. On the other hand, nodes with the new consensus rules
> must reject a block if it is not a flag block while it is supposed to be.
> To achieve these goals, the flag block must 1) have the hardfork bit
> setting to 1, 2) include a short predetermined unique description of the
> hardfork anywhere in its coinbase, and 3) follow any other rules required
> by the hardfork. If these conditions are not fully satisfied, upgraded
> nodes shall reject the block.
>
Ok, so set the bit and then include BIP-GIT-HASH of the canonical BIP on
github in the coinbase?
Since it is a hard fork, the version field could be completely
re-purposed. Set the bit and add the BIP number as the lower bits in the
version field. This lets SPV clients check if they know about the hard
fork.
There network protocol could be updated to add getdata support for asking
for a coinbase only merkleblock. This would allow SPV clients to obtain
the coinbase.
Automatic warning system: When a flag block is found on the network, full
> nodes and SPV nodes should look into its coinbase. They should alert their
> users and/or stop accepting incoming transactions if it is an unknown
> hardfork. It should be noted that the warning system could become a DoS
> vector if the attacker is willing to give up the block reward. Therefore,
> the warning may be issued only if a few blocks are built on top of the flag
> block in a reasonable time frame. This will in turn increase the risk in
> case of a real planned hardfork so it is up to the wallet programmers to
> decide the optimal strategy. Human warning system (e.g. the emergency alert
> system in Bitcoin Core) could fill the gap.
>
If the rule was that hard forks only take effect 100 blocks after the flag
block, then this problem is eliminated.
Emergency hard forks may still have to take effect immediately though, so
it would have to be a custom not a rule.
--001a11c12436bf673e051b8ea6f3
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On T=
hu, Jul 23, 2015 at 5:23 PM, jl2012 via bitcoin-dev <span dir=3D"ltr"><<=
a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">b=
itcoin-dev@lists.linuxfoundation.org</a>></span> wrote:<br><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex">
2) Full nodes and SPV nodes following original consensus rules may not be a=
ware of the deployment of a hardfork. They may stick to an economic-minorit=
y fork and unknowingly accept devalued legacy tokens.<br></blockquote><div>=
<br></div><div>This change means that they are kicked off the main chain im=
mediately when the fork activates.=C2=A0 <br><br></div><div>The change is i=
tself a hard fork.=C2=A0 Clients have be updated to get the benefits.<br></=
div><div><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 =
.8ex;border-left:1px #ccc solid;padding-left:1ex">
3) In the case which the original consensus rules are also valid under the =
new consensus rules, users following the new chain may unexpectedly reorg b=
ack to the original chain if it grows faster than the new one. People may f=
ind their confirmed transactions becoming unconfirmed and lose money.<br></=
blockquote><div><br></div>I don't understand the situation here.=C2=A0 =
Is the assumption of a group of miners suddenly switching (for example, the=
y realise that they didn't intend to support the new rules)?<br></div><=
div class=3D"gmail_quote">=C2=A0<blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Flag block is constructed in a way that nodes with the original consensus r=
ules must reject. On the other hand, nodes with the new consensus rules mus=
t reject a block if it is not a flag block while it is supposed to be. To a=
chieve these goals, the flag block must 1) have the hardfork bit setting to=
1, 2) include a short predetermined unique description of the hardfork any=
where in its coinbase, and 3) follow any other rules required by the hardfo=
rk. If these conditions are not fully satisfied, upgraded nodes shall rejec=
t the block.<br></blockquote><div><br></div><div>Ok, so set the bit and the=
n include BIP-GIT-HASH of the canonical BIP on github in the coinbase?<br><=
br></div><div>Since it is a hard fork, the version field could be completel=
y re-purposed.=C2=A0 Set the bit and add the BIP number as the lower bits i=
n the version field.=C2=A0 This lets SPV clients check if they know about t=
he hard fork.<br><br></div><div>There network protocol could be updated to =
add getdata support for asking for a coinbase only merkleblock.=C2=A0 This =
would allow SPV clients to obtain the coinbase.<br></div><div><br></div><di=
v></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex">Automatic warning system: When a fla=
g block is found on the network, full nodes and SPV nodes should look into =
its coinbase. They should alert their users and/or stop accepting incoming =
transactions if it is an unknown hardfork. It should be noted that the warn=
ing system could become a DoS vector if the attacker is willing to give up =
the block reward. Therefore, the warning may be issued only if a few blocks=
are built on top of the flag block in a reasonable time frame. This will i=
n turn increase the risk in case of a real planned hardfork so it is up to =
the wallet programmers to decide the optimal strategy. Human warning system=
(e.g. the emergency alert system in Bitcoin Core) could fill the gap.<br><=
/blockquote><div><br></div><div>If the rule was that hard forks only take e=
ffect 100 blocks after the flag block, then this problem is eliminated.<br>=
<br></div><div>Emergency hard forks may still have to take effect immediate=
ly though, so it would have to be a custom not a rule.</div></div></div></d=
iv>
--001a11c12436bf673e051b8ea6f3--
|