Skip to content

refactor!: Create a shared EVM module#4688

Closed
alarso16 wants to merge 2 commits intomasterfrom
alarso16/shared-evm
Closed

refactor!: Create a shared EVM module#4688
alarso16 wants to merge 2 commits intomasterfrom
alarso16/shared-evm

Conversation

@alarso16
Copy link
Contributor

@alarso16 alarso16 commented Dec 12, 2025

Why this should be merged

This also shared go-ethereum code to be used by both coreth and subnet-evm without violating licensing issues. Furthermore, it allows testing with both sets of registrations.

This maybe shouldn't be merged in its current form. Likely, it would be easier to just create the module and CI in one PR, and then add a simple implementation in a different PR

How this works

Commit 1 preps a new module and CI for shared evm code.

Commit 2 moves the RPC package, and adds abstractions for testing ease. The dubious part is definitely the global for knowing whether it's a coreth or subnet-evm test for when we need to check constants.

How this was tested

Well it passes CI! To be convinced that both registrations are run and either will cause a CI failure, I recommend checking this out locally and altering the constant set in graft/evm-shared/rpc/subscription_test.go.

Need to be documented in RELEASES.md?

No?

@alarso16 alarso16 force-pushed the alarso16/shared-evm branch 4 times, most recently from 1055e59 to 6512163 Compare December 12, 2025 22:32
@alarso16 alarso16 force-pushed the alarso16/shared-evm branch from 6512163 to 2f50775 Compare December 12, 2025 22:46
@ARR4N
Copy link
Contributor

ARR4N commented Dec 15, 2025

Code originally from geth, used by both coreth and subnet-evm should be sourced from libevm so there's only a single instance and to allow for simpler upstream syncing.

@alarso16
Copy link
Contributor Author

alarso16 commented Dec 15, 2025

Talked offline, this is still the temporary middle place before properly deduplicating with libevm

@alarso16
Copy link
Contributor Author

Instead of importing coreth and subnet-evm into this evm directory, we should instead find a way of to move this into libevm.

@alarso16 alarso16 closed this Dec 29, 2025
@github-project-automation github-project-automation bot moved this to Done 🎉 in avalanchego Dec 29, 2025
@alarso16 alarso16 deleted the alarso16/shared-evm branch March 11, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants