bitcoin-dev
Combined summary - Year 2038 problem and year 2106 chain halting
The Bitcoin development mailing list has been actively discussing the issue of timestamp overflow in Bitcoin transactions.
One proposed solution involves introducing a new variable 'k' to represent the most significant 32 bits of a 64-bit timestamp. This 'k' value would be stored in all cases where time is used to avoid confusion. However, there are concerns that skipping 'k' could cause problems with OP_CHECKLOCKTIMEVERIFY or nLockTime. To address these concerns, it is suggested to add the 'k' value to the coinbase transaction and combine the lower bits from the block header and higher bits from the coinbase transaction.Additionally, it may be necessary to add the 'k' value to the nLockTime field in a similar way as transaction witness in SegWit. The same approach is needed for each OP_CHECKLOCKTIMEVERIFY, and pushing high 32 bits before the currently-used value may solve that. While this proposal requires a hard fork, it is not one that needs to take effect for many years.Another discussion on the mailing list focused on the potential functionality issues of Bitcoin Core after the year 2038. It was noted that if the current time is non-negative, the software will stop working due to assertion checking. Furthermore, the entire chain will halt once it reaches median time 0xffffffff in 2106. Suggestions were made to fix these issues in a soft-fork manner instead of a hard fork.There were also discussions regarding the increment of timestamps in new blocks by post-softfork nodes. It was suggested that the fastest rate can be achieved by incrementing timestamps once per 6 blocks, resulting in a x3600 increase. However, difficulty calculations need to account for the time increase once per difficulty change to maintain a realistic level. The context also mentions what happens if a series of blocks has a timestamp of 0xFFFFFFFF at the appropriate time, which would cause the chain to halt for all old clients.The Bitcoin-dev mailing list also highlighted a potential issue known as the "year 2038 problem" where the chain may halt for all old clients due to the lack of a 32-bit value greater than 0xffffffff. Solutions were proposed, such as adding a 64-bit timestamp to the coinbase transaction and using a similar scheme for nLockTime. However, changing the timestamp datatype could cause hardware incompatibility and require a hard fork.In summary, the discussions on the Bitcoin development mailing list revolve around addressing the issue of timestamp overflow in Bitcoin transactions. Various proposals and solutions have been suggested, including introducing a new variable 'k', combining block header and coinbase transaction bits, and adding timestamps to the nLockTime field. There are also concerns about the functionality of Bitcoin Core after the year 2038 and suggestions for fixing these issues through soft forks.