From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 02 Feb 2026 15:37:08 -0800 Received: from mail-qt1-f185.google.com ([209.85.160.185]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1vn3Tf-0006nu-Iy for bitcoindev@gnusha.org; Mon, 02 Feb 2026 15:37:08 -0800 Received: by mail-qt1-f185.google.com with SMTP id d75a77b69052e-502a341e108sf121916421cf.1 for ; Mon, 02 Feb 2026 15:37:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1770075421; cv=pass; d=google.com; s=arc-20240605; b=b5UUShpBv8i3CBgoLyAVAose/wn5K/SsB+y0R8l2ZNePzYu78oOPvkf9hIKe97KplL XMYdyhpDrkjHvKUDO6Mvluhfyzwpayz0PPqz63BrEA7x5+8fSEDw8fwufv40amRKku+Q pIAILXxbtPTeasuYkpu9PrjNrz1nA4DOeVv9sHtcFdj3/6MzYAs5rkyypXFG2zgw1GCa 1RAAzyAUc07EBOmWeS1e9eAkUewChCyrf2V+wImACM8llKQZNXM2ql7+UhpAsKLMSS6U Jt9V78qvPmCcs6l//EfuabdxBQ3y8mnJ69s1Vnt7A9tAw5hLSFbabt4ui4T7nuhJjH2c K2jQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=L6lqYMNOHTFbE+IWAruG2H1VP3Y3vvsO3Ykdnv9DhrQ=; fh=85LLYRJbXDQtmCyCg6tCCHeYxVymSV32bsOCIArDmUc=; b=j8jJRnAPMfUQZuLh5CtWaQHFOQCjcpueWwsErpRLkGWogqwmT/OUxlKOja+swRmG5j R61SsBCT9g18Tu0EGSbOxQPVoxXTOeM0OFz6KLSMJ4DFx+ltwxlSPHwtXim8piwX4PYB hS12t2kXAFMTkNQ2qU7J9LXb0Irw1nhYQXvr+BkXx0rCPnSNbq3K8e8xx9tEkciGw4ba LekHSHwdAWS385WSnn4GV4jn2Rg7NMqGomAkraXmf4+ncevaE95a8oQPblgPXOmZyVQ3 xImuDbbaFT/+w/CjpmQ9wRBSL2w+cMk67MBNNU5FYF4NNHs48vIdkbjjGfoxDun9DmyG MWIw==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=dCzwipl7; spf=pass (google.com: domain of bymet4@protonmail.com designates 79.135.106.96 as permitted sender) smtp.mailfrom=bymet4@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=1770075421; x=1770680221; 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=L6lqYMNOHTFbE+IWAruG2H1VP3Y3vvsO3Ykdnv9DhrQ=; b=FEiwbHQEIOBg+PTfkQJMZzsmZw+lAtE0c1fDyLmSEN32n5s2tPhx/dYZTmP1BjGybP RaMBfd3O4yR3utpvLZF3HBGjFcEoeP6eOyWnFbxEMrrn1j9hPy86FbMBSevWUVL/aRuh fuZoUCrs8pm/dYSVl7a1BBTkPipAf/B4kpq+decdjmEZw0iKSCU7DIsDIXm6zALwS/8s 8QYnTwrhAH+ePN9iEy9hHkgY8zqh1h17297ldxarDkhz63W88C39CDXFBTBdemx2A+pp +pyBepadbdRn9qS6sM1Ctw3IQ/n0oCkkWJXbpo/y9yVyMV/1wjJGYsC9eCI6J7EukvX8 T2xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770075421; x=1770680221; 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=L6lqYMNOHTFbE+IWAruG2H1VP3Y3vvsO3Ykdnv9DhrQ=; b=g92tq2TKcrfQS70KTZWkQdTG80H6VHE1OUyG4F4WP+1rsU2n58ex5HtVTLBN340YDk BnMgixkBYOI/5rVjL3B6uaKQWQHSpOFs9OJZlsstO0J61o+6VpJd8c7AuFLGk3qFY82r dWC2VPY3QKurGyoxa4rPYflPIAd0h1A4OuvjXDTTl3s8l9SebhAsOgpTPHy+KPQ8XOhc qDAnmaXGuV2jyQYziWcGNB3iNF/cWUcbYt6iEtFnEi83xVzywk7O8TtWfVm50HIkJ7BD pljXdQbAfnPqpfwmBUUkOYe68cw5bX4bkY+k8Ew1by5Cvwk/pcGEE4XroalrnzTKnHB9 Zkqg== X-Forwarded-Encrypted: i=2; AJvYcCUiLvnqGQGon7oHjCwwmhteDyWnz9z7ru0rAzRy49OR/NNOj6/0+wQQ7F7y2yfefSs0n/igamjrLhkH@gnusha.org X-Gm-Message-State: AOJu0YyDgbLL3D3SUJ5Yys63HhYAsaPsRtfOOSf3DqRUx7rOmblTXEXX 9aFQWNhFxC3EaJiyJJpCZaHsojGOTmZPi3+euQIHm05J4LXCKnTpYFeI X-Received: by 2002:a05:622a:44e:b0:4fb:f98d:454 with SMTP id d75a77b69052e-505d225eee6mr176521491cf.52.1770075418367; Mon, 02 Feb 2026 15:36:58 -0800 (PST) X-BeenThere: bitcoindev@googlegroups.com; h="AV1CL+GI1T/X7u6nVg/62vbzb2Tn5vhdVNifs/5C2c/JN5Bjww==" Received: by 2002:a05:622a:104:b0:501:4a3e:41ff with SMTP id d75a77b69052e-505df87695dls51552511cf.1.-pod-prod-09-us; Mon, 02 Feb 2026 15:36:51 -0800 (PST) X-Received: by 2002:a05:620a:440d:b0:8b2:db27:4270 with SMTP id af79cd13be357-8c9eb309b07mr1751207585a.48.1770075411601; Mon, 02 Feb 2026 15:36:51 -0800 (PST) Received: by 2002:ab3:738e:0:b0:2d1:a602:e60f with SMTP id a1c4a302cd1d6-2dcc7d77826msc7a; Mon, 26 Jan 2026 03:36:49 -0800 (PST) X-Received: by 2002:a05:651c:19a8:b0:385:f3df:c375 with SMTP id 38308e7fff4ca-385fa1819c2mr14460351fa.36.1769427407365; Mon, 26 Jan 2026 03:36:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769427407; cv=none; d=google.com; s=arc-20240605; b=OAJpR5F/FTHNYorLyIjn4IMX+VNjimRJak+xKwYa5UJGEzHzMHzlsZYFfx2hVbeH7S RmIPthS3BYyypZ8ZfpnTesCr8KcRMxD/XF9urb79lDc8c97QWnoF4hAKbe6kjSlxvWhA ShMYLT+T13KiVIJ6K0kGDxLwY+cYllHf0r6c4JhGibVDqrwqxu/TxNX35W2r8i8gD2rJ elNwpcLt2+wszHflG/mbYr+kWIgxfKh1F5MICE5eJyfAvYuHzvBSxVNYjjrDSQdGH/ra 86PQ71gUeThQTTyjwZY1lP8X5nJNZMtd0sQOtSi7SbKJG6utrBOQCxZC0ZSQIM2nQgaW f2ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:feedback-id:references:in-reply-to:message-id:subject :cc:from:to:date:dkim-signature; bh=7ccFMLaHgBpd1Nzw7cnnuBWX+Ju5flxS2/z/RFa8NG8=; fh=EFlQbHGamGtHS0dhETioXI40HqKi8X+6ygOktExwe2U=; b=JeiXckeWKTtM6PZPxNfjrbYgXZ7p2idwPqxFM/SKKzsw92hIaAAtkAEg3wdkc9K+ES C8zyJNNe35ga7H3VghSXsraO4U9ATXFyskuo/SET8ORI6VRVm4UndtHXUfEX3AFOL/G3 67jFP4x4yeyErqnS2Z29FFLu0+/5VY0uZvrL0P1swhFhMlFElWiDhmmhYO9oHNOx0CP3 vLqHvM/7CA+zWxQ9CGfL2duUObI/PQugIBJUQohveILnJRvh78fyNvY439XbwwW3v7PT IANUPDeB/bo6PTk40G4XuiqbDiEVfwftVVZ93npxlwWiXcBTzVyQZ5EGe0BZoea99W/+ hsQg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=dCzwipl7; spf=pass (google.com: domain of bymet4@protonmail.com designates 79.135.106.96 as permitted sender) smtp.mailfrom=bymet4@protonmail.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from mail-10696.protonmail.ch (mail-10696.protonmail.ch. [79.135.106.96]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-385d9fc4041si1644171fa.3.2026.01.26.03.36.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jan 2026 03:36:47 -0800 (PST) Received-SPF: pass (google.com: domain of bymet4@protonmail.com designates 79.135.106.96 as permitted sender) client-ip=79.135.106.96; Date: Mon, 26 Jan 2026 11:36:42 +0000 To: Saint Wenhao From: "'Angelo' via Bitcoin Development Mailing List" Cc: "bitcoindev@googlegroups.com" Subject: [bitcoindev] Re: [bitcoin-dev] Unbreaking testnet4 Message-ID: In-Reply-To: References: <85djL2Ah0Mh9Appt934138jLRE23gGmaIr96y8q-clEmMa_APPZLerKrrUZN524_Diq4pOydQLaEOZ3XBy4-sQIPxYODOHreM5RWuNHILto=@protonmail.com> <-XaFaE2DFoVGKF0rABuGC3vtjLoA2zptE5L-xP1FQg3JPwSdc3-AQJZep7AMO3dOYpxD-jK3l2DtoHpz9344ZTQ8vwONoNj8HliVHy4C5fU=@protonmail.com> Feedback-ID: 45585361:user:proton X-Pm-Message-ID: 5cda87ce45b7fee792c930b73ebb9ae0bf3925f4 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1=_YLQtp7XoESAJ0pNhG7sVmIyCyyCi8sXE57Y6g8Xbs" X-Original-Sender: bymet4@protonmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=dCzwipl7; spf=pass (google.com: domain of bymet4@protonmail.com designates 79.135.106.96 as permitted sender) smtp.mailfrom=bymet4@protonmail.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com X-Original-From: Angelo Reply-To: Angelo Precedence: list Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com List-ID: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.7 (/) --b1=_YLQtp7XoESAJ0pNhG7sVmIyCyyCi8sXE57Y6g8Xbs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Made some changes: https://github.com/bitcoin/bitcoin/compare/master...batm= anbytes:bitcoin:testnet4-fix - The hardfork activates at block 151200 instead of 150000. The reason is t= hat block 151200 is the start of epoch 75, and this is less prone to error = and confusion. - At block 151200, difficulty is reset to 1 million, to compensate for the = artificially high difficulty caused by the CPU miners. This would result in= a small mining race for epochs 75 to around 78, where miners with hashpowe= r would find blocks in a matter of seconds. The difficulty will then 4x in = the 76th epoch, then again 4x, and it goes up until it naturally finds the = 10 minute block interval. The number 1 million was selected arbitrarily to get the best of both world= s: (1) it won't result in a block storm (as it would if difficulty was rese= t to 1) and (2) it won't result in very long block intervals. If there were= n't any difficulty reset, and difficulty would just be calculated as normal= , it'd take around an hour for a block to be found, and this would mean epo= ch 75 alone would take around three months instead of two weeks. (Original message is from Bitcointalk) On Saturday, January 24th, 2026 at 10:04 PM, Angelo = wrote: > Made some changes: https://github.com/bitcoin/bitcoin/compare/master...ba= tmanbytes:bitcoin:testnet4-fix > - The hardfork activates at block 151200 instead of 150000. The reason is= that block 151200 is the start of epoch 75, and this is less prone to erro= r and confusion. > - At block 151200, difficulty is reset to 1 million, to compensate for th= e artificially high difficulty caused by the CPU miners. This would result = in a small mining race for epochs 75 to around 78, where miners with hashpo= wer would find blocks in a matter of seconds. The difficulty will then 4x i= n the 76th epoch, then again 4x, and it goes up until it naturally finds th= e 10 minute block interval. > > The number 1 million was selected arbitrarily to get the best of both wor= lds: (1) it won't result in a block storm (as it would if difficulty was re= set to 1) and (2) it won't result in very long block intervals. If there we= ren't any difficulty reset, and difficulty would just be calculated as norm= al, it'd take around an hour for a block to be found, and this would mean e= poch 75 alone would take around three months instead of two weeks. > > (Original message is from Bitcointalk) > On Thursday, January 22nd, 2026 at 1:37 PM, 'Angelo' via Bitcoin Developm= ent Mailing List wrote: > >> - Yes, but you need some test cases as well. >> >> I added unit tests that test the modified functions in isolation. Check = my changes again. >> >> Testnet4 fork behavior (4 tests): >> >> 1. testnet4_min_difficulty_pre_fork: At height 149,999, min-difficulty b= locks ARE allowed (returns powLimit when block is >20min late) >> 2. testnet4_min_difficulty_at_fork: At height 150,000, min-difficulty bl= ocks are NOT allowed (returns previous difficulty instead) >> 3. testnet4_min_difficulty_post_fork: At height 150,001, min-difficulty = blocks are NOT allowed. >> 4. testnet4_permitted_difficulty_transition: PermittedDifficultyTransiti= on() is permissive before fork, strict after. >> >> Other chains unaffected (3 tests): >> 5. regtest_min_difficulty_unaffected: Regtest still allows min-difficult= y at any height (nMinDifficultyBlocksForkHeight=3D0 means no fork) >> 6. mainnet_min_difficulty_unaffected: Mainnet unaffected (fPowAllowMinDi= fficultyBlocks=3Dfalse) >> 7. Existing ChainParams_TESTNET4_sanity already verifies basic testnet4 = param sanity. >> Running the proof-of-work tests, I get no errors detected: >> >>> =E2=80=8B$ ./build/bin/test_bitcoin --run_test=3Dpow_tests >>> Running 21 test cases... >>> *** No errors detected >>> >>> $ ./build/bin/test_bitcoin --run_test=3Dpow_tests/testnet4* >>> Running 4 test cases... >>> >>> *** No errors detected >> >> If you have any other unit tests in mind, let me know, but I think those= are enough. >> >> - Also, rejecting all blocks with CPU difficulty would mean, that the up= dated network will be stuck from time to time, when ASIC miners will come i= n, raise the difficulty, and then go away, leaving the rest of the users wi= th halted chain. >> >> The network is already in a halted chain, because empty blocks are propa= gated faster than non-empty, and transactions are confirmed most often when= ASIC miners include them in their blocks. When ASIC miners go away with th= e current model, the users will have to wait for a much longer time, due to= empty blocks. >> On Monday, January 19th, 2026 at 12:28 PM, Saint Wenhao wrote: >> >>>> The changes in the code are minimal. >>> >>> Yes, but you need some test cases as well. >>> >>>> We could modify the code to not suffer from the temporary 1-hour block= interval if needed. >>> >>> It is not needed. Testnet4 overproduced around 30k blocks, if we count = the time between today, and the Genesis Block. If it will take three months= , instead of two weeks, to re-adjust the difficulty, then it wouldn't matte= r that much, because we already have around 1.5 million more coins, than we= should have today. >>> >>> Also, rejecting all blocks with CPU difficulty would mean, that the upd= ated network will be stuck from time to time, when ASIC miners will come in= , raise the difficulty, and then go away, leaving the rest of the users wit= h halted chain. >>> >>> pon., 19 sty 2026 o 00:35 'Angelo' via Bitcoin Development Mailing List= napisa=C5=82(a): >>> >>>> Hello mailing list. >>>> >>>> I have forked Bitcoin Core and modified the code to fix testnet4 by di= sabling the min difficulty rule after block 150,000: https://github.com/bit= coin/bitcoin/compare/master...batmanbytes:bitcoin:testnet4-fix >>>> >>>> The changes in the code are minimal. As I've written in [Bitcointalk](= https://bitcointalk.org/index.php?topic=3D5569103.msg66301279#msg66301279): >>>> >>>>> I have introduced int nMinDifficultyBlocksForkHeight which is 0 by de= fault in consensus/params.h, only ever used by the CTestNet4Params class. G= etNextWorkRequired and PermittedDifficultyTransition are also modified to c= heck whether min difficulty blocks are enabled, and if yes, whether nMinDif= ficultyBlocksForkHeight is 0 (which would indicate it is not testnet4). >>>> >>>> With no other changes to the code, during the epoch that includes bloc= k 150,000 (which already began at block 149,184), we should expect the bloc= k interval to increase by roughly sixfold (to about one hour per block). Th= is is because the effective hashrate would correspond to approximately one-= sixth of the difficulty. The difficulty increases by about 6x since there a= re roughly six times more difficulty-1 blocks than blocks at the normal dif= ficulty. >>>> >>>> We could modify the code to not suffer from the temporary 1-hour block= interval if needed. I'm just interested to see what you think of those cha= nges, so that we can move forward. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Gro= ups "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 visit https://groups.google.com/d/msgid/bitcoi= ndev/85djL2Ah0Mh9Appt934138jLRE23gGmaIr96y8q-clEmMa_APPZLerKrrUZN524_Diq4pO= ydQLaEOZ3XBy4-sQIPxYODOHreM5RWuNHILto%3D%40protonmail.com. >>> >>> -- >>> You received this message because you are subscribed to the Google Grou= ps "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 visit https://groups.google.com/d/msgid/bitcoin= dev/CACgYNOLCvOiHSSpU0m9mGZmjH1JYb1S%2B_XfGpOFUV%2BgyJsGNKQ%40mail.gmail.co= m. >> >> -- >> You received this message because you are subscribed to the Google Group= s "Bitcoin Development Mailing List" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n email to bitcoindev+unsubscribe@googlegroups.com. >> To view this discussion visit https://groups.google.com/d/msgid/bitcoind= ev/-XaFaE2DFoVGKF0rABuGC3vtjLoA2zptE5L-xP1FQg3JPwSdc3-AQJZep7AMO3dOYpxD-jK3= l2DtoHpz9344ZTQ8vwONoNj8HliVHy4C5fU%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 visit https://groups.google.com/d/msgid/bitcoindev/= IZU5GCk5S4W9V1OE_X77S1ugRZ0wDnvZfYzPNUZBb0vBjCdbImbGmg5gw85WbFRt5pmMIKTc56C= kUtBLiDQA4IpSiBqSLvjMLqU_es6qsa0%3D%40protonmail.com. --b1=_YLQtp7XoESAJ0pNhG7sVmIyCyyCi8sXE57Y6g8Xbs Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

=
- The hardfork activates at block 151200 instead of 150000. The reason is that block 151200 is the start of epoch 75, and this is less prone to error and confusion.
- At block 151200, difficulty is reset to 1 million, to compensate for the artificially high difficulty caused by the CPU miners. This would result in a small mining race for epochs 75 to around 78, where miners with hashpower would find blocks in a matter of seconds. The difficulty will then 4x in the 76th epoch, then again 4x, and it goes up until it naturally finds the 10 minute block interval.

The number 1 million was selected arbitrarily to get the best of both worlds: (1) it won't result in a block storm (as it would if difficulty was reset to 1) and (2) it won't result in very long block intervals. If there weren't any difficulty reset, and difficulty would just be calculated as normal, it'd take around an hour for a block to be found, and this would mean epoch 75 alone would take around three months instead of two weeks. 

(Ori= ginal message is from Bitcointalk)
On Saturday, January 24th, 2026 at 10:04 PM, Angelo <bymet4@prot= onmail.com> wrote:

- The hardfork activates at block 151200 instead of 150000. The reason is that block 151200 is the start of epoch 75, and this is less prone to error and confusion.
- At block 151200, difficulty is reset to 1 million, to compensate for the artificially high difficulty caused by the CPU miners. This would result in a small mining race for epochs 75 to around 78, where miners with hashpower would find blocks in a matter of seconds. The difficulty will then 4x in the 76th epoch, then again 4x, and it goes up until it naturally finds the 10 minute block interval.

The number 1 million was selected arbitrarily to get the best of both worlds: (1) it won't result in a block storm (as it would if difficulty was reset to 1) and (2) it won't result in very long block intervals. If there weren't any difficulty reset, and difficulty would just be calculated as normal, it'd take around an hour for a block to be found, and this would mean epoch 75 alone would take around three months instead of two weeks. 

(Or= iginal message is from Bitcointalk)
On Thursday, January 22nd, 2026 at 1:37 PM, 'Angelo' via Bitcoin De= velopment Mailing List <bitcoindev@googlegroups.com> wrote:
  • Yes, but you need some test cases = as well.

I added unit test= s that test the modified functions in isolation. Check my changes again.

Testnet4 fork behavior (4 tests):

1. testnet4_min_difficulty_pre_fork= : At height 149,999, min-difficulty blocks ARE allowed (returns powLimit wh= en block is >20min late)
2. testnet4_min_difficul= ty_at_fork: At height 150,000, min-difficulty blocks are NOT allowed (retur= ns previous difficulty instead)
3. testnet4_min_diff= iculty_post_fork: At height 150,001, min-difficulty blocks are NOT allowed.=
4. testnet4_permitted_difficulty_transition: PermittedDif= ficultyTransition() is permissive before fork, strict after.

Other chains unaffected (3 tests):
5. regtest_min_difficulty_unaffected: Regtest still all= ows min-difficulty at any height (nMinDifficultyBlocksForkHeight=3D0 means = no fork)
6. mainnet_min_difficulty_unaffected: Mainn= et unaffected (fPowAllowMinDifficultyBlocks=3Dfalse)
7. Existing ChainParams_TESTNET4_sanity already verifies basic testnet4 pa= ram sanity.
  
Run= ning the proof-of-work tests, I get no errors detected:

=E2=80=8B$ ./build/bin/test_bitcoin -= -run_test=3Dpow_tests  
Running 21 test cases...

*** No errors detected

$ ./build/bin/test_bitcoin --run_test=3D= pow_tests/testnet4*
Running 4 test cases...

*** No errors detect= ed

If you have a= ny other unit tests in mind, let me know, but I think those are enough.

  • Also, rejecting all blocks with CPU difficulty would mean, that the upda= ted network will be stuck from time to time, when ASIC miners will come in,= raise the difficulty, and then go away, leaving the rest of the users with= halted chain.

The network is al= ready in a halted chain, because empty blocks are propagated faster than no= n-empty, and transactions are confirmed most often when ASIC miners include= them in their blocks. When ASIC miners go away with the current model, the= users will have to wait for a much longer time, due to empty blocks.
On Monday, January 19th, 2026 at 12:28 PM, Saint Wenhao <saintwe= nhao@gmail.com> wrote:
> The changes in the code are minimal.
<= br>Yes, but you need some test cases as well.

> We could modify t= he code to not suffer from the temporary 1-hour block interval if needed.
It is not needed. Testnet4 overproduced around 30k blocks, if we coun= t the time between today, and the Genesis Block. If it will take three mont= hs, instead of two weeks, to re-adjust the difficulty, then it wouldn't mat= ter that much, because we already have around 1.5 million more coins, than = we should have today.

Also, rejecting all blocks with CPU difficulty= would mean, that the updated network will be stuck from time to time, when= ASIC miners will come in, raise the difficulty, and then go away, leaving = the rest of the users with halted chain.

pon., 19 sty = 2026 o 00:35 'Angelo' via Bitcoin Development Mailing List <bit= coindev@googlegroups.com> napisa=C5=82(a):
Hello = mailing list.

I have forked Bitcoin Core and modified the code t= o fix testnet4 by disabling the min difficulty rule after block 150,000: https://github.com/bitcoin/bitcoin/compare/master...batmanbytes:bitco= in:testnet4-fix

The changes in the code are minimal. A= s I've written in Bitcointalk:
= I have introduced int nMinDifficultyBlocksForkHeight which is 0 by default in consensus/params.h, only ever used by the CTestNet4Params class. GetNextWorkRequired and PermittedDifficultyTransition are also modified to check whether min difficulty blocks are enabled, and if yes, whether nMinDifficultyBlocksForkHeight is 0 (which would indicate it is not testnet4).

With no other= changes to the code, during the epoch that includes block 150,000 (which a= lready began at block 149,184), we should expect the block interval to incr= ease by roughly sixfold (to about one hour per block). This is because the = effective hashrate would correspond to approximately one-sixth of the diffi= culty. The difficulty increases by about 6x since there are roughly six tim= es more difficulty-1 blocks than blocks at the normal difficulty.

We could modify the code to not suffer from the temporary 1= -hour block interval if needed. I'm just interested to see what you think o= f those changes, so that we can move forward.

--
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@goo= glegroups.com.
To view this discussion visit https://groups.google.com/d/ms= gid/bitcoindev/85djL2Ah0Mh9Appt934138jLRE23gGmaIr96y8q-clEmMa_APPZLerKrrUZN= 524_Diq4pOydQLaEOZ3XBy4-sQIPxYODOHreM5RWuNHILto%3D%40protonmail.com.

--
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 visit https://gr= oups.google.com/d/msgid/bitcoindev/CACgYNOLCvOiHSSpU0m9mGZmjH1JYb1S%2B_XfGp= OFUV%2BgyJsGNKQ%40mail.gmail.com.

--
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 visit https://groups.google.com/d/ms= gid/bitcoindev/-XaFaE2DFoVGKF0rABuGC3vtjLoA2zptE5L-xP1FQg3JPwSdc3-AQJZep7AM= O3dOYpxD-jK3l2DtoHpz9344ZTQ8vwONoNj8HliVHy4C5fU%3D%40protonmail.com.


--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/= IZU5GCk5S4W9V1OE_X77S1ugRZ0wDnvZfYzPNUZBb0vBjCdbImbGmg5gw85WbFRt5pmMIKTc56C= kUtBLiDQA4IpSiBqSLvjMLqU_es6qsa0%3D%40protonmail.com.
--b1=_YLQtp7XoESAJ0pNhG7sVmIyCyyCi8sXE57Y6g8Xbs--