From: Pieter Wuille <bitcoin-dev@wuille.net>
To: "yanmaani@cock.li" <yanmaani@cock.li>,
Bitcoin Protocol Discussion
<bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Suggestion: Solve year 2106 problem by taking timestamps mod 2^32
Date: Fri, 16 Oct 2020 21:58:20 +0000 [thread overview]
Message-ID: <Xi32cdJACwsdtwKU2BJAwknUoFDEmJyi5SomLC8bMEyVOnMqEqrG9y5yQlVeIkArwuMM9avcIxtKAlOl6WWHTaSuoz7kwSxzKjCj84NyKP0=@wuille.net> (raw)
In-Reply-To: <42c7e76c023b403a9e99d29a1836b53e@cock.li>
On Saturday, September 19, 2020 5:36 AM, yanmaani--- via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
> Currently, Bitcoin's timestamp rules are as follows:
>
> 1. The block timestamp may not be lower than the median of the last 11
> blocks'
>
> 2. The block timestamp may not be greater than the current time plus two
> hours
>
> 3. The block timestamp may not be greater than 2^32 (Sun, 07 Feb 2106
> 06:28:16 +0000)
>
> Thus, Bitcoin will "die" on or about 2106-02-07, when there is no
> timestamp below 2^32 that exceeds the median of the last 11 blocks.
>
> If the rules were changed to the following, this problem would be
> solved:
>
> 4. The block timestamp plus k*2^32 may not be lower than the median of
> the last 11 blocks'
>
> 5. The block timestamp plus k*2^32 may not be greater than the current
> time plus two hours
>
> 6. k is an integer, whose value must be the same for the calculations of
> Rule 1 and Rule 2
I believe that is equivalent to: we treat block headers (as abstract data
structure) as having a 64-bit timestamp, which have the requirement that
the difference between the timestamp and the median timestamp of the past 11
blocks is at least one and at most 2^32 (I don't think we need to support
less than 6 blocks per 136 years).
On serialization, only the lower 32 bit are encoded. On deserialization,
the higher 32 bits are set equal to that of the median of the past 11 blocks.
If that violates the rule above, set it one higher.
That's in line of how I'd expect this will eventually be addressed. There is
no rush, of course.
> What do you think of this idea? Is it worth a BIP?
Probably, at some point.
Cheers,
--
Pieter
prev parent reply other threads:[~2020-10-16 21:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 12:36 [bitcoin-dev] Suggestion: Solve year 2106 problem by taking timestamps mod 2^32 yanmaani
2020-10-16 21:58 ` Pieter Wuille [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='Xi32cdJACwsdtwKU2BJAwknUoFDEmJyi5SomLC8bMEyVOnMqEqrG9y5yQlVeIkArwuMM9avcIxtKAlOl6WWHTaSuoz7kwSxzKjCj84NyKP0=@wuille.net' \
--to=bitcoin-dev@wuille.net \
--cc=bitcoin-dev@lists.linuxfoundation.org \
--cc=yanmaani@cock.li \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox