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

feat: change oob behavior of RETURNDATALOAD and RETURNDATACOPY #90

Merged
merged 2 commits into from
May 29, 2024
Merged
Changes from 1 commit
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 @@ -294,8 +294,10 @@ The following instructions are introduced in EOF code:
- `RETURNDATALOAD (0xf7)` instruction
- deduct 3 gas
- pop `offset` from the stack
- if `offset + 32 > len(returndata buffer)`, execution results in an exceptional halt
- push 1 item onto the stack, the 32-byte word read from the returndata buffer starting at `offset`
- if `offset + 32 > len(returndata buffer)` the result is zero-padded (same behavior as `CALLDATALOAD`).
- `RETURNDATACOPY (0x3E)` instruction
pdobacz marked this conversation as resolved.
Show resolved Hide resolved
- same behavior as legacy, but changes the exceptional halt behavior to zero-padding behavior (same behavior as `CALLDATACOPY`).
- `EXTCALL (0xf8)`, `EXTDELEGATECALL (0xf9)`, `EXTSTATICCALL (0xfb)`
- Replacement of `CALL`, `DELEGATECALL` and `STATICCALL` instructions, as specced out in [EIP-7069](https://eips.ethereum.org/EIPS/eip-7069), except the runtime operand stack check. In particular:
- The `gas_limit` input is removed.
Expand Down