-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: add activation_block
method for Ethereum hardforks
#5723
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6250c62
add activation_block method for Ethereum hardforks
tcoratger 00ef2a5
Merge remote-tracking branch 'origin/main' into activation-block
tcoratger 6fc8fee
update
tcoratger 5671c56
update mainnet_activation_block method
tcoratger f528b1a
update
tcoratger 65f2951
smol touchup
mattsse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
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.
we can rename this to
mainnet_activation_block
but what we want here is
activation_block(&self, chain: Chain)
see referenced foundry issue.
I'm fine if
fn activation_block
only handles Chain::mainnet in this PRwe don't have to fill all blocks for other chains, just to have it so they can be added one by one.
this will mostly be useful for foundry because I intend to use it in anvil eventually
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.
@mattsse In this case, isn't it better to implement this method for the enum
Chain
itself by doingactivation_block(&self, hardfork: Hardfork)
? Because otherwise we have a circular dependency, right? Because the reth-primitives crate itself uses theHardfork
enum. Maybe I'm missing something here.Also, I wanted to fill in the block activations for certain L2s but do you know where I could have the precise information for each of them? There is no equivalent to the precise Ethereum specification https://ethereum.github.io/execution-specs/autoapi/ethereum/index.html for the other L2s.
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.
we'd like to migrate to alloy-chains now #5429 which gets rid of the circular dep issue, looks like this is a blocker for this PR
I want this functionality in Hardfork and not chainid, so chain crate stays lean
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.
@mattsse Please tell me if this is better now.