ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Leios.Protocol

Description

What a consensus protocol says about the Leios announcement a header may carry.

Synopsis

Documentation

data LeiosAnnouncement Source #

The announcement a header carries, as its protocol view gives it.

Constructors

MkLeiosAnnouncement 

Fields

  • announcementElectee ∷ !(KeyHash 'BlockIssuer)

    the hash of the elected pool's cold verification key; with the header's slot, this identifies the election

  • announcementEbHash ∷ !EbHash
     
  • announcementEbSize ∷ !BytesSize

    the announced endorser block's size

    TODO Nothing reads it yet. A certifying ranking block's ChainSync MsgRollForward will be interpreted as an offer of the endorser block it certifies, of this size, and Leios voting will confirm that the size is accurate.

Instances

Instances details
Eq LeiosAnnouncement Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

Generic LeiosAnnouncement Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

Associated Types

type Rep LeiosAnnouncement 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

type Rep LeiosAnnouncement = D1 ('MetaData "LeiosAnnouncement" "Ouroboros.Consensus.Leios.Protocol" "ouroboros-consensus-5.0.0.0-inplace" 'False) (C1 ('MetaCons "MkLeiosAnnouncement" 'PrefixI 'True) (S1 ('MetaSel ('Just "announcementElectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'BlockIssuer)) :*: (S1 ('MetaSel ('Just "announcementEbHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EbHash) :*: S1 ('MetaSel ('Just "announcementEbSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BytesSize))))
Show LeiosAnnouncement Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

NoThunks LeiosAnnouncement Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

type Rep LeiosAnnouncement Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

type Rep LeiosAnnouncement = D1 ('MetaData "LeiosAnnouncement" "Ouroboros.Consensus.Leios.Protocol" "ouroboros-consensus-5.0.0.0-inplace" 'False) (C1 ('MetaCons "MkLeiosAnnouncement" 'PrefixI 'True) (S1 ('MetaSel ('Just "announcementElectee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'BlockIssuer)) :*: (S1 ('MetaSel ('Just "announcementEbHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EbHash) :*: S1 ('MetaSel ('Just "announcementEbSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BytesSize))))

data LeiosLedgerView Source #

The Leios parameters a ledger view carries.

The periods are durations, as the protocol parameters define them; they need not be whole numbers of slots.

Constructors

MkLeiosLedgerView 

Fields

Instances

Instances details
Eq LeiosLedgerView Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

Generic LeiosLedgerView Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

Associated Types

type Rep LeiosLedgerView 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

type Rep LeiosLedgerView = D1 ('MetaData "LeiosLedgerView" "Ouroboros.Consensus.Leios.Protocol" "ouroboros-consensus-5.0.0.0-inplace" 'False) (C1 ('MetaCons "MkLeiosLedgerView" 'PrefixI 'True) ((S1 ('MetaSel ('Just "llvCommittee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LeiosCommittee) :*: (S1 ('MetaSel ('Just "llvQuorumStakeThreshold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitInterval) :*: S1 ('MetaSel ('Just "llvAnnouncementPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Milliseconds32))) :*: ((S1 ('MetaSel ('Just "llvVotePeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Milliseconds32) :*: S1 ('MetaSel ('Just "llvDiffusionPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Milliseconds32)) :*: (S1 ('MetaSel ('Just "llvMaxEbBodySize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BytesSize) :*: S1 ('MetaSel ('Just "llvMaxEbTxsSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BytesSize)))))
Show LeiosLedgerView Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

NoThunks LeiosLedgerView Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

type Rep LeiosLedgerView Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

type Rep LeiosLedgerView = D1 ('MetaData "LeiosLedgerView" "Ouroboros.Consensus.Leios.Protocol" "ouroboros-consensus-5.0.0.0-inplace" 'False) (C1 ('MetaCons "MkLeiosLedgerView" 'PrefixI 'True) ((S1 ('MetaSel ('Just "llvCommittee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LeiosCommittee) :*: (S1 ('MetaSel ('Just "llvQuorumStakeThreshold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UnitInterval) :*: S1 ('MetaSel ('Just "llvAnnouncementPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Milliseconds32))) :*: ((S1 ('MetaSel ('Just "llvVotePeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Milliseconds32) :*: S1 ('MetaSel ('Just "llvDiffusionPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Milliseconds32)) :*: (S1 ('MetaSel ('Just "llvMaxEbBodySize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BytesSize) :*: S1 ('MetaSel ('Just "llvMaxEbTxsSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BytesSize)))))

class ConsensusProtocol p ⇒ LeiosProtocol p where Source #

Methods

getLeiosAnnouncement ∷ proxy p → ValidateView p → Maybe LeiosAnnouncement Source #

The announcement carried by the header with this view, if any.

validateLeiosAnnouncement ∷ ConsensusConfig p → ValidateView p → SlotNo → Ticked (ChainDepState p) → Except (ValidationErr p) OCINStaleness Source #

The protocol-level validation of a relayed announcement's header, done out of context: against the immutable tip's chain-dependent state ticked to the header's slot, rather than against the header's predecessor.

Since that state may lag, a check our lag could spuriously fail must not reject; a counter that is merely behind instead yields StaleOCIN.

Only called for a view that carries an announcement.

getLeiosLedgerView ∷ proxy p → LedgerView p → Maybe LeiosLedgerView Source #

The Leios parameters this ledger view carries, or Nothing if the protocol has no Leios.

Instances

Instances details
(CanHardFork xs, All SingleEraBlockAndLeiosProtocol xs) ⇒ LeiosProtocol (HardForkProtocol xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

BftCrypto c ⇒ LeiosProtocol (Bft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

PBftCrypto c ⇒ LeiosProtocol (PBft c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

data OCINStaleness Source #

Whether an announcement's operational certificate issue number (OCIN) is at least the one our immutable tip records for its issuer.

A stale one is accepted from the peer but neither processed nor relayed; see validateLeiosAnnouncement.

Constructors

FreshOCIN 
StaleOCIN 

Instances

Instances details
Eq OCINStaleness Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

Show OCINStaleness Source # 
Instance details

Defined in Ouroboros.Consensus.Leios.Protocol

defaultGetLeiosLedgerView ∷ proxy p → LedgerView p → Maybe LeiosLedgerView Source #

getLeiosLedgerView for a protocol that has no Leios.

defaultValidateLeiosAnnouncement ∷ ConsensusConfig p → ValidateView p → SlotNo → Ticked (ChainDepState p) → Except (ValidationErr p) OCINStaleness Source #

validateLeiosAnnouncement for a protocol whose headers never carry an announcement, which is therefore never called.

defaultGetLeiosAnnouncement ∷ proxy p → ValidateView p → Maybe LeiosAnnouncement Source #

getLeiosAnnouncement for a protocol whose headers never carry an announcement.