public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* Re: [bitcoin-dev] Year 2038 problem and year 2106 chain halting
@ 2021-10-17  7:24 vjudeu
  0 siblings, 0 replies; 15+ messages in thread
From: vjudeu @ 2021-10-17  7:24 UTC (permalink / raw)
  To: ZmnSCPxj; +Cc: Bitcoin Protocol Discussion

> Then starting at Unix Epoch 0x80000000, post-softfork nodes just increment the timestamp by 1 on each new block.

It is possible to go even faster. The fastest rate is something like that, if you assume the time in the Genesis Block is zero:

0 1 2 2 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 6 ...

Then you can increment timestamps once per 6 blocks, that means x3600 increase, but then the difficulty is always multiplied by four, so you have to increase time once per difficulty change to keep it on real level, then it will wave between being multiplied by 4 and by 0.25.

On 2021-10-17 01:23:24 user ZmnSCPxj <ZmnSCPxj@protonmail.com> wrote:
> Good morning vjudeu,

> > What happens if a series of blocks has a timestamp of 0xFFFFFFFF at the appropriate time?
>
> The chain will halt for all old clients, because there is no 32-bit value greater than 0xffffffff.
>
> > 1.  Is not violated, since "not lower than" means "greater than or equal to"
>
> No, because it has to be strictly "greater than" in the Bitcoin Core source code, it is rejected when it is "lower or equal to", see:https://github.com/bitcoin/bitcoin/blob/6f0cbc75be7644c276650fd98bfdb6358b827399/src/validation.cpp#L3089-L3094

Then starting at Unix Epoch 0x80000000, post-softfork nodes just increment the timestamp by 1 on each new block.
This just kicks the can since that then imposes a limit on the maximum number of blocks, but at least the unit is now ~10 minutes instead of 1 second, a massive x600 increase in the amount of time we are forced to hardfork.

On the other hand, this does imply that the difficulty calculation will become astronomically and ludicrously high, since pre-softfork nodes will think that blocks are arriving at the rate of 1 per second, so ...

Regards,
ZmnSCPxj




^ permalink raw reply	[flat|nested] 15+ messages in thread
* [bitcoin-dev] Year 2038 problem and year 2106 chain halting
@ 2021-10-13 19:16 vjudeu
  2021-10-15 15:27 ` James Lu
  2021-10-15 15:44 ` yanmaani
  0 siblings, 2 replies; 15+ messages in thread
From: vjudeu @ 2021-10-13 19:16 UTC (permalink / raw)
  To: bitcoin-dev

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

It seems that Bitcoin Core will stop working in 2038 because of assertion checking if the current time is non-negative. Also, the whole chain will halt after reaching median time 0xffffffff in 2106. More information: https://bitcointalk.org/index.php?topic=5365359.0
I wonder if that kind of issues are possible to fix in a soft-fork way.

[-- Attachment #2: Type: text/html, Size: 362 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-10-18  2:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17  7:24 [bitcoin-dev] Year 2038 problem and year 2106 chain halting vjudeu
  -- strict thread matches above, loose matches on Subject: below --
2021-10-13 19:16 vjudeu
2021-10-15 15:27 ` James Lu
2021-10-17  8:19   ` Kate Salazar
2021-10-17 22:38   ` damian
2021-10-15 15:44 ` yanmaani
2021-10-15 22:22   ` vjudeu
2021-10-17 15:14     ` yanmaani
2021-10-17 15:46       ` Kate Salazar
2021-10-18  2:55         ` yanmaani
2021-10-15 23:01   ` ZmnSCPxj
2021-10-16  9:06     ` vjudeu
2021-10-16 20:37       ` David Bakin
2021-10-16 21:34         ` Kate Salazar
2021-10-16 23:23       ` ZmnSCPxj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox