| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Peras.Params
Description
Peras protocol parameters
Synopsis
- newtype PerasIgnoranceRounds = PerasIgnoranceRounds {}
- newtype PerasCooldownRounds = PerasCooldownRounds {}
- newtype PerasBlockMinSlots = PerasBlockMinSlots {}
- newtype PerasCertMaxRounds = PerasCertMaxRounds {}
- newtype PerasCertArrivalThreshold = PerasCertArrivalThreshold {}
- newtype PerasRoundLength = PerasRoundLength {}
- newtype PerasWeight = PerasWeight {}
- newtype PerasQuorumWeightThreshold = PerasQuorumWeightThreshold {}
- newtype PerasQuorumWeightThresholdSafetyMargin = PerasQuorumWeightThresholdSafetyMargin {}
- data PerasParams blk = PerasParams {
- perasIgnoranceRounds ∷ !PerasIgnoranceRounds
- perasCooldownRounds ∷ !PerasCooldownRounds
- perasBlockMinSlots ∷ !PerasBlockMinSlots
- perasCertMaxRounds ∷ !PerasCertMaxRounds
- perasCertArrivalThreshold ∷ !PerasCertArrivalThreshold
- perasWeight ∷ !PerasWeight
- perasQuorumWeightThreshold ∷ !PerasQuorumWeightThreshold
- perasQuorumWeightThresholdSafetyMargin ∷ !PerasQuorumWeightThresholdSafetyMargin
- perasTargetCommitteeSize ∷ !TargetCommitteeSize
- castPerasParams ∷ ∀ blk' blk. PerasParams blk → PerasParams blk'
- defaultPerasParams ∷ PerasParams blk
- dijkstraPerasRoundLength ∷ PerasEnabled PerasRoundLength
- data PerasEnabled a
- pattern PerasEnabled ∷ a → PerasEnabled a
- pattern NoPerasEnabled ∷ PerasEnabled a
- newtype PerasEnabledT (m ∷ Type → Type) a = PerasEnabledT {
- runPerasEnabledT ∷ m (PerasEnabled a)
- fromPerasEnabled ∷ a → PerasEnabled a → a
- perasEnabledToMaybe ∷ PerasEnabled a → Maybe a
- newtype TargetCommitteeSize = TargetCommitteeSize {}
Protocol parameters
newtype PerasIgnoranceRounds Source #
Number of rounds for which to ignore certificates after entering a cooldown period.
Constructors
| PerasIgnoranceRounds | |
Fields | |
Instances
newtype PerasCooldownRounds Source #
Minimum number of rounds to wait before voting again after a cooldown period starts.
Constructors
| PerasCooldownRounds | |
Fields | |
Instances
| FromCBOR PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasCooldownRounds → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasCooldownRounds → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasCooldownRounds] → Size Source # | |||||
| Eq PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| Ord PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasCooldownRounds → PerasCooldownRounds → Ordering # (<) ∷ PerasCooldownRounds → PerasCooldownRounds → Bool # (<=) ∷ PerasCooldownRounds → PerasCooldownRounds → Bool # (>) ∷ PerasCooldownRounds → PerasCooldownRounds → Bool # (>=) ∷ PerasCooldownRounds → PerasCooldownRounds → Bool # max ∷ PerasCooldownRounds → PerasCooldownRounds → PerasCooldownRounds # min ∷ PerasCooldownRounds → PerasCooldownRounds → PerasCooldownRounds # | |||||
| Enum PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods succ ∷ PerasCooldownRounds → PerasCooldownRounds # pred ∷ PerasCooldownRounds → PerasCooldownRounds # toEnum ∷ Int → PerasCooldownRounds # fromEnum ∷ PerasCooldownRounds → Int # enumFrom ∷ PerasCooldownRounds → [PerasCooldownRounds] # enumFromThen ∷ PerasCooldownRounds → PerasCooldownRounds → [PerasCooldownRounds] # enumFromTo ∷ PerasCooldownRounds → PerasCooldownRounds → [PerasCooldownRounds] # enumFromThenTo ∷ PerasCooldownRounds → PerasCooldownRounds → PerasCooldownRounds → [PerasCooldownRounds] # | |||||
| Generic PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
Methods | |||||
| Show PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasCooldownRounds → ShowS # show ∷ PerasCooldownRounds → String # showList ∷ [PerasCooldownRounds] → ShowS # | |||||
| NoThunks PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| type Rep PerasCooldownRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasCooldownRounds = D1 ('MetaData "PerasCooldownRounds" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasCooldownRounds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasCooldownRounds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype PerasBlockMinSlots Source #
Minimum age in slots of a block before it can be voted for in order to get a boost.
Constructors
| PerasBlockMinSlots | |
Fields | |
Instances
| FromCBOR PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasBlockMinSlots → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasBlockMinSlots → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasBlockMinSlots] → Size Source # | |||||
| Eq PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| Ord PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasBlockMinSlots → PerasBlockMinSlots → Ordering # (<) ∷ PerasBlockMinSlots → PerasBlockMinSlots → Bool # (<=) ∷ PerasBlockMinSlots → PerasBlockMinSlots → Bool # (>) ∷ PerasBlockMinSlots → PerasBlockMinSlots → Bool # (>=) ∷ PerasBlockMinSlots → PerasBlockMinSlots → Bool # max ∷ PerasBlockMinSlots → PerasBlockMinSlots → PerasBlockMinSlots # min ∷ PerasBlockMinSlots → PerasBlockMinSlots → PerasBlockMinSlots # | |||||
| Enum PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods succ ∷ PerasBlockMinSlots → PerasBlockMinSlots # pred ∷ PerasBlockMinSlots → PerasBlockMinSlots # toEnum ∷ Int → PerasBlockMinSlots # fromEnum ∷ PerasBlockMinSlots → Int # enumFrom ∷ PerasBlockMinSlots → [PerasBlockMinSlots] # enumFromThen ∷ PerasBlockMinSlots → PerasBlockMinSlots → [PerasBlockMinSlots] # enumFromTo ∷ PerasBlockMinSlots → PerasBlockMinSlots → [PerasBlockMinSlots] # enumFromThenTo ∷ PerasBlockMinSlots → PerasBlockMinSlots → PerasBlockMinSlots → [PerasBlockMinSlots] # | |||||
| Generic PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
Methods | |||||
| Show PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasBlockMinSlots → ShowS # show ∷ PerasBlockMinSlots → String # showList ∷ [PerasBlockMinSlots] → ShowS # | |||||
| NoThunks PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| type Rep PerasBlockMinSlots Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasBlockMinSlots = D1 ('MetaData "PerasBlockMinSlots" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasBlockMinSlots" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasBlockMinSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype PerasCertMaxRounds Source #
Maximum age for a certificate to be included in a block, in rounds.
Constructors
| PerasCertMaxRounds | |
Fields | |
Instances
| FromCBOR PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasCertMaxRounds → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasCertMaxRounds → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasCertMaxRounds] → Size Source # | |||||
| Eq PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| Ord PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasCertMaxRounds → PerasCertMaxRounds → Ordering # (<) ∷ PerasCertMaxRounds → PerasCertMaxRounds → Bool # (<=) ∷ PerasCertMaxRounds → PerasCertMaxRounds → Bool # (>) ∷ PerasCertMaxRounds → PerasCertMaxRounds → Bool # (>=) ∷ PerasCertMaxRounds → PerasCertMaxRounds → Bool # max ∷ PerasCertMaxRounds → PerasCertMaxRounds → PerasCertMaxRounds # min ∷ PerasCertMaxRounds → PerasCertMaxRounds → PerasCertMaxRounds # | |||||
| Enum PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods succ ∷ PerasCertMaxRounds → PerasCertMaxRounds # pred ∷ PerasCertMaxRounds → PerasCertMaxRounds # toEnum ∷ Int → PerasCertMaxRounds # fromEnum ∷ PerasCertMaxRounds → Int # enumFrom ∷ PerasCertMaxRounds → [PerasCertMaxRounds] # enumFromThen ∷ PerasCertMaxRounds → PerasCertMaxRounds → [PerasCertMaxRounds] # enumFromTo ∷ PerasCertMaxRounds → PerasCertMaxRounds → [PerasCertMaxRounds] # enumFromThenTo ∷ PerasCertMaxRounds → PerasCertMaxRounds → PerasCertMaxRounds → [PerasCertMaxRounds] # | |||||
| Generic PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
Methods | |||||
| Show PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasCertMaxRounds → ShowS # show ∷ PerasCertMaxRounds → String # showList ∷ [PerasCertMaxRounds] → ShowS # | |||||
| NoThunks PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| type Rep PerasCertMaxRounds Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasCertMaxRounds = D1 ('MetaData "PerasCertMaxRounds" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasCertMaxRounds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasCertMaxRounds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype PerasCertArrivalThreshold Source #
Maximum number of slots to wait for after the start of a round to consider a certificate valid for voting.
Constructors
| PerasCertArrivalThreshold | |
Fields | |
Instances
| FromCBOR PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasCertArrivalThreshold → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasCertArrivalThreshold → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasCertArrivalThreshold] → Size Source # | |||||
| Eq PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Ord PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → Ordering # (<) ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → Bool # (<=) ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → Bool # (>) ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → Bool # (>=) ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → Bool # max ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → PerasCertArrivalThreshold # min ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → PerasCertArrivalThreshold # | |||||
| Enum PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods succ ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold # pred ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold # toEnum ∷ Int → PerasCertArrivalThreshold # fromEnum ∷ PerasCertArrivalThreshold → Int # enumFrom ∷ PerasCertArrivalThreshold → [PerasCertArrivalThreshold] # enumFromThen ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → [PerasCertArrivalThreshold] # enumFromTo ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → [PerasCertArrivalThreshold] # enumFromThenTo ∷ PerasCertArrivalThreshold → PerasCertArrivalThreshold → PerasCertArrivalThreshold → [PerasCertArrivalThreshold] # | |||||
| Generic PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
| |||||
| Show PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasCertArrivalThreshold → ShowS # | |||||
| NoThunks PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| type Rep PerasCertArrivalThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasCertArrivalThreshold = D1 ('MetaData "PerasCertArrivalThreshold" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasCertArrivalThreshold" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasCertArrivalThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype PerasRoundLength Source #
Length of a Peras round in slots.
Constructors
| PerasRoundLength | |
Fields | |
Instances
| FromCBOR PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasRoundLength → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasRoundLength → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasRoundLength] → Size Source # | |||||
| Eq PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| Ord PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasRoundLength → PerasRoundLength → Ordering # (<) ∷ PerasRoundLength → PerasRoundLength → Bool # (<=) ∷ PerasRoundLength → PerasRoundLength → Bool # (>) ∷ PerasRoundLength → PerasRoundLength → Bool # (>=) ∷ PerasRoundLength → PerasRoundLength → Bool # max ∷ PerasRoundLength → PerasRoundLength → PerasRoundLength # min ∷ PerasRoundLength → PerasRoundLength → PerasRoundLength # | |||||
| Enum PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods succ ∷ PerasRoundLength → PerasRoundLength # pred ∷ PerasRoundLength → PerasRoundLength # toEnum ∷ Int → PerasRoundLength # fromEnum ∷ PerasRoundLength → Int # enumFrom ∷ PerasRoundLength → [PerasRoundLength] # enumFromThen ∷ PerasRoundLength → PerasRoundLength → [PerasRoundLength] # enumFromTo ∷ PerasRoundLength → PerasRoundLength → [PerasRoundLength] # enumFromThenTo ∷ PerasRoundLength → PerasRoundLength → PerasRoundLength → [PerasRoundLength] # | |||||
| Generic PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
Methods from ∷ PerasRoundLength → Rep PerasRoundLength x # to ∷ Rep PerasRoundLength x → PerasRoundLength # | |||||
| Show PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasRoundLength → ShowS # show ∷ PerasRoundLength → String # showList ∷ [PerasRoundLength] → ShowS # | |||||
| NoThunks PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| type Rep PerasRoundLength Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasRoundLength = D1 ('MetaData "PerasRoundLength" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasRoundLength" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasRoundLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype PerasWeight Source #
Weight assigned to a block when boosted by a Peras certificate.
Constructors
| PerasWeight | |
Fields | |
Instances
| FromCBOR PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasWeight → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasWeight → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasWeight] → Size Source # | |||||
| Monoid PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Semigroup PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods (<>) ∷ PerasWeight → PerasWeight → PerasWeight # sconcat ∷ NonEmpty PerasWeight → PerasWeight # stimes ∷ Integral b ⇒ b → PerasWeight → PerasWeight # | |||||
| Eq PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Ord PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasWeight → PerasWeight → Ordering # (<) ∷ PerasWeight → PerasWeight → Bool # (<=) ∷ PerasWeight → PerasWeight → Bool # (>) ∷ PerasWeight → PerasWeight → Bool # (>=) ∷ PerasWeight → PerasWeight → Bool # max ∷ PerasWeight → PerasWeight → PerasWeight # min ∷ PerasWeight → PerasWeight → PerasWeight # | |||||
| Enum PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods succ ∷ PerasWeight → PerasWeight # pred ∷ PerasWeight → PerasWeight # toEnum ∷ Int → PerasWeight # fromEnum ∷ PerasWeight → Int # enumFrom ∷ PerasWeight → [PerasWeight] # enumFromThen ∷ PerasWeight → PerasWeight → [PerasWeight] # enumFromTo ∷ PerasWeight → PerasWeight → [PerasWeight] # enumFromThenTo ∷ PerasWeight → PerasWeight → PerasWeight → [PerasWeight] # | |||||
| Generic PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
| |||||
| Show PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasWeight → ShowS # show ∷ PerasWeight → String # showList ∷ [PerasWeight] → ShowS # | |||||
| NoThunks PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods condense ∷ PerasWeight → String Source # | |||||
| type Rep PerasWeight Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasWeight = D1 ('MetaData "PerasWeight" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasWeight" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasWeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
newtype PerasQuorumWeightThreshold Source #
Total vote weight needed to forge a Peras certificate.
Constructors
| PerasQuorumWeightThreshold | |
Fields | |
Instances
| FromCBOR PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasQuorumWeightThreshold → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasQuorumWeightThreshold → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasQuorumWeightThreshold] → Size Source # | |||||
| Eq PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Ord PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → Ordering # (<) ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → Bool # (<=) ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → Bool # (>) ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → Bool # (>=) ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → Bool # max ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → PerasQuorumWeightThreshold # min ∷ PerasQuorumWeightThreshold → PerasQuorumWeightThreshold → PerasQuorumWeightThreshold # | |||||
| Generic PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
| |||||
| Show PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasQuorumWeightThreshold → ShowS # | |||||
| NoThunks PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods | |||||
| type Rep PerasQuorumWeightThreshold Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasQuorumWeightThreshold = D1 ('MetaData "PerasQuorumWeightThreshold" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasQuorumWeightThreshold" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasQuorumWeightThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational))) | |||||
newtype PerasQuorumWeightThresholdSafetyMargin Source #
Safety margin needed on top of the quorum vote weight threshold.
NOTE: this is needed to account for an extremely unlikely local sortition where not enough honest non-persistent parties decide to vote in a round. This mostly depend on the expected size of the voting committee.
Constructors
| PerasQuorumWeightThresholdSafetyMargin | |
Instances
| FromCBOR PerasQuorumWeightThresholdSafetyMargin Source # | |||||
| ToCBOR PerasQuorumWeightThresholdSafetyMargin Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasQuorumWeightThresholdSafetyMargin → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasQuorumWeightThresholdSafetyMargin → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasQuorumWeightThresholdSafetyMargin] → Size Source # | |||||
| Eq PerasQuorumWeightThresholdSafetyMargin Source # | |||||
| Ord PerasQuorumWeightThresholdSafetyMargin Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → Ordering # (<) ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → Bool # (<=) ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → Bool # (>) ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → Bool # (>=) ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → Bool # max ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin # min ∷ PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin → PerasQuorumWeightThresholdSafetyMargin # | |||||
| Generic PerasQuorumWeightThresholdSafetyMargin Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
| |||||
| Show PerasQuorumWeightThresholdSafetyMargin Source # | |||||
| NoThunks PerasQuorumWeightThresholdSafetyMargin Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Condense PerasQuorumWeightThresholdSafetyMargin Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods condense ∷ PerasQuorumWeightThresholdSafetyMargin → String Source # | |||||
| type Rep PerasQuorumWeightThresholdSafetyMargin Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep PerasQuorumWeightThresholdSafetyMargin = D1 ('MetaData "PerasQuorumWeightThresholdSafetyMargin" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasQuorumWeightThresholdSafetyMargin" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasQuorumWeightThresholdSafetyMargin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational))) | |||||
Protocol parameters bundle
data PerasParams blk Source #
Peras protocol parameters.
These are documented in the section 2.1 of the Peras design report: https://tweag.github.io/cardano-peras/peras-design.pdf#section.2.1
TODO: make fields strict when we have concrete default values for them.
Constructors
| PerasParams | |
Fields
| |
Instances
| Typeable blk ⇒ FromCBOR (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| Typeable blk ⇒ ToCBOR (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasParams blk → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PerasParams blk) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasParams blk] → Size Source # | |||||
| Eq (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods (==) ∷ PerasParams blk → PerasParams blk → Bool # (/=) ∷ PerasParams blk → PerasParams blk → Bool # | |||||
| Generic (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
Methods from ∷ PerasParams blk → Rep (PerasParams blk) x # to ∷ Rep (PerasParams blk) x → PerasParams blk # | |||||
| Show (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasParams blk → ShowS # show ∷ PerasParams blk → String # showList ∷ [PerasParams blk] → ShowS # | |||||
| NoThunks (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| type Rep (PerasParams blk) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep (PerasParams blk) = D1 ('MetaData "PerasParams" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'False) (C1 ('MetaCons "PerasParams" 'PrefixI 'True) (((S1 ('MetaSel ('Just "perasIgnoranceRounds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasIgnoranceRounds) :*: S1 ('MetaSel ('Just "perasCooldownRounds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasCooldownRounds)) :*: (S1 ('MetaSel ('Just "perasBlockMinSlots") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasBlockMinSlots) :*: S1 ('MetaSel ('Just "perasCertMaxRounds") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasCertMaxRounds))) :*: ((S1 ('MetaSel ('Just "perasCertArrivalThreshold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasCertArrivalThreshold) :*: S1 ('MetaSel ('Just "perasWeight") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasWeight)) :*: (S1 ('MetaSel ('Just "perasQuorumWeightThreshold") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasQuorumWeightThreshold) :*: (S1 ('MetaSel ('Just "perasQuorumWeightThresholdSafetyMargin") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PerasQuorumWeightThresholdSafetyMargin) :*: S1 ('MetaSel ('Just "perasTargetCommitteeSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TargetCommitteeSize)))))) | |||||
castPerasParams ∷ ∀ blk' blk. PerasParams blk → PerasParams blk' Source #
Retag a PerasParams with a new phantom blk type.
defaultPerasParams ∷ PerasParams blk Source #
Instantiate default Peras protocol parameters.
NOTE: in the future this will depend on a concrete BlockConfig.
Era-dependent default values
dijkstraPerasRoundLength ∷ PerasEnabled PerasRoundLength Source #
Default value for PerasRoundLength in the Dijkstra eras.
PerasEnabled wrapper
data PerasEnabled a Source #
A marker for Peras-specific values that are not present in all eras
Instances
| Applicative PerasEnabled Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods pure ∷ a → PerasEnabled a # (<*>) ∷ PerasEnabled (a → b) → PerasEnabled a → PerasEnabled b # liftA2 ∷ (a → b → c) → PerasEnabled a → PerasEnabled b → PerasEnabled c # (*>) ∷ PerasEnabled a → PerasEnabled b → PerasEnabled b # (<*) ∷ PerasEnabled a → PerasEnabled b → PerasEnabled a # | |||||
| Functor PerasEnabled Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods fmap ∷ (a → b) → PerasEnabled a → PerasEnabled b # (<$) ∷ a → PerasEnabled b → PerasEnabled a # | |||||
| Monad PerasEnabled Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods (>>=) ∷ PerasEnabled a → (a → PerasEnabled b) → PerasEnabled b # (>>) ∷ PerasEnabled a → PerasEnabled b → PerasEnabled b # return ∷ a → PerasEnabled a # | |||||
| FromCBOR a ⇒ FromCBOR (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| ToCBOR a ⇒ ToCBOR (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods toCBOR ∷ PerasEnabled a → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (PerasEnabled a) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasEnabled a] → Size Source # | |||||
| Eq a ⇒ Eq (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods (==) ∷ PerasEnabled a → PerasEnabled a → Bool # (/=) ∷ PerasEnabled a → PerasEnabled a → Bool # | |||||
| Ord a ⇒ Ord (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods compare ∷ PerasEnabled a → PerasEnabled a → Ordering # (<) ∷ PerasEnabled a → PerasEnabled a → Bool # (<=) ∷ PerasEnabled a → PerasEnabled a → Bool # (>) ∷ PerasEnabled a → PerasEnabled a → Bool # (>=) ∷ PerasEnabled a → PerasEnabled a → Bool # max ∷ PerasEnabled a → PerasEnabled a → PerasEnabled a # min ∷ PerasEnabled a → PerasEnabled a → PerasEnabled a # | |||||
| Generic (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Associated Types
Methods from ∷ PerasEnabled a → Rep (PerasEnabled a) x # to ∷ Rep (PerasEnabled a) x → PerasEnabled a # | |||||
| Show a ⇒ Show (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params Methods showsPrec ∷ Int → PerasEnabled a → ShowS # show ∷ PerasEnabled a → String # showList ∷ [PerasEnabled a] → ShowS # | |||||
| NoThunks a ⇒ NoThunks (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params | |||||
| type Rep (PerasEnabled a) Source # | |||||
Defined in Ouroboros.Consensus.Peras.Params type Rep (PerasEnabled a) = D1 ('MetaData "PerasEnabled" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "MkPerasEnabled" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a)))) | |||||
pattern PerasEnabled ∷ a → PerasEnabled a Source #
pattern NoPerasEnabled ∷ PerasEnabled a Source #
newtype PerasEnabledT (m ∷ Type → Type) a Source #
A MaybeT-like monad transformer.
Used solely for the Peras-related hard fork combinator queries,
see Qry.
Constructors
| PerasEnabledT | |
Fields
| |
Instances
| MonadTrans PerasEnabledT Source # | |
Defined in Ouroboros.Consensus.Peras.Params Methods lift ∷ Monad m ⇒ m a → PerasEnabledT m a # | |
| (Functor m, Monad m) ⇒ Applicative (PerasEnabledT m) Source # | |
Defined in Ouroboros.Consensus.Peras.Params Methods pure ∷ a → PerasEnabledT m a # (<*>) ∷ PerasEnabledT m (a → b) → PerasEnabledT m a → PerasEnabledT m b # liftA2 ∷ (a → b → c) → PerasEnabledT m a → PerasEnabledT m b → PerasEnabledT m c # (*>) ∷ PerasEnabledT m a → PerasEnabledT m b → PerasEnabledT m b # (<*) ∷ PerasEnabledT m a → PerasEnabledT m b → PerasEnabledT m a # | |
| Functor m ⇒ Functor (PerasEnabledT m) Source # | |
Defined in Ouroboros.Consensus.Peras.Params Methods fmap ∷ (a → b) → PerasEnabledT m a → PerasEnabledT m b # (<$) ∷ a → PerasEnabledT m b → PerasEnabledT m a # | |
| Monad m ⇒ Monad (PerasEnabledT m) Source # | |
Defined in Ouroboros.Consensus.Peras.Params Methods (>>=) ∷ PerasEnabledT m a → (a → PerasEnabledT m b) → PerasEnabledT m b # (>>) ∷ PerasEnabledT m a → PerasEnabledT m b → PerasEnabledT m b # return ∷ a → PerasEnabledT m a # | |
fromPerasEnabled ∷ a → PerasEnabled a → a Source #
A fromMaybe-like eliminator for PerasEnabled
perasEnabledToMaybe ∷ PerasEnabled a → Maybe a Source #
Return the underlying Maybe of a PerasEnabled value.
Convenience re-exports
newtype TargetCommitteeSize Source #
Target committee size
Constructors
| TargetCommitteeSize | |
Fields | |
Instances
| FromCBOR TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types | |||||
| ToCBOR TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types Methods toCBOR ∷ TargetCommitteeSize → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy TargetCommitteeSize → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [TargetCommitteeSize] → Size Source # | |||||
| Eq TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types Methods | |||||
| Generic TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types Associated Types
Methods | |||||
| Show TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types Methods showsPrec ∷ Int → TargetCommitteeSize → ShowS # show ∷ TargetCommitteeSize → String # showList ∷ [TargetCommitteeSize] → ShowS # | |||||
| NoThunks TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types | |||||
| type Rep TargetCommitteeSize Source # | |||||
Defined in Ouroboros.Consensus.Committee.Types type Rep TargetCommitteeSize = D1 ('MetaData "TargetCommitteeSize" "Ouroboros.Consensus.Committee.Types" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "TargetCommitteeSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unTargetCommitteeSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||