Skip to content

Commit 9791b59

Browse files
committed
Fix doc after merge
1 parent 3d5623c commit 9791b59

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

docs/paper/nero.pdf

-1.33 KB
Binary file not shown.

docs/paper/nero.tex

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -314,60 +314,6 @@ \subsection{Implementation on Bitcoin}
314314
\Return{$z_1,\dots,z_n$}
315315
\end{algorithm}\label{alg:intermediate_steps}
316316

317-
\begin{example}
318-
Consider a fairly simple program $f$:
319-
\begin{equation*}
320-
f(a,b) = 25a^2b^2{(a+b)}^2
321-
\end{equation*}
322-
323-
Additionally, assume that we can abstract the multiplication operation
324-
via the opcode \texttt{OP\_MUL} (which, in fact, is already natively
325-
implemented in Bitcoin Script, although the size of such script
326-
for two 254-bit numbers exceeds 60kB).
327-
Then, the implementation of $f$ in Bitcoin Script could be:
328-
\begin{empheqboxed}
329-
\begin{align*}
330-
&\elem{a} \elem{b} \opcode{\texttt{OP\_2DUP}}
331-
\opcode{\texttt{OP\_ADD}} \opcode{\texttt{OP\_MUL}}
332-
\opcode{\texttt{OP\_MUL}}
333-
\opcode{\texttt{OP\_DUP}} \opcode{\texttt{OP\_DUP}} \\&
334-
\opcode{\texttt{OP\_ADD}} \opcode{\texttt{OP\_DUP}}
335-
\opcode{\texttt{OP\_ADD}} \opcode{\texttt{OP\_ADD}}
336-
\opcode{\texttt{OP\_DUP}} \opcode{\texttt{OP\_MUL}}
337-
\end{align*}
338-
\end{empheqboxed}
339-
340-
Fairly complex, right? Let us split the function into three shards
341-
$\textcolor{red!80!white}{f_1}$, $\textcolor{blue}{f_2}$, and
342-
$\textcolor{green!60!black}{f_3}$:
343-
\begin{align*}
344-
\textcolor{red!80!white}{f_1}(x,y) = xy(x+y), \quad
345-
\textcolor{blue}{f_2}(z) = 5z, \quad
346-
\textcolor{green!60!black}{f_3}(w) = w^2
347-
\end{align*}
348-
349-
This way, it is fairly easy to see that $f(a,b) =
350-
\textcolor{green!60!black}{f_3} \circ \textcolor{blue}{f_2} \circ
351-
\textcolor{red!80!white}{f_1}(a,b)$. In turn, in Bitcoin
352-
script we can represent $f$ as $\textcolor{red!80!white}{f_1}
353-
\parallel \textcolor{blue}{f_2} \parallel \textcolor{green!60!black}{f_3}$:
354-
\begin{empheqboxed}
355-
\begin{align*}
356-
&\elem{a} \elem{b}
357-
\textcolor{red!80!white}{\opcode{\texttt{OP\_2DUP}}
358-
\opcode{\texttt{OP\_ADD}} \opcode{\texttt{OP\_MUL}}
359-
\opcode{\texttt{OP\_MUL}}} &&
360-
\textcolor{gray!80!black}{\text{// $xy(x+y)$}} \\
361-
&\textcolor{blue}{\opcode{\texttt{OP\_DUP}}
362-
\opcode{\texttt{OP\_DUP}} \opcode{\texttt{OP\_ADD}}
363-
\opcode{\texttt{OP\_DUP}} \opcode{\texttt{OP\_ADD}}
364-
\opcode{\texttt{OP\_ADD}}} && \textcolor{gray!80!black}{\text{// $5z$}} \\
365-
&\textcolor{green!60!black}{\opcode{\texttt{OP\_DUP}}
366-
\opcode{\texttt{OP\_MUL}}}&&\textcolor{gray!80!black}{\text{// $w^2$}}
367-
\end{align*}
368-
\end{empheqboxed}
369-
\end{example}
370-
371317
\begin{example}
372318
Consider a fairly simple program $f$:
373319
\begin{equation*}

0 commit comments

Comments
 (0)