Skip to content

Conversation

@JonathanOppenheimer
Copy link
Member

@JonathanOppenheimer JonathanOppenheimer commented Dec 3, 2025

Why this should be merged

Migrates subnet-evm to graft/subnet-evm as per #4645.

Note that this PR is not in it's final form and will be rebased as more code changes are made in Subnet-EVM to make it compliant with AvalancheGo. See #4645 for a list of PRs that still need to be merged.

This PR was made now to surface any unforeseen CI issues.

As per @maru-ava:

This is basically impossible to review directly, so reviewers are encouraged to review the script that performed the merge and to reproduce the branch locally to gain confidence that this PR represents the results of that script.

cd graft
task subnet-evm-subtree-merge

How this works

See #4531

How this was tested

  • CI will pass only once child PRs are merged into this one

Need to be documented in RELEASES.md?

N/A

qdm12 and others added 30 commits April 1, 2025 10:10
- Part of the core/rawdb migration to use libevm
- Using libevm `InspectDatabase`
- Define options passed to libevm `InspectDatabase`

See original PR ava-labs/coreth#791
- Move our own code to `_ext.go` files
- Import symbols from libevm in imports.go

See original PR ava-labs/coreth#772

Co-authored-by: Arran Schlosberg <[email protected]>
- fix generation of code using type aliases and Go 1.23
- reproducible generation locally (pin gencodec version)
- CI keeps generated Go files up to date with other source code
- Generate missing files

See original PR ava-labs/coreth#856
Reduces overlap between subnet-evm and upstream files:
- Types and variables that are identical to `libevm` are moved to `imports.go`.
- Files that include only `subnet-evm` have the `_ext.go` suffix added.

See original PR ava-labs/coreth#872
These packages are unused and were just copies from the `ava-labs/libevm` repo.

See original PR ava-labs/coreth#876
Until a complete transition to a `libevm` package, it shouldn't be allowed to be imported directly.

Remove the package from the allowed list and move a `types` test into `package types_test` to avoid a circular dependency.

See original PR ava-labs/coreth#874
Complete the transition of `core/types` to upstream code.

Note that the previous commit results in _all_ upstream types / vars / consts being in the `imports.go` file. This results in a strict partition of upstream and local identifiers so it is safe to simply change import paths.

1. Globally change all imports from `subnet-evm/core/types` to `libevm/core/types`;
2. Rename all `subnet-evm/core/types` imports to `customtypes` for ease of review here;
3. Dot import `libevm/core/types` in tests only to avoid hundreds of noisy changes.

See original PR ava-labs/coreth#875
The `types` package now only contains `coreth` logic an nothing from upstream so it shouldn't live in the same location in the repo.

Automated:

```shell
$ git mv core/types plugin/evm/types
$ find -name '*.go' | xargs sed -i 's|"github.com/ava-labs/coreth/core/types"|"github.com/ava-labs/coreth/plugin/evm/types"|'
$ golangci-lint run --fix
```

See original PR ava-labs/coreth#877
- import interfaces from github.com/ava-labs/libevm directly
- import `NotFound` error from github.com/ava-labs/libevm directly
- Keep our two subnet-evm-specific interfaces at interfaces/interfaces.go

See original PR ava-labs/coreth#883
Changes applied from comments on the review of ava-labs/coreth#820

See original PR ava-labs/coreth#862

Signed-off-by: Quentin McGaw <[email protected]>
Co-authored-by: Arran Schlosberg <[email protected]>
Signed-off-by: maru <[email protected]>
Co-authored-by: maru <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
- add missing fee config block for `params.ChainConfig` `Description` method and add test
- add missing fee config block for `params.ChainConfig` `Verify` method and add test
- add test for `params.SetEthUpgrades`
- add comment on the usage of `params.SetEthUpgrades` in genesis
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Lubov66 <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Signed-off-by: Martin Eckardt <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Martin Eckardt <[email protected]>
Co-authored-by: Michael Kaplan <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
alarso16 and others added 9 commits December 1, 2025 20:13
Signed-off-by: Austin Larson <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
…ms (#1679)

Signed-off-by: Jonathan Oppenheimer <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
@JonathanOppenheimer JonathanOppenheimer self-assigned this Dec 3, 2025
@JonathanOppenheimer JonathanOppenheimer changed the title [migrate-subnet-evm][2] Add 'graft/subnet-evm/' [migrate-subnet-evm][2] Add graft/subnet-evm/ Dec 3, 2025
@JonathanOppenheimer JonathanOppenheimer added the DO NOT MERGE This PR must not be merged in its current state label Dec 3, 2025
@JonathanOppenheimer JonathanOppenheimer moved this to Ready 🚦 in avalanchego Dec 3, 2025
@JonathanOppenheimer JonathanOppenheimer moved this from Ready 🚦 to In Progress 🏗️ in avalanchego Dec 3, 2025
JonathanOppenheimer and others added 11 commits December 4, 2025 15:53
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
…1875)

Signed-off-by: Jonathan Oppenheimer <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Signed-off-by: Jonathan Oppenheimer <[email protected]>
Co-authored-by: Austin Larson <[email protected]>
Co-authored-by: Michael Kaplan <[email protected]>
…9a4455ba'

git-subtree-dir: graft/subnet-evm
git-subtree-mainline: aea2f58
git-subtree-split: 73a35d3
@JonathanOppenheimer JonathanOppenheimer force-pushed the JonathanOppenheimer/migrate-subnet-evm-subtree-merge branch from 445324f to 4770bda Compare December 4, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE This PR must not be merged in its current state evm monorepo subnet-evm

Projects

Status: In Progress 🏗️

Development

Successfully merging this pull request may close these issues.