Skip to content

Conversation

@ARR4N
Copy link
Collaborator

@ARR4N ARR4N commented Sep 17, 2024

Why this should be merged

Closes #21

How this works

New methods on params.ChainConfigHooks, each plugged into the end of their respective methods.

The CheckConfigCompatible hook has the same signature as the params.CheckCompatible method, but this can be updated if we find that we need access to the old ChainConfig.

How this was tested

Unit tests of each hook demonstrate the difference compared to when they aren't registered.

@ARR4N ARR4N marked this pull request as ready for review September 17, 2024 18:32
@ARR4N ARR4N requested review from a team, ceyonur, darioush and michaelkaplan13 and removed request for a team September 17, 2024 18:32
Comment on lines -62 to -64
// (Optional) If not all hooks are desirable then embedding a [NOOPHooks]
// allows the type to satisfy the [RulesHooks] interface, resulting in
// default Ethereum behaviour.

Choose a reason for hiding this comment

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

should we keep this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's just been moved to ChainConfigExtra. I didn't think it was necessary to include it twice in the example, and that it should be at the first appearance of NOOPHooks.

Co-authored-by: Darioush Jalali <[email protected]>
Signed-off-by: Arran Schlosberg <[email protected]>
@ARR4N ARR4N merged commit c70b3e3 into libevm Sep 17, 2024
3 checks passed
@ARR4N ARR4N deleted the arr4n/chainconfig-check-hooks branch September 17, 2024 19:55
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.

ChainConfig hooks for subnet-evm

2 participants