Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Conversation

@darioush
Copy link

@darioush darioush commented Jan 6, 2025

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

@darioush darioush changed the title refactor: Split config package so it doesn't end up importing core, c… refactor: Split config package so it doesn't import core, core/vm Jan 6, 2025
@darioush darioush marked this pull request as ready for review January 6, 2025 20:32
@darioush darioush requested review from a team and ceyonur as code owners January 6, 2025 20:32
Copy link
Contributor

@qdm12 qdm12 left a 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.

qdm12
qdm12 previously approved these changes Jan 7, 2025
Co-authored-by: Quentin McGaw <[email protected]>
Signed-off-by: Darioush Jalali <[email protected]>
Darioush Jalali and others added 4 commits January 7, 2025 11:09
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]>
@darioush darioush enabled auto-merge (squash) January 7, 2025 20:38
@darioush darioush merged commit 14e9d30 into master Jan 7, 2025
8 checks passed
@darioush darioush deleted the split-config-type branch January 7, 2025 20:38
@qdm12 qdm12 mentioned this pull request May 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants