Timewarp attack 600 second grace period

Posted by zawy

Jan 7, 2025/23:34 UTC

In the discussion about Bitcoin Improvement Proposals (BIPs), a specific technical concern was raised regarding the way block times are calculated and the logic used within a particular BIP. The confusion stems from an apparent inconsistency in the year references (2017 vs. 2018) and a deeper examination of how block time adjustments should be made to ensure network stability and security. It was highlighted that instead of adhering to the expected calculation of "2014_blocks / 2015_expected_solvetimes" as one might anticipate for adjusting the difficulty across a span of 2015 blocks, the code erroneously implements a "2016_blocks / 2015_times" formula. This discrepancy introduces an imbalance that could potentially affect the network's difficulty adjustment mechanism.

Further analysis suggests that a more accurate approach would involve adjusting the equation to account for both the numerator and denominator simultaneously, proposing an adjusted formula of "(2014+1) / (2015 + 1) = 2015 / 2016," which is intended to more accurately reflect the desired outcome of maintaining a constant difficulty level. The current method, which results in a calculation of "2016 / 2016," inadvertently elevates the difficulty beyond its intended threshold, leading to an increased average block solvetime of 600.6 seconds, contrary to the goal of achieving a consistent pace of block creation.

The conversation also delves into the implications of making adjustments to the network's difficulty setting by introducing a hypothetical scenario involving the subtraction of 600 at both the beginning and end of a given period. Such adjustments are critiqued for potentially setting the difficulty too high, deviating from the objective of keeping it stable. The suggestion of multiplying a certain variable (G) by 3 times 600 is proposed as a solution to recalibrate and achieve the target of solving blocks within a slightly adjusted timeframe of two weeks minus ten minutes, aiming for a more precise and balanced network operation.

Link to Raw Post
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