-
Notifications
You must be signed in to change notification settings - Fork 540
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(EOF): change oob behavior of RETURNDATALOAD and RETURNDATACOPY #1476
Conversation
Old behaviour of RETURNDATACOPY needs to be preserved if it is not EOF bytecode |
Thanks, @rakita! I'll start running the ethtests locally so I can detect these cases more easily. |
@rakita I thought it would be easier to make it backwards compatible haha. Let me know what you think |
Hey, will take this over so it can be merged |
.shared_memory | ||
.slice_mut(memory_offset + copy_len, len - copy_len) | ||
.fill(0); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else if {error}
is missing. Will restructure code a little bit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, go ahead 💪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, waiting for CI.
@jpgonzalezra can you take a look. in returndatacopy
I used shared_memory.set_data
and in returndataload
i removed few lines.
@rakita awesome, the code is very clear now, thank you 💪 |
ISSUE:
Change is here: ipsilon/eof#90
RETURNDATACOPY:
- same behavior as legacy, but changes the exceptional halt behavior to zero-padding behavior
RETURNDATALOAD:
- if
offset + 32 > len(returndata buffer)
the result is zero-padded (same behavior asCALLDATALOAD
). see matching behavior ofRETURNDATACOPY
inModified Behavior
section.