Skip to content

Revert persisting the EVM-only execution cursor with FlatKV state - #4212

Merged
masih merged 9 commits into
giga-1from
masih/1789584107-revert-evmonly-cursor
Sep 17, 2026
Merged

masih merged 9 commits into
giga-1from
masih/1789584107-revert-evmonly-cursor

Conversation

@masih

@masih masih commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

This reverts #4190, which persisted the EVM-only execution cursor (height, app hash, parent hash, gas limit) as an evmonly/cursor changeset alongside each block's FlatKV state and taught NewEVMOnlyApplication to reload it so Info() reported the durable height after a restart. The app returns to keeping its position in the in-memory evmOnlyState, advanced by Commit, and the BlockChangeSetEncoder hook on the executor is removed. Consequently a restarted EVM-only node again reports height 0 from Info(), so #4169 is reopened by this change.

Three commits landed on top of #4190 in evmonlyapp (#4183, #4194, #4205) and conflicted with the automatic revert. Their behaviour is preserved: checkedSenders, EvmChainConfig, EvmBaseFee and EvmCall are re-applied onto the pre-#4190 struct, with EvmCall reading committedHeight, gasLimit, parentHash and the new lastBlockTime field instead of the removed cursor. The chained SHA-256 app hash is unchanged, and the existing evmonlyapp, proxy, giga/evmonly, node and p2p tests pass.

@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

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 17, 2026, 8:19 AM

@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.65517% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.56%. Comparing base (7e3ca24) to head (c693c12).
⚠️ Report is 20 commits behind head on giga-1.

Files with missing lines Patch % Lines
sei-tendermint/internal/evmonlyapp/app.go 89.28% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           giga-1    #4212      +/-   ##
==========================================
+ Coverage   65.55%   65.56%   +0.01%     
==========================================
  Files        2081     2078       -3     
  Lines      157460   157297     -163     
==========================================
- Hits       103222   103137      -85     
+ Misses      54097    54019      -78     
  Partials      141      141              
Flag Coverage Δ
sei-chain-pr 83.77% <89.65%> (?)
sei-db ?

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

Files with missing lines Coverage Δ
giga/evmonly/executor.go 91.26% <ø> (+0.05%) ⬆️
giga/evmonly/giga_store.go 93.28% <100.00%> (+0.18%) ⬆️
sei-tendermint/internal/p2p/giga_router_common.go 78.35% <ø> (+0.15%) ⬆️
sei-tendermint/node/public.go 82.47% <100.00%> (ø)
sei-tendermint/internal/evmonlyapp/app.go 82.77% <89.28%> (+1.00%) ⬆️

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

@masih
masih marked this pull request as ready for review September 16, 2026 20:08
@cursor

cursor Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

PR Summary

High Risk
Removes storage-backed ABCI height/app-hash recovery on restart, so giga mode can mis-handshake or re-InitChain against existing FlatKV state; behavior change is intentional but operationally risky until #4169 is fixed elsewhere.

Overview
Reverts durable EVM-only chain position in FlatKV: the evmonly/cursor changeset, BlockChangeSetEncoder / WithBlockChangeSetEncoder, and startup reload from storage are removed. The executor now commits only the FlatKV state encoder’s changesets; encodingReadsTheStore again depends only on storage clears.

The Autobahn EVM-only app keeps height, app hash, parent hash, and pending finalize/commit state in a single in-memory evmOnlyState (updated on Commit), not on disk. NewEVMOnlyApplication is synchronous again (no restore error), FinalizeBlock stages pending app hash in memory, and Info() reflects committed in-process state only—so after a process restart LastBlockHeight is 0 until InitChain runs, even when Giga storage already has blocks (regresses restart resume / #4169).

Docs drop guidance that apps must derive Info() from storage; giga router comments no longer require refusing InitChain when storage is non-empty. Tests that asserted resume-after-restart and repeat-InitChain after seeding are removed; other evmonlyapp helpers are adjusted for the new constructor shape.

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

@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.

A clean, complete revert of #4190: no dangling references to the removed cursor remain, and the three commits that landed on top (checkedSenders, EvmChainConfig, EvmBaseFee, EvmCall) are faithfully re-applied onto the pre-#4190 struct. The only finding is the restart regression the description itself acknowledges (#4169 reopened), which is deliberate but leaves no test recording the restored behaviour.

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

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] The three restart tests and cursor_test.go are removed along with the feature, which is correct, but nothing now pins the restored behaviour. reopenEVMOnlyTestApp survives and is only used for its storage side effect (_, storage = reopenEVMOnlyTestApp(...) at app_test.go:135, so its *evmOnlyApplication return and the require.True(t, ok) assertion are dead). Reusing it for a short characterization test — reopen after committing a block, assert Info().LastBlockHeight == 0 — would record the reopened #4169 behaviour in the tree, so re-landing cursor persistence flips a visible assertion rather than adding one from scratch.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

storage *bootstrap.GigaStorageManager,
changeSetEncoder evmonly.NamedChangeSetEncoder,
) (abci.Application, error) {
) abci.Application {

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] Dropping the constructor's error return also drops the only path that reloaded a durable position, so a restarted node starts at committedHeight == 0 with a state store that still holds every prior block. The consequence is worse than Info() reporting 0: gigaRouterCommon.runExecute branches on last == 0 and calls InitChain, seedInitialStateVersion returns early for InitialHeight == 1 without inspecting the store, and block 1 is then re-executed against state whose nonces and balances have already advanced — the executor refuses it (or CommitStateChanges(1, ...) fails against a store at a higher version), and runExecute returns, so the node does not come up at all.

This is the #4169 regression the description acknowledges reopening, and the scope is the Autobahn load-test application rather than production (TODO(evmonly-production) still gates real traffic), so I read it as an accepted cost of the revert rather than something to fix here. Worth confirming that no load-test environment currently relies on restarting a node over existing EVM-only storage, since those will now fail to start rather than degrade.

@masih
masih added this pull request to the merge queue Sep 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 17, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e5c63d0. Configure here.

Comment thread sei-tendermint/internal/evmonlyapp/app.go
…vert-evmonly-cursor

# Conflicts:
#	giga/evmonly/executor.go
#	giga/evmonly/giga_store.go
@masih
masih added this pull request to the merge queue Sep 17, 2026
Merged via the queue into giga-1 with commit e104749 Sep 17, 2026
62 checks passed
@masih
masih deleted the masih/1789584107-revert-evmonly-cursor branch September 17, 2026 10:43
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.

3 participants