cardano-ledger-shelley-0.1.0.0
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Shelley.RewardUpdate

Description

How to compute the reward update compuation. Also, how to spread the compuation over many blocks, once the chain reaches a stability point.

Synopsis

Documentation

data RewardAns c Source #

The result of reward calculation is a pair of aggregate Maps. One for the accumulated answer, and one for the answer since the last pulse

Instances

Instances details
Eq ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Show ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep ( RewardAns c) :: Type -> Type Source #

NFData ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnf :: Pulser c -> () Source #

NFData ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => ToCBOR ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => ToCBOR ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => FromCBOR ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => FromCBOR ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Typeable c => NoThunks ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NoThunks ( RewardAns crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep ( RewardAns c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep ( RewardAns c) = D1 (' MetaData "RewardAns" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-0.1.0.0-4LNBTpyKcsy6EW18a3tTt2" ' False ) ( C1 (' MetaCons "RewardAns" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "accumRewardAns") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Map ( Credential ' Staking c) ( Reward c))) :*: S1 (' MetaSel (' Just "recentRewardAns") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( RewardEvent c))))

type Pulser c = RewardPulser c ShelleyBase ( RewardAns c) Source #

The type of RewardPulser we pulse on.

data RewardUpdate crypto Source #

The ultiate goal of a reward update computation. Aggregating rewards for each staking credential.

Instances

Instances details
Eq ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Show ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep ( RewardUpdate crypto) :: Type -> Type Source #

NFData ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnf :: RewardUpdate crypto -> () Source #

Crypto crypto => ToCBOR ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

NoThunks ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

data RewardSnapShot crypto Source #

To complete the reward update, we need a snap shot of the EpochState particular to this computation

Instances

Instances details
HasField "_protocolVersion" ( RewardSnapShot crypto) ProtVer Source #

RewardSnapShot can act as a Proxy for PParams when only the protocol version is needed.

Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Eq ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Show ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep ( RewardSnapShot crypto) :: Type -> Type Source #

NFData ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Typeable crypto => NoThunks ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep ( RewardSnapShot crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

data FreeVars crypto Source #

Instances

Instances details
HasField "_protocolVersion" ( FreeVars crypto) ProtVer Source #

FreeVars can act as a Proxy for PParams when only the protocol version is needed.

Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Eq ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Show ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep ( FreeVars crypto) :: Type -> Type Source #

NFData ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnf :: FreeVars crypto -> () Source #

Crypto crypto => ToCBOR ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Typeable crypto => NoThunks ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep ( FreeVars crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

rewardStakePoolMember :: FreeVars c -> RewardAns c -> Credential ' Staking c -> CompactForm Coin -> RewardAns c Source #

The function to call on each reward update pulse. Called by the pulser.

data RewardPulser c (m :: Type -> Type ) ans where Source #

The type of a Pulser which uses rewardStakePoolMember as its underlying function. rewardStakePool will be partially applied to the component of type (FreeVars c) when pulsing. Note that we use two type equality (~) constraints to fix both the monad m and the ans type, to the context where we will use the type as a Pulser. The type must have m and ans as its last two parameters so we can make a Pulsable instance. RSPL = Reward Serializable Listbased Pulser

Instances

Instances details
NFData ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

rnf :: Pulser c -> () Source #

Crypto c => ToCBOR ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => FromCBOR ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Pulsable ( RewardPulser crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Methods

done :: forall (m :: Type -> Type ) ans. RewardPulser crypto m ans -> Bool Source #

current :: forall (m :: Type -> Type ) ans. RewardPulser crypto m ans -> ans Source #

pulseM :: Monad m => RewardPulser crypto m ans -> m ( RewardPulser crypto m ans) Source #

completeM :: Monad m => RewardPulser crypto m ans -> m ans Source #

Typeable c => NoThunks ( Pulser c) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Eq ans => Eq ( RewardPulser c m ans) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Show ans => Show ( RewardPulser c m ans) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

data PulsingRewUpdate crypto Source #

The state used in the STS rules

Constructors

Pulsing !( RewardSnapShot crypto) !( Pulser crypto)
Complete !( RewardUpdate crypto)

Instances

Instances details
Eq ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Show ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Generic ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Associated Types

type Rep ( PulsingRewUpdate crypto) :: Type -> Type Source #

NFData ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Typeable crypto => NoThunks ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

type Rep ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate