Skip to content

Commit

Permalink
Combine continuation tables
Browse files Browse the repository at this point in the history
  • Loading branch information
hratoanina committed Aug 19, 2024
1 parent 371d9c7 commit 2bffe04
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 30 deletions.
3 changes: 1 addition & 2 deletions docs/arithmetization/tables.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ \section{Tables}
\input{tables/byte-packing}
\input{tables/logic}
\input{tables/memory}
\input{tables/mem-before}
\input{tables/mem-after}
\input{tables/mem-continuations}
\input{tables/keccak-f}
\input{tables/keccak-sponge}
14 changes: 0 additions & 14 deletions docs/arithmetization/tables/mem-after.tex

This file was deleted.

14 changes: 0 additions & 14 deletions docs/arithmetization/tables/mem-before.tex

This file was deleted.

15 changes: 15 additions & 0 deletions docs/arithmetization/tables/mem-continuations.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
\subsection{Memory continuations}
\label{mem-continuations}

The MemBefore (resp. MemAfter) table holds the content of the memory before (resp. after) the execution of the current segment.
For consistency, the MemAfter trace of a segment must be identical to the MemAfter trace of the next segment.
Each row of these tables contains:

\begin{enumerate}
\item $a$, the memory cell address,
\item $v$, the initial value of the cell.
\end{enumerate}
The tables should be ordered by $(a, \tau)$. Since they only hold values, there are no constraints between the rows.

A CTL copies all of the MemBefore values in the memory trace as reads, at timestamp $\tau = 0$.
Another CTL copies the final values from memory to MemAfter. For more details on which values are propagated, consult \ref{final-memory}.
1 change: 1 addition & 0 deletions docs/arithmetization/tables/memory.tex
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ \subsubsection{Memory initialization}
\end{itemize}

\subsubsection{Final memory}
\label{final-memory}

The final value of each cell of the memory must be propagated to the MemAfter table. Since memory operations are ordered by address and by timestamps, this is
easy to do: the last value of an address is the value of the last row touching this address. In other words, we propagate values of rows before the address changes.
Expand Down
Binary file modified docs/arithmetization/zkevm.pdf
Binary file not shown.

0 comments on commit 2bffe04

Please sign in to comment.