Skip to content

Tree sync #7678

Open
Open
@dapplion

Description

@dapplion

Currently forwards sync fetches ranges of blocks by range from either head or latest finalized until reaching the target, from a set of peers with the same status messages. This approach has fundamental issues that make the sync complex and susceptible to griefing attacks. (I'll describe those later)

Proposal

Divide forward sync into two phases:

  1. Header backfill: construct an in-memory tree from all unknown received by peers (status, unknown attestations, etc) and backfill until reaching a known block or conflicting with finality.
  2. Forward sync with knowledge of what block roots to expect at each slot and perfect peer grouping.

This model allows us to address all those issues and delete a lot of code. All lookup sync, by_range routes, batching, optimistic batches, among others, are deleted.

Progress

Related resources

Metadata

Metadata

Assignees

Labels

major-taskA significant amount of work or conceptual task.syncing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions