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 transfers/block, one ordered block worker, 12 executor workers, discard result sink.

The optimized implementation stabilizes around 227k-228k tx/s across repeated runs:

  • 226,198 tx/s
  • 228,323 tx/s
  • 227,601 tx/s

An 800-block profiled run completed at 227,173 tx/s. In the final CPU profile, EncodeMemoryStoreChangeSet and CommitStateChanges each represented about 0.04% of sampled CPU, so further parallel encoding or pooling is not expected to produce a sizable end-to-end gain. This is effectively back at the earlier non-giga loadtest throughput of about 229k tx/s.

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