ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Peras.Params

Description

Peras protocol parameters

Synopsis

Protocol parameters

newtype PerasIgnoranceRounds Source #

Number of rounds for which to ignore certificates after entering a cooldown period.

Instances

Instances details
FromCBOR PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasIgnoranceRounds 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasIgnoranceRounds = D1 ('MetaData "PerasIgnoranceRounds" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasIgnoranceRounds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasIgnoranceRounds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))
Show PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasIgnoranceRounds = D1 ('MetaData "PerasIgnoranceRounds" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-4.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasIgnoranceRounds" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasIgnoranceRounds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype PerasCooldownRounds Source #

Minimum number of rounds to wait before voting again after a cooldown period starts.

Instances

Instances details
FromCBOR PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasCooldownRounds 
Instance details

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)))
Show PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasCooldownRounds Source # 
Instance details

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.

Instances

Instances details
FromCBOR PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasBlockMinSlots 
Instance details

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)))
Show PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasBlockMinSlots Source # 
Instance details

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.

Instances

Instances details
FromCBOR PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasCertMaxRounds 
Instance details

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)))
Show PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasCertMaxRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasCertMaxRounds Source # 
Instance details

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.

Instances

Instances details
FromCBOR PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasCertArrivalThreshold 
Instance details

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)))
Show PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasCertArrivalThreshold Source # 
Instance details

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 

Instances

Instances details
FromCBOR PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasRoundLength 
Instance details

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)))
Show PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasRoundLength Source # 
Instance details

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

Instances details
FromCBOR PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

toCBORPerasWeightEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy PerasWeightSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [PerasWeight] → Size Source #

Monoid PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Semigroup PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Enum PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasWeight 
Instance details

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)))
Show PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasWeight Source # 
Instance details

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.

Instances

Instances details
FromCBOR PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasQuorumWeightThreshold 
Instance details

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)))
Show PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasQuorumWeightThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasQuorumWeightThreshold Source # 
Instance details

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.

Instances

Instances details
FromCBOR PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasQuorumWeightThresholdSafetyMargin 
Instance details

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)))
Show PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasQuorumWeightThresholdSafetyMargin Source # 
Instance details

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.

Instances

Instances details
Typeable blk ⇒ FromCBOR (PerasParams blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Typeable blk ⇒ ToCBOR (PerasParams blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

toCBORPerasParams 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 # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

(==)PerasParams blk → PerasParams blk → Bool #

(/=)PerasParams blk → PerasParams blk → Bool #

Generic (PerasParams blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep (PerasParams blk) 
Instance details

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))))))

Methods

fromPerasParams blk → Rep (PerasParams blk) x #

toRep (PerasParams blk) x → PerasParams blk #

Show (PerasParams blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

showsPrecIntPerasParams blk → ShowS #

showPerasParams blk → String #

showList ∷ [PerasParams blk] → ShowS #

NoThunks (PerasParams blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep (PerasParams blk) Source # 
Instance details

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.

defaultPerasParamsPerasParams blk Source #

Instantiate default Peras protocol parameters.

NOTE: in the future this will depend on a concrete BlockConfig.

Era-dependent default values

PerasEnabled wrapper

data PerasEnabled a Source #

A marker for Peras-specific values that are not present in all eras

Instances

Instances details
Applicative PerasEnabled Source # 
Instance details

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 # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

fmap ∷ (a → b) → PerasEnabled a → PerasEnabled b #

(<$) ∷ a → PerasEnabled b → PerasEnabled a #

Monad PerasEnabled Source # 
Instance details

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 # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

ToCBOR a ⇒ ToCBOR (PerasEnabled a) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

toCBORPerasEnabled 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 # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

(==)PerasEnabled a → PerasEnabled a → Bool #

(/=)PerasEnabled a → PerasEnabled a → Bool #

Ord a ⇒ Ord (PerasEnabled a) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Generic (PerasEnabled a) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep (PerasEnabled a) 
Instance details

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 ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

Methods

fromPerasEnabled a → Rep (PerasEnabled a) x #

toRep (PerasEnabled a) x → PerasEnabled a #

Show a ⇒ Show (PerasEnabled a) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

showsPrecIntPerasEnabled a → ShowS #

showPerasEnabled a → String #

showList ∷ [PerasEnabled a] → ShowS #

NoThunks a ⇒ NoThunks (PerasEnabled a) Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep (PerasEnabled a) Source # 
Instance details

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 ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe a))))

pattern PerasEnabled ∷ a → PerasEnabled a Source #

newtype PerasEnabledT (m ∷ TypeType) a Source #

A MaybeT-like monad transformer.

Used solely for the Peras-related hard fork combinator queries, see Qry.

Constructors

PerasEnabledT 

Fields

Instances

Instances details
MonadTrans PerasEnabledT Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Methods

liftMonad m ⇒ m a → PerasEnabledT m a #

(Functor m, Monad m)Applicative (PerasEnabledT m) Source # 
Instance details

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 # 
Instance details

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 # 
Instance details

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

perasEnabledToMaybePerasEnabled a → Maybe a Source #

Return the underlying Maybe of a PerasEnabled value.

Convenience re-exports

newtype TargetCommitteeSize Source #

Target committee size

Instances

Instances details
FromCBOR TargetCommitteeSize Source # 
Instance details

Defined in Ouroboros.Consensus.Committee.Types

ToCBOR TargetCommitteeSize Source # 
Instance details

Defined in Ouroboros.Consensus.Committee.Types

Eq TargetCommitteeSize Source # 
Instance details

Defined in Ouroboros.Consensus.Committee.Types

Generic TargetCommitteeSize Source # 
Instance details

Defined in Ouroboros.Consensus.Committee.Types

Associated Types

type Rep TargetCommitteeSize 
Instance details

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)))
Show TargetCommitteeSize Source # 
Instance details

Defined in Ouroboros.Consensus.Committee.Types

NoThunks TargetCommitteeSize Source # 
Instance details

Defined in Ouroboros.Consensus.Committee.Types

type Rep TargetCommitteeSize Source # 
Instance details

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)))