bitcoin-dev

The Future of Bitcoin Testnet

The Future of Bitcoin Testnet

Original Postby Andrew Poelstra

Posted on: April 1, 2024 14:20 UTC

In a recent discussion on the Bitcoin Development Mailing List, Fabian from rust-bitcoin touched upon the idea of refining the block parameter structure to simplify handling testnet's difficulty target.

This proposed change aims at mitigating the complexities and limitations tied with the current special-case logic designed for testnet, which involves a difficulty-1 target. By introducing an extra parameter or utilizing an existing one within the blockparams structure, the process could become more straightforward. This adjustment is seen as a way to reduce potential debates (often referred to as "bikeshedding") regarding the retargeting window, given that the existing setup presents a balance between ensuring code functionality and responding to significant drops in block production rates without being susceptible to manipulations within the 2-hour timestamp-faking window.

Furthermore, the proposal suggests revising the current reset rule to address its interaction with the standard difficulty retarget mechanism. After reviewing Jameson's post, which included detailed graphs of difficulty changes, a specific recommendation was made to extend the reset threshold from 20 minutes to 6 hours. This change would effectively place the threshold beyond the miners' capacity to manipulate timestamps while also setting it at a point unlikely to be reached inadvertently. Additionally, the proposal includes adjusting the reset difficulty from 1 to 1MM, aligning it more closely with the historical "normal" testnet difficulty. This adjustment seeks to ensure that the reset rule would only activate under extreme circumstances where mining activity ceases altogether.

Andrew Poelstra, Director of Research at Blockstream, shared these insights through an email, highlighting the potential benefits of the proposed adjustments in streamlining the treatment of testnet difficulty targets while addressing the challenges posed by the existing logic. More information about Poelstra and his work can be found on his personal webpage (Andrew Poelstra's Webpage).