Skip to content

chore(giga): remove evmone from codebase - #4117

Open
shemnon wants to merge 2 commits into
mainfrom
shemnon/con-422-remove-evmone-from-codebase
Open

chore(giga): remove evmone from codebase#4117
shemnon wants to merge 2 commits into
mainfrom
shemnon/con-422-remove-evmone-from-codebase

Conversation

@shemnon

@shemnon shemnon commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes evmone/evmc from the codebase (CON-422). The Giga executor's production path already ran on go-ethereum's native interpreter (NewGethExecutor); the evmc/evmone path (NewEvmoneExecutor, the HostContext/EVMInterpreter bridge, the per-platform evmone shared libraries, and the best-effort VM init in app.go/test_helpers.go) was dead code that nothing called.
  • Deletes giga/executor/lib (evmc loader, checksum verification, bundled libevmone binaries, download generator) and the evmc-based HostContext/EVMInterpreter in giga/executor/internal.
  • Drops the libevmone install step from the Dockerfile and the now-unused evmc/v12 dependency from go.mod/go.sum.
  • Cleans up stale evmone references in giga/tests/giga_test.go comments.

Testing performed to validate your change

  • go build ./..., go vet ./... — clean
  • make fmtcheck and golangci-lint run ./giga/... ./app/... — clean
  • scripts/ramtest.sh ./giga/... targeted runs (TestAllModes_NonConflicting, TestGigaVsGeth_GasComparison, TestGiga_CREATE_CodePath, TestGiga_GasAccounting) — all pass, gas parity between Geth (V2) and Giga unchanged

The Giga executor's production path already runs on go-ethereum's
native interpreter (NewGethExecutor); the evmc/evmone path
(NewEvmoneExecutor, the HostContext/EVMInterpreter bridge, the
per-platform evmone shared libraries, and the best-effort VM init in
app.go/test_helpers.go) was dead code that nothing called.

- Delete giga/executor/lib (evmc loader, checksum verification,
  bundled libevmone binaries, download generator)
- Delete the evmc-based HostContext/EVMInterpreter in
  giga/executor/internal
- Drop NewEvmoneExecutor and the EvmoneVM keeper field
- Drop the libevmone install step from the Dockerfile
- Drop the now-unused evmc/v12 dependency
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
This touches core Giga EVM execution and removes a large alternate interpreter stack, but production behavior should stay on the existing Geth path; risk is mainly regression in Giga gas/accounting tests and any custom deployments that relied on SEI_EVMONE_LIB_DIR or bundled evmone libs.

Overview
Removes the dead evmone/EVMC branch from the Giga EVM executor so Giga always runs through go-ethereum’s native interpreter (NewGethExecutor). That deletes the EVMC bridge (HostContext, EVMInterpreter), NewEvmoneExecutor, the giga/executor/lib loader (checksum-verified shared libs, SEI_EVMONE_LIB_DIR, download generator), and startup/test wiring that best-effort loaded evmone into GigaEvmKeeper.

Build and packaging: the Dockerfile no longer installs libevmone under /usr/lib, and github.com/ethereum/evmc/v12 is dropped from go.mod/go.sum. Tests and comments are updated to describe Geth-vs-Giga gas parity without evmone-specific SSTORE adjustment logic; the standalone TestGiga_SstoreGasDeltaCalculation test is removed with that code.

Reviewed by Cursor Bugbot for commit f2cd9d4. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 9, 2026, 9:53 PM

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A clean, near-pure deletion of the dead evmc/evmone path (2107 lines removed, 9 added): no remaining references to InitEvmoneVM, NewEvmoneExecutor, EvmoneVM, NewHostContext, giga/executor/lib, the SEI_EVMONE_LIB_DIR knob, or evmc/v12 survive anywhere in the tree, and the Dockerfile's /go/lib copy step for the other native libs is untouched. Two non-blocking cleanup gaps remain.

Findings: 0 blocking | 2 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] giga/tests/giga_test.go still carries TestGiga_SstoreGasDeltaCalculation (~lines 1374-1428), which this PR left behind while cleaning the other evmone references in the same file. Its godoc calls it "a unit test for the HostContext gas adjustment logic" and its inline comment reads "Calculate delta the same way NewHostContext does" — both name a type deleted by this PR. The test body reimplements the max(0, seiSstoreGas - 20000) arithmetic locally and asserts it against hardcoded expectations, so it exercises no production code at all now; the real coverage lives in TestGigaVsGeth_GasComparison and TestGiga_SstoreGasHonoredByChainConfig. Deleting it fits the scope of this cleanup better than leaving a test anchored to a removed function.
  • [suggestion] No CHANGELOG.md entry was added under ## Unreleased. The repo's changelog header asks for an entry per PR, and every prior evmone-related change followed that (#3411, #3443, #3624, #3668). This one is operator-visible beyond a pure refactor: release images no longer ship libevmone.*.so in /usr/lib, and the SEI_EVMONE_LIB_DIR override is gone.

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.97%. Comparing base (a665891) to head (f2cd9d4).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4117      +/-   ##
==========================================
- Coverage   60.94%   59.97%   -0.98%     
==========================================
  Files        2192     2087     -105     
  Lines      192187   179499   -12688     
==========================================
- Hits       117131   107652    -9479     
+ Misses      63684    61565    -2119     
+ Partials    11372    10282    -1090     
Flag Coverage Δ
sei-chain-pr 60.91% <ø> (?)
sei-db 69.80% <ø> (?)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/app.go 71.55% <ø> (+0.05%) ⬆️
app/test_helpers.go 67.33% <ø> (+0.31%) ⬆️
giga/deps/xevm/keeper/keeper.go 61.63% <ø> (ø)
giga/executor/executor.go 44.44% <ø> (+12.44%) ⬆️

... and 115 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Delete TestGiga_SstoreGasDeltaCalculation: it re-implemented the
  deleted HostContext's gas-delta arithmetic locally and asserted
  against itself, exercising no production code. Coverage remains in
  TestGigaVsGeth_GasComparison and TestGiga_SstoreGasHonoredByChainConfig.
- Add a CHANGELOG.md entry noting release images no longer ship
  libevmone.*.so/.dylib and that SEI_EVMONE_LIB_DIR is removed.
@shemnon
shemnon added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants