Skip to content

refactor(sync-service): convert start_parachain from blocking linear function to reactive state machine #3222

@replghost

Description

@replghost

Summary

start_parachain is a blocking linear function that runs Phase 1 → Phase 2 → Phase 3 sequentially. This forces all phases to be serial even when their dependencies allow overlap.

Converting to a reactive state machine that responds to events (relay runtime available, :code download complete, Aura proof arrived) would enable natural overlap of all phases.

This is a significant refactor. Do it after exhausting the easier parallelization wins:

  1. Parallelize Aura call proofs
  2. Overlap WASM compilation with proof downloads
  3. Pre-compile cached runtime during DB load

Only needed when the sequential structure itself becomes the bottleneck.

Effort

Large — touches the core parachain sync service architecture.

Metadata

Metadata

Assignees

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