Skip to content

Fix composite snapshot import hang on EVM errors#3091

Merged
Kbhat1 merged 1 commit into
mainfrom
fix/composite-import-evm-hang
Mar 20, 2026
Merged

Fix composite snapshot import hang on EVM errors#3091
Kbhat1 merged 1 commit into
mainfrom
fix/composite-import-evm-hang

Conversation

@Kbhat1

@Kbhat1 Kbhat1 commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

  • Fixes hang in CompositeStateStore.Import when EVMStateStore.Import returns early on error and evmCh later fills
  • Stops forwarding snapshot nodes after an import failure and adds a unit test for that path

Testing performed to validate your change

  • Unit tests
  • Verified on node

Stop forwarding snapshot nodes once an importer fails so CompositeStateStore.Import can return the underlying error instead of blocking on a full evmCh buffer. Add a regression test that reproduces the hang by making the EVM importer exit early while more than 100 EVM nodes remain.

Made-with: Cursor
@github-actions

github-actions Bot commented Mar 19, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 20, 2026, 8:56 PM

@codecov

codecov Bot commented Mar 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 73.33333% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.71%. Comparing base (843a717) to head (2a04fab).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
sei-db/state_db/ss/composite/store.go 73.33% 11 Missing and 5 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3091   +/-   ##
=======================================
  Coverage   58.71%   58.71%           
=======================================
  Files        2094     2094           
  Lines      172972   173013   +41     
=======================================
+ Hits       101563   101589   +26     
- Misses      62426    62437   +11     
- Partials     8983     8987    +4     
Flag Coverage Δ
sei-chain-pr 68.58% <73.33%> (?)
sei-db 70.41% <ø> (-0.22%) ⬇️

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/composite/store.go 68.79% <73.33%> (-0.47%) ⬇️

... and 1 file 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.

for {
select {
case err := <-importErrCh:
if err != nil && importErr == nil {

@blindchaser blindchaser Mar 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[optional]: If both cosmos and EVM importers fail, only the first error captured in importErr is returned. The second is discarded.

do we need to handle the cosmos importer failure errors? and adding testings for dual failures etc

@Kbhat1 Kbhat1 added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 7fd79a0 Mar 20, 2026
41 of 42 checks passed
@Kbhat1 Kbhat1 deleted the fix/composite-import-evm-hang branch March 20, 2026 17:01
@philipsu522 philipsu522 added the backport release/v6.4 Backport to release v6.4 label Mar 20, 2026
@Kbhat1

Kbhat1 commented Mar 20, 2026

Copy link
Copy Markdown
Contributor Author

/backport

@seidroid

seidroid Bot commented Mar 20, 2026

Copy link
Copy Markdown

Created backport PR for release/v6.4:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-3091-to-release/v6.4
git worktree add --checkout .worktree/backport-3091-to-release/v6.4 backport-3091-to-release/v6.4
cd .worktree/backport-3091-to-release/v6.4
git reset --hard HEAD^
git cherry-pick -x 7fd79a0d2e4811246666bacc8ee6cc0a0da32abe
git push --force-with-lease

Kbhat1 added a commit that referenced this pull request Mar 20, 2026
- Fixes hang in CompositeStateStore.Import when EVMStateStore.Import
returns early on error and evmCh later fills
- Stops forwarding snapshot nodes after an import failure and adds a
unit test for that path

- Unit tests
- Verifying on node

(cherry picked from commit 7fd79a0)
Kbhat1 added a commit that referenced this pull request Mar 20, 2026
…rors (#3104)

Backport of #3091 to `release/v6.4`.

Co-authored-by: Kartik Bhat <kartikbhatri@gmail.com>
blindchaser pushed a commit that referenced this pull request Apr 17, 2026
## Describe your changes and provide context
- Fixes hang in CompositeStateStore.Import when EVMStateStore.Import
returns early on error and evmCh later fills
- Stops forwarding snapshot nodes after an import failure and adds a
unit test for that path


## Testing performed to validate your change
- Unit tests
- Verifying on node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants