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

Clarify RJUMP successors and EXTCODE* for mid-creation targets #128

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion spec/eof.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ Code executing within an EOF environment will behave differently than legacy cod
- `RETURNDATACOPY (0x3E)` instruction
- same behavior as legacy, but changes the exceptional halt behavior to zero-padding behavior (same behavior as `CALLDATACOPY`).

**NOTE** Like for legacy targets, the aforementioned behavior of `EXTCODECOPY`, `EXTCODEHASH` and `EXTCODESIZE` does not apply to EOF contract targets mid-creation, i.e. those report same as accounts without code.

#### Creation transactions

Creation transactions (tranactions with empty `to`), with `data` containing EOF code (starting with `EF00` magic) are interpreted as having a concatenation of EOF `initcontainer` and `calldata` in the `data` and:
Expand Down Expand Up @@ -335,7 +337,7 @@ During scanning, for each instruction:
- terminating instructions do not need to update stack heights.
3. Determine the list of successor instructions that can follow the current instructions:
1. The next instruction for all instructions other than terminating instructions and `RJUMP`.
2. All targets of a `RJUMPI` or `RJUMPV`.
2. All targets of an `RJUMP`, `RJUMPI` or `RJUMPV`.
4. For each successor instruction:
1. Check if the instruction is present in the code (i.e. execution must not "fall off" the code).
- This implies that the last instruction may be a terminating instruction or `RJUMP`
Expand Down
Loading