Skip to content

[state sync] State sync fails towards the end of the epoch #14759

@VanBarbascu

Description

@VanBarbascu

Context

When a new epoch begins, supplying nodes discard state parts from the previous epoch and prepare a fresh set of parts for the new one.

Problem

If a node begins state sync too late and the epoch changes before it finishes downloading, the supplying nodes will no longer hold the required parts, causing the sync to fail.

Impact

At present, this issue primarily affects new full nodes syncing state for the first time.
Validator nodes are much less likely to encounter this, as they typically start syncing immediately at the beginning of an epoch.
The only scenario where validators may be impacted is during late-epoch bootstrap—such as after migration or corruption—though even in that case the impact window is minimal, especially that nodes do not track all shards. Using a backup node can eliminate the risk entirely.

Proposed Solutions

  1. Retain state parts from the previous epoch for a period of time.
  2. Detect epoch transitions and restart the state sync process automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions