Author

Topic: What could be the transition plan to Y2038 compliant Bitcoin? (it already is) (Read 10906 times)

sr. member
Activity: 339
Merit: 250
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.

lol. This made me laugh. Yes, please point these out in the next 25 years. If you're considerate, make it 24 so he has a year to make the change Cheesy

+1 on the laugh
full member
Activity: 158
Merit: 100
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.

I have a better idea for timestamps, whatever their underlying type is, for the purposes of calculating the hash,
convert them to the string representation of the number of seconds since the epoch (I hope that moment will not change
after a century).
full member
Activity: 210
Merit: 105
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.
Why are we using uint64 in Version but 32-bit integers in everything else?
founder
Activity: 364
Merit: 7423
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.
legendary
Activity: 1708
Merit: 1010
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.
legendary
Activity: 1708
Merit: 1010
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.

legendary
Activity: 1596
Merit: 1100

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.
lfm
full member
Activity: 196
Merit: 104
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.

full member
Activity: 210
Merit: 105
Timestamps are already stored as uint64s. At least, that's how they're transmitted on the network.
full member
Activity: 158
Merit: 100
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?
full member
Activity: 150
Merit: 100
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.
full member
Activity: 158
Merit: 100
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?
full member
Activity: 158
Merit: 100
Or will it suddenly die then?
Jump to: