Why are there two byte sizes for timestamps in the Bitcoin protocol?

8

2

Reading Block Headers on the Bitcoin wiki, I learned that the timestamp in a block header is four bytes, and the timestamp in the "version" message is eight bytes. Why are there two sizes, and why isn't it more consistent?

Enter image description here

Ning

Posted 2013-12-29T12:52:33.613

Reputation: 2 171

This is actually a good question.Steven Roose 2013-12-29T17:33:21.460

Answers

4

This was discussed in the mailing list a while back: http://sourceforge.net/mailarchive/message.php?msg_id=30824341

I'm guessing 32-bit timestamp was used by Satoshi in the original client and the 64-bit timestamp was introduced later to avoid timestamp overflow.

We may need to change (hardfork) the old 32-bit timestamp fields to 64-bit at some point. See https://en.bitcoin.it/wiki/Hardfork_Wishlist

bitnodes

Posted 2013-12-29T12:52:33.613

Reputation: 121