fix(sn-manager): remove automatic EVM rollback#313
Merged
Conversation
Treat evm_key_name as a transitional migration input rather than a permanent readiness marker. Already-EVM-capable supernodes now remain on the forward update path after migration removes that field; pre-v2.6 nodes without it remain blocked.\n\nRemove the v2.5.0 rollback/download/config mutation path, preserve historical marker visibility, and make supernode startup explicitly reject unsupported active key types.\n\nVerified with sn-manager unit/vet/race tests, full supernode tests, integration tests, independent review, and a 10-validator/10-supernode EVM devnet restart rehearsal.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes sn-manager’s automatic EVM rollback behavior and makes the EVM transition a forward-only update gate, while shifting key-type correctness enforcement to SuperNode startup/migration validation.
Changes:
- Remove the auto-rollback-to-v2.5.0 path and associated rollback marker creation; retain historical visibility of
rolled-back.log. - Update EVM preflight logic to only block forward installs for pre-v2.6 nodes missing
evm_key_name, and to allow normal updates for already EVM-capable nodes. - Tighten SuperNode key validation to explicitly reject unsupported active key types (not legacy
secp256k1and noteth_secp256k1), with new unit coverage.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| supernode/cmd/evmigration.go | Rejects unsupported active key algorithms during migration/startup validation. |
| supernode/cmd/evmigration_test.go | Adds a test ensuring unsupported active key types are rejected. |
| sn-manager/internal/utils/chain_id.go | Updates comments to reflect removal of rollback readers and the forward-only preflight purpose. |
| sn-manager/internal/updater/updater.go | Removes the rollback execution branch from the auto-update loop and updates preflight documentation. |
| sn-manager/internal/updater/rollback.go | Deletes the hard-coded rollback implementation and its download/symlink/config mutation path. |
| sn-manager/internal/updater/rollback_test.go | Removes rollback unit tests corresponding to deleted rollback behavior. |
| sn-manager/internal/updater/preflight.go | Removes rollback decision and updates predicate to allow already EVM-capable nodes with missing transitional config. |
| sn-manager/internal/updater/preflight_test.go | Updates decision table to reflect forward-only gating behavior. |
| sn-manager/internal/updater/preflight_state.go | Extracts/retains block-marker and historical rollback-marker path helpers + block marker state handling. |
| sn-manager/internal/updater/preflight_state_test.go | Adds tests for the extracted block marker state handling. |
| sn-manager/cmd/status.go | Updates status output to label rolled-back.log as a historical marker (v2.6.1). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Prevent automatic downgrades and stale-config activation across the EVM migration boundary. Serialize config and binary mutations, preserve confirmed compatibility blocks, select release channels from the configured chain, and validate migration key material before destructive cleanup. Add regression, race, CI, and operator recovery coverage.
j-rafique
approved these changes
Jul 23, 2026
a-ok123
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
100|
101|- Existing
update-blocked.logandsn-manager statusvisibility remain for unprepared pre-v2.6 nodes.102|- Historical v2.6.1 rollback markers are displayed as
Historical Rollback Marker (v2.6.1).103|- SuperNode logs a startup error for legacy keys without
evm_key_nameand for unsupported active key types.104|
105|## Verification
106|
107|### Automated
108|
109|-
go test ./...insn-manager110|-
go vet ./...insn-manager111|-
go test -race ./internal/updater ./internal/utils ./internal/versioninsn-manager112|-
make test-unit113|-
go vet ./...in repository root114|-
go test -v ./tests/integration/...115|-
go mod tidyproduced no root or sn-manager module diff116|- sn-manager and SuperNode release builds succeeded
117|- concurrent installation, sticky-block, stale-config, release-channel, key-validation, and config-write regression tests
118|- independent production-gate review: passed with no security or logic findings
119|
120|### Devnet
121|
122|Fresh EVM devnet with 10 validators and 10 SuperNodes using this branch:
123|
124|- all 10 SuperNodes registered and started with canonical post-migration-shaped config (
key_nameis EVM;evm_key_nameabsent)125|- restarted SN0 from that same config; it resumed and submitted/retained epoch-report progress
126|- changed SN9 to a legacy active key with no
evm_key_name; startup refused before services with the expected migration remediation error127|- live sn-manager preflight against the running EVM chain:
128| - current
v2.6.1-testnet, noevm_key_name, targetv2.6.2-testnet=> allow129| - current
v2.5.2-testnet, noevm_key_name, targetv2.6.2-testnet=> block130|- all 10 validators returned one identical app hash at height 421
131|- all processes were stopped cleanly after evidence collection
132|
133|## Test notes
134|
135|The repository has no
make linttarget. Formatting,go vet, module-tidy checks, full tests, race checks for the modified manager packages, builds, and independent review were run instead.136|