Delivery-date: Wed, 19 Mar 2025 02:04:13 -0700 Received: from mail-oo1-f64.google.com ([209.85.161.64]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tupLP-0000NW-VS for bitcoindev@gnusha.org; Wed, 19 Mar 2025 02:04:12 -0700 Received: by mail-oo1-f64.google.com with SMTP id 006d021491bc7-5fea6c35b34sf1399364eaf.0 for ; Wed, 19 Mar 2025 02:04:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1742375046; cv=pass; d=google.com; s=arc-20240605; b=Qvn3/LZDBJlKWbKXUKHSuKFwG8tT9TtwvhmmE3/urn9H/AOyG85VbUDGZupKRNwIDr FTkLRrBlJLdxd0OuHBisaDFxEvsGfCt2pviiQpxdlNXdBen64XJqixo7+sRZkzZ0FLku Y055hrGdOYQv0/PGNnr1+/aTDvbl385CaXTbGnJoJmFUj0gGQiaDhJ9ZiSC2nIDzMpeY Nvl0e2OlErng288TEU/kF4B+sKvjKv4QIsFGq62ltZnWj/xg6ZLg0CxIcv3QHj2RDmoK BBjKlS7aqsnnoBkfJjk6YsmpKZP5SCGhZ1RDdN6dL1RCpoTsBghX+ltRJErhHtUq/ege //8g== 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:references:to:cc:in-reply-to:date :subject:mime-version:message-id:from:feedback-id:sender :dkim-signature; bh=54iYqE+mjNctr1ujVzieRueDfZ85MB7SPxfNMj4MQJI=; fh=j7DC2H4l+DqkfAoqH6dAC90WVf8G8tgYBGChxVpPG2k=; b=Yi5gk+z5++nHOGT9z+2Byq7FrwtcIZJvFR3RRwkW22d98Z65kLUlB+bBZvZvqHO6Y7 yQb9o8CWc5+wP6VpqNPQDFuB3JsmajceiE2LEfwFETZ0Eke2ONUnw+95D9/ZE9taUBPk xHHxzMvBxStn2rQ71xNuLqEyU4O77uoOxpqMtreA2QjAnojHHccoa0QyWvJ+kLoLuWRn LFkEAGJu6Q0dbZd6DBPoRn1MHsA3ph9bxRrnjUgj2ae3JquAfCAb61XXMhYk+nWk/ZTd Lyi+aN3Ty+Dw6fxgq/jJul3sYajY+aniIcLL567spmcof5xjOLvudX8pf4JSBamHhHEx b9fg==; darn=gnusha.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@sprovoost.nl header.s=fm2 header.b=faNuuhzi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=tsujiWow; spf=pass (google.com: domain of sjors@sprovoost.nl designates 202.12.124.156 as permitted sender) smtp.mailfrom=sjors@sprovoost.nl; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sprovoost.nl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1742375046; x=1742979846; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:feedback-id:sender:from:to:cc:subject :date:message-id:reply-to; bh=54iYqE+mjNctr1ujVzieRueDfZ85MB7SPxfNMj4MQJI=; b=qUel8dtBkEpmnz+4KRii4mqOj/i8l9Cr8qEO09wzRPVKKAQzmjAD74ZTqwQ/9DiD4K ZrffZlxqx2TPFXkLyH/vLymC5QKe66KZwi4hMagq8qzCzhDoGJ51oigpx/QbJ0UCV/kL cLT34eTcrm7yafg3ie5S/G53pBOVyPYBmAJWoVo0oCoNHQQsbJ3mUc8mdtAcQwE96Gai IS/7H3YmS0qtK4VkA1VOo2Sy+D4jnYxG4xcv3mUwWqVqtxruOU8cI+Q4npvM/AK1J9Uc 4OcQLM/7IZoUst1VqpFxLmvC2EcP7LtBubjEaBeA7KeXDOx6YuiTtgD8EN22fDs0aLmw /t2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742375046; x=1742979846; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:feedback-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=54iYqE+mjNctr1ujVzieRueDfZ85MB7SPxfNMj4MQJI=; b=ZtaC016Hmv5DhXG02yNhEU4sc5nE7QBrwWOP76cTadNMNfYoYEitxAHK40Y4MigcBA eNa5H4DtPeASlIb6XN+3o8VwR1YYuTDL0AZB75+4bzo7RXgAVhUq70iRbvyLGdoRwoU5 ggAk6IlzhE9lswr19U4lFLG0Rf/IE2ETo2NPToA3yR1tB8s7RzPLZnuqjGYt6Hr60/cm AovcKJ90SlV+HTyZTEAnCvkU8zqg/hMV7OuRkwrgUr0ZU+hdJ1lzsq4kRAhgcSJx7M0M d9WeDauHcfzi4rs1r7pGS1sJKtVt4rVjNerRvbkMtEDG9xxQ7zKZZydNODcM8fAbrk7s bEew== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWpVX7caLIekoLqHaUJza4I5wvGHbkShQmCCmb99x9jNFJh35ufgZ9VVy8OGtpZxO182MGOxQ0dAJOh@gnusha.org X-Gm-Message-State: AOJu0Yxb7bmkw587dpRparSmLmX/cp8gei1fSuQ7gfPIyVNFXOoDSMUp 430hbBylXzFyjNbpLzPiCa8iCiboWlp4NuPvcuxoS90Z/ppn9RWh X-Google-Smtp-Source: AGHT+IG28DoA45dAt3WhXnqNO28lV5TUcTW80Ru150Dq0pW/Q2eb2poofuzKD+RxwHsEcPR0W+s7Gw== X-Received: by 2002:a05:6820:7188:b0:601:b6d0:1d6b with SMTP id 006d021491bc7-6021e153f55mr1126375eaf.0.1742375045894; Wed, 19 Mar 2025 02:04:05 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com; h=ARLLPAIT0OMoDH52ziBmuMJTEmE5LirYXaNIUAj4o0dIFski4g== Received: by 2002:a4a:d68f:0:b0:600:3d56:c122 with SMTP id 006d021491bc7-601d87b8e98ls1429243eaf.0.-pod-prod-04-us; Wed, 19 Mar 2025 02:04:03 -0700 (PDT) X-Received: by 2002:a05:6808:3991:b0:3f6:7b56:d10d with SMTP id 5614622812f47-3fead5e9a5cmr1347450b6e.33.1742375043179; Wed, 19 Mar 2025 02:04:03 -0700 (PDT) Received: by 2002:a05:6808:394a:b0:3fa:da36:efcd with SMTP id 5614622812f47-3feac90f881msb6e; Wed, 19 Mar 2025 01:32:49 -0700 (PDT) X-Received: by 2002:a05:6e02:1a47:b0:3d3:ff09:432c with SMTP id e9e14a558f8ab-3d586b24451mr15006055ab.4.1742373168874; Wed, 19 Mar 2025 01:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742373168; cv=none; d=google.com; s=arc-20240605; b=JuZYmZINHL9W7LjkzNmqw0Ip3Hr/6cLwUrGDbumJGRXtA1X9QX/+V3jq/MkrBFz96j uH72f836WjcmGoO4u2KVZRh03qI8lzo++CTbK0zmR/MxKMeE86xRzWoZjz96uZwsSP5C mWBE6wEEBjuenufADIxXevX6nqXjuVRrA6YptUTc0kumgSUvebC57qFsZG3LGBFAWzpX e6D5H4ag1NeRifZAvr49DEOQyNeTj8wsJo20qs/IeWxhmwWDtSrEDcxrx0GLp0iPFTPs nLzgNxutvMNB6ygy7/6PykSqNiPHXBhGmIim/RLPWPUbNMMzAFxDMNKit/dr/oSqp/0b vxdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:feedback-id:dkim-signature:dkim-signature; bh=c8n0kXRr6XMBbqg5IT0cwhsYoDc/q9I8tvnbUXOlpr8=; fh=Ezg9rvKAYI/RPBOu7OhgTfcghRUkQs7xOsWPBEcGsP8=; b=dE3RLOPQNkvsglKp5BrdGcuhwOHZn4e33C0beQe08pgFNkF6rYHAv9aM8cGmb698I3 DB6G7unH6CA/xBRWksGvbTA8ODKZhqP4c+5irtMegKTEneFcyVOQ0ixMnBmCYSwjGe/j LkS7eKAUshR78jTwslODMtLv8A2Yk10chXfdvSkNW8CfwVGEK2rLaSQPAllsf6E+KCqD W/cuCIdjpsoDmuXdmwRQ86QOxUWcwLZ6CAPXvpaVUE7kjMupnuBqaObjs1+D9XKe6/mH 5IAkmXaOYNrH9Tuo5YmYLx2nBbjyL7SQ27SWS95re7X3iC0e4n5BqTrLx5SGl8IpltZt 35FQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@sprovoost.nl header.s=fm2 header.b=faNuuhzi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=tsujiWow; spf=pass (google.com: domain of sjors@sprovoost.nl designates 202.12.124.156 as permitted sender) smtp.mailfrom=sjors@sprovoost.nl; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sprovoost.nl Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com. [202.12.124.156]) by gmr-mx.google.com with ESMTPS id 8926c6da1cb9f-4f26372bbf4si544891173.1.2025.03.19.01.32.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Mar 2025 01:32:48 -0700 (PDT) Received-SPF: pass (google.com: domain of sjors@sprovoost.nl designates 202.12.124.156 as permitted sender) client-ip=202.12.124.156; Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 138F92540122; Wed, 19 Mar 2025 04:32:48 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 19 Mar 2025 04:32:48 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeegkeeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhephffktgggufffjgevvfhfofesrgdtmherhhdt vdenucfhrhhomhepufhjohhrshcurfhrohhvohhoshhtuceoshhjohhrshesshhprhhovh hoohhsthdrnhhlqeenucggtffrrghtthgvrhhnpedvieehheekteefgeehudehieffueet udefheevfeehfedtffffheduheefgfduieenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehsjhhorhhssehsphhrohhvohhoshhtrdhnlhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsghithgtoh hinhguvghvsehgohhoghhlvghgrhhouhhpshdrtghomhdprhgtphhtthhopegurghrohhs ihhorhesphhrohhtohhnmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: ie5e042df:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Mar 2025 04:32:47 -0400 (EDT) From: Sjors Provoost Message-Id: <2064B7F4-B23A-44B0-A361-0EC4187D8E71@sprovoost.nl> Content-Type: multipart/alternative; boundary="Apple-Mail=_F544C97F-768F-426F-A775-453156837FEE" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: [bitcoindev] Unbreaking testnet4 Date: Wed, 19 Mar 2025 09:32:36 +0100 In-Reply-To: Cc: Antoine Poinsot To: 'Antoine Poinsot' via Bitcoin Development Mailing List References: X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Original-Sender: sjors@sprovoost.nl X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@sprovoost.nl header.s=fm2 header.b=faNuuhzi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=tsujiWow; spf=pass (google.com: domain of sjors@sprovoost.nl designates 202.12.124.156 as permitted sender) smtp.mailfrom=sjors@sprovoost.nl; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sprovoost.nl 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 (/) --Apple-Mail=_F544C97F-768F-426F-A775-453156837FEE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Antoine Poinsot wrote: > The given rationale for a difficulty reset was to let developers occasion= ally mine blocks on their laptop. But you cannot have your cake and eat it = too: either the network is permissionless (PoW) or you assign identities an= d privileges to some (Signet). By trying to do both at the same time testne= t4 created a loophole for abuse. As a result it failed on both count: it ne= ither mimics mainnet nor allows developers to mine active blocks on their l= aptop. Let me clarify why developers can't mine on their own laptop with testnet4. The way you would do that is to move your computer clock forward by 20 minu= tes (or use faketime), at which point the difficulty drops to 1. You would = then mine your (presumably non-standard transaction) and broadcast it to th= e network. This is also the strategy used to acquire more testnet coins if you don't h= ave an ASIC and don't want to use a faucet. On testnet3 the latter wasn't very productive because at height 4 million t= he block subsidy is under 10k sats. But on testnet4 every block yields 50 tBTC. So several people try to mine s= uch a block, leading to the many parallel forks.=20 If you're a developer trying to mine a non-standard transaction, you have t= o be fast, well connected and lucky to be the first block picked up by the = rest of the network. But why mine just one if you can mine many? Some CPU miners are now mining as many testnet4 blocks as they can by bumpi= ng their clock 20 minutes not just once, but several times in a row. Until = they run against the limit other nodes put on how far a block can be in the= future, namely two hours. So when a real difficulty block appears, you may= see 5 blocks on top of it instantly. This behavior is even worse from the point of view of a developer trying to= mine a non-standard transaction. Because the tip of your node is always go= ing to be about two hours in the future, when you mine on top of that by mo= ving your clock even further, it will be rejected by your peers. So this use case of CPU mining non-standard transactions is simply dead as = long as this behaviour exists. We might as well reduce code complexity. That said, testnet will never mimic mainnet. It has no value, or worse, ver= y little value. So the incentives are different, which leads to different b= ehavior. That's a whack-a-mole game, which we should probably not dedicate = time to. - Sjors =20 --=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/= 2064B7F4-B23A-44B0-A361-0EC4187D8E71%40sprovoost.nl. --Apple-Mail=_F544C97F-768F-426F-A775-453156837FEE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="UTF-8" Antoine Poinsot wrote:
The given rationale for a difficulty reset was to let developers=20 occasionally mine blocks on their laptop. But you cannot have your cake=20 and eat it too: either the network is permissionless (PoW) or you assign identities and privileges to some (Signet). By trying to do both at the same time testnet4 created a loophole for abuse. As a result it failed=20 on both count: it neither mimics mainnet nor allows developers to mine=20 active blocks on their laptop.

=
Let me clarify why developers can't mine on their own laptop wit= h testnet4.

The way you would do that is to move y= our computer clock forward by 20 minutes (or use faketime), at which point = the difficulty drops to 1. You would then mine your (presumably non-standar= d transaction) and broadcast it to the network.

Th= is is also the strategy used to acquire more testnet coins if you don't hav= e an ASIC and don't want to use a faucet.

On= testnet3 the latter wasn't very productive because at height 4 million the= block subsidy is under 10k sats.

But on testnet4 = every block yields 50 tBTC. So several people try to mine such a block, lea= ding to the many parallel forks. 

If you're a= developer trying to mine a non-standard transaction, you have to be fast, = well connected and lucky to be the first block picked up by the rest of the= network.

But why mine just one if you can mine ma= ny?

Some CPU miners are now mining as many testnet= 4 blocks as they can by bumping their clock 20 minutes not just once, but s= everal times in a row. Until they run against the limit other nodes put on = how far a block can be in the future, namely two hours. So when a real diff= iculty block appears, you may see 5 blocks on top of it instantly.

This behavior is even worse from the point of view of a de= veloper trying to mine a non-standard transaction. Because the tip of your = node is always going to be about two hours in the future, when you mine on = top of that by moving your clock even further, it will be rejected by your = peers.

So this use case of CPU mining non-standard= transactions is simply dead as long as this behaviour exists. We might as = well reduce code complexity.

That said, testnet wi= ll never mimic mainnet. It has no value, or worse, very little value. So th= e incentives are different, which leads to different behavior. That's a wha= ck-a-mole game, which we should probably not dedicate time to.
- Sjors


 

--
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/= 2064B7F4-B23A-44B0-A361-0EC4187D8E71%40sprovoost.nl.
--Apple-Mail=_F544C97F-768F-426F-A775-453156837FEE--