-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add interop hardfork in all relevant places. #14582
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,9 @@ pub fn revm_spec_by_timestamp_after_bedrock( | |
| chain_spec: impl OpHardforks, | ||
| timestamp: u64, | ||
| ) -> OpSpecId { | ||
| // if chain_spec.is_interop_active_at_timestamp(timestamp) { | ||
| // OpSpecId::INTEROP | ||
| // } else | ||
|
Comment on lines
+20
to
+22
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. afaik there are no evm changes for interop? |
||
| if chain_spec.is_isthmus_active_at_timestamp(timestamp) { | ||
| OpSpecId::ISTHMUS | ||
| } else if chain_spec.is_holocene_active_at_timestamp(timestamp) { | ||
|
|
@@ -49,6 +52,10 @@ mod tests { | |
| let cs = ChainSpecBuilder::mainnet().chain(reth_chainspec::Chain::from_id(10)).into(); | ||
| f(cs).build() | ||
| } | ||
| // assert_eq!( | ||
| // revm_spec_by_timestamp_after_bedrock(op_cs(|cs| cs.interop_activated()), 0), | ||
| // OpSpecId::INTEROP | ||
| // ); | ||
| assert_eq!( | ||
| revm_spec_by_timestamp_after_bedrock(op_cs(|cs| cs.isthmus_activated()), 0), | ||
| OpSpecId::ISTHMUS | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,8 @@ hardfork!( | |
| Holocene, | ||
| /// Isthmus: <https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/isthmus/overview.md> | ||
| Isthmus, | ||
| /// Interop: <https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/interop/overview.md> | ||
|
||
| Interop, | ||
| } | ||
| ); | ||
|
|
||
|
|
@@ -162,6 +164,7 @@ impl OpHardfork { | |
| Self::Granite => Some(1723478400), | ||
| Self::Holocene => Some(1732633200), | ||
| Self::Isthmus => todo!(), | ||
| Self::Interop => todo!(), | ||
| }, | ||
| ) | ||
| } | ||
|
|
@@ -198,6 +201,7 @@ impl OpHardfork { | |
| Self::Granite => Some(1726070401), | ||
| Self::Holocene => Some(1736445601), | ||
| Self::Isthmus => todo!(), | ||
| Self::Interop => todo!(), | ||
| }, | ||
| ) | ||
| } | ||
|
|
@@ -378,8 +382,10 @@ mod tests { | |
|
|
||
| #[test] | ||
| fn check_op_hardfork_from_str() { | ||
| let hardfork_str = | ||
| ["beDrOck", "rEgOlITH", "cAnYoN", "eCoToNe", "FJorD", "GRaNiTe", "hOlOcEnE", "isthMUS"]; | ||
| let hardfork_str = [ | ||
| "beDrOck", "rEgOlITH", "cAnYoN", "eCoToNe", "FJorD", "GRaNiTe", "hOlOcEnE", "isthMUS", | ||
| "inTerOP", | ||
| ]; | ||
| let expected_hardforks = [ | ||
| OpHardfork::Bedrock, | ||
| OpHardfork::Regolith, | ||
|
|
@@ -389,6 +395,7 @@ mod tests { | |
| OpHardfork::Granite, | ||
| OpHardfork::Holocene, | ||
| OpHardfork::Isthmus, | ||
| OpHardfork::Interop, | ||
| ]; | ||
|
|
||
| let hardforks: Vec<OpHardfork> = | ||
|
|
||
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 we need to add to the genesis info type