Skip to content

Conversation

@alarso16
Copy link
Contributor

Why this should be merged

This creates all the groundwork to de-duplicate between coreth and subnet-evm in a shared repository. This includes CI and a trivial refactor to prove it works

How this works

Adds all coreth/subnet-evm CI (copy-paste) and lots of go mod tidys

How this was tested

See #4688 for a complicated use case

Need to be documented in RELEASES.md?

No

@alarso16 alarso16 self-assigned this Dec 15, 2025
@alarso16 alarso16 added dependencies This primarily focuses on changing a dependency ci This focuses on changes to the CI process labels Dec 15, 2025
@alarso16 alarso16 marked this pull request as ready for review December 15, 2025 17:46
@alarso16 alarso16 requested review from a team as code owners December 15, 2025 17:46
Copy link
Contributor

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 creates a shared evm module to de-duplicate code between coreth and subnet-evm. The refactor extracts the common constants package into a new graft/evm module that both coreth and subnet-evm can depend on.

Key changes:

  • Created new graft/evm module with shared constants and supporting CI infrastructure
  • Updated coreth and subnet-evm to import constants from the shared module
  • Added comprehensive CI configuration for the new module including linting and testing

Reviewed changes

Copilot reviewed 38 out of 41 changed files in this pull request and generated no comments.

Show a summary per file
File Description
graft/evm/go.mod Defines the new shared evm module with dependencies
graft/evm/Taskfile.yml Adds build, test, and lint tasks for the evm module
graft/evm/.golangci.yml Configures linting rules for the evm module
graft/evm/scripts/*.sh Adds shared scripts for linting, testing, and coverage reporting
graft/subnet-evm/constants/constants.go Removes constants file (moved to shared module)
graft/subnet-evm/**/*.go Updates imports to reference shared evm/constants
graft/subnet-evm/go.mod Adds dependency on shared evm module
graft/coreth/**/*.go Updates imports to reference shared evm/constants
graft/coreth/go.mod Adds dependency on shared evm module
go.mod Adds evm module dependency and replace directive
Dockerfile Includes evm directory in build context
.github/workflows/evm-ci.yml Adds CI workflow for the evm module
.github/CODEOWNERS Adds codeowners for evm module

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

local upstream_folders_file="./scripts/upstream_files.txt"
# Read the upstream_folders file into an array
mapfile -t upstream_folders <"$upstream_folders_file"
# check that the file exists
Copy link
Contributor

Choose a reason for hiding this comment

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

From the department of redundant redundancies, maybe avoid comments that can be trivially inferred from the code? I'm more interested in learning the circumstances under which this file would not exist and what the impact of that absence will be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll clarify behavior and remove the obvious part

Copy link
Member

@JonathanOppenheimer JonathanOppenheimer left a comment

Choose a reason for hiding this comment

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

fair to do the other things separately

@alarso16 alarso16 added evm Related to EVM functionality coreth Related to the former coreth standalone repository labels Dec 15, 2025
@alarso16 alarso16 added the subnet-evm Related to the former subnet-evm standalone repository label Dec 15, 2025
golang.org/x/sys v0.38.0 // indirect
)

replace github.com/ava-labs/avalanchego => ../../
Copy link
Contributor

Choose a reason for hiding this comment

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

Because we don't currently depend on avalanchego, this replace looks weird... But this is presumably in place for when this does depend on avalanchego.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah true! This is leftover from a rebase where it does... in any case it will soon

@StephenButtolph StephenButtolph added this pull request to the merge queue Dec 15, 2025
Merged via the queue into master with commit 37d078c Dec 15, 2025
59 of 60 checks passed
@StephenButtolph StephenButtolph deleted the alarso16/evm-module branch December 15, 2025 20:41
@github-project-automation github-project-automation bot moved this to Done 🎉 in avalanchego Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci This focuses on changes to the CI process coreth Related to the former coreth standalone repository dependencies This primarily focuses on changing a dependency evm Related to EVM functionality subnet-evm Related to the former subnet-evm standalone repository

Projects

Status: Done 🎉

Development

Successfully merging this pull request may close these issues.

5 participants