summaryrefslogtreecommitdiff
path: root/83/ec955100f891f6508e77324b01166787af9fb3
blob: 7d8b358e84379d3debd1f4ae8f2a1c37c4c8b400 (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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
Delivery-date: Thu, 30 May 2024 15:00:33 -0700
Received: from mail-oa1-f55.google.com ([209.85.160.55])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBDPK3QN7WUBRB6HN4OZAMGQEHYLDJCY@googlegroups.com>)
	id 1sCnp1-0000qB-SN
	for bitcoindev@gnusha.org; Thu, 30 May 2024 15:00:33 -0700
Received: by mail-oa1-f55.google.com with SMTP id 586e51a60fabf-25079f9c013sf917703fac.2
        for <bitcoindev@gnusha.org>; Thu, 30 May 2024 15:00:31 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1717106426; cv=pass;
        d=google.com; s=arc-20160816;
        b=vAvtC6bmJQKkNr61VzX4g4zhPBaIaeMKimFdulmePaastzSHjgpqN2aHuLTiEvBEkr
         oEGXm6ZS3Sx09/tlNFCjn0W1pqpHH8DjRBPKSV0h7mc8gWGMbMWlhUX48d8GMiDqjc1I
         8Iz+LAMfVkx4hlVXzeCRv86cQVkMxnFW+O8vblvi1MB3EfXh0FfFTrkkASeK3kNoKdzG
         np+bJmhrNUmyYAU9WbraYSE2ifmE+1BCRVyjhnFCiumNs/zh5npWHb9baDwHN0wrVumK
         6WrlLHcHWBq395EVfibdv/W9oEjy1euig/sXLaQwhxW3djgtB+hog8h29BMk+FK5bVet
         mL8Q==
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:mime-version:feedback-id
         :references:in-reply-to:message-id:subject:cc:from:to:date
         :dkim-signature;
        bh=jzNKgWS0zhorjNSHkbviOIVWWyovJLmg5gIXXh0mowA=;
        fh=i/0hKvR+SXykFks/tmYgC7L81iK60DOiZ7FmNxShXAc=;
        b=KE5fn6n9+lNwpp5K05gKHpg9FOuB3zvNVxqtE3zDFH5jDkl9qMwK4SuvLzikYlu+rR
         9Aa9pfb9NSTiGm6GItk320EJKXI4Lw9Wt4SQOTKj24XQKK+NPyERv+Gl0A6jwq4nh5WG
         xFsFuxb1KZ1HsLnHCWrVJu/Y8J58Ljjg3lAsQh5qPcr8hVYblqT/Pvub7RgzhQZhmXYk
         ggsy1GrjExfwH8IfuyGqm/kAZV8pCRF5GrDAK+IP4ZXX6+gEW541OkCfbK1JsgKFFy4M
         tHsPuFB+w8c19/XGFkt/nhaCMPiabJ5a+qnQB4UWrkzlvx5R9B7VdcibrFCQbn9+8ZcT
         Ul7A==;
        darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
       dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=zb1Puk7k;
       spf=pass (google.com: domain of fjahr@protonmail.com designates 185.70.40.134 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=1717106426; x=1717711226; 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: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=jzNKgWS0zhorjNSHkbviOIVWWyovJLmg5gIXXh0mowA=;
        b=Bz2bUqzDmw8/dTgBCe2aK7xNXPg+K3iq52JYmCaLK7pRix5tViJBUncxeJcULCyKOh
         EEGnfNfDe9apBLJDMMAoRyodqo2GIiJHhHOEBt+3JVVEDHrL6WqjU72UMpP4gF8TAL9B
         3uGfh5gtdlw2bL6J+DBSUFTcLKVCnY33hugd3/WPtyHICX6H6Ctj0NpjcZHShE4qh+3U
         dwPxaPEX6CvQZE9G+7cPxriE3FicCWqezpVvTKbrlRnQkg2EbZaRTII3/12SWWAIeE0X
         vig3mz7US29PfV2oVLm+HA7dNF0+cQ1gbjUd2YlIrxF/u4i7Q5NTIRf2tLkVly8r7DyF
         cH2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1717106426; x=1717711226;
        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: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=jzNKgWS0zhorjNSHkbviOIVWWyovJLmg5gIXXh0mowA=;
        b=uwDfrsO7scJvvsaVHDiNxu1Zh1uxsCAItw3WzcMAszgOyzoCbEgms6GffjDUXJ6RPw
         tTSHUweTSxNpMZU/YCBih7EAFt3TdGmQ6v4nMtMf9yDhtIr/dG+YxwstQL1B0cVHJPLf
         2xPcN29tomfgVs39G4tBMxOJAmQYGTaiOwb18+aGxycQ1uo9KO6Uf9vn+AqujIWTJzTJ
         h30v+gN+fnQkG0IwyomWWtPgPMHJA0R3CDNa99n0VidileY2a8cVVKOKy+plqFcyLsUT
         iOBPHw7I99e6ad8ClWEbLBk0qqvzi1NC9/YcHwlPNPKZzudtSiKMFlZ0kx6wtc09uHGc
         93tw==
X-Forwarded-Encrypted: i=2; AJvYcCWoFfze3DuyIY/xzY9c2AtdB3keNEjBRM/dyrDBhWPrErOT1PbtwcmpqnYcBFoGdK1jXOmjThhkuDk1Xeb4Dn6dydM/A/Y=
X-Gm-Message-State: AOJu0YygStxAtKOyWY15/R7n6v8Bf+vmParfRi5bDGKZZ76KQkdz0um2
	FBwvHlk1OFWYL3KVkaKlHa1swF6zeaGsxeaPv2CzP0qJuPRUluYN
X-Google-Smtp-Source: AGHT+IFypknTMawGNTISn5qkq2Fk46MBUfEtNLt5VOf69teXFbllMCymv0hEmWpNZsJ9jGEfUkpidA==
X-Received: by 2002:a05:6870:470f:b0:250:6023:76c4 with SMTP id 586e51a60fabf-2508b982beamr220927fac.15.1717106425731;
        Thu, 30 May 2024 15:00:25 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com
Received: by 2002:ac8:5911:0:b0:43a:b15a:f8c9 with SMTP id d75a77b69052e-43fe8e508a9ls16719891cf.0.-pod-prod-07-us;
 Thu, 30 May 2024 15:00:24 -0700 (PDT)
X-Received: by 2002:a05:620a:8da:b0:794:ed5b:2db6 with SMTP id af79cd13be357-794ed5b3114mr1159485a.6.1717106424099;
        Thu, 30 May 2024 15:00:24 -0700 (PDT)
Received: by 2002:a05:620a:1aa8:b0:793:220:79c1 with SMTP id af79cd13be357-794e132bc8cms85a;
        Tue, 28 May 2024 16:41:35 -0700 (PDT)
X-Received: by 2002:a05:600c:3514:b0:415:ff48:59fc with SMTP id 5b1f17b1804b1-42122ae4462mr3071395e9.8.1716939693024;
        Tue, 28 May 2024 16:41:33 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1716939693; cv=none;
        d=google.com; s=arc-20160816;
        b=RZQ3HAKqh1Z16a5uDB/uSwfVE0lf8ApiQtFpwO1VMP8KgjtypT707EOzeK5lmtHaga
         XmfNVPhxI6TLcA3hcMC8CoqNNbDMHYfLUInIknZV3OmBzlrzBel1dFH/G/4M/LaRmi84
         d4cowei2mFZDYoMBvyTO2gRKXLkes5coFc9nJ8PW2ZkyrtciRGwyVNIbTnbYzFmE4E+e
         OpLJtc/Oly+Gnt29kR29/EkrLqgQYA45jibvcXToK9ri4jGZVWZb8GJkYa8PAcoKLdO4
         7BRQn1qya3ankN/RariwlKiFAEgNj9dHA+BtvMb7UyrqarvG5jntlg4gctlB0i/MPqFN
         zo4A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=mime-version:feedback-id:references:in-reply-to:message-id:subject
         :cc:from:to:date:dkim-signature;
        bh=qaY8nCr6q8o8BKcA4aLHz16y6yCYuEzvRvMfGjRouCM=;
        fh=ZoFN/wAJsc7YujXIAOohNqslPO0XeXRGfI/gbLftL6I=;
        b=Gudnl60KoX0pfFiOQnXmcPycaFEifVe8OinuaW3z2SJHryEzvaHqCkg9AkuLdMZ4Yl
         WuFqb0LbbN/fOyqoGYA9MjOuY5FMk9cIo7XnS0/3rB5kRAosIvx2za1LEikkr8qypfiD
         uCv7EadbFeR1HLjEmRamPtTc26rl0reFEdcKzcsLny6uRjfcL0no3CTIM9ieP6m3haYa
         rqnPwTyCd7GEc8qDabXmzjpu3CFBaARci+N6+oidcFJ1q6hrX2njQ7CKeWvI28nT6rFF
         ryQmV6guq0/W2MDKPNMrwKme+XlcV0kfLmfobs5+GRreyaHEYmZH6Ee6rw8QP326xURR
         lezA==;
        dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
       dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=zb1Puk7k;
       spf=pass (google.com: domain of fjahr@protonmail.com designates 185.70.40.134 as permitted sender) smtp.mailfrom=fjahr@protonmail.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com
Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch. [185.70.40.134])
        by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-42122786751si403895e9.0.2024.05.28.16.41.32
        for <bitcoindev@googlegroups.com>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 28 May 2024 16:41:33 -0700 (PDT)
Received-SPF: pass (google.com: domain of fjahr@protonmail.com designates 185.70.40.134 as permitted sender) client-ip=185.70.40.134;
Date: Tue, 28 May 2024 23:41:28 +0000
To: Fabian <fjahr@protonmail.com>
From: "'Fabian' via Bitcoin Development Mailing List" <bitcoindev@googlegroups.com>
Cc: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: Re: [bitcoindev] BIP for Testnet 4
Message-ID: <cUk3mhYDInTKWp31VeaGZa68jCM6rhCiNFoQwD5JDeoi4MlxebiVUo06Oiuoj-xbKAkxyO7LpoFeZrj3Ak5cOeJRGDG83ITDdSXrZ3PQta0=@protonmail.com>
In-Reply-To: <a6e3VPsXJf9p3gt_FmNF_Up-wrFuNMKTN30-xCSDHBKXzXnSpVflIZIj2NQ8Wos4PhQCzI2mWEMvIms_FAEs7rQdL15MpC_Phmu_fnR9iTg=@protonmail.com>
References: <a6e3VPsXJf9p3gt_FmNF_Up-wrFuNMKTN30-xCSDHBKXzXnSpVflIZIj2NQ8Wos4PhQCzI2mWEMvIms_FAEs7rQdL15MpC_Phmu_fnR9iTg=@protonmail.com>
Feedback-ID: 5067558:user:proton
X-Pm-Message-ID: 3242898416be67e0b515a1db9ad12226226df1b7
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="b1_AFA1mBiJg99tjq1ZllN2SCv1urIHb7P7MdQ95E60pM"
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=zb1Puk7k;
       spf=pass (google.com: domain of fjahr@protonmail.com designates
 185.70.40.134 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 (-)

This is a multi-part message in MIME format.

--b1_AFA1mBiJg99tjq1ZllN2SCv1urIHb7P7MdQ95E60pM
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Please note that the Block Storm Fix section was already amended with a (mu=
ch needed) clarification:

=3D=3D=3D Block Storm Fix =3D=3D=3D

When the next work required is calculated for the first block in a new diff=
iculty period, the difficulty of the last block of the previous difficulty =
period is only used as the base for this calculation if its difficulty is n=
ot 1. If its difficulty is 1, all blocks in the previous difficulty period =
are checked in reverse order if any of them have a different difficulty tha=
n 1. When a different difficulty is encountered, it is assumed to be the ac=
tual difficulty of the network and used as the base for the calculation of =
the new difficulty level. Note that the first block in new difficulty perio=
d does not allow usage of the 20-min rule (this is prior behavior). This me=
ans that in each difficulty period the first block should always have the a=
ctual difficulty even if all other blocks were mined with the 20-min rule.
For the avoidance of doubt, no matter which block in the previous difficult=
y period provides the actual difficulty used as the basis for the calculati=
on, the timestamp of the last block is always the one that is used as the e=
nd time of the difficulty period.
On Wednesday, May 29th, 2024 at 12:01 AM, 'Fabian' via Bitcoin Development =
Mailing List <bitcoindev@googlegroups.com> wrote:

> Hello list,
>
> a potential reset or replacement of Testnet 3 has been discussed on this =
list previously here: https://groups.google.com/g/bitcoindev/c/9bL00vRj7OU/=
m/9yCPo3uUBwAJ
>
> The discussion continued in the accompanying bitcoin core pull request (h=
ttps://github.com/bitcoin/bitcoin/pull/29775) which has been tested in the =
past couple of weeks and adopted by several projects on an experimental bas=
is, such as https://mempool.space/testnet4 for example.
>
> I have now formalized the current rules and genesis block implemented in =
the PR as BIP draft: https://github.com/bitcoin/bips/pull/1601
>
> -----------
>
> =3D=3D Abstract =3D=3D
>
> A new test network with the goal to replace Testnet 3. This network comes=
 with small but important improvements of the consensus rules, that should =
make it impractical to attack the network using only CPU mining.
>
> =3D=3D Motivation =3D=3D
>
> Quoting the original mailing list post from Jameson Lopp:
>
> "Testnet3 has been running for 13 years. It's on block 2.5 million someth=
ing and the block reward is down to ~0.014 TBTC, so mining is not doing a g=
reat job at distributing testnet coins anymore.
>
> The reason the block height is insanely high is due to a rather amusing e=
dge case bug that causes the difficulty to regularly get reset to 1, which =
causes a bit of havoc. If you want a deep dive into the quirk: https://blog=
.lopp.net/the-block-storms-of-bitcoins-testnet/
>
> Testnet3 is being actively used for scammy airdrops; those of us who tend=
 to be generous with our testnet coins are getting hounded by non-developer=
s chasing cheap gains.
>
> As a result, TBTC is being actively bought and sold; one could argue that=
 the fundamental principle of testnet coins having no value has been broken=
."
>
> Since then the issue with block storms has been further demonstrated on T=
estnet 3 when three years' worth of blocks were mined in a few weeks while =
rendering the network practically unusable at the same time.
>
> =3D=3D Specification =3D=3D
>
> Consensus of Testnet 4 follows the same rules as Testnet 3 with the excep=
tion of the two new rules detailed below.
>
> This means that the existing 20 min difficulty exception in Testnet 3 is =
explicitly kept in place, meaning that a block with a timestamp 20 minutes =
further into the future from the current time is allowed to have a minimum =
difficulty of 1 instead of whatever the actual level currently is.
>
> =3D=3D=3D Block Storm Fix =3D=3D=3D
>
> When the next work required is calculated for the first block in a new di=
fficulty period, the difficulty of the last block of the previous difficult=
y period is only used as the base for this calculation if its difficulty is=
 not 1. If its difficulty is 1, all blocks in the previous difficulty perio=
d are checked in reverse order if any of them have a different difficulty t=
han 1. When a different difficulty is encountered, it is assumed to be the =
actual difficulty of the network and used as the base for the calculation o=
f the new difficulty level. Only if all blocks from the previous difficulty=
 period have had a difficulty of 1 (possibly by the use of the 20-min rule)=
, this is also used as the base for the calculation of the next difficulty =
period.
>
> For the avoidance of doubt, no matter which block in the previous difficu=
lty period provides the actual difficulty used as the basis for the calcula=
tion, the timestamp of the last block is always the one that is used as the=
 end time of the difficulty period.
>
> =3D=3D=3D Time Warp Fix =3D=3D=3D
>
> To protect against the time warp attack, the following rule proposed as p=
art of The Great Consensus Cleanup is enforced: "The nTime field of each bl=
ock whose height, mod 2016, is 0 must be greater than or equal to the nTime=
 field of the immediately prior block minus 600. For the avoidance of doubt=
, such blocks must still comply with existing Median-Time-Past nTime restri=
ctions."
>
> =3D=3D Rationale =3D=3D
>
> The applied changes were the result of discussions on the mailing list an=
d the PR. The selected changes try to strike a balance between minimal chan=
ges to the network (keeping it as close to mainnet as possible) while makin=
g it more robust against attackers that try to disrupt the network. Several=
 alternative designs were considered:
>
> * For the block storm fix an alternative fix could have been to prevent t=
he last block in a difficulty period from applying the existing difficulty =
exception. Both solutions were deemed acceptable and there was no clear pre=
ference among reviewers.
> * Removal of the 20-min difficulty exception was discussed but dismissed =
since several reviewers insisted that it was a useful feature allowing non-=
standard transactions to be mined with just a CPU.
> * Increase of minimum difficulty was discussed but dismissed as it would =
categorically prevent participation in the network using a CPU miner.
> * Increase of the delay in the 20 min difficulty exception was suggested =
but did not receive significant support.
> * Re-enabling <code>acceptnonstdtxn</code> in bitcoin core by default was=
 dismissed as it had led to confusion among layer-2s that had used testnet =
for transaction propagation tests and expected it to behave similar to main=
net.
> * Motivating miners to re-org min difficulty blocks was suggested but thi=
s may still be done after Testnet 4 is deployed, so it can be considered ou=
t of scope for this BIP.
> * Persisting the real difficulty in the version field was suggested to pr=
event exploits of the 20-min rule in an even more robust way, but did not r=
eceive a critical level of support since it would be a more invasive change=
.
>
> =3D=3D Network Parameters =3D=3D
>
> =3D=3D=3D Consensus Rules =3D=3D=3D
>
> All consensus rules active on mainnet at the time of this proposal are en=
forced from block 1, the newest of these rules being the Taproot softfork.
>
> =3D=3D=3D Genesis Block =3D=3D=3D
>
> * Message: <code>03/May/2024 000000000000000000001ebd58c244970b3aa9d783bb=
001011fbe8ea8e98e00e</code>
> * Pubkey: <code>000000000000000000000000000000000000000000000000000000000=
000000000</code>
> * Time stamp: 1714777860
> * Nonce: 393743547
> * Difficulty: <code>0x1d00ffff</code>
> * Version: 1
>
> The resulting genesis block hash is <code>00000000da84f2bafbbc53dee25a72a=
e507ff4914b867c565be350b0da8bf043</code>, and the block hex is <code>010000=
00010000000000000000000000000000000000000000000000000000000000000000fffffff=
f5504ffff001d01044c4c30332f4d61792f3230323420303030303030303030303030303030=
303030303031656264353863323434393730623361613964373833626230303130313166626=
53865613865393865303065ffffffff0100f2052a0100000023210000000000000000000000=
00000000000000000000000000000000000000000000ac00000000</code>.
>
> =3D=3D=3D Message Start =3D=3D=3D
>
> The message start is defined as <code>0x1c163f28</code>. These four bytes=
 were randomly generated and have no special meaning.
>
> =3D=3D Compatibility =3D=3D
>
> This specification is backward compatible in the sense that existing soft=
ware can use Testnet 4 out of the box, assuming support for Testnet 3 alrea=
dy exists.
>
> Simply by adding the network parameters for Testnet 4 (magic number, etc.=
), a client can connect to and use Testnet 4 without further modifications.=
 The block headers have valid proof of work, so clients can trivially check=
 that blocks are "probably" valid.
>
> However, without the implementation of the changes detailed in Specificat=
ions, a client could follow a chain that does not follow the rules. Any ful=
ly validating node should check these rules and reject blocks that fail to =
follow them. Clients should either validate these rules or connect to trust=
ed peers that do full validation.
>
> =3D=3D Reference implementation =3D=3D
>
> Pull request at https://github.com/bitcoin/bitcoin/pull/29775
>
> =3D=3D References =3D=3D
>
> # Original mailing list thread: https://groups.google.com/g/bitcoindev/c/=
9bL00vRj7OU/m/kFPaQCzmBwAJ
> # Blog post on block storm bug: https://blog.lopp.net/the-block-storms-of=
-bitcoins-testnet/
> # Consensus Cleanup BIP draft: https://github.com/TheBlueMatt/bips/blob/c=
leanup-softfork/bip-XXXX.mediawiki
> # Consensus Cleanup PR draft: https://github.com/bitcoin/bitcoin/pull/154=
82
>
> =3D=3D Copyright =3D=3D
>
> This document is licensed under the Creative Commons CC0 1.0 Universal li=
cense.
>
> --
> 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/a6e3VPsXJf9p3gt_FmNF_Up-wrFuNMKTN30-xCSDHBKXzXnSpVflIZIj2NQ8Wo=
s4PhQCzI2mWEMvIms_FAEs7rQdL15MpC_Phmu_fnR9iTg%3D%40protonmail.com.

--=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/cUk3mhYDInTKWp31VeaGZa68jCM6rhCiNFoQwD5JDeoi4MlxebiVUo06Oiuoj-xb=
KAkxyO7LpoFeZrj3Ak5cOeJRGDG83ITDdSXrZ3PQta0%3D%40protonmail.com.

--b1_AFA1mBiJg99tjq1ZllN2SCv1urIHb7P7MdQ95E60pM
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div style=3D"font-family: Arial, sans-serif; font-size: 14px;">Please note=
 that the Block Storm Fix section was already amended with a (much needed) =
clarification:</div><div style=3D"font-family: Arial, sans-serif; font-size=
: 14px;"><br></div><div style=3D"font-family: Arial, sans-serif; font-size:=
 14px;"><span>=3D=3D=3D Block Storm Fix =3D=3D=3D</span><div><br></div><div=
><span>When the next work required is calculated for the first block in a n=
ew difficulty period, the difficulty of the last block of the previous diff=
iculty period is only used as the base for this calculation if its difficul=
ty is not 1. If its difficulty is 1, all blocks in the previous difficulty =
period are checked in reverse order if any of them have a different difficu=
lty than 1. When a different difficulty is encountered, it is assumed to be=
 the actual difficulty of the network and used as the base for the calculat=
ion of the new difficulty level. Note that the first block in new difficult=
y period does not allow usage of the 20-min rule (this is prior behavior). =
This means that in each difficulty period the first block should always hav=
e the actual difficulty even if all other blocks were mined with the 20-min=
 rule.</span></div><div><br></div><span>For the avoidance of doubt, no matt=
er which block in the previous difficulty period provides the actual diffic=
ulty used as the basis for the calculation, the timestamp of the last block=
 is always the one that is used as the end time of the difficulty period.</=
span><br></div><div class=3D"protonmail_quote">
        On Wednesday, May 29th, 2024 at 12:01 AM, 'Fabian' via Bitcoin Deve=
lopment Mailing List &lt;bitcoindev@googlegroups.com&gt; wrote:<br>
        <blockquote type=3D"cite" class=3D"protonmail_quote">
            <div style=3D"font-family: Arial, sans-serif; font-size: 14px;"=
>Hello list,</div><div style=3D"font-family: Arial, sans-serif; font-size: =
14px;"><br></div><div style=3D"font-family: Arial, sans-serif; font-size: 1=
4px;">a potential reset or replacement of Testnet 3 has been discussed on t=
his list previously here:&nbsp;<span><a target=3D"_blank" rel=3D"noreferrer=
 nofollow noopener" href=3D"https://groups.google.com/g/bitcoindev/c/9bL00v=
Rj7OU/m/9yCPo3uUBwAJ">https://groups.google.com/g/bitcoindev/c/9bL00vRj7OU/=
m/9yCPo3uUBwAJ</a></span><br><span></span></div><div style=3D"font-family: =
Arial, sans-serif; font-size: 14px;"><br></div><div style=3D"font-family: A=
rial, sans-serif; font-size: 14px;">The discussion continued in the&nbsp;<s=
pan>accompanying</span> bitcoin core pull request (<span style=3D"scrollbar=
-width: thin; background-color: rgb(255, 255, 255);"><a target=3D"_blank" r=
el=3D"noreferrer nofollow noopener" href=3D"https://github.com/bitcoin/bitc=
oin/pull/29775" style=3D"scrollbar-width: thin; color: blue;">https://githu=
b.com/bitcoin/bitcoin/pull/29775</a>)</span> which has been tested in the p=
ast couple of weeks and adopted by several projects on an experimental basi=
s, such as&nbsp;<span><a target=3D"_blank" rel=3D"noreferrer nofollow noope=
ner" href=3D"https://mempool.space/testnet4">https://mempool.space/testnet4=
</a>&nbsp;for example.</span><br><span></span></div><div style=3D"font-fami=
ly: Arial, sans-serif; font-size: 14px;"><span><br></span></div><div style=
=3D"font-family: Arial, sans-serif; font-size: 14px;"> I have now formalize=
d t<span style=3D"display: inline !important; background-color: rgb(255, 25=
5, 255);">he current rules and genesis block implemented in the PR as BIP d=
raft</span>:&nbsp;<span><a target=3D"_blank" rel=3D"noreferrer nofollow noo=
pener" href=3D"https://github.com/bitcoin/bips/pull/1601">https://github.co=
m/bitcoin/bips/pull/1601</a></span></div><div style=3D"font-family: Arial, =
sans-serif; font-size: 14px;"><br></div><div style=3D"font-family: Arial, s=
ans-serif; font-size: 14px;">-----------</div><div style=3D"font-family: Ar=
ial, sans-serif; font-size: 14px;"><span></span><div><span>=3D=3D Abstract =
=3D=3D</span></div><div><br></div><div><span>A new test network with the go=
al to replace Testnet 3. This network comes with small but important improv=
ements of the consensus rules, that should make it impractical to attack th=
e network using only CPU mining.</span></div><div><br></div><div><span>=3D=
=3D Motivation =3D=3D</span></div><div><br></div><div><span>Quoting the ori=
ginal mailing list post from Jameson Lopp:</span></div><div><br></div><div>=
<span>"Testnet3 has been running for 13 years. It's on block 2.5 million so=
mething and the block reward is down to ~0.014 TBTC, so mining is not doing=
 a great job at distributing testnet coins anymore.</span></div><div><br></=
div><div><span>The reason the block height is insanely high is due to a rat=
her amusing edge case bug that causes the difficulty to regularly get reset=
 to 1, which causes a bit of havoc. If you want a deep dive into the quirk:=
 <a target=3D"_blank" rel=3D"noreferrer nofollow noopener" href=3D"https://=
blog.lopp.net/the-block-storms-of-bitcoins-testnet/">https://blog.lopp.net/=
the-block-storms-of-bitcoins-testnet/</a></span></div><div><br></div><div><=
span>Testnet3 is being actively used for scammy airdrops; those of us who t=
end to be generous with our testnet coins are getting hounded by non-develo=
pers chasing cheap gains.</span></div><div><br></div><div><span>As a result=
, TBTC is being actively bought and sold; one could argue that the fundamen=
tal principle of testnet coins having no value has been broken."</span></di=
v><div><br></div><div><span>Since then the issue with block storms has been=
 further demonstrated on Testnet 3 when three years' worth of blocks were m=
ined in a few weeks while rendering the network practically unusable at the=
 same time.</span></div><div><br></div><div><span>=3D=3D Specification =3D=
=3D</span></div><div><br></div><div><span>Consensus of Testnet 4 follows th=
e same rules as Testnet 3 with the exception of the two new rules detailed =
below.</span></div><div><br></div><div><span>This means that the existing 2=
0 min difficulty exception in Testnet 3 is explicitly kept in place, meanin=
g that a block with a timestamp 20 minutes further into the future from the=
 current time is allowed to have a minimum difficulty of 1 instead of whate=
ver the actual level currently is.</span></div><div><br></div><div><span>=
=3D=3D=3D Block Storm Fix =3D=3D=3D</span></div><div><br></div><div><span>W=
hen the next work required is calculated for the first block in a new diffi=
culty period, the difficulty of the last block of the previous difficulty p=
eriod is only used as the base for this calculation if its difficulty is no=
t 1. If its difficulty is 1, all blocks in the previous difficulty period a=
re checked in reverse order if any of them have a different difficulty than=
 1. When a different difficulty is encountered, it is assumed to be the act=
ual difficulty of the network and used as the base for the calculation of t=
he new difficulty level. Only if all blocks from the previous difficulty pe=
riod have had a difficulty of 1 (possibly by the use of the 20-min rule), t=
his is also used as the base for the calculation of the next difficulty per=
iod.</span></div><div><br></div><div><span>For the avoidance of doubt, no m=
atter which block in the previous difficulty period provides the actual dif=
ficulty used as the basis for the calculation, the timestamp of the last bl=
ock is always the one that is used as the end time of the difficulty period=
.</span></div><div><br></div><div><span>=3D=3D=3D Time Warp Fix =3D=3D=3D</=
span></div><div><br></div><div><span>To protect against the time warp attac=
k, the following rule proposed as part of The Great Consensus Cleanup is en=
forced: "The nTime field of each block whose height, mod 2016, is 0 must be=
 greater than or equal to the nTime field of the immediately prior block mi=
nus 600. For the avoidance of doubt, such blocks must still comply with exi=
sting Median-Time-Past nTime restrictions."</span></div><div><br></div><div=
><span>=3D=3D Rationale =3D=3D</span></div><div><br></div><div><span>The ap=
plied changes were the result of discussions on the mailing list and the PR=
. The selected changes try to strike a balance between minimal changes to t=
he network (keeping it as close to mainnet as possible) while making it mor=
e robust against attackers that try to disrupt the network. Several alterna=
tive designs were considered:</span></div><div><br></div><div><span>* For t=
he block storm fix an alternative fix could have been to prevent the last b=
lock in a difficulty period from applying the existing difficulty exception=
. Both solutions were deemed acceptable and there was no clear preference a=
mong reviewers.</span></div><div><span>* Removal of the 20-min difficulty e=
xception was discussed but dismissed since several reviewers insisted that =
it was a useful feature allowing non-standard transactions to be mined with=
 just a CPU.</span></div><div><span>* Increase of minimum difficulty was di=
scussed but dismissed as it would categorically prevent participation in th=
e network using a CPU miner.</span></div><div><span>* Increase of the delay=
 in the 20 min difficulty exception was suggested but did not receive signi=
ficant support.</span></div><div><span>* Re-enabling &lt;code&gt;acceptnons=
tdtxn&lt;/code&gt; in bitcoin core by default was dismissed as it had led t=
o confusion among layer-2s that had used testnet for transaction propagatio=
n tests and expected it to behave similar to mainnet.</span></div><div><spa=
n>* Motivating miners to re-org min difficulty blocks was suggested but thi=
s may still be done after Testnet 4 is deployed, so it can be considered ou=
t of scope for this BIP.</span></div><div><span>* Persisting the real diffi=
culty in the version field was suggested to prevent exploits of the 20-min =
rule in an even more robust way, but did not receive a critical level of su=
pport since it would be a more invasive change.</span></div><div><br></div>=
<div><span>=3D=3D Network Parameters =3D=3D</span></div><div><br></div><div=
><span>=3D=3D=3D Consensus Rules =3D=3D=3D</span></div><div><br></div><div>=
<span>All consensus rules active on mainnet at the time of this proposal ar=
e enforced from block 1, the newest of these rules being the Taproot softfo=
rk.</span></div><div><br></div><div><span>=3D=3D=3D Genesis Block =3D=3D=3D=
</span></div><div><br></div><div><span>* Message: &lt;code&gt;03/May/2024 0=
00000000000000000001ebd58c244970b3aa9d783bb001011fbe8ea8e98e00e&lt;/code&gt=
;</span></div><div><span>* Pubkey: &lt;code&gt;0000000000000000000000000000=
00000000000000000000000000000000000000&lt;/code&gt;</span></div><div><span>=
* Time stamp: 1714777860</span></div><div><span>* Nonce: 393743547</span></=
div><div><span>* Difficulty: &lt;code&gt;0x1d00ffff&lt;/code&gt;</span></di=
v><div><span>* Version: 1</span></div><div><br></div><div><span>The resulti=
ng genesis block hash is &lt;code&gt;00000000da84f2bafbbc53dee25a72ae507ff4=
914b867c565be350b0da8bf043&lt;/code&gt;, and the block hex is &lt;code&gt;0=
1000000010000000000000000000000000000000000000000000000000000000000000000ff=
ffffff5504ffff001d01044c4c30332f4d61792f32303234203030303030303030303030303=
030303030303030316562643538633234343937306233616139643738336262303031303131=
6662653865613865393865303065ffffffff0100f2052a01000000232100000000000000000=
0000000000000000000000000000000000000000000000000ac00000000&lt;/code&gt;.</=
span></div><div><br></div><div><span>=3D=3D=3D Message Start =3D=3D=3D</spa=
n></div><div><br></div><div><span>The message start is defined as &lt;code&=
gt;0x1c163f28&lt;/code&gt;. These four bytes were randomly generated and ha=
ve no special meaning.</span></div><div><br></div><div><span>=3D=3D Compati=
bility =3D=3D</span></div><div><br></div><div><span>This specification is b=
ackward compatible in the sense that existing software can use Testnet 4 ou=
t of the box, assuming support for Testnet 3 already exists.</span></div><d=
iv><br></div><div><span>Simply by adding the network parameters for Testnet=
 4 (magic number, etc.), a client can connect to and use Testnet 4 without =
further modifications. The block headers have valid proof of work, so clien=
ts can trivially check that blocks are "probably" valid.</span></div><div><=
br></div><div><span>However, without the implementation of the changes deta=
iled in Specifications, a client could follow a chain that does not follow =
the rules. Any fully validating node should check these rules and reject bl=
ocks that fail to follow them. Clients should either validate these rules o=
r connect to trusted peers that do full validation.</span></div><div><br></=
div><div><span>=3D=3D Reference implementation =3D=3D</span></div><div><br>=
</div><div><span>Pull request at <a target=3D"_blank" rel=3D"noreferrer nof=
ollow noopener" href=3D"https://github.com/bitcoin/bitcoin/pull/29775">http=
s://github.com/bitcoin/bitcoin/pull/29775</a></span></div><div><br></div><d=
iv><span>=3D=3D References =3D=3D</span></div><div><br></div><div><span># O=
riginal mailing list thread: <a target=3D"_blank" rel=3D"noreferrer nofollo=
w noopener" href=3D"https://groups.google.com/g/bitcoindev/c/9bL00vRj7OU/m/=
kFPaQCzmBwAJ">https://groups.google.com/g/bitcoindev/c/9bL00vRj7OU/m/kFPaQC=
zmBwAJ</a></span></div><div><span># Blog post on block storm bug: <a target=
=3D"_blank" rel=3D"noreferrer nofollow noopener" href=3D"https://blog.lopp.=
net/the-block-storms-of-bitcoins-testnet/">https://blog.lopp.net/the-block-=
storms-of-bitcoins-testnet/</a></span></div><div><span># Consensus Cleanup =
BIP draft: <a target=3D"_blank" rel=3D"noreferrer nofollow noopener" href=
=3D"https://github.com/TheBlueMatt/bips/blob/cleanup-softfork/bip-XXXX.medi=
awiki">https://github.com/TheBlueMatt/bips/blob/cleanup-softfork/bip-XXXX.m=
ediawiki</a></span></div><div><span># Consensus Cleanup PR draft: <a target=
=3D"_blank" rel=3D"noreferrer nofollow noopener" href=3D"https://github.com=
/bitcoin/bitcoin/pull/15482">https://github.com/bitcoin/bitcoin/pull/15482<=
/a></span></div><div><br></div><div><span>=3D=3D Copyright =3D=3D</span></d=
iv><div><br></div><div><span>This document is licensed under the Creative C=
ommons CC0 1.0 Universal license.</span></div></div><div class=3D"protonmai=
l_signature_block" style=3D"font-family: Arial, sans-serif; font-size: 14px=
;">
</div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
Bitcoin Development Mailing List" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a target=3D"_blank" rel=3D"noreferrer nofollow noopener" href=3D"m=
ailto:bitcoindev+unsubscribe@googlegroups.com">bitcoindev+unsubscribe@googl=
egroups.com</a>.<br>
To view this discussion on the web visit <a target=3D"_blank" rel=3D"norefe=
rrer nofollow noopener" href=3D"https://groups.google.com/d/msgid/bitcoinde=
v/a6e3VPsXJf9p3gt_FmNF_Up-wrFuNMKTN30-xCSDHBKXzXnSpVflIZIj2NQ8Wos4PhQCzI2mW=
EMvIms_FAEs7rQdL15MpC_Phmu_fnR9iTg%3D%40protonmail.com">https://groups.goog=
le.com/d/msgid/bitcoindev/a6e3VPsXJf9p3gt_FmNF_Up-wrFuNMKTN30-xCSDHBKXzXnSp=
VflIZIj2NQ8Wos4PhQCzI2mWEMvIms_FAEs7rQdL15MpC_Phmu_fnR9iTg%3D%40protonmail.=
com</a>.<br>

        </blockquote><br>
    </div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Bitcoin Development Mailing List&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:bitcoindev+unsubscribe@googlegroups.com">bitcoind=
ev+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/bitcoindev/cUk3mhYDInTKWp31VeaGZa68jCM6rhCiNFoQwD5JDeoi4MlxebiVU=
o06Oiuoj-xbKAkxyO7LpoFeZrj3Ak5cOeJRGDG83ITDdSXrZ3PQta0%3D%40protonmail.com?=
utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/b=
itcoindev/cUk3mhYDInTKWp31VeaGZa68jCM6rhCiNFoQwD5JDeoi4MlxebiVUo06Oiuoj-xbK=
AkxyO7LpoFeZrj3Ak5cOeJRGDG83ITDdSXrZ3PQta0%3D%40protonmail.com</a>.<br />

--b1_AFA1mBiJg99tjq1ZllN2SCv1urIHb7P7MdQ95E60pM--