byron-spec-chain-1.0.1.0: Executable specification of the Cardano blockchain
Safe HaskellSafe-Inferred
LanguageHaskell2010

Byron.Spec.Chain.STS.Rule.SigCnt

Synopsis

Documentation

data SIGCNT Source #

Instances

Instances details
Data SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

Methods

gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → SIGCNT → c SIGCNT Source #

gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c SIGCNT Source #

toConstrSIGCNTConstr Source #

dataTypeOfSIGCNTDataType Source #

dataCast1Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c SIGCNT) Source #

dataCast2Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c SIGCNT) Source #

gmapT ∷ (∀ b. Data b ⇒ b → b) → SIGCNTSIGCNT Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → SIGCNT → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → SIGCNT → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → SIGCNT → [u] Source #

gmapQiInt → (∀ d. Data d ⇒ d → u) → SIGCNT → u Source #

gmapMMonad m ⇒ (∀ d. Data d ⇒ d → m d) → SIGCNT → m SIGCNT Source #

gmapMpMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SIGCNT → m SIGCNT Source #

gmapMoMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SIGCNT → m SIGCNT Source #

STS SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

Embed SIGCNT PBFT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.Pbft

type BaseM SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

type Environment SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

type Event SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

type PredicateFailure SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

type Signal SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

type State SIGCNT Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

data SigcntPredicateFailure Source #

These PredicateFailures are all throwable.

Constructors

TooManyIssuedBlocks VKeyGenesis

The given genesis key issued too many blocks.

NotADelegate

The key signing the block is not a delegate of a genesis key.

Instances

Instances details
Data SigcntPredicateFailure Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

Methods

gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → SigcntPredicateFailure → c SigcntPredicateFailure Source #

gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c SigcntPredicateFailure Source #

toConstrSigcntPredicateFailureConstr Source #

dataTypeOfSigcntPredicateFailureDataType Source #

dataCast1Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c SigcntPredicateFailure) Source #

dataCast2Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c SigcntPredicateFailure) Source #

gmapT ∷ (∀ b. Data b ⇒ b → b) → SigcntPredicateFailureSigcntPredicateFailure Source #

gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → SigcntPredicateFailure → r Source #

gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → SigcntPredicateFailure → r Source #

gmapQ ∷ (∀ d. Data d ⇒ d → u) → SigcntPredicateFailure → [u] Source #

gmapQiInt → (∀ d. Data d ⇒ d → u) → SigcntPredicateFailure → u Source #

gmapMMonad m ⇒ (∀ d. Data d ⇒ d → m d) → SigcntPredicateFailure → m SigcntPredicateFailure Source #

gmapMpMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SigcntPredicateFailure → m SigcntPredicateFailure Source #

gmapMoMonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SigcntPredicateFailure → m SigcntPredicateFailure Source #

Show SigcntPredicateFailure Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

Eq SigcntPredicateFailure Source # 
Instance details

Defined in Byron.Spec.Chain.STS.Rule.SigCnt

issuerEnvironment SIGCNTState SIGCNTGen VKey Source #

Generate an issuer that can still issue blocks according to the SIGCNT rule. The issuers are taken from the range of the delegation map passed as parameter.

This generator will throw an error if no suitable issuer can be found, which means that the block production halted.

sigCntTBlockCountWord8Gen Double Source #

Generate a signature count threshold given a chain stability parameter k and number of genesis keys ngk.

This threshold must allow that all the (honest) genesis keys can issue enough blocks to fill the rolling window of k. If this is not possible, then the block production will halt since there will not be valid issuers. So the threshold must make it possible to find an integer n such that:

n <= k * t

and

k < ngk * n
= { algebra }
k / ngk < n

We know there must be an integer in the interval

(k/ngk, k/ngk + 1]

So to satisfy the requirements above, we can pick a t such that:

k/ngk + 1 <= k * t
= { algebra }
1/ngk + 1/k <= t

To pick a value for t we vary the proportion of honest keys.