Safe Haskell | None |
---|---|
Language | Haskell98 |
Shelley.Spec.Ledger.EpochBoundary
Description
This modules implements the necessary functions for the changes that can happen at epoch boundaries.
Synopsis
- newtype Stake crypto = Stake {
- unStake :: Map (Credential 'Staking crypto) Coin
- newtype BlocksMade crypto = BlocksMade {
- unBlocksMade :: Map (KeyHash 'StakePool crypto) Natural
- data SnapShot crypto = SnapShot {
- _stake :: !(Stake crypto)
- _delegations :: !(Map (Credential 'Staking crypto) (KeyHash 'StakePool crypto))
- _poolParams :: !(Map (KeyHash 'StakePool crypto) (PoolParams crypto))
- data SnapShots crypto = SnapShots {
- _pstakeMark :: !(SnapShot crypto)
- _pstakeSet :: !(SnapShot crypto)
- _pstakeGo :: !(SnapShot crypto)
- _feeSS :: !Coin
- emptySnapShot :: SnapShot crypto
- emptySnapShots :: SnapShots crypto
- aggregateUtxoCoinByCredential :: forall era. ShelleyBased era => Map Ptr (Credential 'Staking (Crypto era)) -> UTxO era -> Map (Credential 'Staking (Crypto era)) Coin -> Map (Credential 'Staking (Crypto era)) Coin
- poolStake :: KeyHash 'StakePool crypto -> Map (Credential 'Staking crypto) (KeyHash 'StakePool crypto) -> Stake crypto -> Stake crypto
- obligation :: PParams era -> Map (Credential 'Staking (Crypto era)) Coin -> Map (KeyHash 'StakePool (Crypto era)) (PoolParams (Crypto era)) -> Coin
- maxPool :: PParams era -> Coin -> Rational -> Rational -> Coin
Documentation
Type of stake as map from hash key to coins associated.
Instances
Eq (Stake crypto) Source # | |
Ord (Stake crypto) Source # | |
Defined in Shelley.Spec.Ledger.EpochBoundary | |
Show (Stake crypto) Source # | |
NFData (Stake crypto) Source # | |
Defined in Shelley.Spec.Ledger.EpochBoundary | |
Crypto crypto => ToCBOR (Stake crypto) Source # | |
Crypto crypto => FromCBOR (Stake crypto) Source # | |
NoThunks (Stake crypto) Source # | |
newtype BlocksMade crypto Source #
Blocks made
Constructors
BlocksMade | |
Fields
|
Instances
Snapshot of the stake distribution.
Constructors
SnapShot | |
Fields
|
Instances
data SnapShots crypto Source #
Snapshots of the stake distribution.
Constructors
SnapShots | |
Fields
|
Instances
emptySnapShot :: SnapShot crypto Source #
emptySnapShots :: SnapShots crypto Source #
aggregateUtxoCoinByCredential :: forall era. ShelleyBased era => Map Ptr (Credential 'Staking (Crypto era)) -> UTxO era -> Map (Credential 'Staking (Crypto era)) Coin -> Map (Credential 'Staking (Crypto era)) Coin Source #
Sum up all the Coin for each staking Credential
poolStake :: KeyHash 'StakePool crypto -> Map (Credential 'Staking crypto) (KeyHash 'StakePool crypto) -> Stake crypto -> Stake crypto Source #
Get stake of one pool