ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Ouroboros.Consensus.ChainGenerator.Params

Synopsis

Documentation

newtype Asc Source #

The active slot coefficient

INVARIANT: 0 < x < 1

It's as precise as Double, which likely suffices for all of our needs.

Constructors

UnsafeAsc Double 

Bundled Patterns

pattern AscDoubleAsc 

Instances

Instances details
Read Asc Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Show Asc Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

showsPrecIntAscShowS #

showAscString #

showList ∷ [Asc] → ShowS #

Eq Asc Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

(==)AscAscBool #

(/=)AscAscBool #

newtype Delta Source #

The Δ parameter of the Praos theorems and so also of the Praos Race Assumption

ASSUMPTION: If an honest block b is minted at the start of slot x, then every (healthy) honest node will have selected a chain no worse than b by the onset of slot x + Δ + 1.

NOTE: If Δ=0, then the best block minted in each slot is selected by every (healthy) honest node before the onset of the next slot.

NOTE: If the honest block k+1 after its intersection with an alternative chain was minted in slot x, then the alternative block k+1 after the intersection can be minted no sooner than slot x + Δ + 1. Thus x + Δ is the youngest slot in the Praos Race Window.

Constructors

Delta Int 

Instances

Instances details
Read Delta Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Show Delta Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

showsPrecIntDeltaShowS #

showDeltaString #

showList ∷ [Delta] → ShowS #

Eq Delta Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

(==)DeltaDeltaBool #

(/=)DeltaDeltaBool #

Ord Delta Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

compareDeltaDeltaOrdering #

(<)DeltaDeltaBool #

(<=)DeltaDeltaBool #

(>)DeltaDeltaBool #

(>=)DeltaDeltaBool #

maxDeltaDeltaDelta #

minDeltaDeltaDelta #

newtype Kcp Source #

The k parameter of the Praos Common Prefix property

Also known as the SecurityParam.

Constructors

Kcp Int 

Instances

Instances details
Read Kcp Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Show Kcp Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

showsPrecIntKcpShowS #

showKcpString #

showList ∷ [Kcp] → ShowS #

Eq Kcp Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

(==)KcpKcpBool #

(/=)KcpKcpBool #

Ord Kcp Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

compareKcpKcpOrdering #

(<)KcpKcpBool #

(<=)KcpKcpBool #

(>)KcpKcpBool #

(>=)KcpKcpBool #

maxKcpKcpKcp #

minKcpKcpKcp #

newtype Len Source #

The maximum length of any leader schedule

This can be interpreted as the end of time, the final moment simulated during a test.

Constructors

Len Int 

Instances

Instances details
Read Len Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Show Len Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

showsPrecIntLenShowS #

showLenString #

showList ∷ [Len] → ShowS #

Eq Len Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

(==)LenLenBool #

(/=)LenLenBool #

Ord Len Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

compareLenLenOrdering #

(<)LenLenBool #

(<=)LenLenBool #

(>)LenLenBool #

(>=)LenLenBool #

maxLenLenLen #

minLenLenLen #

newtype Scg Source #

The s parameter of the Praos Chain Growth property

Also known as the width of the stability window. In particular, we assume that an adversarial stake holder cannot drastically increase their rate of election until at least s many slots after the first block on an adversarial chain.

In other words: we're assuming that any serious attempt to corrupt the leader schedule would be isolated to a private adversarial chain.

Constructors

Scg Int 

Instances

Instances details
Read Scg Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Show Scg Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

showsPrecIntScgShowS #

showScgString #

showList ∷ [Scg] → ShowS #

Eq Scg Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

(==)ScgScgBool #

(/=)ScgScgBool #

Ord Scg Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Params

Methods

compareScgScgOrdering #

(<)ScgScgBool #

(<=)ScgScgBool #

(>)ScgScgBool #

(>=)ScgScgBool #

maxScgScgScg #

minScgScgScg #

ascFromBits ∷ (Enum w, FiniteBits w) ⇒ w → Asc Source #

PRECONDITION: the bits aren't all the same

The Asc that equals the fraction w / 2^widthW.

ascValAscDouble Source #

Interpret Asc as a Double