mirror of https://github.com/zcash/zips.git
Correct an error pointed out in NCC's Blossom audit affecting the first 10 blocks of the chain.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
1258385ab5
commit
65d43bfac4
|
@ -9002,7 +9002,7 @@ Define:
|
|||
\begin{formulae}
|
||||
\hfuzz=10pt
|
||||
\item $\mean(S) := \hfrac{\ssum{i=1}{\length(S)} S_i}{\length(S)}$
|
||||
\item $\median(S) := \sorted(S)_{\sceiling{\length(S) / 2}}$
|
||||
\item $\median(S) := \sorted(S)_{\sceiling{(\length(S)+1) / 2}}$
|
||||
\item $\bound{\Lower}{\Upper}(x) := \maximum(\Lower, \minimum(\Upper, x)))$
|
||||
\item $\trunc{x} := \begin{cases}
|
||||
\floor{x},&\caseif x \geq 0 \\
|
||||
|
@ -9049,12 +9049,16 @@ The \targetThreshold for a given \blockHeight $\BlockHeight$ is then calculated
|
|||
\end{formulae}
|
||||
|
||||
\vspace{-2ex}
|
||||
\pnote{
|
||||
The convention used for the height parameters to $\MedianTime$, $\ActualTimespan$,
|
||||
$\ActualTimespanDamped$, $\ActualTimespanBounded$, $\MeanTarget$, $\Threshold$, and
|
||||
$\ThresholdBits$ is that these functions use only information from \blocks \emph{preceding}
|
||||
the given \blockHeight.
|
||||
}
|
||||
\begin{pnotes}
|
||||
\item The convention used for the height parameters to the functions $\MedianTime$, $\MeanTarget$,
|
||||
$\ActualTimespan$, $\ActualTimespanDamped$, $\ActualTimespanBounded$, $\Threshold$, and $\ThresholdBits$
|
||||
is that these functions use only information from \blocks \emph{preceding} the given \blockHeight.
|
||||
\item When the $\median$ function is applied to a sequence of even length (which only happens
|
||||
in the definition of $\MedianTime$ during the first $\PoWAveragingWindow - 1$ \blocks of
|
||||
the \blockchain), the element that begins the second half of the sequence is taken.
|
||||
This corresponds to the \zcashd implementation, but was not specified correctly in versions
|
||||
of this specification prior to 2019.0-beta-40.
|
||||
\end{pnotes}
|
||||
|
||||
On the test network from \blockHeight $299188$ onward, the difficulty adjustment algorithm
|
||||
is changed to allow minimum-difficulty \blocks, as described in \cite{ZIP-205}.
|
||||
|
@ -9945,6 +9949,10 @@ Peter Newell's illustration of the Jubjub bird, from \cite{Carroll1902}.
|
|||
\begin{itemize}
|
||||
\item Fix a specification error in the Founders' Reward calculation during
|
||||
the slow start period.
|
||||
\item Correct an inconsistency in difficulty adjustment between the spec and
|
||||
\zcashd implementation for the first $\PoWAveragingWindow - 1$ \blocks
|
||||
of the \blockchain. This inconsistency was pointed out by NCC Group
|
||||
in their \Blossom specification audit.
|
||||
\blossom{
|
||||
\item Revert changes for funding streams from Withdrawn \cite{ZIP-207}.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue