summaryrefslogtreecommitdiff
path: root/25/4a4bba93ecea5fad820f751381febcfe9acfb3
blob: 391091ba81eaec07bd115e0cf21a451b4381112e (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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
Return-Path: <braydon@purse.io>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 580661765
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 11 Oct 2019 21:24:30 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com
	[209.85.215.179])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id BB88514D
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 11 Oct 2019 21:24:29 +0000 (UTC)
Received: by mail-pg1-f179.google.com with SMTP id y35so6507693pgl.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Fri, 11 Oct 2019 14:24:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purse.io; s=google;
	h=to:references:from:openpgp:autocrypt:subject:message-id:date
	:user-agent:mime-version:in-reply-to:content-transfer-encoding
	:content-language;
	bh=7p2R1NfQe0UVDFHYw8adG2volXQw6XHhr9jt/CnDNg4=;
	b=VvnP3hetUUootStMJlOM8BOxsKBWjIAHfWt9EhjKHNfuxgwE2/iDi1j9/TURuNNHdC
	PxIy8tJDPyT6e6EN5EsQ2lnIIIr8Zjqf3ZPeFmN5yr3WT5+Nh3YfuONiKJXcYG3nRWRn
	fqk6SWa+lKMM28f9SUFkXJffVljFaz4bGMraE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:to:references:from:openpgp:autocrypt:subject
	:message-id:date:user-agent:mime-version:in-reply-to
	:content-transfer-encoding:content-language;
	bh=7p2R1NfQe0UVDFHYw8adG2volXQw6XHhr9jt/CnDNg4=;
	b=YStsrVD4wbDKiqS5m2a8FOBoIf/ROYSqQQ0A6f+a1cuyylfH0UvDgeScwjBfElV7Qz
	FJrIjlk6vobi/GEmpVMsBglOHJdfUNPrpwR2Ra3bGykB3iMhwNxoRYyvLkCJaQgiyv+l
	bQwzy9cwB/zwB12zmnh1K9eHwnFqbZQJpv9z6spqTzRzell7M3L845BBlOOGlDoJeJzg
	IeiJWRL2pwVeuPUzPzoQh2Q9w9ctW1pGSBsRUjvy9KV8efzafj4mcruVkCuMUSdSJg3x
	dn26ERKluVYUpB5yK0aIxwVAPJUvaLFImgCib40WFmiMszWPbmsUhHTsl/wlujBo4z/d
	rduQ==
X-Gm-Message-State: APjAAAXI0SViM0uSYvRFvlqOMIswJav8L5yjbBMoCSehEzfaAdowbfQ5
	6LbN+lKoFNH90tPCqm0NIz/JM8QgVZU=
X-Google-Smtp-Source: APXvYqyn1hJKOvTJ3TGnTI7I01nD9Ww4TGVdKRE2Tn0QF/W0Zod9S7bUVVOzh/jlEBcV92KfJ6YFyg==
X-Received: by 2002:a65:62d2:: with SMTP id m18mr18742097pgv.117.1570829068768;
	Fri, 11 Oct 2019 14:24:28 -0700 (PDT)
Received: from [10.0.0.199] ([198.244.101.193])
	by smtp.gmail.com with ESMTPSA id
	e192sm14313323pfh.83.2019.10.11.14.24.27
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Fri, 11 Oct 2019 14:24:28 -0700 (PDT)
To: "David A. Harding" <dave@dtrt.org>,
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
References: <42cd5ffd-63e8-b738-c4ea-13d0699b1268@purse.io>
	<20191004082031.ns3pgzwh2zz2mxyc@ganymede>
From: Braydon Fuller <braydon@purse.io>
Openpgp: preference=signencrypt
Autocrypt: addr=braydon@purse.io; keydata=
	xsFNBFsEkasBEAC4oPJQsFWAM0OjNJlYUxJbTV8bo1TgXwZdNZWewG6fvQQ+iGGImy/a5h10
	/9V+/Ctio8ayAfpk6V3z/vxq8IdPVcsWccHLnguaAEEhYnKdGZfsohcQMO4LR63R6vPrUYUJ
	ehVzt2YZ5F495iRDKwbQLXbmXF9vLtaKuf/6hbVmlG7bM59eVKcvpE8EKm95Lpw+CBE3uKc3
	RxTcKHgo6QrkClm19GNDDkmHxM/k+hGT3M+sXGhgpL2940AGKsXuTPghgLQ+5seBWtzuWV31
	Uf0ltHx6Ks1w0mlgZZ+u4wlljMHIBKLr4cYDOF8AYxyVcPzuQLdRjIIKEgpMDQW7ftbgGM/q
	hgGg2mN036KTUfT1HkmT82Z3D3z4ACJ/bY/J+mJw0baqcJpezndd1M6dnDNF9Slst2Mr+Loe
	JdN1tY5kk6/OWwAI5L15hmdiRWUBryJqun7sy23cmVPSOrtaIfl7/SEFJ+MuXbK53+mFGT2P
	CpdRzV4MrKr9qbBaXkkhvEfoL2z6VwIFBprqZjthPHcHR8r6QSTpZdsD+7+qoq2o4MDUqP54
	5a3kGI3l6VW767VE/NUIocyO7Z9D/EZOCk22ElTLTCzWm0JvxxGJoalebLQcGey/A9WWGOv/
	ydwvTry3PWAzrrXNt43McHHwZXU4vSLnAtAxQy06Nt9wsWo+2QARAQABzSFCcmF5ZG9uIEZ1
	bGxlci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Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <20191004082031.ns3pgzwh2zz2mxyc@ganymede>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Language: en-US
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU,
	RCVD_IN_DNSWL_NONE 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: Sat, 12 Oct 2019 01:30:49 +0000
Subject: Re: [bitcoin-dev] Chain width expansion
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol 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: Fri, 11 Oct 2019 21:24:30 -0000

On 10/4/19 1:20 AM, David A. Harding wrote:

> On Thu, Oct 03, 2019 at 05:38:36PM -0700, Braydon Fuller via bitcoin-de=
v wrote:
>> This paper describes a solution [to DoS attacks] that does not
>> require enabling or maintaining checkpoints and provides improved secu=
rity.
>> [...]=20
>> The paper is available at:
>> https://bcoin.io/papers/bitcoin-chain-expansion.pdf
> Hi Braydon,
>
> Thank you for researching this important issue.  An alternative solutio=
n
> proposed some time ago (I believe originally by Gregory Maxwell) was a
> soft fork to raise the minimum difficulty.  You can find discussion of
> it in various old IRC conversations[1,2] as well as in related changes
> to Bitcoin Core such as PR #9053 addining minimum chain work[3] and the=

> assumed-valid change added in Bitcoin Core 0.14.0[4].
>
> [1] http://www.erisian.com.au/meetbot/bitcoin-core-dev/2016/bitcoin-cor=
e-dev.2016-10-27-19.01.log.html#l-121
> [2] http://www.erisian.com.au/meetbot/bitcoin-core-dev/2017/bitcoin-cor=
e-dev.2017-03-02-19.01.log.html#l-57
> [3] https://github.com/bitcoin/bitcoin/pull/9053/commits/fd46136dfaf68a=
7046cf7b8693824d73ac6b1caf
> [4] https://bitcoincore.org/en/2017/03/08/release-0.14.0/#assumed-valid=
-blocks
>
Okay, here is an overview of what I have found for the minimum
difficulty proposal:

It describes having a new consensus rule to not fork or accept headers
prior to, or below, a minimum difficulty once the best chain work is
achieved at release time of the software. This would be instead of the
rule to not fork before the last checkpoint, as checkpoints are removed.

It has an advantage to the existing checkpoint solution as it does not
require checkpoints to be enabled. This is not a surprise as the
proposal was to remove checkpoints entirely. It would increase the cost
of the attack without checkpoints. Long header chains would need to be
built using this minimum difficulty, instead of the current lowest
difficulty of the genesis block. The exact cost of that is not yet
calculated.

There are a few caveats with the approach mentioned; nodes are
vulnerable if the initial loader peer is the attacker, it could leave
minority hashpower without an ability to softfork away during a
contentious hardfork, and requires period consensus changes to continue
to maintain:
=C2=A0 - Nodes are vulnerable during the initial sync when joining the
network until the minimum chainwork is achieved. This is possible if the
loader peer is the attacker. To mitigate this there would need to be a
minimum chainwork defined based on the current chainwork. However, such
could also be used to prevent nodes from joining the network as it's
rejecting rather that throttling.
=C2=A0 - A contentious hardfork could leave a minority hashpower without =
an
ability to softfork away without agreeing on a hardfork. This was the
reason why the minimum difficulty was about 10 devices instead of 10,000.=

=C2=A0 - It's technically a consensus change each time the minimum diffic=
ulty
or best chainwork is updated. It is a similar consensus change as
maintaining the last checkpoint, as it's used to prevent forking prior
to the last checkpoint.

I think the solution proposed in the Bitcoin Chain Width Expansion paper
solves those issues by limiting chain width and throttling based on
chainwork, instead of rejecting blocks based on the minimum difficulty.