Skip to content

Polygon sync enters feedback loop when milestones accumulate #116

@madumas

Description

@madumas

Description

The Polygon sync service enters a feedback loop when milestones accumulate faster than they can be processed. This occurs after a node restart or during periods of slow execution.

Symptoms

  • Sync cycle times increase progressively
  • Node falls further behind despite continuous processing
  • waypointsLen values grow each cycle
  • age (time behind chain head) increases instead of decreasing

Logs demonstrating the problem

After a node restart, the following pattern emerges:

[02-03|14:54:39] [sync] downloading blocks using waypoints waypointsLen=94 ...
[02-03|15:00:44] head updated age=6m8s
[02-03|15:00:44] [sync] update fork choice done in=5m0s

[02-03|15:00:44] [sync] downloading blocks using waypoints waypointsLen=142 ...
[02-03|15:08:12] head updated age=7m34s
[02-03|15:08:12] [sync] update fork choice done in=6m30s

[02-03|15:08:12] [sync] downloading blocks using waypoints waypointsLen=159 ...

Analysis

Time waypointsLen Cycle duration Age behind head
14:54:39 94 - (restart)
15:00:44 142 5m00s 6m08s
15:08:12 159 6m30s 7m34s

Each cycle:

  1. Processes all available waypoints (94 → 142 → 159)
  2. Takes longer than the previous cycle (5m → 6m30s)
  3. Falls further behind the chain head (6m → 7m34s)

The node accumulates milestones faster than it can process them, creating a feedback loop that prevents convergence.

Environment

  • Chain: bor-mainnet
  • Version: v3.3.7

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