| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.Shelley.LedgerState
Description
This module implements the operation rules for treating UTxO transactions (Tx)
as state transformations on a ledger state (LedgerState),
as specified in A Simplified Formal Specification of a UTxO Ledger.
Synopsis
- newtype UTxO era = UTxO {}
- class CanGetUTxO (t ∷ Type → Type) where
- utxoG ∷ SimpleGetter (t era) (UTxO era)
- class CanGetUTxO t ⇒ CanSetUTxO (t ∷ Type → Type) where
- type family AccountState era = (r ∷ Type) | r → era
- data ChainAccountState
- class (EraAccounts era, ToJSON (CertState era), EncCBOR (CertState era), DecShareCBOR (CertState era), Share (CertState era) ~ (Interns (Credential 'Staking), Interns (KeyHash 'StakePool), Interns (Credential 'DRepRole), Interns (Credential 'HotCommitteeRole)), Default (CertState era), NoThunks (CertState era), NFData (CertState era), Show (CertState era), Eq (CertState era)) ⇒ EraCertState era where
- type CertState era = (r ∷ Type) | r → era
- certDStateL ∷ Lens' (CertState era) (DState era)
- certPStateL ∷ Lens' (CertState era) (PState era)
- obligationCertState ∷ CertState era → Obligations
- certsTotalDepositsTxBody ∷ ∀ (t ∷ TxLevel). EraTxBody era ⇒ PParams era → CertState era → TxBody t era → Coin
- certsTotalRefundsTxBody ∷ ∀ (t ∷ TxLevel). EraTxBody era ⇒ PParams era → CertState era → TxBody t era → Coin
- data DState era = DState {}
- data EpochState era = EpochState {}
- data PulsingRewUpdate
- data FutureGenDeleg = FutureGenDeleg {}
- data InstantaneousRewards = InstantaneousRewards {
- iRReserves ∷ !(Map (Credential 'Staking) Coin)
- iRTreasury ∷ !(Map (Credential 'Staking) Coin)
- deltaReserves ∷ !DeltaCoin
- deltaTreasury ∷ !DeltaCoin
- data LedgerState era = LedgerState {
- lsUTxOState ∷ !(UTxOState era)
- lsCertState ∷ !(CertState era)
- data PState era = PState {
- psVRFKeyHashes ∷ !(Map (VRFVerKeyHash 'StakePoolVRF) (NonZero Word64))
- psStakePools ∷ !(Map (KeyHash 'StakePool) StakePoolState)
- psFutureStakePoolParams ∷ !(Map (KeyHash 'StakePool) StakePoolParams)
- psRetiring ∷ !(Map (KeyHash 'StakePool) EpochNo)
- data RewardUpdate = RewardUpdate {}
- data RewardSnapShot = RewardSnapShot {
- rewFees ∷ !Coin
- rewProtocolVersion ∷ !ProtVer
- rewNonMyopic ∷ !NonMyopic
- rewDeltaR1 ∷ !Coin
- rewR ∷ !Coin
- rewDeltaT1 ∷ !Coin
- rewLikelihoods ∷ !(Map (KeyHash 'StakePool) Likelihood)
- rewLeaders ∷ !(Map (Credential 'Staking) (Set Reward))
- data UTxOState era = UTxOState {
- utxosUtxo ∷ !(UTxO era)
- utxosDeposited ∷ !Coin
- utxosFees ∷ !Coin
- utxosGovState ∷ !(GovState era)
- utxosInstantStake ∷ !(InstantStake era)
- utxosDonation ∷ !Coin
- smartUTxOState ∷ EraStake era ⇒ PParams era → UTxO era → Coin → Coin → GovState era → Coin → UTxOState era
- mkShelleyCertState ∷ EraCertState era ⇒ PState era → DState era → CertState era
- data ShelleyCertState era = ShelleyCertState {
- shelleyCertPState ∷ !(PState era)
- shelleyCertDState ∷ !(DState era)
- genesisState ∷ (EraGov era, EraCertState era, EraStake era) ⇒ Map (KeyHash 'GenesisRole) GenDelegPair → UTxO era → LedgerState era
- consumed ∷ ∀ (t ∷ TxLevel). EraUTxO era ⇒ PParams era → CertState era → UTxO era → TxBody t era → Value era
- produced ∷ ∀ era (l ∷ TxLevel). (EraUTxO era, EraCertState era) ⇒ PParams era → CertState era → TxBody l era → Value era
- totalObligation ∷ (EraGov era, EraCertState era) ⇒ CertState era → GovState era → Coin
- allObligations ∷ (EraGov era, EraCertState era) ⇒ CertState era → GovState era → Obligations
- applyRUpd ∷ (EraGov era, EraCertState era) ⇒ RewardUpdate → EpochState era → EpochState era
- applyRUpdFiltered ∷ (EraGov era, EraCertState era) ⇒ RewardUpdate → EpochState era → (EpochState era, FilteredRewards era)
- filterAllRewards ∷ (EraGov era, EraCertState era) ⇒ Map (Credential 'Staking) (Set Reward) → EpochState era → FilteredRewards era
- data FilteredRewards era = FilteredRewards {
- frRegistered ∷ !(Map (Credential 'Staking) (Set Reward))
- frShelleyIgnored ∷ Map (Credential 'Staking) (Set Reward)
- frUnregistered ∷ Set (Credential 'Staking)
- frTotalUnregistered ∷ Coin
- createRUpd ∷ (EraGov era, EraCertState era) ⇒ EpochSize → BlocksMade → EpochState era → Coin → ActiveSlotCoeff → NonZero Word64 → ShelleyBase RewardUpdate
- completeRupd ∷ PulsingRewUpdate → ShelleyBase (RewardUpdate, RewardEvent)
- startStep ∷ (EraGov era, EraCertState era) ⇒ EpochSize → BlocksMade → EpochState era → Coin → ActiveSlotCoeff → NonZero Word64 → PulsingRewUpdate
- pulseStep ∷ PulsingRewUpdate → ShelleyBase (PulsingRewUpdate, RewardEvent)
- completeStep ∷ PulsingRewUpdate → ShelleyBase (PulsingRewUpdate, RewardEvent)
- data NewEpochState era = NewEpochState !EpochNo !BlocksMade !BlocksMade !(EpochState era) !(StrictMaybe PulsingRewUpdate) !PoolDistr !(StashedAVVMAddresses era)
- type family StashedAVVMAddresses era where ...
- stashedAVVMAddresses ∷ NewEpochState era → StashedAVVMAddresses era
- getGKeys ∷ EraCertState era ⇒ NewEpochState era → Set (KeyHash 'GenesisRole)
- updateNES ∷ EraGov era ⇒ NewEpochState era → BlocksMade → LedgerState era → NewEpochState era
- circulation ∷ EpochState era → Coin → Coin
- decayFactor ∷ Float
- returnRedeemAddrsToReserves ∷ EraTxOut era ⇒ EpochState era → EpochState era
- updateNonMyopic ∷ NonMyopic → Coin → Map (KeyHash 'StakePool) Likelihood → NonMyopic
- emptyRewardUpdate ∷ RewardUpdate
- pvCanFollow ∷ ProtVer → ProtVer → Bool
- availableAfterMIR ∷ MIRPot → ChainAccountState → InstantaneousRewards → Coin
- data ShelleyGovState era = ShelleyGovState {
- sgsCurProposals ∷ !(ProposedPPUpdates era)
- sgsFutureProposals ∷ !(ProposedPPUpdates era)
- sgsCurPParams ∷ !(PParams era)
- sgsPrevPParams ∷ !(PParams era)
- sgsFuturePParams ∷ !(FuturePParams era)
- nesPdL ∷ ∀ era f. Functor f ⇒ (PoolDistr → f PoolDistr) → NewEpochState era → f (NewEpochState era)
- nesEsL ∷ ∀ era f. Functor f ⇒ (EpochState era → f (EpochState era)) → NewEpochState era → f (NewEpochState era)
- nesELL ∷ ∀ era f. Functor f ⇒ (EpochNo → f EpochNo) → NewEpochState era → f (NewEpochState era)
- nesBprevL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) Natural → f (Map (KeyHash 'StakePool) Natural)) → NewEpochState era → f (NewEpochState era)
- nesBcurL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) Natural → f (Map (KeyHash 'StakePool) Natural)) → NewEpochState era → f (NewEpochState era)
- nesRuL ∷ ∀ era f. Functor f ⇒ (StrictMaybe PulsingRewUpdate → f (StrictMaybe PulsingRewUpdate)) → NewEpochState era → f (NewEpochState era)
- nesStashedAVVMAddressesL ∷ ∀ era f. Functor f ⇒ (StashedAVVMAddresses era → f (StashedAVVMAddresses era)) → NewEpochState era → f (NewEpochState era)
- nesEpochStateL ∷ ∀ era f. Functor f ⇒ (EpochState era → f (EpochState era)) → NewEpochState era → f (NewEpochState era)
- esSnapshotsL ∷ ∀ era f. Functor f ⇒ (SnapShots → f SnapShots) → EpochState era → f (EpochState era)
- esLStateL ∷ ∀ era f. Functor f ⇒ (LedgerState era → f (LedgerState era)) → EpochState era → f (EpochState era)
- esNonMyopicL ∷ ∀ era f. Functor f ⇒ (NonMyopic → f NonMyopic) → EpochState era → f (EpochState era)
- curPParamsEpochStateL ∷ EraGov era ⇒ Lens' (EpochState era) (PParams era)
- prevPParamsEpochStateL ∷ EraGov era ⇒ Lens' (EpochState era) (PParams era)
- futurePParamsEpochStateL ∷ EraGov era ⇒ Lens' (EpochState era) (FuturePParams era)
- lsUTxOStateL ∷ ∀ era f. Functor f ⇒ (UTxOState era → f (UTxOState era)) → LedgerState era → f (LedgerState era)
- lsCertStateL ∷ ∀ era f. Functor f ⇒ (CertState era → f (CertState era)) → LedgerState era → f (LedgerState era)
- utxosDepositedL ∷ ∀ era f. Functor f ⇒ (Coin → f Coin) → UTxOState era → f (UTxOState era)
- utxosFeesL ∷ ∀ era f. Functor f ⇒ (Coin → f Coin) → UTxOState era → f (UTxOState era)
- utxosGovStateL ∷ ∀ era f. Functor f ⇒ (GovState era → f (GovState era)) → UTxOState era → f (UTxOState era)
- utxosDonationL ∷ ∀ era f. Functor f ⇒ (Coin → f Coin) → UTxOState era → f (UTxOState era)
- epochStateGovStateL ∷ ∀ era f. Functor f ⇒ (GovState era → f (GovState era)) → EpochState era → f (EpochState era)
- epochStateStakeDistrL ∷ ∀ era f. Functor f ⇒ (VMap VB VP (Credential 'Staking) (CompactForm Coin) → f (VMap VB VP (Credential 'Staking) (CompactForm Coin))) → EpochState era → f (EpochState era)
- epochStateStakePoolsL ∷ EraCertState era ⇒ Lens' (EpochState era) (Map (KeyHash 'StakePool) StakePoolState)
- epochStateDonationL ∷ ∀ era f. Functor f ⇒ (Coin → f Coin) → EpochState era → f (EpochState era)
- newEpochStateGovStateL ∷ ∀ era f. Functor f ⇒ (GovState era → f (GovState era)) → NewEpochState era → f (NewEpochState era)
- dsGenDelegsL ∷ ∀ era f. Functor f ⇒ (GenDelegs → f GenDelegs) → DState era → f (DState era)
- dsIRewardsL ∷ ∀ era f. Functor f ⇒ (InstantaneousRewards → f InstantaneousRewards) → DState era → f (DState era)
- dsFutureGenDelegsL ∷ ∀ era f. Functor f ⇒ (Map FutureGenDeleg GenDelegPair → f (Map FutureGenDeleg GenDelegPair)) → DState era → f (DState era)
- psStakePoolsL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) StakePoolState → f (Map (KeyHash 'StakePool) StakePoolState)) → PState era → f (PState era)
- psFutureStakePoolParamsL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) StakePoolParams → f (Map (KeyHash 'StakePool) StakePoolParams)) → PState era → f (PState era)
- psRetiringL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) EpochNo → f (Map (KeyHash 'StakePool) EpochNo)) → PState era → f (PState era)
- psVRFKeyHashesL ∷ ∀ era f. Functor f ⇒ (Map (VRFVerKeyHash 'StakePoolVRF) (NonZero Word64) → f (Map (VRFVerKeyHash 'StakePoolVRF) (NonZero Word64))) → PState era → f (PState era)
- ssStakeMarkL ∷ Lens' SnapShots SnapShot
- ssStakeMarkPoolDistrL ∷ Lens' SnapShots PoolDistr
- ssStakeSetL ∷ Lens' SnapShots SnapShot
- ssStakeGoL ∷ Lens' SnapShots SnapShot
- ssFeeL ∷ Lens' SnapShots Coin
- ssStakeL ∷ Lens' SnapShot Stake
- ssStakeDistrL ∷ Lens' SnapShot (VMap VB VP (Credential 'Staking) (CompactForm Coin))
- ssDelegationsL ∷ Lens' SnapShot (VMap VB VB (Credential 'Staking) (KeyHash 'StakePool))
- ssPoolParamsL ∷ Lens' SnapShot (VMap VB VB (KeyHash 'StakePool) StakePoolParams)
UTxO
The unspent transaction outputs.
Instances
| CanGetUTxO UTxO | |||||
Defined in Cardano.Ledger.State.UTxO | |||||
| CanSetUTxO UTxO | |||||
| ToJSON (TxOut era) ⇒ ToJSON (UTxO era) | |||||
| (DecCBOR (TxOut era), Era era) ⇒ FromCBOR (UTxO era) | |||||
| (EncCBOR (TxOut era), Era era) ⇒ ToCBOR (UTxO era) | |||||
| (Era era, DecCBOR (TxOut era)) ⇒ DecCBOR (UTxO era) | |||||
| (DecShareCBOR (TxOut era), Share (TxOut era) ~ Interns (Credential 'Staking)) ⇒ DecShareCBOR (UTxO era) | |||||
| (Era era, EncCBOR (TxOut era)) ⇒ EncCBOR (UTxO era) | |||||
| Default (UTxO era) | |||||
Defined in Cardano.Ledger.State.UTxO | |||||
| (Era era, NFData (TxOut era)) ⇒ NFData (UTxO era) | |||||
Defined in Cardano.Ledger.State.UTxO | |||||
| Era era ⇒ Monoid (UTxO era) | |||||
| Semigroup (UTxO era) | |||||
| Generic (UTxO era) | |||||
Defined in Cardano.Ledger.State.UTxO Associated Types
| |||||
| Show (TxOut era) ⇒ Show (UTxO era) | |||||
| (Era era, Eq (TxOut era)) ⇒ Eq (UTxO era) | |||||
| NoThunks (TxOut era) ⇒ NoThunks (UTxO era) | |||||
| type Share (UTxO era) | |||||
| type Rep (UTxO era) | |||||
Defined in Cardano.Ledger.State.UTxO | |||||
class CanGetUTxO (t ∷ Type → Type) where Source #
Minimal complete definition
Nothing
Methods
utxoG ∷ SimpleGetter (t era) (UTxO era) Source #
default utxoG ∷ CanSetUTxO t ⇒ SimpleGetter (t era) (UTxO era) Source #
Instances
| CanGetUTxO UTxO | |
Defined in Cardano.Ledger.State.UTxO | |
| CanGetUTxO EpochState Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods utxoG ∷ SimpleGetter (EpochState era) (UTxO era) Source # | |
| CanGetUTxO LedgerState Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods utxoG ∷ SimpleGetter (LedgerState era) (UTxO era) Source # | |
| CanGetUTxO NewEpochState Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods utxoG ∷ SimpleGetter (NewEpochState era) (UTxO era) Source # | |
| CanGetUTxO UTxOState Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |
class CanGetUTxO t ⇒ CanSetUTxO (t ∷ Type → Type) where Source #
Instances
Others to organize
type family AccountState era = (r ∷ Type) | r → era Source #
Instances
| type AccountState ShelleyEra Source # | |
Defined in Cardano.Ledger.Shelley.State.Account | |
data ChainAccountState Source #
Instances
class (EraAccounts era, ToJSON (CertState era), EncCBOR (CertState era), DecShareCBOR (CertState era), Share (CertState era) ~ (Interns (Credential 'Staking), Interns (KeyHash 'StakePool), Interns (Credential 'DRepRole), Interns (Credential 'HotCommitteeRole)), Default (CertState era), NoThunks (CertState era), NFData (CertState era), Show (CertState era), Eq (CertState era)) ⇒ EraCertState era where Source #
The state associated with the DELPL rule, which combines the DELEG rule and the POOL rule.
Methods
certDStateL ∷ Lens' (CertState era) (DState era) Source #
certPStateL ∷ Lens' (CertState era) (PState era) Source #
obligationCertState ∷ CertState era → Obligations Source #
Calculate total possible refunds in the system that are related to certificates
There is an invariant that the sum of all the fields should be the same as the utxosDeposited field of the UTxOState. Note that this does not depend upon the current values of the Key and Pool deposits of the PParams.
certsTotalDepositsTxBody ∷ ∀ (t ∷ TxLevel). EraTxBody era ⇒ PParams era → CertState era → TxBody t era → Coin Source #
Compute the total deposits from the Certs of a TxBody.
This is the contribution of a TxBody towards the deposit pot (utxosDeposit field of the UTxOState) of the system
certsTotalRefundsTxBody ∷ ∀ (t ∷ TxLevel). EraTxBody era ⇒ PParams era → CertState era → TxBody t era → Coin Source #
Compute the total refunds from the Certs of a TxBody.
This is the contribution of a TxBody towards the total Obligations of the system
See Obligations and obligationCertState for more information.
Instances
| EraCertState ShelleyEra Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Associated Types
Methods certDStateL ∷ Lens' (CertState ShelleyEra) (DState ShelleyEra) Source # certPStateL ∷ Lens' (CertState ShelleyEra) (PState ShelleyEra) Source # obligationCertState ∷ CertState ShelleyEra → Obligations Source # certsTotalDepositsTxBody ∷ ∀ (t ∷ TxLevel). EraTxBody ShelleyEra ⇒ PParams ShelleyEra → CertState ShelleyEra → TxBody t ShelleyEra → Coin Source # certsTotalRefundsTxBody ∷ ∀ (t ∷ TxLevel). EraTxBody ShelleyEra ⇒ PParams ShelleyEra → CertState ShelleyEra → TxBody t ShelleyEra → Coin Source # | |||||
The state used by the DELEG rule, which roughly tracks stake delegation and some governance features.
Constructors
| DState | |
Fields
| |
Instances
| CanGetAccounts DState | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| CanSetAccounts DState | |||||
| ToJSON (Accounts era) ⇒ ToJSON (DState era) | |||||
| EraAccounts era ⇒ DecShareCBOR (DState era) | |||||
| (Era era, EncCBOR (Accounts era)) ⇒ EncCBOR (DState era) | |||||
| ToJSON (Accounts era) ⇒ ToKeyValuePairs (DState era) | |||||
Defined in Cardano.Ledger.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ DState era → [kv] Source # | |||||
| Default (Accounts era) ⇒ Default (DState era) | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| NFData (Accounts era) ⇒ NFData (DState era) | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| Generic (DState era) | |||||
Defined in Cardano.Ledger.State.CertState Associated Types
| |||||
| Show (Accounts era) ⇒ Show (DState era) | |||||
| Eq (Accounts era) ⇒ Eq (DState era) | |||||
| NoThunks (Accounts era) ⇒ NoThunks (DState era) | |||||
| type Share (DState era) | |||||
| type Rep (DState era) | |||||
Defined in Cardano.Ledger.State.CertState type Rep (DState era) = D1 ('MetaData "DState" "Cardano.Ledger.State.CertState" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "DState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "dsAccounts") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Accounts era)) :*: S1 ('MetaSel ('Just "dsFutureGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map FutureGenDeleg GenDelegPair))) :*: (S1 ('MetaSel ('Just "dsGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 GenDelegs) :*: S1 ('MetaSel ('Just "dsIRewards") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 InstantaneousRewards)))) | |||||
data EpochState era Source #
Constructors
| EpochState | |
Fields
| |
Instances
| CanGetChainAccountState EpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods chainAccountStateG ∷ SimpleGetter (EpochState era) ChainAccountState Source # | |||||
| CanSetChainAccountState EpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods chainAccountStateL ∷ Lens' (EpochState era) ChainAccountState Source # | |||||
| CanGetInstantStake EpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeG ∷ SimpleGetter (EpochState era) (InstantStake era) Source # | |||||
| CanSetInstantStake EpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeL ∷ Lens' (EpochState era) (InstantStake era) Source # | |||||
| CanGetUTxO EpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods utxoG ∷ SimpleGetter (EpochState era) (UTxO era) Source # | |||||
| CanSetUTxO EpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ ToJSON (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toJSON ∷ EpochState era → Value Source # toEncoding ∷ EpochState era → Encoding Source # toJSONList ∷ [EpochState era] → Value Source # toEncodingList ∷ [EpochState era] → Encoding Source # omitField ∷ EpochState era → Bool Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ FromCBOR (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ ToCBOR (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toCBOR ∷ EpochState era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (EpochState era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochState era] → Size Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ DecCBOR (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraStake era, EncCBOR (GovState era), EncCBOR (CertState era)) ⇒ EncCBOR (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods encCBOR ∷ EpochState era → Encoding Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ ToKeyValuePairs (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toKeyValuePairs ∷ KeyValue e kv ⇒ EpochState era → [kv] Source # | |||||
| Default (LedgerState era) ⇒ Default (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods def ∷ EpochState era Source # | |||||
| (EraTxOut era, NFData (GovState era), NFData (CertState era), NFData (InstantStake era)) ⇒ NFData (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods rnf ∷ EpochState era → () # | |||||
| Generic (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Associated Types
Methods from ∷ EpochState era → Rep (EpochState era) x # to ∷ Rep (EpochState era) x → EpochState era # | |||||
| (EraTxOut era, Show (GovState era), Show (CertState era), Show (InstantStake era)) ⇒ Show (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods showsPrec ∷ Int → EpochState era → ShowS # show ∷ EpochState era → String # showList ∷ [EpochState era] → ShowS # | |||||
| (EraTxOut era, Eq (GovState era), Eq (CertState era), Eq (InstantStake era)) ⇒ Eq (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods (==) ∷ EpochState era → EpochState era → Bool # (/=) ∷ EpochState era → EpochState era → Bool # | |||||
| (EraTxOut era, NoThunks (GovState era), NoThunks (CertState era), NoThunks (InstantStake era)) ⇒ NoThunks (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| type Rep (EpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types type Rep (EpochState era) = D1 ('MetaData "EpochState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "EpochState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "esChainAccountState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ChainAccountState) :*: S1 ('MetaSel ('Just "esLState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (LedgerState era))) :*: (S1 ('MetaSel ('Just "esSnapshots") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SnapShots) :*: S1 ('MetaSel ('Just "esNonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonMyopic)))) | |||||
data PulsingRewUpdate Source #
The state used in the STS rules
Constructors
| Pulsing !RewardSnapShot !Pulser | |
| Complete !RewardUpdate |
Instances
| ToJSON PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods toJSON ∷ PulsingRewUpdate → Value Source # toEncoding ∷ PulsingRewUpdate → Encoding Source # toJSONList ∷ [PulsingRewUpdate] → Value Source # | |||||
| DecCBOR PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| EncCBOR PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods | |||||
| NFData PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods rnf ∷ PulsingRewUpdate → () # | |||||
| Generic PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Associated Types
Methods from ∷ PulsingRewUpdate → Rep PulsingRewUpdate x # to ∷ Rep PulsingRewUpdate x → PulsingRewUpdate # | |||||
| Show PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods showsPrec ∷ Int → PulsingRewUpdate → ShowS # show ∷ PulsingRewUpdate → String # showList ∷ [PulsingRewUpdate] → ShowS # | |||||
| Eq PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods | |||||
| NoThunks PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| type Rep PulsingRewUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate type Rep PulsingRewUpdate = D1 ('MetaData "PulsingRewUpdate" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "Pulsing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RewardSnapShot) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Pulser)) :+: C1 ('MetaCons "Complete" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RewardUpdate))) | |||||
data FutureGenDeleg Source #
Constructors
| FutureGenDeleg | |
Fields | |
Instances
| ToJSON FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Methods toJSON ∷ FutureGenDeleg → Value Source # toEncoding ∷ FutureGenDeleg → Encoding Source # toJSONList ∷ [FutureGenDeleg] → Value Source # | |||||
| DecCBOR FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| EncCBOR FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Methods | |||||
| NFData FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Methods rnf ∷ FutureGenDeleg → () # | |||||
| Generic FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Associated Types
| |||||
| Show FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Methods showsPrec ∷ Int → FutureGenDeleg → ShowS # show ∷ FutureGenDeleg → String # showList ∷ [FutureGenDeleg] → ShowS # | |||||
| Eq FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Methods (==) ∷ FutureGenDeleg → FutureGenDeleg → Bool # (/=) ∷ FutureGenDeleg → FutureGenDeleg → Bool # | |||||
| Ord FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState Methods compare ∷ FutureGenDeleg → FutureGenDeleg → Ordering # (<) ∷ FutureGenDeleg → FutureGenDeleg → Bool # (<=) ∷ FutureGenDeleg → FutureGenDeleg → Bool # (>) ∷ FutureGenDeleg → FutureGenDeleg → Bool # (>=) ∷ FutureGenDeleg → FutureGenDeleg → Bool # | |||||
| NoThunks FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| type Rep FutureGenDeleg | |||||
Defined in Cardano.Ledger.State.CertState type Rep FutureGenDeleg = D1 ('MetaData "FutureGenDeleg" "Cardano.Ledger.State.CertState" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "FutureGenDeleg" 'PrefixI 'True) (S1 ('MetaSel ('Just "fGenDelegSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "fGenDelegGenKeyHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'GenesisRole)))) | |||||
data InstantaneousRewards Source #
InstantaneousRewards captures the pending changes to the ledger state caused by MIR certificates. It consists of two mappings, the rewards which will be paid out from the reserves and the rewards which will be paid out from the treasury. It also consists of two coin values which represent the transfer of coins from one pot to the other pot. NOTE that the following property should always hold: deltaReserves + deltaTreasury = 0
Constructors
| InstantaneousRewards | |
Fields
| |
Instances
| ToJSON InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| DecShareCBOR InstantaneousRewards | |||||
| EncCBOR InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Methods | |||||
| ToKeyValuePairs InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ InstantaneousRewards → [kv] Source # | |||||
| Default InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Methods | |||||
| NFData InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Methods rnf ∷ InstantaneousRewards → () # | |||||
| Generic InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Associated Types
Methods | |||||
| Show InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Methods showsPrec ∷ Int → InstantaneousRewards → ShowS # show ∷ InstantaneousRewards → String # showList ∷ [InstantaneousRewards] → ShowS # | |||||
| Eq InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState Methods | |||||
| NoThunks InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| type Share InstantaneousRewards | |||||
| type Rep InstantaneousRewards | |||||
Defined in Cardano.Ledger.State.CertState type Rep InstantaneousRewards = D1 ('MetaData "InstantaneousRewards" "Cardano.Ledger.State.CertState" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "InstantaneousRewards" 'PrefixI 'True) ((S1 ('MetaSel ('Just "iRReserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) Coin)) :*: S1 ('MetaSel ('Just "iRTreasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) Coin))) :*: (S1 ('MetaSel ('Just "deltaReserves") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "deltaTreasury") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin)))) | |||||
data LedgerState era Source #
The state associated with a Ledger.
Constructors
| LedgerState | |
Fields
| |
Instances
| CanGetInstantStake LedgerState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeG ∷ SimpleGetter (LedgerState era) (InstantStake era) Source # | |||||
| CanSetInstantStake LedgerState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeL ∷ Lens' (LedgerState era) (InstantStake era) Source # | |||||
| CanGetUTxO LedgerState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods utxoG ∷ SimpleGetter (LedgerState era) (UTxO era) Source # | |||||
| CanSetUTxO LedgerState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ ToJSON (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toJSON ∷ LedgerState era → Value Source # toEncoding ∷ LedgerState era → Encoding Source # toJSONList ∷ [LedgerState era] → Value Source # toEncodingList ∷ [LedgerState era] → Encoding Source # omitField ∷ LedgerState era → Bool Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ FromCBOR (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ ToCBOR (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toCBOR ∷ LedgerState era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (LedgerState era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [LedgerState era] → Size Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ DecShareCBOR (LedgerState era) Source # | |||||
| (EraTxOut era, EraStake era, EncCBOR (GovState era), EncCBOR (CertState era)) ⇒ EncCBOR (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods encCBOR ∷ LedgerState era → Encoding Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era) ⇒ ToKeyValuePairs (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toKeyValuePairs ∷ KeyValue e kv ⇒ LedgerState era → [kv] Source # | |||||
| (Default (UTxOState era), Default (CertState era)) ⇒ Default (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods def ∷ LedgerState era Source # | |||||
| (EraTxOut era, NFData (GovState era), NFData (CertState era), NFData (InstantStake era)) ⇒ NFData (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods rnf ∷ LedgerState era → () # | |||||
| Generic (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Associated Types
Methods from ∷ LedgerState era → Rep (LedgerState era) x # to ∷ Rep (LedgerState era) x → LedgerState era # | |||||
| (EraTxOut era, Show (GovState era), Show (CertState era), Show (InstantStake era)) ⇒ Show (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods showsPrec ∷ Int → LedgerState era → ShowS # show ∷ LedgerState era → String # showList ∷ [LedgerState era] → ShowS # | |||||
| (EraTxOut era, Eq (GovState era), Eq (CertState era), Eq (InstantStake era)) ⇒ Eq (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods (==) ∷ LedgerState era → LedgerState era → Bool # (/=) ∷ LedgerState era → LedgerState era → Bool # | |||||
| (EraTxOut era, NoThunks (GovState era), NoThunks (CertState era), NoThunks (InstantStake era)) ⇒ NoThunks (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| type Share (LedgerState era) Source # | |||||
| type Rep (LedgerState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types type Rep (LedgerState era) = D1 ('MetaData "LedgerState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "LedgerState" 'PrefixI 'True) (S1 ('MetaSel ('Just "lsUTxOState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxOState era)) :*: S1 ('MetaSel ('Just "lsCertState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CertState era)))) | |||||
The state used by the POOL rule, which tracks stake pool information.
Constructors
| PState | |
Fields
| |
Instances
| ToJSON (PState era) | |||||
| (Era era, DecShareCBOR (PState era)) ⇒ DecCBOR (PState era) | |||||
| DecShareCBOR (PState era) | |||||
| Era era ⇒ EncCBOR (PState era) | |||||
| ToKeyValuePairs (PState era) | |||||
Defined in Cardano.Ledger.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ PState era → [kv] Source # | |||||
| Default (PState era) | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| NFData (PState era) | |||||
Defined in Cardano.Ledger.State.CertState | |||||
| Generic (PState era) | |||||
Defined in Cardano.Ledger.State.CertState Associated Types
| |||||
| Show (PState era) | |||||
| Eq (PState era) | |||||
| NoThunks (PState era) | |||||
| type Share (PState era) | |||||
| type Rep (PState era) | |||||
Defined in Cardano.Ledger.State.CertState type Rep (PState era) = D1 ('MetaData "PState" "Cardano.Ledger.State.CertState" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "PState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "psVRFKeyHashes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (VRFVerKeyHash 'StakePoolVRF) (NonZero Word64))) :*: S1 ('MetaSel ('Just "psStakePools") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) StakePoolState))) :*: (S1 ('MetaSel ('Just "psFutureStakePoolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) StakePoolParams)) :*: S1 ('MetaSel ('Just "psRetiring") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) EpochNo))))) | |||||
data RewardUpdate Source #
The ultimate goal of a reward update computation. Aggregating rewards for each staking credential.
Constructors
| RewardUpdate | |
Instances
| ToJSON RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods toJSON ∷ RewardUpdate → Value Source # toEncoding ∷ RewardUpdate → Encoding Source # toJSONList ∷ [RewardUpdate] → Value Source # toEncodingList ∷ [RewardUpdate] → Encoding Source # omitField ∷ RewardUpdate → Bool Source # | |||||
| DecCBOR RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| EncCBOR RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods | |||||
| ToKeyValuePairs RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods toKeyValuePairs ∷ KeyValue e kv ⇒ RewardUpdate → [kv] Source # | |||||
| NFData RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods rnf ∷ RewardUpdate → () # | |||||
| Generic RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Associated Types
| |||||
| Show RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods showsPrec ∷ Int → RewardUpdate → ShowS # show ∷ RewardUpdate → String # showList ∷ [RewardUpdate] → ShowS # | |||||
| Eq RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| NoThunks RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| type Rep RewardUpdate Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate type Rep RewardUpdate = D1 ('MetaData "RewardUpdate" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "RewardUpdate" 'PrefixI 'True) ((S1 ('MetaSel ('Just "deltaT") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "deltaR") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin)) :*: (S1 ('MetaSel ('Just "rs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (Set Reward))) :*: (S1 ('MetaSel ('Just "deltaF") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 DeltaCoin) :*: S1 ('MetaSel ('Just "nonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonMyopic))))) | |||||
data RewardSnapShot Source #
To complete the reward update, we need a snap shot of the EpochState particular to this computation
Constructors
| RewardSnapShot | |
Fields
| |
Instances
| DecCBOR RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| EncCBOR RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods | |||||
| NFData RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods rnf ∷ RewardSnapShot → () # | |||||
| Generic RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Associated Types
| |||||
| Show RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods showsPrec ∷ Int → RewardSnapShot → ShowS # show ∷ RewardSnapShot → String # showList ∷ [RewardSnapShot] → ShowS # | |||||
| Eq RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate Methods (==) ∷ RewardSnapShot → RewardSnapShot → Bool # (/=) ∷ RewardSnapShot → RewardSnapShot → Bool # | |||||
| NoThunks RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate | |||||
| type Rep RewardSnapShot Source # | |||||
Defined in Cardano.Ledger.Shelley.RewardUpdate type Rep RewardSnapShot = D1 ('MetaData "RewardSnapShot" "Cardano.Ledger.Shelley.RewardUpdate" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "RewardSnapShot" 'PrefixI 'True) (((S1 ('MetaSel ('Just "rewFees") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "rewProtocolVersion") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ProtVer)) :*: (S1 ('MetaSel ('Just "rewNonMyopic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NonMyopic) :*: S1 ('MetaSel ('Just "rewDeltaR1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: ((S1 ('MetaSel ('Just "rewR") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "rewDeltaT1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin)) :*: (S1 ('MetaSel ('Just "rewLikelihoods") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'StakePool) Likelihood)) :*: S1 ('MetaSel ('Just "rewLeaders") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (Credential 'Staking) (Set Reward))))))) | |||||
There is a serious invariant that we must maintain in the UTxOState. Given (UTxOState utxo _ _ _ istake) it must be the case that Of course computing the RHS of the above equality can be very expensive, so we only use this route in the testing function smartUTxO. But we are very careful, wherever we update the UTxO, we carefully make INCREMENTAL changes to istake to maintain this invariant. This happens in the UTxO rule.
Constructors
| UTxOState | |
Fields
| |
Instances
| CanGetInstantStake UTxOState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeG ∷ SimpleGetter (UTxOState era) (InstantStake era) Source # | |||||
| CanSetInstantStake UTxOState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeL ∷ Lens' (UTxOState era) (InstantStake era) Source # | |||||
| CanGetUTxO UTxOState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| CanSetUTxO UTxOState Source # | |||||
| (EraTxOut era, EraGov era, EraStake era) ⇒ ToJSON (UTxOState era) Source # | |||||
| (EraTxOut era, EraGov era, EraStake era) ⇒ FromCBOR (UTxOState era) Source # | |||||
| (EraTxOut era, EraGov era, EraStake era) ⇒ ToCBOR (UTxOState era) Source # | |||||
| (EraTxOut era, EraGov era, EraStake era) ⇒ DecShareCBOR (UTxOState era) Source # | |||||
| (EraTxOut era, EraStake era, EncCBOR (GovState era)) ⇒ EncCBOR (UTxOState era) Source # | |||||
| (EraTxOut era, EraGov era, EraStake era) ⇒ ToKeyValuePairs (UTxOState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toKeyValuePairs ∷ KeyValue e kv ⇒ UTxOState era → [kv] Source # | |||||
| (EraGov era, EraStake era) ⇒ Default (UTxOState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, NFData (GovState era), NFData (InstantStake era)) ⇒ NFData (UTxOState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| Generic (UTxOState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Associated Types
| |||||
| (EraTxOut era, Show (GovState era), Show (InstantStake era)) ⇒ Show (UTxOState era) Source # | |||||
| (EraTxOut era, Eq (GovState era), Eq (InstantStake era)) ⇒ Eq (UTxOState era) Source # | |||||
| (NoThunks (UTxO era), NoThunks (GovState era), NoThunks (InstantStake era)) ⇒ NoThunks (UTxOState era) Source # | |||||
| type Share (UTxOState era) Source # | |||||
| type Rep (UTxOState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types type Rep (UTxOState era) = D1 ('MetaData "UTxOState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "UTxOState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "utxosUtxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (UTxO era)) :*: (S1 ('MetaSel ('Just "utxosDeposited") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin) :*: S1 ('MetaSel ('Just "utxosFees") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))) :*: (S1 ('MetaSel ('Just "utxosGovState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (GovState era)) :*: (S1 ('MetaSel ('Just "utxosInstantStake") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (InstantStake era)) :*: S1 ('MetaSel ('Just "utxosDonation") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Coin))))) | |||||
smartUTxOState ∷ EraStake era ⇒ PParams era → UTxO era → Coin → Coin → GovState era → Coin → UTxOState era Source #
A valid (or self-consistent) UTxOState{utxosUtxo, utxosDeposited , utxosFees , utxosPpups , utxosStakeDistr} maintains an invariant between the utxosUtxo and utxosStakeDistr fields. the utxosStakeDistr field is the aggregation of Coin over the StakeReferences in the UTxO. It can be computed by a pure function from the _utxo field. In some situations, mostly unit or example tests, or when initializing a small UTxO, we want to create a UTxOState that computes the utxosStakeDistr from the utxosUtxo. This is aways safe to do, but if the utxosUtxo field is big, this can be very expensive, which defeats the purpose of memoizing the utxosStakeDistr field. So use of this function should be restricted to tests and initializations, where the invariant should be maintained.
TO IncrementalStake
mkShelleyCertState ∷ EraCertState era ⇒ PState era → DState era → CertState era Source #
data ShelleyCertState era Source #
Constructors
| ShelleyCertState | |
Fields
| |
Instances
| ToJSON (Accounts era) ⇒ ToJSON (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods toJSON ∷ ShelleyCertState era → Value Source # toEncoding ∷ ShelleyCertState era → Encoding Source # toJSONList ∷ [ShelleyCertState era] → Value Source # toEncodingList ∷ [ShelleyCertState era] → Encoding Source # omitField ∷ ShelleyCertState era → Bool Source # | |||||
| EraAccounts era ⇒ DecShareCBOR (ShelleyCertState era) Source # | |||||
| EraAccounts era ⇒ EncCBOR (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods encCBOR ∷ ShelleyCertState era → Encoding Source # | |||||
| ToJSON (Accounts era) ⇒ ToKeyValuePairs (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyCertState era → [kv] Source # | |||||
| Default (Accounts era) ⇒ Default (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods def ∷ ShelleyCertState era Source # | |||||
| (Era era, NFData (Accounts era)) ⇒ NFData (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods rnf ∷ ShelleyCertState era → () # | |||||
| Generic (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Associated Types
Methods from ∷ ShelleyCertState era → Rep (ShelleyCertState era) x # to ∷ Rep (ShelleyCertState era) x → ShelleyCertState era # | |||||
| Show (Accounts era) ⇒ Show (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods showsPrec ∷ Int → ShelleyCertState era → ShowS # show ∷ ShelleyCertState era → String # showList ∷ [ShelleyCertState era] → ShowS # | |||||
| Eq (Accounts era) ⇒ Eq (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState Methods (==) ∷ ShelleyCertState era → ShelleyCertState era → Bool # (/=) ∷ ShelleyCertState era → ShelleyCertState era → Bool # | |||||
| (Era era, NoThunks (Accounts era)) ⇒ NoThunks (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState | |||||
| type Share (ShelleyCertState era) Source # | |||||
| type Rep (ShelleyCertState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.State.CertState type Rep (ShelleyCertState era) = D1 ('MetaData "ShelleyCertState" "Cardano.Ledger.Shelley.State.CertState" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyCertState" 'PrefixI 'True) (S1 ('MetaSel ('Just "shelleyCertPState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PState era)) :*: S1 ('MetaSel ('Just "shelleyCertDState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (DState era)))) | |||||
Genesis State
genesisState ∷ (EraGov era, EraCertState era, EraStake era) ⇒ Map (KeyHash 'GenesisRole) GenDelegPair → UTxO era → LedgerState era Source #
Creates the ledger state for an empty ledger which contains the specified transaction outputs.
Validation
consumed ∷ ∀ (t ∷ TxLevel). EraUTxO era ⇒ PParams era → CertState era → UTxO era → TxBody t era → Value era Source #
produced ∷ ∀ era (l ∷ TxLevel). (EraUTxO era, EraCertState era) ⇒ PParams era → CertState era → TxBody l era → Value era Source #
Compute the lovelace which are created by the transaction For eras before Conway, VState is expected to have an empty Map for vsDReps, and so deposit summed up is zero.
DelegationState
totalObligation ∷ (EraGov era, EraCertState era) ⇒ CertState era → GovState era → Coin Source #
allObligations ∷ (EraGov era, EraCertState era) ⇒ CertState era → GovState era → Obligations Source #
Epoch boundary
applyRUpd ∷ (EraGov era, EraCertState era) ⇒ RewardUpdate → EpochState era → EpochState era Source #
Apply a RewardUpdate to the EpochState. Does several things 1) Adds reward coins to Rewards component of the UMap field of the DState, for actively delegated Stake 2) Adds to the Treasury of the ChainAccountState for non-actively delegated stake 3) Adds fees to the UTxOState
applyRUpdFiltered ∷ (EraGov era, EraCertState era) ⇒ RewardUpdate → EpochState era → (EpochState era, FilteredRewards era) Source #
filterAllRewards ∷ (EraGov era, EraCertState era) ⇒ Map (Credential 'Staking) (Set Reward) → EpochState era → FilteredRewards era Source #
data FilteredRewards era Source #
Constructors
| FilteredRewards | |
Fields
| |
Instances
| NFData (FilteredRewards era) Source # | |
Defined in Cardano.Ledger.Shelley.LedgerState.IncrementalStake Methods rnf ∷ FilteredRewards era → () # | |
createRUpd ∷ (EraGov era, EraCertState era) ⇒ EpochSize → BlocksMade → EpochState era → Coin → ActiveSlotCoeff → NonZero Word64 → ShelleyBase RewardUpdate Source #
To create a reward update, run all 3 phases This function is not used in the rules, so it ignores RewardEvents
completeRupd ∷ PulsingRewUpdate → ShelleyBase (RewardUpdate, RewardEvent) Source #
Phase 3 of reward update has several parts a) completeM the pulser (in case there are still computions to run) b) Combine the pulser provenance with the RewardProvenance c) Construct the final RewardUpdate d) Add the leader rewards to both the events and the computed Rewards
startStep ∷ (EraGov era, EraCertState era) ⇒ EpochSize → BlocksMade → EpochState era → Coin → ActiveSlotCoeff → NonZero Word64 → PulsingRewUpdate Source #
pulseStep ∷ PulsingRewUpdate → ShelleyBase (PulsingRewUpdate, RewardEvent) Source #
Run the pulser for a bit. If is has nothing left to do, complete it.
data NewEpochState era Source #
New Epoch state and environment
Constructors
| NewEpochState !EpochNo !BlocksMade !BlocksMade !(EpochState era) !(StrictMaybe PulsingRewUpdate) !PoolDistr !(StashedAVVMAddresses era) |
Instances
| CanGetChainAccountState NewEpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods chainAccountStateG ∷ SimpleGetter (NewEpochState era) ChainAccountState Source # | |||||
| CanSetChainAccountState NewEpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods chainAccountStateL ∷ Lens' (NewEpochState era) ChainAccountState Source # | |||||
| CanGetInstantStake NewEpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeG ∷ SimpleGetter (NewEpochState era) (InstantStake era) Source # | |||||
| CanSetInstantStake NewEpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods instantStakeL ∷ Lens' (NewEpochState era) (InstantStake era) Source # | |||||
| CanGetUTxO NewEpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods utxoG ∷ SimpleGetter (NewEpochState era) (UTxO era) Source # | |||||
| CanSetUTxO NewEpochState Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era, DecCBOR (StashedAVVMAddresses era)) ⇒ FromCBOR (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraGov era, EraStake era, EraCertState era, EncCBOR (StashedAVVMAddresses era)) ⇒ ToCBOR (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods toCBOR ∷ NewEpochState era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (NewEpochState era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [NewEpochState era] → Size Source # | |||||
| (EraTxOut era, EraGov era, EraStake era, DecCBOR (StashedAVVMAddresses era), EraCertState era) ⇒ DecCBOR (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| (EraTxOut era, EraStake era, EncCBOR (StashedAVVMAddresses era), EncCBOR (GovState era), EncCBOR (CertState era)) ⇒ EncCBOR (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods encCBOR ∷ NewEpochState era → Encoding Source # | |||||
| (EraStake era, EraGov era, EraCertState era, Default (StashedAVVMAddresses era)) ⇒ Default (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods def ∷ NewEpochState era Source # | |||||
| (EraTxOut era, NFData (StashedAVVMAddresses era), NFData (GovState era), NFData (CertState era), NFData (InstantStake era)) ⇒ NFData (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods rnf ∷ NewEpochState era → () # | |||||
| Generic (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Associated Types
Methods from ∷ NewEpochState era → Rep (NewEpochState era) x # to ∷ Rep (NewEpochState era) x → NewEpochState era # | |||||
| (EraTxOut era, Show (StashedAVVMAddresses era), Show (GovState era), Show (CertState era), Show (InstantStake era)) ⇒ Show (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods showsPrec ∷ Int → NewEpochState era → ShowS # show ∷ NewEpochState era → String # showList ∷ [NewEpochState era] → ShowS # | |||||
| (EraTxOut era, Eq (StashedAVVMAddresses era), Eq (GovState era), Eq (CertState era), Eq (InstantStake era)) ⇒ Eq (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types Methods (==) ∷ NewEpochState era → NewEpochState era → Bool # (/=) ∷ NewEpochState era → NewEpochState era → Bool # | |||||
| (Era era, NoThunks (EpochState era), NoThunks (StashedAVVMAddresses era)) ⇒ NoThunks (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types | |||||
| type Rep (NewEpochState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.LedgerState.Types type Rep (NewEpochState era) = D1 ('MetaData "NewEpochState" "Cardano.Ledger.Shelley.LedgerState.Types" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "NewEpochState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nesEL") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo) :*: (S1 ('MetaSel ('Just "nesBprev") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlocksMade) :*: S1 ('MetaSel ('Just "nesBcur") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlocksMade))) :*: ((S1 ('MetaSel ('Just "nesEs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochState era)) :*: S1 ('MetaSel ('Just "nesRu") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe PulsingRewUpdate))) :*: (S1 ('MetaSel ('Just "nesPd") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PoolDistr) :*: S1 ('MetaSel ('Just "stashedAVVMAddresses") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StashedAVVMAddresses era)))))) | |||||
type family StashedAVVMAddresses era where ... Source #
Equations
| StashedAVVMAddresses ShelleyEra = UTxO ShelleyEra | |
| StashedAVVMAddresses _1 = () |
stashedAVVMAddresses ∷ NewEpochState era → StashedAVVMAddresses era Source #
AVVM addresses to be removed at the end of the Shelley era. Note that the existence of this field is a hack, related to the transition of UTxO to disk. We remove AVVM addresses from the UTxO on the Shelley/Allegra boundary. However, by this point the UTxO will be moved to disk, and hence doing a scan of the UTxO for AVVM addresses will be expensive. Our solution to this is to do a scan of the UTxO on the Byron/Shelley boundary (since Byron UTxO are still on disk), stash the results here, and then remove them at the Shelley/Allegra boundary.
This is very much an awkward implementation hack, and hence we hide it from as many places as possible.
getGKeys ∷ EraCertState era ⇒ NewEpochState era → Set (KeyHash 'GenesisRole) Source #
updateNES ∷ EraGov era ⇒ NewEpochState era → BlocksMade → LedgerState era → NewEpochState era Source #
Update new epoch state
circulation ∷ EpochState era → Coin → Coin Source #
Calculate the current circulation
This is used in the rewards calculation, and for API endpoints for pool ranking.
Decay
Remove Bootstrap Redeem Addresses
returnRedeemAddrsToReserves ∷ EraTxOut era ⇒ EpochState era → EpochState era Source #
updateNonMyopic ∷ NonMyopic → Coin → Map (KeyHash 'StakePool) Likelihood → NonMyopic Source #
Check whether the new protocol version is a legitimate version bump with respect to the previous one.
availableAfterMIR ∷ MIRPot → ChainAccountState → InstantaneousRewards → Coin Source #
This function returns the coin balance of a given pot, either the reserves or the treasury, after the instantaneous rewards and pot transfers are accounted for.
data ShelleyGovState era Source #
Constructors
| ShelleyGovState | |
Fields
| |
Instances
| EraPParams era ⇒ ToJSON (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods toJSON ∷ ShelleyGovState era → Value Source # toEncoding ∷ ShelleyGovState era → Encoding Source # toJSONList ∷ [ShelleyGovState era] → Value Source # toEncodingList ∷ [ShelleyGovState era] → Encoding Source # omitField ∷ ShelleyGovState era → Bool Source # | |||||
| (Era era, DecCBOR (PParamsUpdate era), DecCBOR (PParams era)) ⇒ FromCBOR (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance | |||||
| (Era era, EncCBOR (PParamsUpdate era), EncCBOR (PParams era)) ⇒ ToCBOR (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods toCBOR ∷ ShelleyGovState era → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (ShelleyGovState era) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyGovState era] → Size Source # | |||||
| (Era era, DecCBOR (PParamsUpdate era), DecCBOR (PParams era)) ⇒ DecCBOR (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance | |||||
| (Era era, DecCBOR (PParamsUpdate era), DecCBOR (PParams era)) ⇒ DecShareCBOR (ShelleyGovState era) Source # | |||||
| (Era era, EncCBOR (PParamsUpdate era), EncCBOR (PParams era)) ⇒ EncCBOR (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods encCBOR ∷ ShelleyGovState era → Encoding Source # | |||||
| EraPParams era ⇒ ToKeyValuePairs (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyGovState era → [kv] Source # | |||||
| EraPParams era ⇒ Default (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods def ∷ ShelleyGovState era Source # | |||||
| (NFData (PParamsUpdate era), NFData (PParams era)) ⇒ NFData (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods rnf ∷ ShelleyGovState era → () # | |||||
| Generic (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Associated Types
Methods from ∷ ShelleyGovState era → Rep (ShelleyGovState era) x # to ∷ Rep (ShelleyGovState era) x → ShelleyGovState era # | |||||
| (Show (PParamsUpdate era), Show (PParams era)) ⇒ Show (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods showsPrec ∷ Int → ShelleyGovState era → ShowS # show ∷ ShelleyGovState era → String # showList ∷ [ShelleyGovState era] → ShowS # | |||||
| (Eq (PParamsUpdate era), Eq (PParams era)) ⇒ Eq (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance Methods (==) ∷ ShelleyGovState era → ShelleyGovState era → Bool # (/=) ∷ ShelleyGovState era → ShelleyGovState era → Bool # | |||||
| (NoThunks (PParamsUpdate era), NoThunks (PParams era)) ⇒ NoThunks (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance | |||||
| type Share (ShelleyGovState era) Source # | |||||
| type Rep (ShelleyGovState era) Source # | |||||
Defined in Cardano.Ledger.Shelley.Governance type Rep (ShelleyGovState era) = D1 ('MetaData "ShelleyGovState" "Cardano.Ledger.Shelley.Governance" "cardano-ledger-shelley-1.18.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyGovState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sgsCurProposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era)) :*: S1 ('MetaSel ('Just "sgsFutureProposals") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ProposedPPUpdates era))) :*: (S1 ('MetaSel ('Just "sgsCurPParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams era)) :*: (S1 ('MetaSel ('Just "sgsPrevPParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams era)) :*: S1 ('MetaSel ('Just "sgsFuturePParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (FuturePParams era)))))) | |||||
Lenses from Types
nesPdL ∷ ∀ era f. Functor f ⇒ (PoolDistr → f PoolDistr) → NewEpochState era → f (NewEpochState era) Source #
nesEsL ∷ ∀ era f. Functor f ⇒ (EpochState era → f (EpochState era)) → NewEpochState era → f (NewEpochState era) Source #
nesELL ∷ ∀ era f. Functor f ⇒ (EpochNo → f EpochNo) → NewEpochState era → f (NewEpochState era) Source #
nesBprevL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) Natural → f (Map (KeyHash 'StakePool) Natural)) → NewEpochState era → f (NewEpochState era) Source #
nesBcurL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) Natural → f (Map (KeyHash 'StakePool) Natural)) → NewEpochState era → f (NewEpochState era) Source #
nesRuL ∷ ∀ era f. Functor f ⇒ (StrictMaybe PulsingRewUpdate → f (StrictMaybe PulsingRewUpdate)) → NewEpochState era → f (NewEpochState era) Source #
nesStashedAVVMAddressesL ∷ ∀ era f. Functor f ⇒ (StashedAVVMAddresses era → f (StashedAVVMAddresses era)) → NewEpochState era → f (NewEpochState era) Source #
nesEpochStateL ∷ ∀ era f. Functor f ⇒ (EpochState era → f (EpochState era)) → NewEpochState era → f (NewEpochState era) Source #
esSnapshotsL ∷ ∀ era f. Functor f ⇒ (SnapShots → f SnapShots) → EpochState era → f (EpochState era) Source #
esLStateL ∷ ∀ era f. Functor f ⇒ (LedgerState era → f (LedgerState era)) → EpochState era → f (EpochState era) Source #
esNonMyopicL ∷ ∀ era f. Functor f ⇒ (NonMyopic → f NonMyopic) → EpochState era → f (EpochState era) Source #
curPParamsEpochStateL ∷ EraGov era ⇒ Lens' (EpochState era) (PParams era) Source #
prevPParamsEpochStateL ∷ EraGov era ⇒ Lens' (EpochState era) (PParams era) Source #
futurePParamsEpochStateL ∷ EraGov era ⇒ Lens' (EpochState era) (FuturePParams era) Source #
lsUTxOStateL ∷ ∀ era f. Functor f ⇒ (UTxOState era → f (UTxOState era)) → LedgerState era → f (LedgerState era) Source #
lsCertStateL ∷ ∀ era f. Functor f ⇒ (CertState era → f (CertState era)) → LedgerState era → f (LedgerState era) Source #
utxosGovStateL ∷ ∀ era f. Functor f ⇒ (GovState era → f (GovState era)) → UTxOState era → f (UTxOState era) Source #
epochStateGovStateL ∷ ∀ era f. Functor f ⇒ (GovState era → f (GovState era)) → EpochState era → f (EpochState era) Source #
epochStateStakeDistrL ∷ ∀ era f. Functor f ⇒ (VMap VB VP (Credential 'Staking) (CompactForm Coin) → f (VMap VB VP (Credential 'Staking) (CompactForm Coin))) → EpochState era → f (EpochState era) Source #
epochStateStakePoolsL ∷ EraCertState era ⇒ Lens' (EpochState era) (Map (KeyHash 'StakePool) StakePoolState) Source #
epochStateDonationL ∷ ∀ era f. Functor f ⇒ (Coin → f Coin) → EpochState era → f (EpochState era) Source #
newEpochStateGovStateL ∷ ∀ era f. Functor f ⇒ (GovState era → f (GovState era)) → NewEpochState era → f (NewEpochState era) Source #
Lenses from CertState
dsGenDelegsL ∷ ∀ era f. Functor f ⇒ (GenDelegs → f GenDelegs) → DState era → f (DState era) Source #
dsIRewardsL ∷ ∀ era f. Functor f ⇒ (InstantaneousRewards → f InstantaneousRewards) → DState era → f (DState era) Source #
dsFutureGenDelegsL ∷ ∀ era f. Functor f ⇒ (Map FutureGenDeleg GenDelegPair → f (Map FutureGenDeleg GenDelegPair)) → DState era → f (DState era) Source #
psStakePoolsL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) StakePoolState → f (Map (KeyHash 'StakePool) StakePoolState)) → PState era → f (PState era) Source #
psFutureStakePoolParamsL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) StakePoolParams → f (Map (KeyHash 'StakePool) StakePoolParams)) → PState era → f (PState era) Source #
psRetiringL ∷ ∀ era f. Functor f ⇒ (Map (KeyHash 'StakePool) EpochNo → f (Map (KeyHash 'StakePool) EpochNo)) → PState era → f (PState era) Source #
psVRFKeyHashesL ∷ ∀ era f. Functor f ⇒ (Map (VRFVerKeyHash 'StakePoolVRF) (NonZero Word64) → f (Map (VRFVerKeyHash 'StakePoolVRF) (NonZero Word64))) → PState era → f (PState era) Source #
Lenses from SnapShot(s)
ssStakeDistrL ∷ Lens' SnapShot (VMap VB VP (Credential 'Staking) (CompactForm Coin)) Source #