Open
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
40043e3 to
d99185c
Compare
d99185c to
aa0c47d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3227 +/- ##
==========================================
- Coverage 59.36% 59.31% -0.06%
==========================================
Files 2072 2072
Lines 169942 170956 +1014
==========================================
+ Hits 100887 101401 +514
- Misses 60271 60772 +501
+ Partials 8784 8783 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
6a55ffa to
cf8803c
Compare
yzang2019
reviewed
Apr 17, 2026
|
|
||
| cosmosLatest := s.cosmosStore.GetLatestVersion() | ||
| evmLatest := s.evmStore.GetLatestVersion() | ||
| if cosmosLatest > 0 && evmLatest == 0 { |
Contributor
yzang2019
approved these changes
Apr 17, 2026
jewei1997
approved these changes
Apr 17, 2026
Replaces the two-field StateStoreConfig.WriteMode / ReadMode with a single EVMMode enum that takes only "cosmos_only" or "split". The previous matrix (cosmos_only / dual_write / split_write crossed with cosmos_only / evm_first / split_read) produced configurations whose behavior was hard to reason about — in particular, evm_first's fallback-to-cosmos semantics masked inconsistencies between the two backends and hid the iterator routing bug that broke pointer lookups on Giga-enabled nodes. Under "split" there is no fallback: a read or iterate that would miss returns empty rather than silently routing to a different backend. Scope is the SS (State Store) layer only. The SC layer still uses the older WriteMode / ReadMode enums; those were left untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- mapstructure tag on EVMMode is now "evm-ss-mode", matching the TOML key used in app.toml and the viper binding. - Renamed tests that still mentioned the removed modes (SplitWrite, SplitRead, CosmosOnlyWrite) so the names describe behavior under the new single EVMMode field. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The tag is dead code for StateStoreConfig — Unmarshal is only used in ParseConfig (app.toml template generation), which doesn't read from viper at all. The live runtime path uses viper.GetString directly and bypasses mapstructure. Other fields in the same struct share the same "tag doesn't match TOML key" pattern, so touching only this one made the struct more inconsistent. A uniform cleanup of the tags can happen separately if desired. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…fy-modes # Conflicts: # sei-db/state_db/ss/composite/store.go
sei-cosmos/server/config/config_test.go was still referencing the removed StateStore.WriteMode / ReadMode fields and the old WriteMode/ReadMode constants (SplitWrite, SplitRead, CosmosOnlyWrite, CosmosOnlyRead). Updated the StateStore blocks to use the single EVMMode field and EVMModeSplit / EVMModeCosmosOnly constants. SC blocks (which still use WriteMode/ReadMode) are untouched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the short-lived EVMMode string enum (cosmos_only / split)
with a plain bool EVMSplit. The enum only ever had two values so the
string type carried no real information beyond "on or off"; a bool
reads more naturally, eliminates parse/validate code, and drops any
chance of a typo in app.toml silently falling back to a default.
Key -> flow:
TOML state-store.evm-ss-split = {true|false} (default false)
viper v.GetBool("state-store.evm-ss-split")
flag FlagEVMSSSplit -> cast.ToBool
struct StateStoreConfig.EVMSplit bool
runtime evmStore opened iff EVMSplit; routing keys off evmStore != nil
Deletes sei-db/config/evm_mode.go entirely. Collapses the composite
"evmRouted" helper to a nil check — if evmStore was opened, EVMSplit
was true at startup and it's the sole home for EVM data. Import and
recovery paths likewise drop the mode comparison.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three DB-state guards in NewCompositeStateStore prevent the common footgun of flipping evm-ss-split on without first state syncing: 1. validateEVMSSDirectory: reject if Cosmos SS has history but the EVM SS directory is missing or empty. Runs before the EVM SS DB is opened so a rejected config leaves no empty data/evm_ss/ behind. 2. validateEVMSSPreRecovery: catch the same misconfiguration when the directory exists but its DBs are empty (e.g. from a prior failed attempt). WAL replay only covers the last KeepRecent blocks so it cannot rebuild a fresh EVM SS from scratch. 3. validateEVMSSPostRecovery: reject mismatched earliest versions between Cosmos SS and EVM SS — indicates the two DBs came from different snapshots or were pruned independently. The config-level mode validation from the original PR is dropped: EVMSplit is a bool, so there is no invalid string to reject. Adds docs/migration/giga_store_migration.md covering the full flow and these checks. Drops the old TestConstructorRecoversStalEVM test whose premise (rebuild EVM SS from WAL when dir is missing) is exactly the scenario the new guards correctly refuse. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
99330ad to
53d4092
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Describe your changes and provide context
evm-ss-write-mode/evm-ss-read-modeoffcosmos_onlywithout state syncingTesting performed to validate your change