From d44a67a456c491b361d5caa4284f235f1f8235dc Mon Sep 17 00:00:00 2001 From: pdobacz <5735525+pdobacz@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:34:05 +0100 Subject: [PATCH] Move DATA* opcodes to the `0xd0s` section --- spec/eof.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/eof.md b/spec/eof.md index a7cd9b3..5f50295 100644 --- a/spec/eof.md +++ b/spec/eof.md @@ -238,18 +238,18 @@ Code executing within an EOF environment will behave differently than legacy cod - ends initcode frame execution and returns control to CREATE3/4 caller frame where `deploy_container_index` and `aux_data` are used to construct deployed contract (see above) - instruction exceptionally aborts if after the appending, data section size would overflow the maximum data section size or underflow (i.e. be less than data section size declared in the header) - instruction exceptionally aborts if invoked not in "initcode-mode" -- `DATALOAD (0xe8)` instruction +- `DATALOAD (0xd0)` instruction - deduct 4 gas - pop one value, `offset`, from the stack - read `[offset, offset+32]` from the data section of the active container and push the value to the stack - pad with 0s if reading out of data bounds -- `DATALOADN (0xe9)` instruction +- `DATALOADN (0xd1)` instruction - deduct 3 gas - like `DATALOAD`, but takes the offset as a 16-bit immediate value and not from the stack -- `DATASIZE (0xea)` instruction +- `DATASIZE (0xd2)` instruction - deduct 2 gas - push the size of the data section of the active container to the stack -- `DATACOPY (0xeb)` instruction +- `DATACOPY (0xd3)` instruction - deduct 3 gas - pops `mem_offset`, `offset`, `size` from the stack - perform memory expansion to `mem_offset + size` and deduct memory expansion cost