feat(EOF): change oob behavior of RETURNDATALOAD and RETURNDATACOPY#1476
Merged
rakita merged 15 commits intobluealloy:mainfrom Jun 8, 2024
Merged
feat(EOF): change oob behavior of RETURNDATALOAD and RETURNDATACOPY#1476rakita merged 15 commits intobluealloy:mainfrom
rakita merged 15 commits intobluealloy:mainfrom
Conversation
Member
|
Old behaviour of RETURNDATACOPY needs to be preserved if it is not EOF bytecode |
Contributor
Author
|
Thanks, @rakita! I'll start running the ethtests locally so I can detect these cases more easily. |
Contributor
Author
|
@rakita I thought it would be easier to make it backwards compatible haha. Let me know what you think |
Member
|
Hey, will take this over so it can be merged |
rakita
reviewed
Jun 8, 2024
| .shared_memory | ||
| .slice_mut(memory_offset + copy_len, len - copy_len) | ||
| .fill(0); | ||
| } |
Member
There was a problem hiding this comment.
else if {error} is missing. Will restructure code a little bit here.
Contributor
Author
There was a problem hiding this comment.
You're right, go ahead 💪
rakita
approved these changes
Jun 8, 2024
Member
There was a problem hiding this comment.
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.
Contributor
Author
|
@rakita awesome, the code is very clear now, thank you 💪 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofRETURNDATACOPYinModified Behaviorsection.