Skip to main content

Module follower

Module follower 

Source
Expand description

A query node that follows the chain through the light client instead of taking part in consensus. Verified blocks reach the query API through the same sink a validator hands its decides to, so every API module serves them unchanged.

The light client’s root of trust is its genesis stake table. Unless FollowerOptions::light_client_genesis pins one, it is derived from the network config, and a follower starting on an empty database fetches that config from its config peers, which default to the very upstreams it verifies. Pin the genesis wherever the upstreams are not trusted on first start.

Structs§

Follower 🔒
FollowerConsensus 🔒
Behind an Arc in FollowerHandle, as the API’s ConsensusSource.
FollowerContext
Owns the follower’s tasks: dropping it stops following unless it was detached. Not Clone, so nothing else can stop the follower; the API holds a FollowerHandle.
FollowerHandle
What the API holds. Clones share the follower’s state and own nothing that stops it; a FollowerContext does that.
FollowerOptions
FollowerParams
VerifiedBlock 🔒

Traits§

ChainSource 🔒
Where a follower reads the chain from.

Functions§

connect_light_client 🔒
init_follower_node
The follow loop is running when this returns; FollowerContext::new takes over stopping it.
init_with_source 🔒