Skip to content
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: Canyon hardfork behind optimism feature flag #871

Merged
merged 2 commits into from Nov 20, 2023

Conversation

clabby
Copy link
Contributor

@clabby clabby commented Nov 18, 2023

Overview

Adds the Canyon hardfork behind the optimism feature flag, and adds a macro to define the SpecId enum to separate the ordering of hardforks between L1 and optimism.

The Canyon hardfork does not implement any EVM changes, though it does implicitly enable Shanghai.

More information about Canyon can be found in the upstream tracking issue: ethereum-optimism/optimism#7452

}
}
#[cfg(feature = "optimism")]
define_spec_id!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having a separate SpecId structure, but it isn't best to wrap it inside macro.

You could do:

        /// Specification IDs and their activation block.
        /// 
        /// See: [Ethereum Execution Specs](https://github.com/ethereum/execution-specs)
        #[cfg(feature = "optimism")]
        #[repr(u8)]
        #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, enumn::N)]
        #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
        pub enum SpecId {
            ...
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pulled it back out

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@rakita rakita merged commit 3608d2d into bluealloy:main Nov 20, 2023
8 checks passed
rakita pushed a commit that referenced this pull request Nov 21, 2023
* Add `Canyon` hardfork behind `optimism` feature flag

* Remove macro
rakita pushed a commit that referenced this pull request Nov 21, 2023
* Add `Canyon` hardfork behind `optimism` feature flag

* Remove macro
@rakita
Copy link
Member

rakita commented Nov 21, 2023

Just to note here, I created this change on the top of the 1609e07 commit. This "parent" commit is used inside reth and the idea is to freeze revm as there are some breaking revm changes so it would be less painful.

@github-actions github-actions bot mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants