-
Notifications
You must be signed in to change notification settings - Fork 438
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
Add Labels to ChainParameters to Enable Hardforks via Single Timestamp #7764
base: master
Are you sure you want to change the base?
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.
We need to support all hardforks
if (Eip4844TransitionTimestamp == Eip4788TransitionTimestamp && | ||
Eip4788TransitionTimestamp == Eip1153TransitionTimestamp && | ||
Eip1153TransitionTimestamp == Eip5656TransitionTimestamp && | ||
Eip5656TransitionTimestamp == Eip6780TransitionTimestamp) |
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 should have a helper method to have such comparisions as we will do it for every hardfork.
} | ||
set | ||
{ | ||
_dencunTransitionTimestamp = value; |
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.
Potentially we could have _dencunTransitionTimestamp
and individual EIP's out of sync, so maybe always calculate it and don't have a separate field?
} | ||
set | ||
{ | ||
_dencunTransitionTimestamp = value; |
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.
Potentially we could have _dencunTransitionTimestamp
and individual EIP's out of sync, so maybe always calculate it and don't have a separate field? Then you also don't need Validate
methods
if (Eip4844TransitionTimestamp == Eip4788TransitionTimestamp && | ||
Eip4788TransitionTimestamp == Eip1153TransitionTimestamp && | ||
Eip1153TransitionTimestamp == Eip5656TransitionTimestamp && | ||
Eip5656TransitionTimestamp == Eip6780TransitionTimestamp) |
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.
You could potentially use more declarative style of Expression
Api to map individual properties to Hardfork property, that might be useful outside of this class too?
This PR introduces functionality to allow grouped EIP timestamps (e.g., dencun, cancun) in ChainParameters. This simplifies the process of activating multiple EIPs simultaneously through a single label, while preserving the ability to handle individual EIP timestamps.
Fixes #7738
Changes
Types of Changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Added unit tests in ChainParametersTests to verify:
Documentation
Requires documentation update
Requires explanation in Release Notes
Release Notes: