| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Leios.Cert
Description
The claim a block's Leios certificate makes, and whether the certificate establishes it.
Synopsis
- data LeiosClaim = LeiosClaim {}
- data LeiosCertRejection
- leiosClaim ∷ ConvertRawHash blk ⇒ ChainHash blk → WithOrigin SlotNo → Except LeiosCertRejection LeiosClaim
- verifyLeiosClaim ∷ StrictMaybe LeiosLedgerView → LeiosCert → LeiosClaim → Except LeiosCertRejection ()
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
| Eq LeiosClaim Source # | |
Defined in Ouroboros.Consensus.Leios.Cert | |
| Show LeiosClaim Source # | |
Defined in Ouroboros.Consensus.Leios.Cert Methods showsPrec ∷ Int → LeiosClaim → ShowS # show ∷ LeiosClaim → String # showList ∷ [LeiosClaim] → ShowS # | |
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 |
Instances
| Eq LeiosCertRejection Source # | |
Defined in Ouroboros.Consensus.Leios.Cert Methods | |
| Show LeiosCertRejection Source # | |
Defined in Ouroboros.Consensus.Leios.Cert Methods showsPrec ∷ Int → LeiosCertRejection → ShowS # show ∷ LeiosCertRejection → String # showList ∷ [LeiosCertRejection] → ShowS # | |
| NoThunks LeiosCertRejection Source # | |
Defined in Ouroboros.Consensus.Leios.Cert | |
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.