Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: cellard on November 21, 2018, 05:43:38 PM



Title: 2038 year problem: does it have an impact on bitcoin?
Post by: cellard on November 21, 2018, 05:43:38 PM
https://en.wikipedia.org/wiki/Year_2038_problem

Can this have an impact on something bitcoin related? maybe some wallet devices like trezors or whatever? machines running the nodes? block explorers? any other ideas that could be related or it will be irrelevant?

https://upload.wikimedia.org/wikipedia/commons/e/e9/Year_2038_problem.gif


Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: ABCbits on November 21, 2018, 06:26:20 PM
Bitcoin won't face this problem in 2038 as bitcoin use unsigned 32-bit/4-byte int

But i'm not sure if all client or wallet uses same data format or already migrate to longer timestamp format (such as unsigned 64-bit/8-byte int)


Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: HeRetiK on November 21, 2018, 08:35:59 PM
Bitcoin won't face this problem in 2038 as bitcoin use unsigned 32-bit/4-byte int

Yep, in the case of Bitcoin it will be a year 2106 problem [1].

I don't think migrating to another dataformat will be of much trouble though. If other software is able to mitigate the year 2038 problem in time, so will Bitcoin.

[1] https://en.bitcoin.it/wiki/Block_timestamp


Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: pooya87 on November 22, 2018, 05:06:28 AM
FWIW, something that can have a simple solution is not a problem. when you see 1542862977 we all agree that it represents "Thursday, November 22, 2018 5:02:57 AM". but also we can all agree that it represents "Thursday, November 22, 2118 5:02:57 AM". in other words a simple condition can fix the problem:
Code:
if (block_height > 5,100,000) then Add100Years
5.1 mil is the approximate number of blocks in 88 years from now (in 2106)


Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: cellard on November 22, 2018, 04:56:03 PM
Bitcoin won't face this problem in 2038 as bitcoin use unsigned 32-bit/4-byte int

Yep, in the case of Bitcoin it will be a year 2106 problem [1].

I don't think migrating to another dataformat will be of much trouble though. If other software is able to mitigate the year 2038 problem in time, so will Bitcoin.

[1] https://en.bitcoin.it/wiki/Block_timestamp

Yeah these things are always a letdown. Some make it sound as if the end of the world is coming. I remember in 1999 everyone was talking about "the 2000 effect" and they even made some movies about it. There was a Simpsons special as well, with planes crashing and toasters becoming evil robots. I was pumped to see what would happen as a kid.

https://en.wikipedia.org/wiki/Year_2000_problem

Of course nothing happened, because there is always planning ahead. I guess the most interesting far future situation in Bitcoin will be the 2140, all coins mined scenario. I would really like to see how things are by then.


Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: Dasha88fed on November 22, 2018, 05:10:39 PM
FWIW, something that can have a simple solution is not a problem. when you see 1542862977 we all agree that it represents "Thursday, November 22, 2018 5:02:57 AM". but also we can all agree that it represents "Thursday, November 22, 2118 5:02:57 AM". in other words a simple condition can fix the problem:
Code:
if (block_height > 5,100,000) then Add100Years
5.1 mil is the approximate number of blocks in 88 years from now (in 2106)
This is cool, I did not think that a solution to this problem would be found so quickly. When I read that Bitcoin might face the problem of 2038, it began to get a little nervous, but now I understand that not everything is as bad as it seems at first glance.


Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: jnano on November 23, 2018, 09:36:48 PM
Some make it sound as if the end of the world is coming. I remember in 1999 everyone was talking about "the 2000 effect" and they even made some movies about it.

It was a bigger problem then. They weren't worried about desktop software, but rather, old computing tech in places like banks or power stations.
Bitcoin? Let's assume there are a few things to fix. I'm sure the Bitcoin ecosystem would manage to do it in less than 20 years. :)



Title: Re: 2038 year problem: does it have an impact on bitcoin?
Post by: my dream2021 on November 28, 2018, 04:29:00 PM
Can this have an impact on something bitcoin related? maybe some wallet devices like trezors or whatever? machines running the nodes? block explorers? any other ideas that could be related or it will be irrelevant?...............
This situation non-issue on Bitcoin like  etotheipi (https://bitcointalk.org/index.php?action=profile;u=31239) say:

This is basically a non-issue.  Just interpret the timestamp as the lower 32-bits of an infinite timestamp.  It "wraps around" every 138 years, and it's pretty easy to figure out how many times it's wrapped since Bitcoin was created, so it's easy to convert the stored 32-bit value, into your own 64-bit value.