-
Notifications
You must be signed in to change notification settings - Fork 2k
chore: clean up unused EOF code #10715
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
Conversation
…n - no change in handling
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.
all of this lgtm, but didn't look too closely at the create cheatcode extractions, or if anything changed there at all.
the large diff for this makes this harder to review, from the looks of it we could have kept the functions?
// common create_end functionality for both legacy and EOF. | ||
fn create_end_common( | ||
&mut self, | ||
ecx: Ecx, | ||
call: Option<&CreateInputs>, | ||
outcome: &mut CreateOutcome, | ||
) { |
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.
this is the main change, haven't reviewed this extractions line by line but this looks okay
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.
The diff appears large but it is basically just a direct inline of create_common
/ create_end_common
as they were previously a shared implementation with EOF's create_*
and it would now be an unnecessary abstraction to keep around
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.
I think this looks good and confident all OK but the debugger changes which we don't have tests for (left some comments, happy to work on a basic test suite to perform).
Also, just a note that we're going to have (at least?) one more iteration to cleanup EOF, see bluealloy/revm#2644
@@ -14,32 +11,8 @@ impl OpcodeParam { | |||
/// Returns the list of named parameters for the given opcode, accounts for special opcodes | |||
/// requiring immediate bytes to determine stack items. | |||
#[inline] | |||
pub(crate) fn of(op: u8, immediate: Option<&Bytes>) -> Option<Vec<Self>> { |
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.
in is_jump
we keep the way we identify using immediate_bytes
but here we don't rely on it anymore, wonder if this is right?
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.
this is correct, I prefer keeping this abstraction as it is more readable than reverting to what was defined previously inline, ref: paradigmxyz/revm-inspectors#301 (record_immediate_bytes
). This is an abstraction introduced as part of the EOF PR but not strictly an EOF feature.
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, ideally we should be able to combine this with bump to bluealloy/revm#2644
I'll follow up in the Revm 25+ bump with the final removal of any EOF related fields to be deprecated in the next Revm release |
Motivation
Related PRs:
Updates:
Solution
Removes EOF leftovers, simplifies where possible + retaining abstractions that help readability
PR Checklist