Unbreaking testnet4

Posted by Anthony Towns

May 12, 2025/05:21 UTC

The email discusses challenges and potential solutions related to transaction (tx) value errors in blockchain operations, specifically focusing on issues that arise when input or output values of a transaction fall outside the predefined range of 0-21 million. These errors can occur under several conditions, including when a single input or the sum of inputs to a transaction, a single output, the sum of outputs from a single transaction, or the fee paid by a single transaction, exceed the allowed range. Additionally, it addresses the problem of block fees going beyond this range.

A proposed solution to these issues involves adjusting the initial premine and halving time to keep the total supply under control, thus preventing the aforementioned errors. The suggestion includes setting the initial premine at half the total supply and reducing the halving time accordingly, with specific figures provided for different scenarios. For instance, having a premine of 10.5 million with a halving interval of 105,000 blocks, or adjusting the premine to 18.375 million with halvenings every six months, are among the options discussed. Another approach mentioned is premining almost the entire supply to instantly shift rewards to transaction fees post-premine, highlighting the importance of maintaining a mechanism for permissionless, anonymous, and low-latency coin acquisition for testing purposes.

Moreover, the email outlines a technical framework for implementing a premined testnet, detailing steps from defining the chain with a new genesis block to distributing the premine among developers, wallet maintainers, and others after mining begins. This approach aims at making the testnet more work-intensive than existing ones, requiring a significant amount of hashing power to reset, which would come at a considerable cost in terms of lost mainnet block rewards. It also touches upon the necessity of a hard fork to prevent compatibility issues between old and new clients due to discrepancies in expected block discovery times.

In discussing the pros and cons of different premine strategies, the email suggests that creating a massive initial block with a singular utxo (or one for each premine recipient) could be more efficient than the traditional method, which burdens users with downloading and validating thousands of blocks. The term "premine" is clarified to encompass any scenario where the creators of a chain have the opportunity to claim or distribute coins before the general public can mine new ones.

For further details, the author references a GitHub link containing code modifications that would enable the outlined changes: https://github.com/ajtowns/bitcoin/commits/202505-premine/.

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