Unbreaking testnet4

Posted by Sjors Provoost

Mar 19, 2025/08:32 UTC

In a recent discussion on the Bitcoin Development Mailing List, Antoine Poinsot offered insights into the challenges developers face when attempting to mine on their own laptops using testnet4. He explained that the conventional method for mining with limited resources involves adjusting the computer's clock forward by 20 minutes or employing faketime. This adjustment causes the network difficulty to drop to its lowest level, allowing for the mining of blocks, including non-standard transactions, which are then broadcasted to the network. This technique also serves as a strategy for acquiring more testnet coins without needing an ASIC or relying on faucets.

However, Poinsot pointed out that while this approach might have been somewhat viable on testnet3, it has become significantly less effective on testnet4. On testnet3, the reward for mining a block after height 4 million was less than 10k sats, making the effort scarcely worthwhile. In contrast, testnet4 offers a substantial increase in block rewards, dispensing 50 tBTC per block, which has led to a surge in mining activity. Consequently, many CPU miners have begun mining multiple blocks by repeatedly advancing their clocks, not just once but several times in succession, until they encounter the restriction placed by other nodes on how far into the future a block can be, capped at two hours.

This aggressive mining tactic results in immediate complications for developers aiming to mine a single non-standard transaction. Given that the network's tip is constantly set around two hours ahead, any attempt to mine atop this by further advancing the clock would lead to rejection from peer nodes. Therefore, the utility of CPU mining for non-standard transactions on testnet4 is essentially nullified as long as this behavior continues.

Poinsot concludes by reflecting on the fundamental differences between testnet and mainnet environments. He notes that testnet will never accurately replicate the mainnet due to its inherently low or negligible value, leading to distinct behaviors and incentives. As such, dedicating time to address these issues might not be the best allocation of resources, suggesting a possible shift away from complexity in code related to testnet environments.

Link to Raw Post

Thread Summary (32 replies)

Mar 18 - Jul 5, 2025

Message History

33 messages

Antoine PoinsotOriginal Post
Mar 18, 2025/14:29 UTC
Antoine Poinsot
Mar 18, 2025/21:34 UTC
Melvin Carvalho
Mar 19, 2025/07:01 UTC
Sjors Provoost
Mar 19, 2025/07:56 UTC
Sjors Provoost
Mar 19, 2025/08:32 UTC
Garlo Nicon
Mar 19, 2025/08:43 UTC
Melvin Carvalho
Mar 19, 2025/09:11 UTC
bitcoindevml.void
Mar 19, 2025/17:03 UTC
Melvin Carvalho
Mar 20, 2025/18:58 UTC
Murch
Mar 21, 2025/21:20 UTC
Garlo Nicon
Mar 24, 2025/07:00 UTC
Murch
Mar 24, 2025/12:25 UTC
Antoine Poinsot
Mar 24, 2025/13:57 UTC
Saint Wenhao
Mar 31, 2025/07:32 UTC
Saint Wenhao
Apr 27, 2025/11:44 UTC
Jameson Lopp
Apr 27, 2025/22:49 UTC
Saint Wenhao
Apr 28, 2025/06:11 UTC
Jameson Lopp
Apr 28, 2025/10:45 UTC
pithosian
Apr 28, 2025/11:48 UTC
emsit
Apr 28, 2025/11:59 UTC
Sjors Provoost
Apr 28, 2025/12:47 UTC
Saint Wenhao
Apr 28, 2025/13:33 UTC
Saint Wenhao
Apr 28, 2025/18:15 UTC
Sjors Provoost
Apr 28, 2025/18:50 UTC
Greg Maxwell
May 5, 2025/22:25 UTC
Saint Wenhao
May 6, 2025/11:48 UTC
Garlo Nicon
May 9, 2025/13:07 UTC
Anthony Towns
May 12, 2025/05:21 UTC
pithosian
May 12, 2025/12:05 UTC
Saint Wenhao
May 12, 2025/18:17 UTC
pithosian
May 12, 2025/20:19 UTC
Saint Wenhao
May 17, 2025/05:11 UTC
Garlo Nicon
Jul 5, 2025/04:31 UTC
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project.

Give Feedback