Skip to main content

Module startup_catchup

Module startup_catchup 

Source
Expand description

Startup stake-table catchup for new-protocol nodes.

Cliquenet only connects to validators in the current epoch’s stake table window (N-1, N, N+1). On a fresh-join or cold-restart node, no consensus messages can be received until those stake tables are populated, so the existing reactive catchup (triggered by an unknown-epoch proposal) never fires.

bootstrap_epoch_window drives the existing catchup machinery synchronously at startup: it walks forward one epoch at a time from the highest already-known epoch (loaded from persistence by reload_stake) until peers can no longer serve the next epoch root leaf — which is the point at which the live network currently is.

Functions§

bootstrap_epoch_window
Walk forward from the highest already-known epoch until peers can no longer serve the next epoch root leaf, populating the membership with stake tables for every epoch up through N+1 (where N is the current epoch). Returns N.