BitcoinTalk

What could be the transition plan to Y2038 compliant Bitcoin? (it already is)

BitcoinTalk
#1
From:
throughput
Subject:
What could be the transition plan to Y2038 compliant Bitcoin? (it already is)
Date:
Or will it suddenly die then?
BitcoinTalk
#2
From:
throughput
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
As far as I can read C++, Bitcoin implementation stores timestamps as unsigned integers
and block timestamp is a part of binary block format, of which a hash is computed.
Since blocks are chained and the previous block is referenced in the current by it's hash,
you cannot simply recompile the client with 64bit timestamps.
You will need to recompute the whole chain, is that an option?
Or we need to propose some transition plan to another binary block format.

Or, I am wrong and everybody should relax.

What do you think?
BitcoinTalk
#3
From:
martin
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
I believe you would need a client which understood the old time format and the new one. At a certain block number all clients would switch over to the new timestamp system, old blocks would stay as they are, people with old versions of the software would suddenly find that they could not submit any transactions or create any blocks.
BitcoinTalk
#4
From:
throughput
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
I believe you would need a client which understood the old time format and the new one. At a certain block number all clients would switch over to the new timestamp system, old blocks would stay as they are, people with old versions of the software would suddenly find that they could not submit any transactions or create any blocks.

Great.

Everybody, how do you think, is it time to bother on implementing that plan or we should wait for something to happen?
BitcoinTalk
#5
From:
lachesis
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
Timestamps are already stored as uint64s. At least, that's how they're transmitted on the network.
BitcoinTalk
#6
From:
lfm
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
Timestamps are already stored as uint64s. At least, that's how they're transmitted on the network.

main.cpp:                unsigned int nTime;


in the block headers. Thats 32 bits if you don't know.

BitcoinTalk
#7
From:
jgarzik
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:

It seems to be a crazy mix...

CWalletKey(main.h): 64-bit
Rest of main.h, including in-memory block/txn objects: 32-bit
Internal main.cpp calculations: 64-bit
Network(version): 64-bit
Network(addr): 32-bit
Network(getblock): 32-bit
Network(submitorder): 32-bit

At a minimum, there are plenty of 32-bit time variables that clearly need changing to 64-bit.
BitcoinTalk
#8
From:
MoonShadow
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
I'm not a programmer, but I have doubts that any of those 32 bit variables are subject to rolling over antime near 2038.  My understanding, however limited it may be, is that the timestamp of the blockchain is relative only to it's position within the chain, and not subject to any such limitations.  I'm sure that the two week difficulty calculations require an accurate count of seconds, but at worst, that would just throw off the calculations for the two weeks around the rollover in 2038.  And since there is a limit to just how much the difficulty may change in any two week period, even that isn't particularly crucial.

BitcoinTalk
#9
From:
MoonShadow
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
The problem with the time stamps, is a unix time stamp as a 32 bit integer WILL overflow in 2038. I am a programmer, but you can find more info on it by googling unix time problem or 2038 Smiley

I understand the Y2038 problem from a layman's perspective.  My point was that, I doubted that a Y2038 problem exists within the structure of bitcoin.  Since the timestamp is relative only to a particular position within the blockchain, there is no reason that a client should require an accurate timestamp within the block.  And then, what would that be?  GMT?  I'm pretty sure that my client is doing fine with local time.  If that could be getting any successful blocks rejected, let me know, please.
BitcoinTalk
#10
From:
satoshi
Subject:
Re: What could be the transition plan to Y2038 compliant Bitcoin?
Date:
unsigned int is good until 2106.  Surely the network will have to be totally revamped at least once by then.

There should not be any signed int.  If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int.