ouroboros-consensus-0.28.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Config.SecurityParam

Synopsis

Documentation

newtype SecurityParam Source #

Protocol security parameter

In longest-chain protocols, we interpret this as the number of rollbacks we support.

i.e., k == 1: we can roll back at most one block k == 2: we can roll back at most two blocks, etc

NOTE: This talks about the number of blocks we can roll back, not the number of slots.

In weightiest-chain protocols (such as Ouroboros Peras), we interpret this as the maximum amount of weight we can roll back. Here, the total weight of a chain (fragment) is defined to be its length plus the sum of all weight boosts given to some of its blocks on the chain (fragment).

i.e. k == 30: we can roll back at most 30 unweighted blocks, or two blocks each having additional weight 14. In the latter case, the chain fragment has total weight 2 + 2 * 14 = 30.

Constructors

SecurityParam 

Instances

Instances details
FromCBOR SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

ToCBOR SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

Generic SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

Associated Types

type Rep SecurityParam 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

type Rep SecurityParam = D1 ('MetaData "SecurityParam" "Ouroboros.Consensus.Config.SecurityParam" "ouroboros-consensus-0.28.0.0-inplace" 'True) (C1 ('MetaCons "SecurityParam" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxRollbacks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonZero Word64))))
Show SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

Eq SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

NoThunks SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

type Rep SecurityParam Source # 
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

type Rep SecurityParam = D1 ('MetaData "SecurityParam" "Ouroboros.Consensus.Config.SecurityParam" "ouroboros-consensus-0.28.0.0-inplace" 'True) (C1 ('MetaCons "SecurityParam" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxRollbacks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonZero Word64))))

maxRollbackWeightSecurityParamPerasWeight Source #

The maximum amount of weight we can roll back.