Date: 2023-10-21
ChainMuxer
state transitions:
flowchart TD
A[Idle]
B[Connect]
C[Bootstrap]
D[Follow]
A -->|sync| B
A -->|skip| D
B -->|behind| C
B -->|in-sync| D
D -->|on-error| A
C --> A
Once the ChainMuxer
is in follow
mode, it passes control to the
TipsetProcessor
. A typical start-up sequence looks like this:
idle
state: Immediately switch toconnect
state.connect
state: Wait for 5 tipsets from peers. If we're within 1 epoch of the heaviest seen tipset, switch tofollow
state. Otherwise, switch tobootstrap
state.bootstrap
state: Fetch tipsets between the heaviest seen tipset and the last validated tipset. Validate all of those tipsets and return toidle
state.follow
state: Pass control to theTipsetProcessor
state machine.
TipsetProcessor
state transitions:
flowchart TD
A[Idle]
B[FindRange]
C[SyncRange]
A -->|new tipset group| B
B --> C
C --> A
C --> B