Skip to content

Guard emergency recovery ViewID transitions - #5107

Merged
Frozen merged 2 commits into
harmony-one:mainfrom
Frozen:fix/emergency-recovery-view-id-guard
Aug 15, 2026
Merged

Guard emergency recovery ViewID transitions#5107
Frozen merged 2 commits into
harmony-one:mainfrom
Frozen:fix/emergency-recovery-view-id-guard

Conversation

@Frozen

@Frozen Frozen commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • activate a one-off 1,000,000,000 ViewID floor for mainnet shard 0 at retained height 92,730,034 and shard 1 at retained height 94,978,278
  • install the floor before networked consensus signing and derive the leader deterministically from the recovery view
  • validate ANNOUNCE blocks synchronously before PREPARE, bind message and block ViewIDs, and reject unsafe COMMITTED or carried prepared blocks
  • accept NEWVIEW only from the deterministically selected leader
  • keep ViewID state monotonic while the floor is active and use checked arithmetic for view advancement and leader gaps

This extracts only the ViewID/view-change protection from Frozen#13. It does not include abandoned-block rejection, rollback, staged-sync, receipt, staking, or recovery feature-freeze changes.

Test

  • go test -mod=readonly -count=1 ./consensus ./cmd/harmony
  • go vet -mod=readonly ./consensus ./cmd/harmony
  • go test -race -mod=readonly -count=1 ./consensus -run 'Test(EmergencyRecovery|Recovery|NewViewRequires)'
  • git diff --check

@Frozen
Frozen force-pushed the fix/emergency-recovery-view-id-guard branch from 8dc7753 to c0df248 Compare August 14, 2026 19:46
@Frozen
Frozen force-pushed the fix/emergency-recovery-view-id-guard branch from c0df248 to 0a2a771 Compare August 14, 2026 20:07
@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@Frozen
Frozen merged commit 26d1b77 into harmony-one:main Aug 15, 2026
11 checks passed
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.

2 participants