From 11d4f82a9a04725f3499e71e5a432def37913714 Mon Sep 17 00:00:00 2001 From: Andrei Maiboroda Date: Wed, 10 Jan 2024 17:07:21 +0100 Subject: [PATCH] Fix DATALOAD/DATALOADN prices according to EIP-7480 --- spec/eof.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/eof.md b/spec/eof.md index 1b9cb6e..be078d6 100644 --- a/spec/eof.md +++ b/spec/eof.md @@ -239,12 +239,12 @@ Code executing within an EOF environment will behave differently than legacy cod - 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 - - deduct 3 gas + - 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 - - deduct 2 gas + - deduct 3 gas - like `DATALOAD`, but takes the offset as a 16-bit immediate value and not from the stack - `DATASIZE (0xea)` instruction - deduct 2 gas