ouroboros-consensus-1.0.0.0: Consensus layer for the Ouroboros blockchain protocol
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
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-1.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

Eq PerasIgnoranceRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord 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-1.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
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-1.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

Eq PerasCooldownRounds Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord 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-1.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
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-1.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

Eq PerasBlockMinSlots Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord 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-1.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasBlockMinSlots" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasBlockMinSlots") '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
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-1.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

Eq PerasCertArrivalThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord 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-1.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
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-1.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

Eq PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasRoundLength Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks 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-1.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
Monoid PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Semigroup 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-1.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

Eq PerasWeight Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord 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-1.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasWeight" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasWeight") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype PerasQuorumStakeThreshold Source #

Total stake needed to forge a Peras certificate.

Instances

Instances details
Generic PerasQuorumStakeThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasQuorumStakeThreshold 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

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

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasQuorumStakeThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasQuorumStakeThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasQuorumStakeThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasQuorumStakeThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasQuorumStakeThreshold Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasQuorumStakeThreshold = D1 ('MetaData "PerasQuorumStakeThreshold" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-1.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasQuorumStakeThreshold" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasQuorumStakeThreshold") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational)))

newtype PerasQuorumStakeThresholdSafetyMargin Source #

Safety margin needed on top of the quorum stake 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
Generic PerasQuorumStakeThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasQuorumStakeThresholdSafetyMargin 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

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

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasQuorumStakeThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Ord PerasQuorumStakeThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasQuorumStakeThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Condense PerasQuorumStakeThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasQuorumStakeThresholdSafetyMargin Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasQuorumStakeThresholdSafetyMargin = D1 ('MetaData "PerasQuorumStakeThresholdSafetyMargin" "Ouroboros.Consensus.Peras.Params" "ouroboros-consensus-1.0.0.0-inplace" 'True) (C1 ('MetaCons "PerasQuorumStakeThresholdSafetyMargin" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPerasQuorumStakeThresholdSafetyMargin") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational)))

Protocol parameters bundle

data PerasParams 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
Generic PerasParams Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Associated Types

type Rep PerasParams 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Show PerasParams Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

Eq PerasParams Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

NoThunks PerasParams Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

type Rep PerasParams Source # 
Instance details

Defined in Ouroboros.Consensus.Peras.Params

mkPerasParamsPerasParams Source #

Instantiate default Peras protocol parameters.

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