Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update specs for continuation #489

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Conversation

hratoanina
Copy link
Contributor

See #384.

@github-actions github-actions bot added crate: evm_arithmetization Anything related to the evm_arithmetization crate. specs labels Aug 13, 2024
@@ -24,8 +24,8 @@
/// The values at the respective positions are:
/// - 0: The account key
/// - 1: The slot key
/// - 2: A ptr to the payload (the stored value)
/// - 3: A ptr to the initial payload.
/// - 2: The slot value.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to the PR, but it wasn't changed in #433.

docs/arithmetization/cpulogic.tex Outdated Show resolved Hide resolved

Since we process one transaction at a time, a few intermediary values need to be provided by the prover. Indeed, to prove that the registers in the EVM state are correctly updated, we need to have access to their initial values. When aggregating proofs, we can also constrain those values to match from one transaction to the next. Let us consider the example of the transaction number. Let $n$ be the number of transactions executed so far in the current block. If the current proof is not a dummy one (we are indeed executing a transaction), then the transaction number should be updated: $n := n+1$. Otherwise, the number remains unchanged. We can easily constrain this update. When aggregating the previous transaction proof ($lhs$) with the current one ($rhs$), we also need to check that the output transaction number of $lhs$ is the same as the input transaction number of $rhs$.
Since we process transactions and not full blocks, a few intermediary values need to be provided by the prover. Indeed, to prove that the registers in the EVM state are correctly updated, we need to have access to their initial values. When aggregating proofs, we can also constrain those values to match from one batch to the next. Let us consider the example of the transaction number. Let $n$ be the number of transactions executed so far in the current block. If the current proof is not a dummy one (we are indeed executing a transaction), then the transaction number should be updated: $n := n+k$ with $k$ the number of transactions in the batch. Otherwise, the number remains unchanged. We can easily constrain this update. When aggregating the previous transaction batch proof ($lhs$) with the current one ($rhs$), we also need to check that the output transaction number of $lhs$ is the same as the input transaction number of $rhs$.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Since we process transactions and not full blocks, a few intermediary values need to be provided by the prover. Indeed, to prove that the registers in the EVM state are correctly updated, we need to have access to their initial values. When aggregating proofs, we can also constrain those values to match from one batch to the next. Let us consider the example of the transaction number. Let $n$ be the number of transactions executed so far in the current block. If the current proof is not a dummy one (we are indeed executing a transaction), then the transaction number should be updated: $n := n+k$ with $k$ the number of transactions in the batch. Otherwise, the number remains unchanged. We can easily constrain this update. When aggregating the previous transaction batch proof ($lhs$) with the current one ($rhs$), we also need to check that the output transaction number of $lhs$ is the same as the input transaction number of $rhs$.
Since we process transactions and not entire blocks, a few intermediary values need to be provided by the prover. Indeed, to prove that the registers in the EVM state are correctly updated, we need to have access to their initial values. When aggregating proofs, we can also constrain those values to match from one batch to the next. Let us consider the example of the transaction number. Let $n$ be the number of transactions executed so far in the current block. If the current proof is not a dummy one (we are indeed executing a batch of transactions), then the transaction number should be updated: $n := n+k$ with $k$ the number of transactions in the batch. Otherwise, the number remains unchanged. We can easily constrain this update. When aggregating the previous transaction batch proof ($lhs$) with the current one ($rhs$), we also need to check that the output transaction number of $lhs$ is the same as the input transaction number of $rhs$.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orthogonal to the changes, but I find this paragraph and a few other extremely heavy / verbose.

docs/arithmetization/cpulogic.tex Outdated Show resolved Hide resolved
docs/arithmetization/cpulogic.tex Outdated Show resolved Hide resolved
docs/arithmetization/cpulogic.tex Outdated Show resolved Hide resolved
docs/arithmetization/cpulogic.tex Outdated Show resolved Hide resolved
docs/arithmetization/tables/cpu.tex Outdated Show resolved Hide resolved
Comment on lines +85 to +86
\item \texttt{Context pruning}: When \texttt{SET\_CONTEXT} is called to return to a parent context, this makes the current context stale. The kernel indicates it
by setting one general column to 1. For more details about context pruning, see \ref{context-pruning}.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know where to write the comment, but it's missing (if we want to keep writing them...) the new columns on the memory table side.

docs/arithmetization/tables/mem-before.tex Outdated Show resolved Hide resolved
docs/arithmetization/tables/memory.tex Outdated Show resolved Hide resolved
@Nashtare Nashtare merged commit 5cb6b5a into feat/continuations Aug 20, 2024
15 checks passed
@Nashtare Nashtare deleted the continuation_specs branch August 20, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate. specs
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants