Skip to content

Guard emergency recovery ViewID transitions - #5110

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

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

Conversation

@Frozen

@Frozen Frozen commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Dev counterpart of #5107.

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 requested review from lijiang2087 and mur-me August 15, 2026 17:34
@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 5e56a16 into harmony-one:dev 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