Skip to content

Use libevm instead of coreth #3918

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

Merged
merged 16 commits into from
May 12, 2025
Merged

Use libevm instead of coreth #3918

merged 16 commits into from
May 12, 2025

Conversation

ceyonur
Copy link
Contributor

@ceyonur ceyonur commented Apr 30, 2025

Why this should be merged

Importing customtypes and params pkg causes a libevm side-effect which prevents us to use any libevm based (subnet-evm, coreth) VMs to use the e2e tests here. This PR reduces usage of side-effect pkg.

How this was tested

  • Added a new test, TestMustNotImport, in tests/fixture/imports_test.go. This test ensures certain packages do not import restricted modules like plugin/evm/customtypes and params to avoid global configuration conflicts.

Need to be documented in RELEASES.md?

No

@JuanLeon2
Copy link
Contributor

May or may not conflict with pr 3923

@ceyonur
Copy link
Contributor Author

ceyonur commented May 5, 2025

May or may not conflict with pr 3923

Yes it conflicts with 3923. This one addresses comments in that PR.

@ceyonur ceyonur marked this pull request as ready for review May 9, 2025 18:31
@Copilot Copilot AI review requested due to automatic review settings May 9, 2025 18:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the project from using coreth packages to libevm packages to prevent side-effect issues in end-to-end tests.

  • Replaces coreth/core and coreth/params with libevm/core and libevm/params in multiple files.
  • Introduces a new test (TestMustNotImport) to ensure restricted packages (coreth imports) are not accidentally introduced.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

File Description
tests/fixture/tmpnet/genesis.go Replaced coreth imports with libevm, mitigating side-effects.
tests/fixture/imports_test.go Added a test to check that coreth packages are not imported.
tests/e2e/c/dynamic_fees.go Updated import from coreth/params to libevm/params.
genesis/genesis_test.go Updated import from coreth/core to libevm/core.
Files not reviewed (1)
  • go.mod: Language not supported

@StephenButtolph StephenButtolph changed the title use libevm instead of coreth Use libevm instead of coreth May 11, 2025
@StephenButtolph StephenButtolph enabled auto-merge May 11, 2025 17:37
@StephenButtolph StephenButtolph added this pull request to the merge queue May 12, 2025
Merged via the queue into master with commit 883cebf May 12, 2025
46 of 47 checks passed
@StephenButtolph StephenButtolph deleted the fix-coreth-imports branch May 12, 2025 18:38
@github-project-automation github-project-automation bot moved this from Ready 🚦 to Done 🎉 in avalanchego May 12, 2025
samliok added a commit that referenced this pull request May 13, 2025
Co-authored-by: Stephen Buttolph <[email protected]>

## Why this should be merged

## How this works

## How this was tested

## Need to be documented in RELEASES.md?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants