From 5fef9270e2241270bd9c298d8076b838203da7c1 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Fri, 26 Mar 2021 16:30:40 +0000 Subject: [PATCH] NCC audit: Correct the sizes of SpendDescriptionV5 and OutputDescriptionV5 in the version transaction format. Signed-off-by: Daira Hopwood --- protocol/protocol.tex | 6 ++++-- zip-0225.rst | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/protocol/protocol.tex b/protocol/protocol.tex index cc12cffb..dfb95e64 100644 --- a/protocol/protocol.tex +++ b/protocol/protocol.tex @@ -11960,13 +11960,13 @@ A \blockHeight in the range $\range{1}{499999999}$ after which the \transaction & \Varies & $\nSpendsSapling$ & \type{compactSize} & The number of \spendDescriptions in $\vSpendsSapling$.\! \\ \hline -& \Longunderstack{$362 \mult$ \\$\!\nSpendsSapling\!$} & $\vSpendsSapling$ & \type{SpendDescriptionV5} \type{[$\nSpendsSapling$]} & +& \Longunderstack{$96 \mult$ \\$\!\nSpendsSapling\!$} & $\vSpendsSapling$ & \type{SpendDescriptionV5} \type{[$\nSpendsSapling$]} & A sequence of \spendDescriptions{}, encoded per \crossref{spendencodingandconsensus}.\! \\ \hline & \Varies & $\nOutputsSapling\!$ & \type{compactSize} & The number of \outputDescriptions in $\vOutputsSapling$.\! \\ \hline -& \Longunderstack{$948 \mult$ \\$\!\nOutputsSapling\!$} & $\vOutputsSapling\!$ & \type{OutputDescriptionV5} \type{[$\nOutputsSapling$]} & +& \Longunderstack{$756 \mult$ \\$\!\nOutputsSapling\!$} & $\vOutputsSapling\!$ & \type{OutputDescriptionV5} \type{[$\nOutputsSapling$]} & A sequence of \outputDescriptions{}, encoded per \crossref{outputencodingandconsensus}.\! \\ \hline $\ddagger$ & $8$ & $\valueBalance{Sapling}\!$ & \type{int64} & @@ -13982,6 +13982,8 @@ Peter Newell's illustration of the Jubjub bird, from \cite{Carroll1902}. output of $\maptocurvesimpleswuIsoG$. \item Document the limitation on the domain separation string for the \groupHash into \Pallas and \Vesta. + \item Correct the sizes of \type{SpendDescriptionV5} and \type{OutputDescriptionV5} + in the version 5 \transaction format. \item Make the naming of $\enableSpends$ and $\enableOutputs$ consistent. \end{itemize} \item Correct the description of $\lengthField$ in \crossref{unifiedpaymentaddrencoding}. diff --git a/zip-0225.rst b/zip-0225.rst index cf1d08e9..f12121c6 100644 --- a/zip-0225.rst +++ b/zip-0225.rst @@ -106,7 +106,7 @@ Transaction Format +-----------------------------+--------------------------+----------------------------------------+---------------------------------------------------------------------+ |``varies`` |``nSpendsSapling`` |``compactSize`` |Number of Sapling Spend descriptions in ``vSpendsSapling``. | +-----------------------------+--------------------------+----------------------------------------+---------------------------------------------------------------------+ -|``128 * nSpendsSapling`` |``vSpendsSapling`` |``SpendDescriptionV5[nSpendsSapling]`` |A sequence of Sapling Spend descriptions, encoded per | +|``96 * nSpendsSapling`` |``vSpendsSapling`` |``SpendDescriptionV5[nSpendsSapling]`` |A sequence of Sapling Spend descriptions, encoded per | | | | |protocol §7.3 ‘Spend Description Encoding and Consensus’. | +-----------------------------+--------------------------+----------------------------------------+---------------------------------------------------------------------+ |``varies`` |``nOutputsSapling`` |``compactSize`` |Number of Sapling Output Decriptions in ``vOutputsSapling``. |