summaryrefslogtreecommitdiff
path: root/58/c28232b5e89bf4992d4d64a66dcbd2ec85d71f
blob: b57a79ac9bb12d86d294e8af70832b27975ed94b (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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
Delivery-date: Mon, 01 Apr 2024 15:06:22 -0700
Received: from mail-oa1-f57.google.com ([209.85.160.57])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBAABBVW7VSYAMGQE2QKHC3Y@googlegroups.com>)
	id 1rrPnK-00064P-Gv
	for bitcoindev@gnusha.org; Mon, 01 Apr 2024 15:06:22 -0700
Received: by mail-oa1-f57.google.com with SMTP id 586e51a60fabf-22a26af895fsf4196136fac.2
        for <bitcoindev@gnusha.org>; Mon, 01 Apr 2024 15:06:22 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1712009176; cv=pass;
        d=google.com; s=arc-20160816;
        b=WzwVVxB92nU+MIoyLN2IMl2aFM26vSo/QvjdshGqUhcty1JZZ88fhUtcdj+imFB1c3
         ZEDAxUSLMFB+JxCa62KDy/Umxly3Baa5PRLg5V2W+jQK/lQgewlY7pMr87IMJdsM1MeV
         orPNSW9SAShhWbwMWw3B7TKeYxuUZDE8u/UqgjqigIPeudlqO00Zm22V8aN+jvJHsUBL
         FBiVmmPOJ5GCWZ19IwPnNUjOBsqAgGLjXrawrf9sjiYet031pRmnPzQToKnfja2qaKBi
         4HlTAXOCggxyx675XvTFcuRs5de6in1CcwGjaY2HQ0LWFwtXkXEGQKb2dU9wDpYDsBJ6
         ZsyA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-transfer-encoding
         :mime-version:feedback-id:references:in-reply-to:message-id:subject
         :cc:from:to:date:dkim-signature;
        bh=ZuKayrkQkscwwNFqC8lkl0Lr/7zeNWoQ43U79t21a+Y=;
        fh=milHk4pFDovT02zBibsHZTCtSC58jpJBKVkPVMnG8qI=;
        b=xzVFJ2A7PTVmk15tcTNZcrB6o/avNLORIgb/pUOxAaETZJzkG6KSvQpc1YIuuLAULL
         9QIN6GHRg/Lo/QaGBKiH6fvtefvYYstswPf3SmKi3ZC4uxuvFM/s7aiM5D0E5KnB64He
         FxTiTnYBOBG2m8rAa4JMuCsmMVJ0JNpCE4/W0YZIx3+aoK8Wlurh2KNPWj2JcSuTFg35
         pLx0mb161alspO3mf6ykwCGlHbwsq6OxfhTnNE9rUGbhenzB3GyeNqottMdoqrIMnDqW
         9C0MreokcbtIBn4FswZqrI262Nv09vIAvMvyVJjs/Y2qAioiYXy/FAmYpMItZojs0kz4
         S5Gg==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=ncX5+rfn;
       spf=pass (google.com: domain of fjahr@protonmail.com designates 185.70.43.16 as permitted sender) smtp.mailfrom=fjahr@protonmail.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1712009176; x=1712613976; darn=gnusha.org;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to
         :x-original-authentication-results:x-original-sender
         :content-transfer-encoding:mime-version:feedback-id:references
         :in-reply-to:message-id:subject:cc:from:to:date:from:to:cc:subject
         :date:message-id:reply-to;
        bh=ZuKayrkQkscwwNFqC8lkl0Lr/7zeNWoQ43U79t21a+Y=;
        b=eZMHcgQzm9XYWdLtLEA8ioviASJwOfRR/qe2agGn7P6PA5LGAZ7FJumyhmsPakYa/l
         KeS/a2YVmCJ8IhmhxFnIbrCPCxp7UFaoGabfkyfFlqign1LtTivI5mzKIeb/RfGWeroq
         q43ZNqgWvX1S5QmoXeiLCpFp/wXmtwEEdQOn6+XLBuFEsKKG/HPaWkr7D38ZiBOgDAPY
         bzf0sFnPGV2BdIqJxOnd9TOxjAZq7mClEuZjEh+vOfJzeTYiTIKQsNQz54d9S8jok51P
         B38HxKLxkStp57wPiY6tTXVM9//yDHh5OFgCGfcUbLOiZyABRibPOeSqortEB43WyJKZ
         ybMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1712009176; x=1712613976;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to
         :x-original-authentication-results:x-original-sender
         :content-transfer-encoding:mime-version:feedback-id:references
         :in-reply-to:message-id:subject:cc:from:to:date:x-beenthere
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
        bh=ZuKayrkQkscwwNFqC8lkl0Lr/7zeNWoQ43U79t21a+Y=;
        b=weHevirirRA8BURBdyfMvVl3lL/lsIMImJUoqwG3Ax7AaEVZREc0u6l/aZjLycep5O
         VpP79XMoQDYmkTCR3icgsFtnlIwzCqKAYAdzdJNY9r0BEJG+tuX/e3+UUTbPbD/wPb/a
         iJhbG9vDDJkQFEm8WNdNYg5Swr962wrvjG6N0WrGW0Y0jXDiCVfvhByaB8txslHYxJNU
         iwx8hDHD7glnmMHMVST4qseS2ZpNC+Kn+siAbj7jz1SC3OUab+rbm+WxSwMiBKtP84cT
         IXWcT4FVIaQNblkCJq7lX5eaLBgB/y1PSt75VNHVg9FA9guap0cIhqofupFVJTfB6P2y
         bR+A==
X-Forwarded-Encrypted: i=2; AJvYcCWMBpq23NcBJZdGphzOyAHZkM8GeiGvBzPE/vnIAu+U+RZ7fNJhoZIXrP2o6MWKdDa5vQ/8fnBdF3/YcydN+hZ3P7xkQsU=
X-Gm-Message-State: AOJu0YxvGYO3j1CbAT5nUXmic15mPX/PkZS6JC9LmBLYjfSxNGPVu+DZ
	5XXGmD26bAXoBGr74LcBUs+hBVJox/X9toISUPyboUlmWOJuplTk
X-Google-Smtp-Source: AGHT+IHbBEQXHB835cmgFB+/yB9VJeZgCiVef6Ix1DXlhpwrt4xUgRVxbSW9k5C5LZcp1gUy/N7k/Q==
X-Received: by 2002:a05:6870:b50d:b0:22b:c197:a2af with SMTP id v13-20020a056870b50d00b0022bc197a2afmr12545379oap.42.1712009175335;
        Mon, 01 Apr 2024 15:06:15 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:a05:622a:18a2:b0:434:33ee:95d9 with SMTP id
 v34-20020a05622a18a200b0043433ee95d9ls59353qtc.2.-pod-prod-00-us; Mon, 01 Apr
 2024 15:06:14 -0700 (PDT)
X-Received: by 2002:a05:620a:2483:b0:78b:e7e2:f3c5 with SMTP id i3-20020a05620a248300b0078be7e2f3c5mr29235qkn.7.1712009174563;
        Mon, 01 Apr 2024 15:06:14 -0700 (PDT)
Received: by 2002:a05:620a:2953:b0:78a:59df:2777 with SMTP id af79cd13be357-78b8a9a4eb4ms85a;
        Mon, 1 Apr 2024 15:01:42 -0700 (PDT)
X-Received: by 2002:a05:600c:468e:b0:414:c42:e114 with SMTP id p14-20020a05600c468e00b004140c42e114mr6956997wmo.39.1712008900065;
        Mon, 01 Apr 2024 15:01:40 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1712008900; cv=none;
        d=google.com; s=arc-20160816;
        b=PDkThNYCNym5r/X+jP27HQZIe1W5KieVQwW5KQAzeN6zhkcIMwt4v45826cE2cLdri
         +nItiuYaKSeHyMjTUUsFo1XN8RgUYj/hwXS3/z0/EHDUyJPXA74drO0hj4Hj3+cbDTi/
         MigWq8vHMRU7jajpumuAFnfB+xY2Fbodm+2ELGaz8uyqSDLhF4r3roDD87wjxqZh6AfR
         VIBxhZ8ILmB+MH9ce1UGy0eNVJN92X13zfMwe74/453q0p+nzp5WRMjAE6LDQ27Dk0l8
         VbmhJmFzPTAh5QbtVEF0LsRM+V5Ydffqv+MS4Erstix0ZF4mB0zWhIe3KGicIUT8Fz+q
         6seQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:feedback-id:references
         :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature;
        bh=noZXj5ubyOUHtdC8/hpRP072MwLw8azzcftpL1pNLiA=;
        fh=D0uEBcYmfecDDBtJKegWnwmxyD0LCciBGlKYBPWZn3o=;
        b=G/M6DYPvJQkvnTleH/NxWgUN9YPC5ry9T/2L4+85aMu0G/nSfydTAZa2R7CCCL6i4g
         of9Ix7jrJKL/nszRIMBvX1CFZJRTC/gWS6x5cnZukZ+N0y947qLrEuw7hJOiTL9E3xm8
         Wx+j53TGlcvR44y0hedW41YahtSdRBDrUr7pgtuaeLPvrRqYD24nlNPOFB0LJWjMBTes
         NYUEN4a/7mMkzPyhipWRFUbCsX3gF7Z6Bk5oTj4L2jQb4iKnhqO0C/ztClG6KEYob8zh
         k+22gcCteWV9VeInpJdzefT1EclgxvG2ys8byC1/ikLAB1cnn/mx8GIZdrQoHBRCSaFZ
         WYuQ==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=ncX5+rfn;
       spf=pass (google.com: domain of fjahr@protonmail.com designates 185.70.43.16 as permitted sender) smtp.mailfrom=fjahr@protonmail.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch. [185.70.43.16])
        by gmr-mx.google.com with ESMTPS id k27-20020a05600c1c9b00b0041489943029si391792wms.1.2024.04.01.15.01.40
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 01 Apr 2024 15:01:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of fjahr@protonmail.com designates 185.70.43.16 as permitted sender) client-ip=185.70.43.16;
Date: Mon, 01 Apr 2024 22:01:35 +0000
To: Andrew Poelstra <apoelstra@wpsoftware.net>
From: "'Fabian' via Bitcoin Development Mailing List" <bitcoindev@googlegroups.com>
Cc: bitcoindev@googlegroups.com
Subject: Re: [bitcoindev] The Future of Bitcoin Testnet
Message-ID: <06oL-GctrcLb99M_RuOgygXKMjtB_vPLHOCuc-axYrGVy_QBRGPu5wA9C2QXDb7cKIJbJu_t_JKmRrr9FsBORdUPavXPFvOi98p04UQuvuE=@protonmail.com>
In-Reply-To: <ZgrCxWxMkiAt2Tg2@camus>
References: <CADL_X_eXjbRFROuJU0b336vPVy5Q2RJvhcx64NSNPH-3fDCUfw@mail.gmail.com> <ZgmJFfXnQddkTQVq@petertodd.org> <CAFC_Vt7zKvMEfQLzWHQ6t_9bgv1iqt4Ah8N883CuoSfmLUKdMA@mail.gmail.com> <ZgnVtJHn2ikLfwa9@petertodd.org> <CADL_X_cmcXxHke089OD_45VRJy5aR+9uj-18bSjXBE7FKwR-Jw@mail.gmail.com> <wKrcm6SEjcG_7UmxByP-rDDVajB7-oYJRF9p_BjLe5XVzxVV9nCB8RsTAXcD5vF_rWxUmLK4HOM7zV7U4-kZSUO9Ccj4jEehsbbb7FD45GQ=@wuille.net> <ZgrCxWxMkiAt2Tg2@camus>
Feedback-ID: 5067558:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Original-Sender: fjahr@protonmail.com
X-Original-Authentication-Results: gmr-mx.google.com;       dkim=pass
 header.i=@protonmail.com header.s=protonmail3 header.b=ncX5+rfn;
       spf=pass (google.com: domain of fjahr@protonmail.com designates
 185.70.43.16 as permitted sender) smtp.mailfrom=fjahr@protonmail.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
X-Original-From: Fabian <fjahr@protonmail.com>
Reply-To: Fabian <fjahr@protonmail.com>
Precedence: list
Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com
List-ID: <bitcoindev.googlegroups.com>
X-Google-Group-Id: 786775582512
List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com>
List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com>
List-Archive: <https://groups.google.com/group/bitcoindev
List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com>
List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>,
 <https://groups.google.com/group/bitcoindev/subscribe>
X-Spam-Score: -1.0 (-)

Hi,

removing the special rule and moving to a reduced block interval sounds lik=
e a good and simple solution.

Another idea: Keep the current exception logic and adapt the difficulty adj=
ustment code (`CalculateNextWorkRequired`) to look for the last block that =
didn't have difficulty 1 and use that block's difficulty as the basis for t=
he new difficulty calculation. It seemed like the most intuitive fix to me =
when I looked at the code after reading Jameson's first email (see https://=
github.com/bitcoin/bitcoin/pull/29775/commits/9913549637706749f0af5d326f949=
bd652cbd5f8).

Best,
Fabian



On Monday, April 1st, 2024 at 4:20 PM, Andrew Poelstra <apoelstra@wpsoftwar=
e.net> wrote:

> On Mon, Apr 01, 2024 at 01:37:59PM +0000, Pieter Wuille wrote:
>=20
> > As for using other measures to prevent too large difficulty variations.=
.. I'm not sure that's desirable, because it always cuts both ways (nicely =
demonstrated by the "allow difficulty 1 rule" on testnet3 backfiring and en=
abling block storms!). For applications that actually need very predictable=
 block rate, there is signet. For others, just the normal mainnet rules are=
 probably not too terrible. I would be ok with having a somewhat reduced bl=
ock interval (say a few days instead of 2 weeks) if that's not deemed to co=
mplex to implement across the ecosystem, but I don't think it's that import=
ant.
>=20
>=20
> I really like this. For my part (rust-bitcoin) this would be as simple
> as adding an extra parameter to my blockparams structure. Possibly one
> already exists, I'd have to check.
>=20
> This would be much easier than the existing situation where we have
> special-case logic for testnet the difficulty-1 target.
>=20
> It would also limit the amount of bikeshedding possible, since there
> aren't too many conflicting goals regarding the retargeting window...
> unlike tweaking the existing logic where there's a tradeoff between
> "we should make this never happen" and "it should happen often enough
> that it doesn't break people's code" and "it should happen if blocks
> slow down to like, 1/50th their normal rate even if they are still
> technically being produced" and "it shouldn't be possible to trigger
> it within the 2-hour timestamp-faking window" etc. And questions
> about whether we should fix/redesign the interaction between the reset
> rule and the normal difficulty retarget.
>=20
>=20
> OTOH, since we already have the special logic, I'd also be happy with
> tweaking the existing rule. My specific proposal (after reading Jameson's
> post, which has some nice graphs of difficulty) would be
>=20
> * increase the reset threshold from 20 minutes to 6 hours, which is
> (a) well outside the 2-hour window in which miners can easily fake
> timestamps, and (b) will basically never be hit by accident
> * increase the reset difficulty from 1 to 1MM, which is an rough lower
> bound on the "normal" testnet difficulty seen historically
>=20
> Which puts us in the "this rule would never be triggered unless
> literally everyone stopped mining" corner of the design space.
>=20
>=20
> --
> Andrew Poelstra
> Director of Research, Blockstream
> Email: apoelstra at wpsoftware.net
> Web: https://www.wpsoftware.net/andrew
>=20
> The sun is always shining in space
> -Justin Lewis-Webster
>=20
> --
> You received this message because you are subscribed to the Google Groups=
 "Bitcoin Development Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an=
 email to bitcoindev+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgi=
d/bitcoindev/ZgrCxWxMkiAt2Tg2%40camus.

--=20
You received this message because you are subscribed to the Google Groups "=
Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to bitcoindev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/=
bitcoindev/06oL-GctrcLb99M_RuOgygXKMjtB_vPLHOCuc-axYrGVy_QBRGPu5wA9C2QXDb7c=
KIJbJu_t_JKmRrr9FsBORdUPavXPFvOi98p04UQuvuE%3D%40protonmail.com.