From 0c53d8815fa755a630f802ecc1fcaa4f03656480 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 28 Apr 2022 14:53:34 +0100 Subject: [PATCH] Clarify how to determine which table in \crossref{txnencoding} to use for transaction parsing, depending on the effectiveVersion as determined by the `header` field. fixes #603 Signed-off-by: Daira Hopwood --- protocol/protocol.tex | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/protocol/protocol.tex b/protocol/protocol.tex index ff869e2f..317d9a8b 100644 --- a/protocol/protocol.tex +++ b/protocol/protocol.tex @@ -12295,9 +12295,10 @@ upgrade-supporting nodes \MUST allow for this. \intropart \lsection{Consensus Changes from \BitcoinText}{consensusfrombitcoin} -\vspace{-1ex} +\vspace{-1.5ex} \extralabel{txnencodingandconsensus}{\lsubsection{Transaction Encoding and Consensus}{txnencoding}} +\vspace{-0.5ex} The \Zcash{} \defining{\transaction} format up to and including \transactionVersion $4$ is as follows (this should be read in the context of consensus rules later in the section): @@ -12372,10 +12373,14 @@ A \saplingBindingSignature on the \sighashTxHash, validated as specified in \cro } %scalebox \end{center} -\vspace{-1ex} +\vspace{-1.5ex} \begin{tabularx}{\textwidth}{@{}l@{\hskip 1em}X@{}} $\footnotestar$ & Version constraints apply to the $\effectiveVersion$, which is equal to -$\minimum(2, \versionField)$ when $\fOverwintered = 0$ and to $\versionField$ otherwise. \\ +$\minimum(2, \versionField)$ when $\fOverwintered = 0$ and to $\versionField$ otherwise. +\nufive{If $\effectiveVersion \geq 5$ once $\headerField$ has been parsed, the remainder of the +\transaction encoding \MUST be parsed according to the v5 format described in the next table.} +The consensus rules later in this section specify constraints on $\nVersionGroupId$ +depending on $\effectiveVersion$. \\ $\dagger$ & The \joinSplitPubKey{} and \joinSplitSig{} fields are present if and only if $\effectiveVersion \geq 2$ and $\nJoinSplit > 0$. \\ @@ -14612,6 +14617,11 @@ Peter Newell's illustration of the Jubjub bird, from \cite{Carroll1902}. \historyentry{2022.3.1}{} \begin{itemize} +\nufive{ + \item Clarify how to determine which table in \crossref{txnencoding} to use for + \transaction parsing, depending on the $\effectiveVersion$ as determined by + the $\headerField$ field. +} \item Correct ``block chain branch'' to ``~\!\!\consensusBranch'' to match \cite{ZIP-200}. \item Add an acknowledgement to Mary Maller for reviewing the \HaloTwo security proofs.