summaryrefslogtreecommitdiff
path: root/e4/f9ac86359d15e92c558bf9af951e6ab8fc55cd
blob: e11f1988003323d19312aecb38908890499d4e19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Return-Path: <bitcoin-dev@wuille.net>
Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 54419C0051
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 16 Oct 2020 21:58:34 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by silver.osuosl.org (Postfix) with ESMTP id A87582E880
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 16 Oct 2020 21:58:33 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from silver.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id iu0N238UYKmS
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 16 Oct 2020 21:58:31 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mail-40136.protonmail.ch (mail-40136.protonmail.ch
 [185.70.40.136])
 by silver.osuosl.org (Postfix) with ESMTPS id 62F452E85D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Fri, 16 Oct 2020 21:58:31 +0000 (UTC)
Date: Fri, 16 Oct 2020 21:58:20 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wuille.net;
 s=protonmail2; t=1602885508;
 bh=B7q2zOo2HGwbb1gryWmfFj8Z58g0maL4QuOIhcBKZrk=;
 h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From;
 b=oJsntOhiGBkd0Gitzc6TxvEwtPmIfr791szBU/nDQauMHJUtPMoHZ89wYlccpAeZf
 RyvKWuGJCG1Cf0x+HoLPqqA2zJ2WWEknIUJaeHLNbV0OQVVE3JbWssp96Bh6FbZsFO
 zaxZ2P1o2fLx+ZeWszrZyQREoQpzgaAp55xKe1ty4iDm91Mif8XVTxi+NbUNg+pMs2
 0Rf0kRqEY2vuDL8rxNyBpBi9Otwz35ZGl/UmhVLF2PeNQTmn50v0Y+uogAXmLhrNmK
 k0ACtOB4O+E1RHO21/tfzh4g0/Q1IMPLU2s98/fQUX6DAelG2ZAgK+ht/e0rJEtkhE
 P/bBoPQh3Nt+A==
To: "yanmaani@cock.li" <yanmaani@cock.li>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
From: Pieter Wuille <bitcoin-dev@wuille.net>
Reply-To: Pieter Wuille <bitcoin-dev@wuille.net>
Message-ID: <Xi32cdJACwsdtwKU2BJAwknUoFDEmJyi5SomLC8bMEyVOnMqEqrG9y5yQlVeIkArwuMM9avcIxtKAlOl6WWHTaSuoz7kwSxzKjCj84NyKP0=@wuille.net>
In-Reply-To: <42c7e76c023b403a9e99d29a1836b53e@cock.li>
References: <42c7e76c023b403a9e99d29a1836b53e@cock.li>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Fri, 16 Oct 2020 23:34:55 +0000
Subject: Re: [bitcoin-dev] Suggestion: Solve year 2106 problem by taking
	timestamps mod 2^32
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, 
 <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Oct 2020 21:58:34 -0000

On Saturday, September 19, 2020 5:36 AM, yanmaani--- via bitcoin-dev <bitco=
in-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 1=
1
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 block=
s.
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 i=
s
no rush, of course.

>     What do you think of this idea? Is it worth a BIP?

Probably, at some point.

Cheers,

--
Pieter