HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

Modulebyron-spec-chain-1.0.1.1Haskell2010

Byron.Spec.Chain.STS.Rule.SigCnt

  • 2 types
  • 2 values
datadata SIGCNT
#
Instances9Data, STS, Embed, BaseM, Environment, Event, …

These PredicateFailures are all throwable.

Constructors

Instances3Eq, Data, Show

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.

valuesigCntT :: BlockCount -> Word8 -> Gen Double
#

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.