Skip to content

[codex] add evm-only giga executor path#3583

Open
codchen wants to merge 5 commits into
mainfrom
codex/sei-v3-evm-only-scaffold
Open

[codex] add evm-only giga executor path#3583
codchen wants to merge 5 commits into
mainfrom
codex/sei-v3-evm-only-scaffold

Conversation

@codchen

@codchen codchen commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add giga/evmonly as the final-form EVM-only giga execution path boundary
  • define raw Ethereum RLP block input and commit-neutral outputs as an EVM-native state changeset plus receipts
  • port the core sei-v3-style execution shape directly into giga/evmonly:
    • raw RLP tx parsing and sender recovery
    • go-ethereum execution against an SDK-free native vm.StateDB
    • key-addressable EVM-native balance, nonce, code, and storage state reads
    • deterministic post-block StateChangeSet output
    • Ethereum receipt and per-tx metadata construction
  • add a map-backed MemoryState backend for tests and early integration
  • leave custom precompiles as fail-closed placeholders behind an SDK-free registry/context
  • refresh the README to describe the current implementation, input/output contract, and known limitations

Notes

Custom precompile behavior is intentionally still open. Registered custom precompile addresses return ErrCustomPrecompilesOpen, including through geth's precompile map, so calls fail closed instead of silently executing as empty accounts.

The current port is sequential. The state boundary and changeset shape are intended to be replaceable with the sei-v3 OCC scheduler/store once that layer is brought over.

Historical BLOCKHASH lookups beyond the parent block are not wired yet; BlockHash is currently used for receipt/log metadata.

Validation

go test ./giga/evmonly/...
go test ./giga/...

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.47561% with 338 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.30%. Comparing base (4f2dcc2) to head (ef04c0e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
giga/evmonly/state_db.go 37.72% 221 Missing and 20 partials ⚠️
giga/evmonly/executor.go 68.62% 32 Missing and 16 partials ⚠️
giga/evmonly/state.go 53.40% 39 Missing and 2 partials ⚠️
giga/evmonly/parser.go 60.00% 5 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3583      +/-   ##
==========================================
- Coverage   59.21%   58.30%   -0.91%     
==========================================
  Files        2214     2145      -69     
  Lines      183389   175498    -7891     
==========================================
- Hits       108593   102332    -6261     
+ Misses      65002    64031     -971     
+ Partials     9794     9135     -659     
Flag Coverage Δ
sei-chain-pr 48.47% <48.47%> (?)
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

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

Files with missing lines Coverage Δ
giga/evmonly/config.go 100.00% <100.00%> (ø)
giga/evmonly/parser.go 60.00% <60.00%> (ø)
giga/evmonly/state.go 53.40% <53.40%> (ø)
giga/evmonly/executor.go 68.62% <68.62%> (ø)
giga/evmonly/state_db.go 37.72% <37.72%> (ø)

... and 74 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.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 15, 2026, 11:27 AM

@codchen codchen changed the title [codex] scaffold evm-only giga executor path [codex] add evm-only giga executor path Jun 15, 2026
@codchen codchen marked this pull request as ready for review June 15, 2026 07:54
@cursor

cursor Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New execution path touches EVM state transitions and fee/nonce validation, but it is isolated from app/app.go and ships with placeholders for custom precompiles and limited BLOCKHASH support.

Overview
Introduces giga/evmonly, a new Cosmos-free execution boundary for the final-form giga path: blocks are raw Ethereum RLP txs plus EVM block context, and the executor returns a commit-neutral post-block StateChangeSet and Ethereum receipts (caller persists state).

The Executor runs txs sequentially via go-ethereum core.ApplyMessage on an SDK-free nativeStateDB backed by StateReader / optional MemoryState. It adds RLP parse + sender recovery, configurable nonce/gas-price checks, receipt/log metadata, and deterministic changeset diffing for balance, nonce, code, and storage.

Custom precompiles are wired only as fail-closed placeholders (ErrCustomPrecompilesOpen) through a stub geth precompile map and an SDK-free precompiles registry/context for future work. README documents the contract, limitations (sequential execution, parent-only BLOCKHASH), and tests cover empty blocks, transfers, and precompile failure.

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

Comment thread giga/evmonly/executor.go
result.Receipts = append(result.Receipts, receipt)
result.GasUsed += txResult.GasUsed
}
stateDB.Finalise(true)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing per-transaction Finalise

High Severity

ExecuteBlock calls ApplyMessage for each transaction but only invokes stateDB.Finalise once after the whole block. Self-destructed accounts therefore keep code and storage until block end, so later transactions in the same block can execute against contracts that should already be destroyed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 44a10bc. Configure here.

Comment thread giga/evmonly/state_db.go
s.AddSlotToAccessList(tuple.Address, key)
}
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Transient storage leaks across txs

Medium Severity

Prepare rebuilds the access list for each transaction but leaves transientStates untouched. EIP-1153 transient slots written in an earlier transaction remain visible to later transactions in the same block, violating per-transaction transient semantics.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 44a10bc. Configure here.

@codchen codchen force-pushed the codex/sei-v3-evm-only-scaffold branch from 44a10bc to ef04c0e Compare June 15, 2026 11:25

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ef04c0e. Configure here.

Comment thread giga/evmonly/parser.go
func parseTx(raw []byte, signer ethtypes.Signer) (*ethtypes.Transaction, common.Address, error) {
var tx ethtypes.Transaction
if err := rlp.DecodeBytes(raw, &tx); err != nil {
return nil, common.Address{}, err

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Typed transaction bytes not decoded

Medium Severity

parseTx decodes inputs with rlp.DecodeBytes only. Standard Ethereum raw bytes for access-list, EIP-1559, blob, and set-code transactions use a type prefix and are decoded with Transaction.UnmarshalBinary, so those txs fail parsing before execution.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit ef04c0e. Configure here.

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.

1 participant