Skip to content

Integrate evmonly executor with giga store - #3864

Draft
codchen wants to merge 2 commits into
mainfrom
codex/integrate-evmonly-giga-store
Draft

Integrate evmonly executor with giga store#3864
codchen wants to merge 2 commits into
mainfrom
codex/integrate-evmonly-giga-store

Conversation

@codchen

@codchen codchen commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • make the evmonly executor store-only: every block opens a giga snapshot and commits through CommitStateChanges
  • require a store-specific NamedChangeSetEncoder and preserve storage-prefix clears
  • add the loadtest MemoryStore implementation over the existing immutable StateReader
  • encode state changes directly into typed, fixed-width NamedChangeSet key/value pairs with contiguous backing allocations
  • apply direct pairs without an RLP encode/decode round trip
  • retain historical state through per-block version slabs and linked version nodes, avoiding independently growing slices and duplicate account-touch indexes
  • keep result sinks post-commit and preserve cleanup/error behavior across sequential and OCC execution

Why

The evmonly executor now has one persistence model: a giga Store. The concrete store implementation can vary, but execution no longer has a separate non-giga state path.

The first loadtest adapter wrapped the complete native changeset in RLP and decoded it immediately inside CommitStateChanges. The direct format removes that redundant work while continuing to exercise the real giga interface.

Loadtest

Configuration: 400 blocks, 1,000 transactions/block, one ordered block worker, 12 executor workers, zero gas price, and discard result sink. Values are three-run medians in tx/s.

Workload Pre-MemoryStore Giga MemoryStore Difference OCC reruns/block
Transfer, unique 254,684 227,601 -10.6% 0
Transfer, 10% recipient conflicts 224,630 198,971 -11.4% 50
Transfer, hot recipient 74,961 71,220 -5.0% 999
Transfer, same sender 84,601 81,371 -3.8% 999
ERC20 transfer, unique 194,834 175,273 -10.0% 0
ERC20 transfer, 10% recipient conflicts 163,868 146,445 -10.6% 50
ERC20 transfer, hot recipient 34,256 32,986 -3.7% 999
Snapshot/revert 262,522 233,799 -10.9% 0

Every run completed 400,000/400,000 transactions successfully with zero execution errors and zero OCC fallbacks.

The pre-MemoryStore comparison is not an equivalent persistence implementation: it executes against WithState and discards block state changes, while the Giga run encodes, commits, and retains current and historical state for later snapshots. It is therefore a useful lower bound on commit overhead, not evidence that the Giga interface itself costs 10% in production.

In an 800-block snapshot/revert profile, EncodeMemoryStoreChangeSet and CommitStateChanges each represented about 0.1% of sampled CPU. Most MemoryStore-specific allocation was the retained versioned storage map. A pointer-free indexed-history experiment did not improve end-to-end throughput and was reverted.

Validation

  • go test ./giga/... ./sei-db/state_db/giga
  • go test -race ./giga/evmonly/...
  • go vet ./giga/evmonly/... ./sei-db/state_db/giga
  • touched Go files pass gofmt -s -l and goimports -l
  • git diff --check

The full-tree goimports -l . reports pre-existing untouched generated and test files.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 7, 2026, 7:42 AM

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.91968% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.92%. Comparing base (a8f5cd1) to head (1a66532).

Files with missing lines Patch % Lines
giga/evmonly/memory_store.go 81.29% 44 Missing and 31 partials ⚠️
giga/evmonly/cmd/evmonly-loadtest/state.go 0.00% 20 Missing ⚠️
giga/evmonly/giga_store.go 90.47% 2 Missing and 2 partials ⚠️
giga/evmonly/occ.go 87.50% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3864      +/-   ##
==========================================
- Coverage   61.74%   60.92%   -0.82%     
==========================================
  Files        2381     2289      -92     
  Lines      201667   191643   -10024     
==========================================
- Hits       124513   116766    -7747     
+ Misses      66074    64601    -1473     
+ Partials    11080    10276     -804     
Flag Coverage Δ
sei-chain-pr 79.49% <79.91%> (?)
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/cmd/evmonly-loadtest/config.go 67.14% <100.00%> (+0.32%) ⬆️
giga/evmonly/cmd/evmonly-loadtest/pipeline.go 71.91% <100.00%> (+1.68%) ⬆️
giga/evmonly/cmd/evmonly-loadtest/sinks.go 75.71% <100.00%> (-0.23%) ⬇️
giga/evmonly/executor.go 87.68% <100.00%> (-0.05%) ⬇️
giga/evmonly/state.go 89.00% <100.00%> (+0.57%) ⬆️
giga/evmonly/types.go 81.81% <ø> (ø)
giga/evmonly/occ.go 81.72% <87.50%> (ø)
giga/evmonly/giga_store.go 90.47% <90.47%> (ø)
giga/evmonly/cmd/evmonly-loadtest/state.go 70.10% <0.00%> (-18.21%) ⬇️
giga/evmonly/memory_store.go 81.29% <81.29%> (ø)

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

@codchen
codchen force-pushed the codex/integrate-evmonly-giga-store branch from a80537b to 66a304c Compare August 6, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant