Bitcoin Forum
November 06, 2024, 02:40:39 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 32-bit Timestamp in Block Header?  (Read 319 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
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


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!