Skip to content

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Feb 3, 2026

Describe your changes and provide context

Add a catch-all LegacyDB to EVM-SS that stores all EVM module keys that don't fit into the optimized databases (Nonce, CodeHash, Code, Storage).

This ensures ALL EVM data is routed to EVM-SS:

  • Optimized keys (nonce, code, codehash, storage) go to specialized DBs
  • All other EVM keys (address mappings, receipts, pointers, bloom, etc.) go to LegacyDB with the full original key preserve

Testing performed to validate your change

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 12, 2026, 8:18 PM

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.77%. Comparing base (7831ba3) to head (6ade865).

Files with missing lines Patch % Lines
sei-db/state_db/ss/composite/store.go 0.00% 2 Missing and 2 partials ⚠️
sei-db/common/evm/keys.go 66.66% 2 Missing ⚠️
sei-db/state_db/ss/evm/store.go 0.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                         Coverage Diff                         @@
##           feature/composite-ss-read-path    #2792       +/-   ##
===================================================================
+ Coverage                           48.32%   56.77%    +8.45%     
===================================================================
  Files                                 671     2070     +1399     
  Lines                               50580   168610   +118030     
===================================================================
+ Hits                                24443    95733    +71290     
- Misses                              23998    64348    +40350     
- Partials                             2139     8529     +6390     
Flag Coverage Δ
sei-chain 40.89% <46.66%> (?)
sei-cosmos 48.11% <ø> (-0.03%) ⬇️
sei-db 68.72% <ø> (ø)
sei-tendermint 58.73% <ø> (?)

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

Files with missing lines Coverage Δ
sei-db/state_db/ss/evm/types.go 100.00% <100.00%> (ø)
sei-db/common/evm/keys.go 80.95% <66.66%> (ø)
sei-db/state_db/ss/evm/store.go 58.77% <0.00%> (ø)
sei-db/state_db/ss/composite/store.go 49.07% <0.00%> (ø)

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

@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from b68f249 to f5d8315 Compare February 3, 2026 21:52
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-legacy-db branch 2 times, most recently from 2d1839f to 24a9eae Compare February 4, 2026 21:31
Base automatically changed from feature/composite-ss-wal-integration to feature/composite-ss-read-path February 9, 2026 20:57
Comment on lines 472 to 476
for version, evmChanges := range evmChangesByVersion {
if err := s.evmStore.ApplyChangesetParallel(version, evmChanges); err != nil {
s.logger.Error("failed to flush EVM raw import batch", "version", version, "error", err)
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
@Kbhat1 Kbhat1 requested a review from yzang2019 February 11, 2026 15:24
@Kbhat1
Copy link
Contributor Author

Kbhat1 commented Feb 11, 2026

@yzang2019 could you review again?

Comment on lines 165 to 171
for storeType, pairs := range changes {
ch, ok := s.asyncChs[storeType]
if !ok || len(pairs) == 0 {
continue
}
ch <- dbWrite{version: version, pairs: pairs}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
Comment on lines 262 to 265
for st, ch := range s.asyncChs {
close(ch)
delete(s.asyncChs, st)
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
ch := make(chan dbWrite, asyncBufferSize)
store.asyncChs[storeType] = ch
store.asyncWg.Add(1)
go store.asyncWorker(db, ch)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-legacy-db branch 2 times, most recently from 03beace to 6c1c6aa Compare February 12, 2026 00:46
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-read-path branch from fd3d4c8 to 12de207 Compare February 12, 2026 00:47
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-legacy-db branch from 6c1c6aa to 57a6b04 Compare February 12, 2026 00:48
@Kbhat1 Kbhat1 requested a review from blindchaser February 12, 2026 16:55
Part 6 of CompositeStateStore: adds catch-all LegacyDB so ALL EVM
data is routed to EVM-SS.

- EVMKeyLegacy: catch-all for EVM keys that don't match optimized
  types (address mappings, codesize, receipts, pointers, bloom, etc.)
- CodeSize routes to Legacy (not its own DB) per reviewer feedback
- Rename EVMKeyUnknown → EVMKeyEmpty (only for zero-length keys)
- Rename StoreUnknown → StoreEmpty
- Malformed keys route to Legacy instead of being dropped
- Updated all tests for new routing behavior
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-legacy-db branch from 57a6b04 to 6ade865 Compare February 12, 2026 20:17
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.

2 participants