From 7ea6510a05b631eef6ba7ea63561d1aee5c70b42 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 29 Jul 2019 16:46:13 +0100 Subject: [PATCH] Protocol spec: index improvements. Signed-off-by: Daira Hopwood --- protocol/protocol.tex | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/protocol/protocol.tex b/protocol/protocol.tex index fff28478..4636c239 100644 --- a/protocol/protocol.tex +++ b/protocol/protocol.tex @@ -736,7 +736,7 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg \newcommand{\statement}{\term{statement}} \newcommand{\statements}{\terms{statement}} \newcommand{\ZkSNARKStatements}{\titleterm{Zk-SNARK Statement}\notsprout{s}} -\newcommand{\zkProof}{\term{zk proof}} +\newcommand{\zkProof}{\termandindex{zk proof}{zero-knowledge proof}} \newcommand{\zeroKnowledgeProof}{\term{zero-knowledge proof}} \newcommand{\zeroKnowledgeProofs}{\terms{zero-knowledge proof}} \newcommand{\proofNonmalleability}{\termandindex{nonmalleability}{nonmalleability (of proofs)}} @@ -832,7 +832,8 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg \newcommand{\blockVersionNumber}{\term{block version number}} \newcommand{\blockVersionNumbers}{\terms{block version number}} \newcommand{\Blockversions}{\termandindex{Block versions}{block version number}} -\newcommand{\blockTime}{\term{block time}} +\newcommand{\blockTargetSpacing}{\term{block target spacing}} +\newcommand{\blockTimestamp}{\term{block timestamp}} \newcommand{\blockHeight}{\term{block height}} \newcommand{\blockHeights}{\terms{block height}} \newcommand{\activationHeight}{\term{activation block height}} @@ -880,8 +881,8 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg \newcommand{\bestValidBlockchain}{\term{best valid block chain}} \newcommand{\blockchainReorganization}{\term{block chain reorganization}} \newcommand{\blockchainReorganizations}{\terms{block chain reorganization}} -\newcommand{\branch}{\term{branch}} -\newcommand{\branches}{\termes{branch}} +\newcommand{\blockhainBranch}{\term{block chain branch}} +\newcommand{\blockchainBranches}{\termes{block chain branch}} \newcommand{\mempool}{\term{mempool}} \newcommand{\treestate}{\term{treestate}} \newcommand{\treestates}{\terms{treestate}} @@ -8693,8 +8694,8 @@ each \spendDescription (\crossref{spendencoding}), and each \outputDescription ( %} \overwinteronwarditem{The purpose of \versionGroupID{} is to allow unambiguous parsing of \definingquotedterm{loose} \transactions, independent of the context of a \blockchain. - Code that parses \transactions is likely to be reused between \blockchain \branches as - defined in \cite{ZIP-200}, and in that case the \fOverwintered{} and \versionField{} + Code that parses \transactions is likely to be reused between \defining{\blockchainBranches} + as defined in \cite{ZIP-200}, and in that case the \fOverwintered{} and \versionField{} fields alone may be insufficient to determine the format to be used for parsing.} \item A \transactionVersionNumber of $2$ does not have the same meaning as in \Bitcoin, where it is associated with support for \ScriptOP{CHECKSEQUENCEVERIFY} @@ -8930,8 +8931,8 @@ $32$ & \sprout{$\hashReserved$} \saplingonward{The \merkleRoot $\LEBStoOSPOf{256}{\rt}$ of the \Sapling{} \noteCommitmentTree corresponding to the final \Sapling{} \treestate of this \block.} \\ \hline -$4$ & $\nTimeField$ & \type{uint32} & The \blockTime is a Unix epoch time (UTC) when the miner -started hashing the \header (according to the miner). \\ \hline +$4$ & $\nTimeField$ & \type{uint32} & The \defining{\blockTimestamp} is a Unix epoch time (UTC) +when the miner started hashing the \header (according to the miner). \\ \hline $4$ & $\nBitsField$ & \type{uint32} & An encoded version of the \targetThreshold this \block's \header hash must be less than or equal to, in the same nBits format used by \Bitcoin. @@ -9181,10 +9182,11 @@ $\ToTarget(\nBitsField)$. \lsubsubsection{Difficulty adjustment}{diffadjustment} +The desired time between \blocks is called the \defining{\blockTargetSpacing}. \Zcash uses a difficulty adjustment algorithm based on DigiShield v3/v4 \cite{DigiByte-PoW}, with simplifications and altered parameters, to adjust difficulty to target -the desired \blockTime. -Unlike \Bitcoin, the difficulty adjustment occurs after every \block. +the desired \blockTargetSpacing. Unlike \Bitcoin, the difficulty adjustment occurs +after every \block. \notbeforeblossom{The constants }$\PoWLimit$, $\PreBlossomHalvingInterval$, $\PoWAveragingWindow$, $\PoWMaxAdjustDown$, $\PoWMaxAdjustUp$, $\PoWDampingFactor$,\notblossom{ and}