ZIP 221: update note about uint32 time overflow.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-03-10 19:16:55 +00:00
parent fd151499d5
commit 86dbc09fc3
2 changed files with 9 additions and 4 deletions

View File

@ -220,7 +220,8 @@ License: MIT</pre>
<dt>Internal or root node</dt>
<dd>Inherited from the left child.</dd>
</dl>
<p>Serialized as <code>nTime</code> (<code>uint32</code>). This will overflow on 2106-02-07.</p>
<p>Serialized as <code>nTime</code> (<code>uint32</code>).</p>
<p>Note that a <code>uint32</code> time value would overflow on 2106-02-07, but this field (and <code>nLatestTimestamp</code> below) can only hold values that occur in the <code>nTime</code> field of a block header, which is also of type <code>uint32</code>.</p>
</li>
<li><code>nLatestTimestamp</code>
<dl>
@ -230,7 +231,7 @@ License: MIT</pre>
<dd>Inherited from the right child.</dd>
</dl>
<p>Note that due to timestamp consensus rules, <code>nLatestTimestamp</code> may be smaller than <code>nEarliestTimestamp</code> in some subtrees. This may occur within subtrees smaller than <code>PoWMedianBlockSpan</code> blocks.</p>
<p>Serialized as <code>nTime</code> (<code>uint32</code>). This will overflow on 2106-02-07.</p>
<p>Serialized as <code>nTime</code> (<code>uint32</code>).</p>
</li>
<li><code>nEarliestTargetBits</code>
<dl>

View File

@ -214,7 +214,11 @@ Each MMR node is defined as follows:
Internal or root node
Inherited from the left child.
Serialized as ``nTime`` (``uint32``). This will overflow on 2106-02-07.
Serialized as ``nTime`` (``uint32``).
Note that a ``uint32`` time value would overflow on 2106-02-07, but this field (and
``nLatestTimestamp`` below) can only hold values that occur in the ``nTime`` field of
a block header, which is also of type ``uint32``.
3. ``nLatestTimestamp``
@ -228,7 +232,7 @@ Each MMR node is defined as follows:
``nEarliestTimestamp`` in some subtrees. This may occur within subtrees smaller than
``PoWMedianBlockSpan`` blocks.
Serialized as ``nTime`` (``uint32``). This will overflow on 2106-02-07.
Serialized as ``nTime`` (``uint32``).
4. ``nEarliestTargetBits``