Skip to content

avoid taking snapshot upon StateDB creation#2787

Open
codchen wants to merge 2 commits intomainfrom
tony/giga-snapshot
Open

avoid taking snapshot upon StateDB creation#2787
codchen wants to merge 2 commits intomainfrom
tony/giga-snapshot

Conversation

@codchen
Copy link
Collaborator

@codchen codchen commented Jan 30, 2026

Describe your changes and provide context

We used to take a Snapshot of the store whenever an EVM transaction starts, even if it's just a value transfer, because we need the original context to serve GetCommittedState. Taking snapshot is expensive from an allocation standpoint. This PR adds a new method on cachekv.Store so that for giga, GetCommittedState can invoke the new method instead of having to take a snapshot at the beginning.

Testing performed to validate your change

unit tests

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 6, 2026, 3:12 AM

@github-actions
Copy link

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 30, 2026, 4:39 AM

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 73.91304% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.91%. Comparing base (5c26262) to head (ba85a41).

Files with missing lines Patch % Lines
giga/deps/xevm/state/statedb.go 33.33% 3 Missing and 1 partial ⚠️
giga/deps/xevm/state/state.go 33.33% 1 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (5c26262) and HEAD (ba85a41). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5c26262) HEAD (ba85a41)
sei-tendermint 1 0
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2787      +/-   ##
==========================================
- Coverage   56.58%   46.91%   -9.67%     
==========================================
  Files        2033     1967      -66     
  Lines      166263   160953    -5310     
==========================================
- Hits        94074    75519   -18555     
- Misses      63926    78869   +14943     
+ Partials     8263     6565    -1698     
Flag Coverage Δ
sei-chain 41.50% <73.91%> (-0.01%) ⬇️
sei-cosmos 48.12% <ø> (-0.02%) ⬇️
sei-db 68.72% <ø> (ø)
sei-tendermint ?

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

Files with missing lines Coverage Δ
giga/deps/store/cachekv.go 80.80% <100.00%> (+1.02%) ⬆️
giga/deps/xevm/keeper/keeper.go 58.40% <100.00%> (+0.37%) ⬆️
giga/deps/xevm/keeper/state.go 69.23% <100.00%> (+11.33%) ⬆️
giga/deps/xevm/state/state.go 95.12% <33.33%> (-1.58%) ⬇️
giga/deps/xevm/state/statedb.go 40.78% <33.33%> (+0.52%) ⬆️

... and 322 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 tony/giga-snapshot branch from 75fa180 to bf4ea52 Compare January 30, 2026 05:14
@codchen codchen force-pushed the tony/giga-snapshot branch from cd111c4 to e7378f8 Compare February 2, 2026 03:01
@codchen codchen force-pushed the tony/giga-snapshot branch from e7378f8 to ba85a41 Compare February 6, 2026 03:11
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