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 that EXTDELEGATECALL fails EOF->EOA/empty too #124

Merged
merged 1 commit into from
Jun 5, 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
2 changes: 1 addition & 1 deletion spec/eof.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ The following instructions are introduced in EOF code:
- The `gas_limit` input is removed.
- The `output_offset` and `output_size` is removed.
- The `gas_limit` will be set to `(gas_left / 64) * 63` (as if the caller used `gas()` in place of `gas_limit`).
- `EXTDELEGATECALL` to a legacy contract is disallowed, and it returns `1` (same as when the callee frame `reverts`) to signal failure. Only initial gas cost of `EXTDELEGATECALL` is consumed (similarly to the call depth check) and the target address still becomes warm. We allow legacy to EOF path for existing proxy contracts to be able to use EOF upgrades.
- `EXTDELEGATECALL` to a non-EOF contract (legacy contract, EOA, empty account) is disallowed, and it returns `1` (same as when the callee frame `reverts`) to signal failure. Only initial gas cost of `EXTDELEGATECALL` is consumed (similarly to the call depth check) and the target address still becomes warm. We allow legacy to EOF path for existing proxy contracts to be able to use EOF upgrades.
- No address trimming is performed on the `target_address`, and if the address has more than 20 bytes the operation halts with an exceptional failure.

**NOTE**: The replacement instructions `EXT*CALL` continue being treated as **undefined** in legacy code.
Expand Down
Loading