Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- bigLedgerPeerQuota :: AccPoolStake
- accumulateBigLedgerStake :: [(PoolStake, NonEmpty RelayAccessPoint)] -> [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))]
- recomputeRelativeStake :: LedgerPeersKind -> [(PoolStake, NonEmpty RelayAccessPoint)] -> [(PoolStake, NonEmpty RelayAccessPoint)]
- newtype AccPoolStake = AccPoolStake {}
- newtype PoolStake = PoolStake {}
- data RelayAccessPoint where
Documentation
bigLedgerPeerQuota :: AccPoolStake Source #
The total accumulated stake of big ledger peers.
accumulateBigLedgerStake :: [(PoolStake, NonEmpty RelayAccessPoint)] -> [(AccPoolStake, (PoolStake, NonEmpty RelayAccessPoint))] Source #
Sort ascendingly a given list of pools with stake,
and tag each one with cumulative stake, with a cutoff
at bigLedgerPeerQuota
recomputeRelativeStake :: LedgerPeersKind -> [(PoolStake, NonEmpty RelayAccessPoint)] -> [(PoolStake, NonEmpty RelayAccessPoint)] Source #
Not all stake pools have valid / usable relay information. This means that we need to recalculate the relative stake for each pool.
newtype AccPoolStake Source #
The accumulated relative stake of a stake pool, like PoolStake but it also includes the relative stake of all preceding pools. A value in the range [0, 1].
Instances
The relative stake of a stakepool in relation to the total amount staked. A value in the [0, 1] range.
data RelayAccessPoint Source #
A relay can have either an IP address and a port number or a domain with a port number
pattern RelayDomainAccessPoint :: DomainAccessPoint -> RelayAccessPoint |
|