Skip to content

Initialize app from last header on frozen restart for v6.6 - #4448

Merged
masih merged 2 commits into
release/v6.6from
masih/1791207351-freeze-init-last-header-v6.6
Oct 5, 2026
Merged

masih merged 2 commits into
release/v6.6from
masih/1791207351-freeze-init-last-header-v6.6

Conversation

@masih

@masih masih commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

This is the v6.6 version of #4447. A node in freeze mode halts one block below its freeze height and never processes another block. On v6.6 the EVM HTTP and WS servers wait for start signals that only ProcessBlock sends, so once a frozen node restarts they never start. The node keeps its data and its Tendermint RPC, but EVM RPC stays down. frozen-6-7-0 runs v6.6.3 and hits this on every restart.

v6.6 has no InitLastHeader in the ABCI Application interface, so #4447 cannot be cherry-picked as is. Proxy.InitLastHeader forwards the call only to apps that implement it, which leaves the interface unchanged. BaseApp.InitLastHeader sets checkState from the header, as Commit does. App.InitLastHeader calls it and then sends the start signals through signalEVMServersStart, which ProcessBlock now also uses, so each signal is still sent once. nodeImpl.OnStart makes the same freeze-only call as on main, with the block meta at state.LastBlockHeight.

TestFrozenNodeServesEVMRPCAfterRestart restarts seid on the height-10 frozen node in the frozen RPC router cluster. Locally it timed out with the v6.6.3 binary and passed with this change.

Part of PLT-1370.

A frozen node processes no blocks after a restart, so ProcessBlock never sends the EVM HTTP and WS start signals and the servers never start. In freeze mode, pass the last stored block header to the app after the handshake. App.InitLastHeader sets checkState from it and sends the start signals. The proxy only forwards the call to apps that implement it, so the ABCI Application interface is unchanged.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 5, 2026, 3:55 PM

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.21%. Comparing base (3a022d9) to head (c7bea83).

Files with missing lines Patch % Lines
sei-tendermint/node/node.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release/v6.6    #4448      +/-   ##
================================================
- Coverage         59.11%   58.21%   -0.90%     
================================================
  Files              2231     2157      -74     
  Lines            184599   175895    -8704     
================================================
- Hits             109120   102394    -6726     
+ Misses            65634    64360    -1274     
+ Partials           9845     9141     -704     
Flag Coverage Δ
sei-chain-pr 58.22% <90.47%> (?)
sei-db 69.80% <ø> (ø)
sei-db-state-db ?

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

Files with missing lines Coverage Δ
app/app.go 72.11% <100.00%> (+0.06%) ⬆️
sei-cosmos/baseapp/abci.go 64.35% <100.00%> (+0.11%) ⬆️
sei-tendermint/internal/proxy/proxy.go 92.06% <100.00%> (+0.39%) ⬆️
sei-tendermint/node/node.go 65.22% <60.00%> (-0.07%) ⬇️

... and 74 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 October 5, 2026 15:30
@cursor

cursor Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes node startup and query/check-state initialization for freeze-mode restarts; behavior for live nodes is unchanged aside from refactored EVM server signaling in ProcessBlock.

Overview
Fixes frozen nodes losing EVM RPC after restart on v6.6, where HTTP/WS servers only received start signals from ProcessBlock and freeze mode never processes another block.

Adds InitLastHeader on BaseApp (sets checkState like Commit) and on App (also calls shared signalEVMServersStart, refactored out of ProcessBlock so each signal is still sent once). Tendermint’s Proxy forwards the call via an optional interface so the ABCI Application type stays unchanged. nodeImpl startup in freeze mode loads the last committed block meta and invokes InitLastHeader.

Coverage: unit tests for check state + EVM signals, a freeze-mode restart test in node, and an integration test that restarts seid in Docker and asserts eth_getBlockByNumber still works.

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

@masih

masih commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

@seidroid review

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

This backports the frozen-restart fix to v6.6. It adds InitLastHeader through an optional interface on Proxy, BaseApp and App, so a restarted frozen node sets its checkState from the last stored header and sends the EVM HTTP/WS start signals once. I checked the tree at merge commit b3858f9 and found nothing blocking: the signal channels have a buffer of 1, the sent flags are only touched before the reactors start and from ProcessBlock after that, and the unit test's Setup processes no block, so the signal assertion is real. The codex reading ("nothing found") agrees with this; my only additions are two nits about misplaced doc comments.

Non-blocking

  • OnStart calls InitLastHeader whenever freezeHeight > 0, including a node that is still syncing toward its freeze height. That node's EVM servers now start before it processes any block in this session, not after its first ProcessBlock. This looks harmless, but it is a behaviour change for non-frozen freeze-configured nodes and is not mentioned.
2 nits, not posted on the code
  • app/app.go:1908 — signalEVMServersStart and InitLastHeader were inserted between ProcessBlock's doc comment and ProcessBlock. Godoc now gives ProcessBlock's description to signalEVMServersStart, and ProcessBlock itself has no doc.
  • sei-cosmos/baseapp/abci.go:269 — Same problem here: InitLastHeader sits between Commit's doc comment and func Commit, so the halt-height description now documents InitLastHeader and Commit has no doc.

seidroid review · decision approve · session ec1ec75ef2bb43159f194331a1917676 · turn resp_claude_355bda7d4fe5d8e5baefef962ce2edfd · item f2133e293a8351c6bbdc7661f5f692eb

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

@masih
masih enabled auto-merge (squash) October 5, 2026 16:24
@masih
masih merged commit 1f9afeb into release/v6.6 Oct 5, 2026
95 of 97 checks passed
@masih
masih deleted the masih/1791207351-freeze-init-last-header-v6.6 branch October 5, 2026 18:33
masih pushed a commit that referenced this pull request Oct 6, 2026
Systematic changelog re-generation for the v6.6.4 patch release.

Adds the PRs merged to `release/v6.6` since v6.6.3, as reported by
`scripts/generate-changelog.sh release/v6.5 release/v6.6`:
- #4448 Initialize app from last header on frozen restart for v6.6
- #4056 Bump version to v6.6.3 in prep for patch release
- #4055 Backport `release/v6.6`: Update v6.6 change log in prep to cut
v6.6.3 patch

Made with [Cursor](https://cursor.com)

Co-authored-by: Cursor <cursoragent@cursor.com>
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