Bitcoin Forum
May 04, 2024, 05:21:32 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 32-bit Timestamp in Block Header?  (Read 300 times)
u87982 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 1


View Profile
October 26, 2017, 04:05:04 AM
 #1

I'm reading Mastering Bitcoin by Andreas Antonopoulos and it says that a 32-bit timestamp is used in the header (4 bytes), but by my calculation, that means that the timestamp will max out in 2106.  What happens after that?  Isn't the Unix epoch time usually represented by 64 bits?

Groovy Code:
println Instant.ofEpochSecond(Math.pow(256,4).toLong())
//Gives 2106-02-07T06:28:16Z
1714800092
Hero Member
*
Offline Offline

Posts: 1714800092

View Profile Personal Message (Offline)

Ignore
1714800092
Reply with quote  #2

1714800092
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714800092
Hero Member
*
Offline Offline

Posts: 1714800092

View Profile Personal Message (Offline)

Ignore
1714800092
Reply with quote  #2

1714800092
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6578


Just writing some code


View Profile WWW
October 26, 2017, 05:20:44 AM
 #2

That is correct, the timestamp's maximum time is in 2106. After that, a lot of things could break. However this is a known problem and it is known almost a century in advance, so we have a lot of time to plan something to do. A hard fork could be done to expand the field to 64 bits or to some other scheme that does not have a maximum. I believe a soft fork could also be done to handle this.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!