-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor: move evm-spec-id to config #5786
refactor: move evm-spec-id to config #5786
Conversation
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.
makes sense, i like this! we currently reason about the spec id as an evm—related util when it's an important part of the config. just adding a few commits to inline & remove the utility on the evm
crate
4d5a77f
to
f9d1720
Compare
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.
made some changes—feel free to rollback if you prefer to have both!
@@ -112,24 +111,6 @@ pub fn halt_to_instruction_result(halt: Halt) -> InstructionResult { | |||
} | |||
} | |||
|
|||
/// Converts an `EvmVersion` into a `SpecId`. |
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.
removed this as this was duped from this pr onwards
@@ -255,6 +259,24 @@ where | |||
Ok(num) | |||
} | |||
|
|||
/// Returns the [SpecId] derived from [EvmVersion] | |||
#[inline] | |||
pub fn evm_spec_id(evm_version: &EvmVersion) -> SpecId { |
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.
wrapped this in a simple util function, and we use this on config
gg |
* refactor: move evm-spec-id to config * chore: make util general and wrap it on config * chore: remove duped util on evm crate * chore: fix fixtures --------- Co-authored-by: Enrique Ortiz <hi@enriqueortiz.dev>
Motivation
prep for #5782
this makes it easier to access the spec id required for the evm from the config
Solution