ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Leios.NewValidClaims

Description

Where the ChainDB passes the claim of each new Leios certification it validates.

The ChainDB passes each on, with the announcement it certifies, as it establishes the claim; see cdbsOnNewLeiosValidClaim. LeiosFetch consumes them, to fetch the endorser block each such announcement names.

Synopsis

Documentation

data NewLeiosValidClaims (m ∷ Type → Type) Source #

The claims of the new Leios certifications the ChainDB validates, each with the announcement it certifies, held from when they are recorded until the one thread that consumes them does.

Only the code that wires up a node holds both fields: whatever records is given just recordNewLeiosValidClaim, and the one thread that consumes them just consumeNewLeiosValidClaims.

It holds only what that thread has yet to consume. That stays small, as long as the thread consumes them again as soon as it has handled the previous ones, and handles them without waiting long. A committee seat votes at most once per slot, so a quorum certifies at most one announcement per slot unless the committee equivocates; the claims arrive at the rate of elections, whatever the node's peers do.

Constructors

MkNewLeiosValidClaims 

Fields

ignoreNewLeiosValidClaim ∷ ∀ (m ∷ Type → Type). MonadSTM m ⇒ LeiosClaim → LeiosAnnouncement → STM m () Source #

In place of recordNewLeiosValidClaim, for what opens a ChainDB but fetches nothing: it records nothing.