Skip to content

Refuse EVM-only state that holds blocks but no execution cursor - #4211

Draft
masih wants to merge 1 commit into
giga-1from
masih/1789573368-evmonly-refuse-cursorless-state
Draft

masih wants to merge 1 commit into
giga-1from
masih/1789573368-evmonly-refuse-cursorless-state

Conversation

@masih

@masih masih commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

An EVM-only node whose FlatKV state was written before #4190 introduced the durable execution cursor holds block state at a nonzero version but no evmonly/cursor record. loadEVMOnlyCursor treated a missing cursor as "nothing to resume" and returned None, so Info() reported height 0, the giga router took the fresh-start path and called InitChain, and seedInitialStateVersion then refused because the store was already at height 364932. The node crash-looped with App.InitChain(): EVM-only state is already at height 364932 before InitChain, a message that reads like a stale-genesis or re-init problem when the actual cause is a store that cannot tell where execution stopped.

NewEVMOnlyApplication now takes the genesis initial height. A store without a cursor is still resumed through InitChain when it is empty or sits exactly at initialHeight-1, which is what a crash between InitChain and the first block leaves behind; at any other version it is refused at construction with errEVMOnlyCursorMissing, which names the state height, the chain's first height, and the remedy (reset the EVM-only state directory so the node resyncs from the block store). prepareApplication reads the genesis document to supply the height, so the same value drives both the startup check and InitChain. The pre-cursor stores on the testnet still need a one-time state reset; the change makes that failure explicit at startup instead of an ambiguous panic inside the router.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 16, 2026, 3:45 PM

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.53%. Comparing base (7e3ca24) to head (a17ec63).
⚠️ Report is 17 commits behind head on giga-1.

Files with missing lines Patch % Lines
sei-tendermint/node/public.go 77.77% 2 Missing ⚠️
sei-tendermint/internal/evmonlyapp/app.go 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           giga-1    #4211      +/-   ##
==========================================
- Coverage   65.55%   65.53%   -0.03%     
==========================================
  Files        2081     2077       -4     
  Lines      157460   157094     -366     
==========================================
- Hits       103222   102947     -275     
+ Misses      54097    54006      -91     
  Partials      141      141              
Flag Coverage Δ
sei-chain-pr 73.74% <84.21%> (?)
sei-db ?

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

Files with missing lines Coverage Δ
sei-tendermint/internal/evmonlyapp/cursor.go 93.02% <100.00%> (ø)
sei-tendermint/internal/evmonlyapp/app.go 81.85% <66.66%> (+0.07%) ⬆️
sei-tendermint/node/public.go 80.58% <77.77%> (-1.90%) ⬇️

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant