Suggestion: Solve year 2106 problem by taking timestamps mod 2^32 [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2020-10-16T21:58:20+00:00


Summary:

In a Bitcoin-dev email thread, user yanmaani has suggested an amendment to the timestamp rules in the Bitcoin network. Currently, there are certain rules in place for block timestamps - they must not be lower than the median of the last 11 blocks, greater than the current time plus two hours, or greater than 2^32, which would cause Bitcoin to "die" around February 7th, 2106.Yanmaani's proposed solution involves treating block headers as having a 64-bit timestamp. The requirement is that the difference between the timestamp and the median timestamp of the past 11 blocks should be at least one and at most 2^32. To achieve this, the higher 32 bits of the timestamp are set equal to the median of the past 11 blocks on deserialization. If this violates the rule mentioned above, it is set one higher.User Pieter believes that Yanmaani's solution is in line with what will eventually be addressed and thinks it may be worth considering as a BIP (Bitcoin Improvement Proposal) in the future.Currently, Bitcoin faces a problem with its timestamp rules. There are restrictions that prevent the block timestamp from being lower than the median of the last 11 blocks, greater than the current time plus two hours, or greater than 2^32. This means that if no timestamp below 2^32 exceeds the median of the last 11 blocks, Bitcoin would "die" on or about February 7, 2106.One proposed solution to this problem is to change the rules so that the block timestamp plus k*2^32 may not be lower than the median of the last 11 blocks and may not be greater than the current time plus two hours. It is important to note that k is an integer with the same value for the calculations of both Rule 1 and Rule 2. However, this solution would cause a hardfork in 2106, approximately 85.5 years from now, and it is expected that 95% of nodes would have updated by then.Another proposed solution is to use 64-bit timestamps. However, this would break compatibility with other software that has specific expectations of header fields, such as ASICs' firmware. Furthermore, this solution would cause a hardfork before the date of timestamp overflow, making it less appropriate.It remains to be seen whether Yanmaani's idea is worth considering as a BIP. This discussion highlights the challenges faced by Bitcoin in relation to its timestamp rules and the potential solutions that could be explored in order to address these issues.


Updated on: 2023-08-02T02:41:11.701704+00:00