ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Leios.Cert

Description

The claim a block's Leios certificate makes, and whether the certificate establishes it.

Synopsis

Documentation

data LeiosClaim Source #

What a block containing a certificate claims: that the endorser block its predecessor announced is certified. The predecessor's hash identifies the claim.

Constructors

LeiosClaim 

Fields

Instances

Instances details
Eq LeiosClaim Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Cert

Methods

(==) ∷ LeiosClaim → LeiosClaim → Bool #

(/=) ∷ LeiosClaim → LeiosClaim → Bool #

Show LeiosClaim Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Cert

data LeiosCertRejection Source #

Why a block's Leios certificate is invalid

Constructors

LeiosCertAtGenesis

The block's predecessor is genesis, which announces nothing.

LeiosCertWithoutCommittee

The ledger view at the block's slot has no Leios committee.

LeiosCertInvalid !VerificationError 

leiosClaim ∷ ConvertRawHash blk ⇒ ChainHash blk → WithOrigin SlotNo → Except LeiosCertRejection LeiosClaim Source #

The claim of a block containing a certificate, given the block's predecessor's hash and slot.

verifyLeiosClaim ∷ StrictMaybe LeiosLedgerView → LeiosCert → LeiosClaim → Except LeiosCertRejection () Source #

Verify that the certificate establishes the claim

The certificate must be signed by a quorum of the committee that was seated when the predecessor announced the endorser block. The given view, however, is the Leios part of the ledger view at the certifying block's slot, not at the predecessor's slot. It nonetheless seats the right committee, because the committee is fixed for a whole epoch and because a header that certifies an announcement from an earlier epoch is invalid: so the certifying block and its predecessor are in the same epoch, and therefore have the same committee.

If the view is SNothing, then the certifying block's era has no Leios, and so the certificate is invalid.