Skip to content

Node startup phases #4644

@erikgrinaker

Description

@erikgrinaker

The way we currently transition from e.g. fast sync to consensus is very messy (the reactors enable/disable message processing and call methods directly each other). This will become even more messy when we implement state sync (#828) and with fallback to fast sync for lagging nodes (#129).

I suggest we instead have a concept of node phases (e.g. WAL replay, block replay, state sync, fast sync, consensus, and so on), and an overall manager which enables/disables various reactors and processes based on heuristics (e.g. switch to fast sync if consensus is lagging). This requires support for announcing changes in P2P channels (#4394).

This is somewhat related to the idea of modes (#2237).


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Metadata

Assignees

No one assigned

    Labels

    C:p2pComponent: P2P pkgC:syncComponent: Fast Sync, State SyncT:enhancementType: Enhancementstalefor use by stalebot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions