Add NU0 to Sapling version of spec.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2017-12-02 02:03:23 +00:00
parent 1b394b58fa
commit 44e989f741
2 changed files with 37 additions and 11 deletions

View File

@ -25,14 +25,14 @@ pvcpdf:
.PHONY: sapling
sapling:
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [Sapling]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [NU0+Sapling]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
# If latexmk fails, touch an input so that 'make' won't think it is up-to-date next time.
rm -f sapling.aux sapling.bbl sapling.blg sapling.brf sapling.bcf
latexmk -bibtex -pdf -jobname=sapling protocol || { touch incremental_merkle.pdf; exit 1; }
.PHONY: pvcsapling
pvcsapling:
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [Sapling]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
printf '\\toggletrue{issapling}\n\\renewcommand{\\docversion}{Version %s [NU0+Sapling]}' "$$(git describe --tags --abbrev=6)" |tee protocol.ver
# If latexmk fails, touch an input so that 'make' won't think it is up-to-date next time.
rm -f sapling.aux sapling.bbl sapling.blg sapling.brf sapling.bcf
latexmk -bibtex -pdf -jobname=sapling -pvc protocol

View File

@ -170,6 +170,7 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg
\RequirePackage[usenames,dvipsnames]{xcolor}
% https://en.wikibooks.org/wiki/LaTeX/Colors#The_68_standard_colors_known_to_dvips
\newcommand{\todo}[1]{{\color{Sepia}\sf{TODO: #1}}}
\definecolor{green}{RGB}{0,120,0}
@ -177,18 +178,26 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg
\newcommand{\setchanged}{\color{\changedcolor}}
\newcommand{\changed}[1]{\texorpdfstring{{\setchanged{#1}}}{#1}}
\newcommand{\saplingcolor}{green}
\newcommand{\nuzerocolor}{blue}
\iftoggle{issapling}{
\newcommand{\sprout}[1]{}
\newcommand{\notsprout}[1]{#1}
\newcommand{\setsapling}{\color{\saplingcolor}}
\newcommand{\sapling}[1]{\texorpdfstring{{\setsapling{#1}}}{#1}}
\newcommand{\setnuzero}{\color{\nuzerocolor}}
\newcommand{\nuzero}[1]{\texorpdfstring{{\setnuzero{#1}}}{#1}}
\pagecolor{yellow!8}
} {
\newcommand{\sprout}[1]{#1}
\newcommand{\notsprout}[1]{}
\newcommand{\setsapling}{}
\newcommand{\sapling}[1]{}
\newcommand{\setnuzero}{}
\newcommand{\nuzero}[1]{}
}
% terminology
\newcommand{\term}[1]{\textsl{#1}\kern 0.05em\xspace}
@ -201,6 +210,7 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg
\newcommand{\Zerocash}{\termbf{Zerocash}}
\newcommand{\Sprout}{\notsprout{\termbf{Sprout}}}
\newcommand{\Sapling}{\termbf{Sapling}}
\newcommand{\NUZero}{\termbf{NU0}}
\newcommand{\Bitcoin}{\termbf{Bitcoin}}
\newcommand{\CryptoNote}{\termbf{CryptoNote}}
\newcommand{\ZEC}{\termbf{ZEC}}
@ -842,13 +852,22 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg
\newcommand{\consensusrule}[1]{\needspace{3ex}\subparagraph{Consensus rule:}{#1}}
\newenvironment{consensusrules}{\introlist\subparagraph{Consensus rules:}\begin{itemize}}{\end{itemize}}
\newcommand{\sproutonlyitem}[1]{\sprout{\item {#1}}\notsprout{\item {[\Sprout only]}\, {#1}}}
\newcommand{\sproutonlyitem}[1]{\item \sapling{[\Sprout only]\,} {#1}}
\newcommand{\saplingonlyitem}[1]{\sprout{}\sapling{\item {[\Sapling only]}\, {#1}}}
\newcommand{\prenuzeroitem}[1]{\sprout{}\sapling{\item {[Pre-\NUZero]}\, {#1}}}
\newcommand{\nuzeroonlyitem}[1]{\sprout{}\sapling{\item {[\NUZero only]}\, {#1}}}
\newcommand{\sproutonly}[1]{\sapling{[\Sprout only]\,} {#1}}
\newcommand{\saplingonly}[1]{\sapling{[\Sapling only]\, {#1}}}
\newcommand{\prenuzero}[1]{\sapling{[Pre-\NUZero]\, {#1}}}
\newcommand{\nuzeroonly}[1]{\sapling{[\NUZero only]\, {#1}}}
\newcommand{\securityrequirement}[1]{\needspace{3ex}\subparagraph{Security requirement:}{#1}}
\newenvironment{securityrequirements}{\introlist\subparagraph{Security requirements:}\begin{itemize}}{\end{itemize}}
\newcommand{\pnote}[1]{\subparagraph{Note:}{#1}}
\newenvironment{pnotes}{\introlist\subparagraph{Notes:}\begin{itemize}}{\end{itemize}}
\newcommand{\sproutonlypnote}[1]{\sapling{[\Sprout only]\,\,} \textbf{Note:\,} {#1}}
\newcommand{\prenuzeropnote}[1]{\sapling{[Pre-\NUZero]\,\,} \textbf{Note:\,} {#1}}
\newcommand{\nuzeroonlypnote}[1]{\sapling{[\NUZero only]\,\,} \textbf{Note:\,} {#1}}
\newcommand{\affiliation}{\hairspace$^\dagger$\;}
@ -878,10 +897,10 @@ memory-hard proof-of-work algorithm.
\vspace{1.5ex}
\sprout{\noindent This specification defines the \Zcash consensus protocol and explains
its differences from \Zerocash and \Bitcoin.}
\sapling{\noindent This \em{draft} specification defines the next major
version of the \Zcash consensus protocol, codenamed \Sapling. It is
a work in progress and should not be used as a reference for the current
protocol.}
\sapling{\noindent This \em{draft} specification defines the next minor
version of the \Zcash consensus protocol, codenamed \NUZero, and the
subsequent major version, codenamed \Sapling. It is a work in progress
and should not be used as a reference for the current protocol.}
\vspace{2.5ex}
\noindent \textbf{Keywords:}~ \StrSubstitute[0]{\keywords}{,}{, }.
@ -910,10 +929,13 @@ non-interactive arguments of knowledge (\zkSNARKs).
Changes from the original \Zerocash are explained in \crossref{differences},
and highlighted in \changed{\changedcolor} throughout the document.
\sapling{
Changes specific to the \Sapling upgrade (which are also changes from
\Zerocash) are highlighted in green. The name \Sprout is used for the
\Zcash protocol prior to \Sapling.
\notsprout{
Changes specific to the \NUZero upgrade (which are also changes from
\Zerocash) are highlighted in \nuzero{\nuzerocolor}.
Changes specific to the \Sapling upgrade following \NUZero (which are also
changes from \Zerocash) are highlighted in \sapling{\saplingcolor}.
The name \Sprout is used for the \Zcash protocol prior to \Sapling
(both before and after \NUZero).
}
Technical terms for concepts that play an important role in \Zcash are
@ -936,6 +958,10 @@ This specification is structured as follows:
of ideal cryptographic components;
\item Concrete Protocol — how the functions and encodings of the abstract
protocol are instantiated;
\notsprout{
\item Upgrade Transitions — the strategy for upgrading from \Sprout to \NUZero
and then \Sapling;
}
\item Consensus Changes from \Bitcoin — how \Zcash differs from \Bitcoin at
the consensus layer, including the Proof of Work;
\item Differences from the \Zerocash protocol — a summary of changes from the