summaryrefslogtreecommitdiff
path: root/08/a1ba5cd7a29db958635fb7aac68d7553075acf
blob: fd09cf79e3b274415ed4c6d2df334c49e52a496d (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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
Return-Path: <mercedes.catherine.salazar@gmail.com>
Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 70DBAC000D
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 17 Oct 2021 15:47:00 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp1.osuosl.org (Postfix) with ESMTP id 5DD8681C6E
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 17 Oct 2021 15:47:00 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level: 
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: smtp1.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key) header.d=gmail.com
Received: from smtp1.osuosl.org ([127.0.0.1])
 by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id OReDT0700XUN
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 17 Oct 2021 15:46:59 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com
 [IPv6:2607:f8b0:4864:20::b30])
 by smtp1.osuosl.org (Postfix) with ESMTPS id 3658B81C67
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 17 Oct 2021 15:46:59 +0000 (UTC)
Received: by mail-yb1-xb30.google.com with SMTP id s64so2209772yba.11
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sun, 17 Oct 2021 08:46:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=1bIcBMro4BveLKecMnCtP7vEIEE3aWgfKMp6jHiMeTk=;
 b=lykm3g0BAe4X0Z0lvR6IJmwsLGqfYXrdJaIWKPmxA9gklDknsJFvqDvzGUJuXjlyrR
 a1LrpS4oL5mhBfPmq8/+izjcSm4R/wiLdJfYr0d7h/o1qqnteiGRLymDTMMRCwzR68Y0
 m8UmS/fwsTrbNHYbSGzNHX8Cx2UzozEaJbqihx5O4VcyigkwqZi6oFmqLnyiswghauwx
 HTqsfgJTYF1C7FpSIF39b1V/IsRwRlNJfxB/GDb0OmNJzG2zbC5zYvgr6LYaNts0+tiC
 BAheg1ajQR+Z5Jm5rJlIfdndiLUk2lhYuhnhxe2DEDDw4qg5S4rWR9pWm3IeC7A/h/BO
 tbLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=1bIcBMro4BveLKecMnCtP7vEIEE3aWgfKMp6jHiMeTk=;
 b=eMKSHaBWyWa85/jjN1ThhUcezWyPjD2eoXBPF93TQvCKVKYa9VvpZjk7odAEEFoDdK
 arkNVzl3PoI7LlP2Sdk3LkJth3La1k0EPbZ+jJx0nnph2UXLpN/pubbd84ZCBKwlPKbw
 5mw3xvzZ5fTA6kNU2Ugfm/PvK9XMGjaatpsxf5EE+MNDYyA8RMmyKxY2iJVTlML54aaA
 CJGwQ12lq0vAihubsDvAIdYiJXCm4bzarDoqJtWw/Ek0rTMKkIiHuw7nhDabqwr6IrK8
 6/DhBaBSIS4ZsT1wf1wvMjgEouE5cxE9A0DTj7lp6ERe9qQvqaKDRMldr2U8g/YPdagz
 oLKA==
X-Gm-Message-State: AOAM530bJP8VK2lEpKDcze09VGXPfBtW1v4RGZVmJXOYL0BPMCNVEK0T
 meFehx72rc5E9+Xhuv96HH43NIurxKn2ZLYCLaE=
X-Google-Smtp-Source: ABdhPJwkyGUwMO8EoI6WoO0xJjr6rF0z7eaN6umdbSixBE0BiE9R9zrBHQ8IFskHTOpo3XHuI2vKoV4tmM6yjyuUcns=
X-Received: by 2002:a25:1ac6:: with SMTP id
 a189mr24281465yba.149.1634485618109; 
 Sun, 17 Oct 2021 08:46:58 -0700 (PDT)
MIME-Version: 1.0
References: <143289360-eb35e705fded3eb4175a6f8d7669b3a0@pmq5v.m5r2.onet>
 <0d0b22a297d112939e11c86aa1f6d736@cock.li>
In-Reply-To: <0d0b22a297d112939e11c86aa1f6d736@cock.li>
From: Kate Salazar <mercedes.catherine.salazar@gmail.com>
Date: Sun, 17 Oct 2021 17:46:46 +0200
Message-ID: <CAHiDt8BY1dT=PhjudHbJS01eqm=So7Q1tvo8ft9sFLT=D33Kfg@mail.gmail.com>
To: yanmaani@cock.li, 
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="000000000000a871da05ce8e569b"
X-Mailman-Approved-At: Sun, 17 Oct 2021 16:12:33 +0000
Subject: Re: [bitcoin-dev] Year 2038 problem and year 2106 chain halting
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: Sun, 17 Oct 2021 15:47:00 -0000

--000000000000a871da05ce8e569b
Content-Type: text/plain; charset="UTF-8"

Hi yanmaani

On Sun, Oct 17, 2021 at 5:28 PM yanmaani--- via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> What, no. The `k` value is calculated implicitly, because there's only
> one value of it that could ever be valid - if `k` is 1 too small, we're
> 70 years too far back, and then the block will violate median of last
> 11. If `k` is 1 too large, we're 70 years too far in the future, then
> the block will violate 2 hour rule. Nothing is added to coinbase or
> anywhere else.
>
> It's possible that you'd need some extra logic for locktime, yes, but it
> would only be a problem in very special cases. Worst-case, you'll have
> to use block time locking in the years around the switch, or softfork in
> 64-bit locking.
>
> But unless I'm missing something, 32-bit would be enough, you just
> wouldn't be able to locktime something past the timestamp for the
> switch. After the switchover, everything would be back to normal.
>
> This is a hardfork, yes, but it's a hardfork that kicks in way into the
> future. And because it's a hardfork, you might as well do anything, as
> long as it doesn't change anything now.
>

"Anything" is quite a word.
Ideally, hard fork requires upgrading every node that can be upgraded,
or at least have the node operator's consent to lose the node (for every
node that can't be upgraded).


>
> On 2021-10-15 22:22, vjudeu@gazeta.pl wrote:
> > Your solution seems to solve the problem of chain halting, but there
> > are more issues. For example: if you have some time modulo 2^32, then
> > you no longer know if timestamp zero is related to 1970 or 2106 or
> > some higher year. Your "k" value representing in fact the most
> > significant 32 bits of 64-bit timestamp has to be stored in all cases
> > where time is used. If there is no "k", then zero should be used for
> > backward compatibility. Skipping "k" could cause problems related to
> > OP_CHECKLOCKTIMEVERIFY or nLockTime, because if some transaction was
> > timestamped to 0xbadc0ded, then that transaction will be valid in
> > 0x00000000badc0ded, invalid in 0x0000000100000000, and valid again in
> > 0x00000001badc0ded, the same for timelocked outputs.
> >
> > So, I think your "k" value should be added to the coinbase
> > transaction, then you can combine two 32-bit values, the lower bits
> > from the block header and the higher bits from the coinbase
> > transaction. Also, adding your "k" value transaction nLockTime field
> > is needed (maybe in a similar way as transaction witness was added in
> > Segwit), because in other case after reaching 0x0000000100000000 all
> > off-chain transactions with timelocks around 0x00000000ffffffff will
> > be additionally timelocked for the next N years. The same is needed
> > for each OP_CHECKLOCKTIMEVERIFY, maybe pushing high 32 bits before the
> > currently used value will solve that (and assuming zero if there is
> > only some 32-bit value).
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
>

--000000000000a871da05ce8e569b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi yanmaani</div><br><div class=3D"gmail_quote"><div =
dir=3D"ltr" class=3D"gmail_attr">On Sun, Oct 17, 2021 at 5:28 PM yanmaani--=
- via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.o=
rg">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wrote:<br></div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
solid rgb(204,204,204);padding-left:1ex">What, no. The `k` value is calcula=
ted implicitly, because there&#39;s only <br>
one value of it that could ever be valid - if `k` is 1 too small, we&#39;re=
 <br>
70 years too far back, and then the block will violate median of last <br>
11. If `k` is 1 too large, we&#39;re 70 years too far in the future, then <=
br>
the block will violate 2 hour rule. Nothing is added to coinbase or <br>
anywhere else.<br>
<br>
It&#39;s possible that you&#39;d need some extra logic for locktime, yes, b=
ut it <br>
would only be a problem in very special cases. Worst-case, you&#39;ll have =
<br>
to use block time locking in the years around the switch, or softfork in <b=
r>
64-bit locking.<br>
<br>
But unless I&#39;m missing something, 32-bit would be enough, you just <br>
wouldn&#39;t be able to locktime something past the timestamp for the <br>
switch. After the switchover, everything would be back to normal.<br>
<br>
This is a hardfork, yes, but it&#39;s a hardfork that kicks in way into the=
 <br>
future. And because it&#39;s a hardfork, you might as well do anything, as =
<br>
long as it doesn&#39;t change anything now.<br></blockquote><div><br></div>=
<div>&quot;Anything&quot; is quite a word.</div><div>Ideally, hard fork req=
uires upgrading every node that can be upgraded,<br></div><div>or at least =
have the node operator&#39;s consent to lose the node (for every</div><div>=
node that can&#39;t be upgraded).</div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
<br>
On 2021-10-15 22:22, <a href=3D"mailto:vjudeu@gazeta.pl" target=3D"_blank">=
vjudeu@gazeta.pl</a> wrote:<br>
&gt; Your solution seems to solve the problem of chain halting, but there<b=
r>
&gt; are more issues. For example: if you have some time modulo 2^32, then<=
br>
&gt; you no longer know if timestamp zero is related to 1970 or 2106 or<br>
&gt; some higher year. Your &quot;k&quot; value representing in fact the mo=
st<br>
&gt; significant 32 bits of 64-bit timestamp has to be stored in all cases<=
br>
&gt; where time is used. If there is no &quot;k&quot;, then zero should be =
used for<br>
&gt; backward compatibility. Skipping &quot;k&quot; could cause problems re=
lated to<br>
&gt; OP_CHECKLOCKTIMEVERIFY or nLockTime, because if some transaction was<b=
r>
&gt; timestamped to 0xbadc0ded, then that transaction will be valid in<br>
&gt; 0x00000000badc0ded, invalid in 0x0000000100000000, and valid again in<=
br>
&gt; 0x00000001badc0ded, the same for timelocked outputs.<br>
&gt; <br>
&gt; So, I think your &quot;k&quot; value should be added to the coinbase<b=
r>
&gt; transaction, then you can combine two 32-bit values, the lower bits<br=
>
&gt; from the block header and the higher bits from the coinbase<br>
&gt; transaction. Also, adding your &quot;k&quot; value transaction nLockTi=
me field<br>
&gt; is needed (maybe in a similar way as transaction witness was added in<=
br>
&gt; Segwit), because in other case after reaching 0x0000000100000000 all<b=
r>
&gt; off-chain transactions with timelocks around 0x00000000ffffffff will<b=
r>
&gt; be additionally timelocked for the next N years. The same is needed<br=
>
&gt; for each OP_CHECKLOCKTIMEVERIFY, maybe pushing high 32 bits before the=
<br>
&gt; currently used value will solve that (and assuming zero if there is<br=
>
&gt; only some 32-bit value).<br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div></div>

--000000000000a871da05ce8e569b--