This repository was archived by the owner on Nov 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 160
refactor: Split config package so it doesn't import core, core/vm #734
Merged
Conversation
This file contains hidden or 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
ceyonur
reviewed
Jan 7, 2025
qdm12
reviewed
Jan 7, 2025
Contributor
qdm12
left a comment
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.
Maybe there is an alternative approach to this (suggested in comments)?
Having a type alias with type assertion does work, but it's a tiny bit convoluted I think.
… core, core/vm etc." This reverts commit 8f1ed91.
qdm12
previously approved these changes
Jan 7, 2025
Co-authored-by: Quentin McGaw <[email protected]> Signed-off-by: Darioush Jalali <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]> Signed-off-by: Darioush Jalali <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]> Signed-off-by: Darioush Jalali <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]> Signed-off-by: Darioush Jalali <[email protected]>
qdm12
approved these changes
Jan 7, 2025
ceyonur
reviewed
Jan 7, 2025
ceyonur
reviewed
Jan 7, 2025
ceyonur
approved these changes
Jan 7, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why this should be merged
One main goal of the atomic package refactor is to have the client config imported / serialized without importing most of the VM functionality like core or core/vm.
As is on master, plugin/evm/config ends up importing stuff through legacypool & a direct import of "eth" (to return eth.Settings)
How this works
The simplest approach seems to me as redeclaring the config type with its methods in plugin/evm.
I left "deprecate" to avoid moving the test but I can move the test if desired.
How this was tested
CI. I also added a UT to enforce forbidden imports. I think this UT can live in plugin/evm since that's the "main" package.
Need to be documented?
No
Need to update RELEASES.md?
No