Skip to content

Fix SS migration doc - #4027

Open
yzang2019 wants to merge 2 commits into
mainfrom
yzang/fix-migration-doc
Open

Fix SS migration doc#4027
yzang2019 wants to merge 2 commits into
mainfrom
yzang/fix-migration-doc

Conversation

@yzang2019

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Fix some minor outdated text for SS migration guide.

Testing performed to validate your change

@cursor

cursor Bot commented Aug 26, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only changes to the migration guide; no runtime or config code is modified.

Overview
Updates docs/migration/giga_store_migration.md so operators see current on-disk layout and migration options, not the older data/evm_ss/ wording.

Paths and legacy behavior: Cosmos SS is documented as data/state_store/cosmos/{backend} and EVM SS as data/state_store/evm/{backend}, with notes that existing data/pebbledb/ or data/evm_ss/ trees are still used when already present.

Config and verification: The app.toml example now includes evm-ss-separate-dbs = false (recommended single-DB EVM layout). The verification section adds sample startup log lines and clarifies that separateDBs=false does not mean Giga SS is disabled—it only reflects the experimental per-type split flag.

Migration paths: Prerequisites and Step 2 distinguish P2P state-sync (layout-agnostic on the wire) from layout-sensitive data/ tarballs, including when a Giga snapshot restore can skip another P2P sync. Rollback, safety checks, and FAQ entries are aligned with the new paths and the two new FAQ answers on logs and tarball migration.

Reviewed by Cursor Bugbot for commit 58ef462. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Aug 26, 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 27, 2026, 4:04 PM

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.24%. Comparing base (d69e67d) to head (58ef462).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4027      +/-   ##
==========================================
- Coverage   61.24%   60.24%   -1.00%     
==========================================
  Files        2153     2054      -99     
  Lines      188393   176643   -11750     
==========================================
- Hits       115373   106419    -8954     
+ Misses      62289    60462    -1827     
+ Partials    10731     9762     -969     
Flag Coverage Δ
sei-db 69.80% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 142 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.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-only update to the Giga SS migration guide; the new path layout (data/state_store/{cosmos,evm}/{backend}), the legacy data/evm_ss fallback, the evm-ss-separate-dbs key and the sample startup log lines all check out against sei-db/common/utils/path.go, app/seidb.go and sei-db/state_db/ss/composite/store.go. One gap: the new "restore a data-directory snapshot" path omits the config that must match the snapshot.

Findings: 0 blocking | 4 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.
  • 3 non-blocking pre-existing issue(s) listed below under pre-existing issues.

Pre-existing issues

  • [suggestion] docs/migration/giga_store_migration.md "What's different about EVM SS" (lines 32-36, unchanged by this PR) says EVM SS is "point-query only by design" and "iteration is explicitly disabled on the EVM backend". The code supports it: CompositeStateStore.Iterator/ReverseIterator route EVM store keys to EVMStateStore, which serves them from the unified DB when separateDBs=false (sei-db/state_db/ss/evm/store.go:121). The section's rationale ("cross-bucket scans would defeat the per-type sub-DB layout") only applies to the evm-ss-separate-dbs = true mode this PR now documents as non-default and experimental, so the section reads as more restrictive than reality.
  • [suggestion] sei-db/config/toml.go:157 still documents evm-ss-db-directory as defaulting to <home>/data/evm_ss, while sei-db/config/ss_config.go:124 and utils.GetEVMStateStorePath use <home>/data/state_store/evm/{backend} (with data/evm_ss only as a legacy fallback). This PR fixes exactly that staleness in the migration guide; the generated app.toml comment operators actually read has the same issue.
  • [suggestion] The "Rollback Steps" section (lines 189-198) lists only the config flip and directory cleanup, without pointing at the FAQ entry (lines 222-227) that explains EVM state written while split was enabled is absent from Cosmos SS, so historical EVM queries stay broken until another state sync. An operator following Rollback Steps alone will not see that caveat.

**Data-directory snapshots** (a tar of `~/.sei/data`) *are* layout-sensitive. A
tarball taken from a Giga SS node contains `data/state_store/evm/` (and
`data/state_store/cosmos/`) instead of a single mixed Cosmos SS directory. You can
enable Giga SS Store by restoring such a snapshot and setting `evm-ss-split = true`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] Restoring a Giga data/ tarball needs more than evm-ss-split = true: the restoring node's ss-backend (and ss-db-directory / evm-ss-db-directory if set) must match the layout inside the tarball, because both SS paths are backend-qualified (utils.GetStateStorePath / GetEVMStateStorePathdata/state_store/{cosmos,evm}/{backend}).

The backend mismatch is the dangerous case and it fails silently: a pebbledb tarball restored on a node configured with ss-backend = "rocksdb" resolves both SS dirs to non-existent .../rocksdb paths, so Cosmos SS opens empty — and because the safety checks in NewCompositeStateStore only fire when "Cosmos SS already has history", none of them trip. The node starts against a restored SC with an empty SS instead of refusing to launch. (A mismatched evm-ss-separate-dbs is caught: the EVM dir is non-empty but its unified DB is, so validateEVMSSPreRecovery aborts startup.)

Suggest adding a line here — and to the matching FAQ answer at line 243 — that the restoring node's ss-backend, evm-ss-separate-dbs, and any SS directory overrides must match the node the snapshot was taken from.

@yzang2019
yzang2019 added this pull request to the merge queue Aug 27, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 27, 2026
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