Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

stack_top doc #6

Closed
wants to merge 3 commits into from
Closed

stack_top doc #6

wants to merge 3 commits into from

Conversation

hratoanina
Copy link
Member

No description provided.

evm/src/cpu/docs/memory-handling.md Outdated Show resolved Hide resolved
evm/src/cpu/docs/memory-handling.md Outdated Show resolved Hide resolved
evm/src/cpu/docs/memory-handling.md Outdated Show resolved Hide resolved
evm/src/cpu/docs/memory-handling.md Outdated Show resolved Hide resolved
evm/src/cpu/docs/memory-handling.md Outdated Show resolved Hide resolved
evm/src/cpu/docs/memory-handling.md Outdated Show resolved Hide resolved
## Operation flag merging
To reduce the total number of columns, many operation flags are merged together (for example DUP and SWAP). If the two instructions have different stack behaviors, this can be a problem: the filter for an individual operation is now of degree 2 (e.g. `lv.op.dup_swap * lv.opcode_bits[4]` for SWAP) and some constraints of `eval_packed_one` are already of degree 3.

When this happens, stack constraints are defined manually in the operation's dedicated file (e.g. `dup_swap.rs`). Implementation details vary and can be found in the files; in general they make use of the `stack_inv_aux` and `stack_inv_aux_2` columns to lower the degree of the constraints.
Copy link
Member

Choose a reason for hiding this comment

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

there's no explanation of what inv_aux_2 holds?

Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to remove any mention to inv_aux_2 and, if needed, to explain more in the dedicated files. Do you think we should still mention it here?

@hratoanina hratoanina closed this Nov 13, 2023
@hratoanina hratoanina deleted the top_stack_documentation branch November 13, 2023 15:09
LindaGuiga pushed a commit that referenced this pull request Feb 19, 2024
Fixes & version bumps to work with Erigon fork
LindaGuiga pushed a commit that referenced this pull request Feb 19, 2024
Robin's suggested changes for #6

Co-authored-by: Robin Salen <[email protected]>
LindaGuiga pushed a commit that referenced this pull request Feb 19, 2024
LindaGuiga pushed a commit that referenced this pull request Feb 19, 2024
LindaGuiga pushed a commit that referenced this pull request Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants