diff --git a/protocol/protocol.tex b/protocol/protocol.tex index 3e21cc357..5a232ed47 100644 --- a/protocol/protocol.tex +++ b/protocol/protocol.tex @@ -8017,24 +8017,22 @@ \introlist The usage of the \memo is by agreement between the sender and recipient of the -\note. The \memo{} \SHOULD be encoded either as: +\note. The \memo{} \SHOULD be encoded as one of: \begin{itemize} \item a UTF-8 human-readable string \cite{Unicode}, padded by appending zero bytes; or - \item an arbitrary sequence of $\MemoByteLength$ bytes starting with a byte value of $\hexint{F5}$ - or greater, which is therefore not a valid UTF-8 string. + \item the byte $\hexint{F6}$ followed by $511$ $\hexint{00}$ bytes, indicating ``no memo''; or + \item any other sequence of $\MemoByteLength$ bytes starting with a byte value $\hexint{F5}$ + or greater (which is therefore not a valid UTF-8 string), as specified in \cite{ZIP-302}. \end{itemize} -In the former case, wallet software is expected to strip any trailing zero bytes -and then display the resulting \mbox{UTF-8} string to the recipient user, where applicable. -Incorrect UTF-8-encoded byte sequences \SHOULD be displayed as replacement characters -(\ReplacementCharacter). +When the first byte value is less than $\hexint{F5}$, wallet software is expected to strip any +trailing zero bytes and then display the resulting \mbox{UTF-8} string to the recipient user, +where applicable. Incorrect UTF-8-encoded byte sequences \SHOULD be displayed as replacement +characters (\ReplacementCharacter). -In the latter case, the contents of the \memo{} \SHOULDNOT be displayed. A start byte -of $\hexint{F5}$ is reserved for use by automated software by private agreement. -A start byte of $\hexint{F6}$ followed by $511$ $\hexint{00}$ bytes means ``no memo''. -A start byte of $\hexint{F6}$ followed by anything else, or a start byte of $\hexint{F7}$ -or greater, are reserved for use in future \Zcash protocol extensions. +In other cases, the contents of the \memo{} \SHOULDNOT be displayed unless otherwise specified +by \cite{ZIP-302}. } Other fields are as defined in \crossref{notes}. @@ -10262,6 +10260,13 @@ \intropart \lsection{Change History}{changehistory} +\historyentry{2020.1.1}{2020-02-13} + +\begin{itemize} + \item Resolve conflicts in the specification of \memos by deferring to \cite{ZIP-302}. +\end{itemize} + + \historyentry{2020.1.0}{2020-02-06} \begin{itemize} diff --git a/protocol/zcash.bib b/protocol/zcash.bib index 2c7438bba..17d2ab7d4 100644 --- a/protocol/zcash.bib +++ b/protocol/zcash.bib @@ -920,6 +920,15 @@ @misc{ZIP-243 urldate={2019-08-28} } +@misc{ZIP-302, + presort={ZIP-0302}, + author={Jay Graber and Jack Grigg}, + title={Standardized Memo Field Format}, + howpublished={Zcash Improvement Proposal 302 (in progress).}, + url={https://github.com/zcash/zips/pull/105}, + urldate={2020-02-13} +} + @misc{DigiByte-PoW, presort={DigiByte-PoW}, author={DigiByte Core Developers},