scalus.cardano.ledger.epoch
Members list
Packages
Type members
Classlikes
The two pots of ADA outside the UTxO set and the accounts, the ledger's ChainAccountState: the treasury and the reserves, ledger-rules spec [DM-9].
The two pots of ADA outside the UTxO set and the accounts, the ledger's ChainAccountState: the treasury and the reserves, ledger-rules spec [DM-9].
The ledger reads the treasury of the last epoch boundary in LEDGER, so a tx's currentTreasuryValue must equal it; the Emulator keeps UtxoEnv.treasury equal to it, spec [DM-13]. The reserves fund the rewards of phase 4.
Value parameters
- reserves
-
the reserves,
casReserves - treasury
-
the treasury,
casTreasury
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AccountState.type
What the enactment of the ratified actions gives, the ledger's EnactState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs:131-141) without the treasury and the previous pparams, ledger-rules spec [DM-12a], D86. The treasury is a variable of one RATIFY run only (RATIFY sets it to 0 when the run ends, conway Rules/Ratify.hs:360), and the ledger never reads ensPrevPParams.
What the enactment of the ratified actions gives, the ledger's EnactState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs:131-141) without the treasury and the previous pparams, ledger-rules spec [DM-12a], D86. The treasury is a variable of one RATIFY run only (RATIFY sets it to 0 when the run ends, conway Rules/Ratify.hs:360), and the ledger never reads ensPrevPParams.
Value parameters
- committee
-
the committee, or
Noneafter a NoConfidence - params
-
the current pparams with the enacted ParameterChange and HardForkInitiation actions applied
- roots
-
the last enacted action of each purpose
- withdrawals
-
the enacted treasury withdrawals, summed per credential, spec [EN-6]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The node's EpochState (eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs:66-75) with the parts of the node's ConwayGovState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs:245-252) that only epoch boundaries write, D122.
The node's EpochState (eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs:66-75) with the parts of the node's ConwayGovState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs:245-252) that only epoch boundaries write, D122.
In the node, params, prevParams, futureParams and the ratify pulser live in the gov state of ledgerState. Here they sit beside it: the Scalus GovState holds only the part the tx rules read and write, D27, and the current pparams stay in the validation context, spec [DM-7].
Value parameters
- accountState
-
the treasury and the reserves,
esChainAccountState - futureParams
-
the pparams the next boundary adopts,
cgsFuturePParams, D125 - ledgerState
-
the ledger state of the tx rules,
esLState - nonMyopic
-
the pool-ranking data,
esNonMyopic; always NonMyopic.empty, D124 - params
-
the current pparams,
cgsCurPParams - pendingRatify
-
the ratify result the next boundary enacts, the result of
cgsDRepPulsingState - prevParams
-
the pparams before the last boundary,
cgsPrevPParams - snapshots
-
the stake snapshots and the fee snapshot,
esSnapshots
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The pparams the next epoch boundary adopts, the node's FuturePParams (libs/cardano-ledger-core/src/Cardano/Ledger/State/Governance.hs:90-101), D125.
The pparams the next epoch boundary adopts, the node's FuturePParams (libs/cardano-ledger-core/src/Cardano/Ledger/State/Governance.hs:90-101), D125.
The node has a third case, PotentialPParamsUpdate, for the time before the ratify pulser is done. The Emulator computes the ratify result whole at the boundary, D3, so the update is always known: it is never potential. Java reads the case with instanceof FuturePParams.DefinitePParamsUpdate and its params(), and builds one with the static forwarders FuturePParams.noPParamsUpdate() and definitePParamsUpdate(params), interop rule 9.
Attributes
- Companion
- object
- Supertypes
-
trait Enumtrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- enum
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
FuturePParams.type
The stake of one pool, the node's IndividualPoolStake (libs/cardano-ledger-core/src/Cardano/Ledger/State/PoolDistr.hs:54-62).
The stake of one pool, the node's IndividualPoolStake (libs/cardano-ledger-core/src/Cardano/Ledger/State/PoolDistr.hs:54-62).
Value parameters
- stakeShare
-
the pool's stake over the total active stake, in lowest terms,
individualPoolStake - totalStake
-
the stake delegated to the pool,
individualTotalPoolStake - vrfKeyHash
-
the VRF key of the pool params,
individualPoolStakeVrf
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The whole ledger state of the Emulator in the shape of the node's NewEpochState (eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs:308-333), ledger-rules spec D122. A read result: the Emulator builds it, a caller reads it; a new field later adds an accessor only. stashedAVVMAddresses is left out: it is empty after the Allegra era. Java reads the maps and the reward update through the getters of NewEpochStatePlatform, D128.
The whole ledger state of the Emulator in the shape of the node's NewEpochState (eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/Types.hs:308-333), ledger-rules spec D122. A read result: the Emulator builds it, a caller reads it; a new field later adds an accessor only. stashedAVVMAddresses is left out: it is empty after the Allegra era. Java reads the maps and the reward update through the getters of NewEpochStatePlatform, D128.
Value parameters
- blocksMadeCur
-
the blocks each pool made since the last boundary,
nesBcur - blocksMadePrev
-
the blocks each pool made in the epoch before the last boundary,
nesBprev - epochState
-
the epoch state,
nesEs - lastEpoch
-
the epoch of the last boundary the ledger ran,
nesEL, D66 - pendingRewards
-
the reward update the last boundary computed and the next one applies,
nesRu; the Emulator computes it whole at the boundary, so it is never a pulser, D3 - poolDistr
-
the stake distribution of the pools for this epoch,
nesPd, D123
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait InteropApiclass Objecttrait Matchableclass AnyShow all
The pool-ranking data of the node, NonMyopic (eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs:231-235). Not part of the protocol: only the wallet ranking getNonMyopicMemberRewards reads it. The Emulator does not compute it, so it is always NonMyopic.empty, D124.
The pool-ranking data of the node, NonMyopic (eras/shelley/impl/src/Cardano/Ledger/Shelley/PoolRank.hs:231-235). Not part of the protocol: only the wallet ranking getNonMyopicMemberRewards reads it. The Emulator does not compute it, so it is always NonMyopic.empty, D124.
Value parameters
- likelihoods
-
the log-weights of each pool's block counts,
likelihoodsNM(aLikelihoodis a sequence ofFloatlog-weights, PoolRank.hs:88-101) - rewardPot
-
the reward pot of the last reward update,
rewardPotNM
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait InteropApiclass Objecttrait Matchableclass AnyShow all
The stake distribution of the pools, the node's PoolDistr (libs/cardano-ledger-core/src/Cardano/Ledger/State/PoolDistr.hs:98-106), D123.
The stake distribution of the pools, the node's PoolDistr (libs/cardano-ledger-core/src/Cardano/Ledger/State/PoolDistr.hs:98-106), D123.
Value parameters
- pools
-
the stake of each pool with at least one delegator,
unPoolDistr - totalActiveStake
-
the total active stake of the snapshot, at least 1 lovelace,
pdTotalActiveStake
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait InteropApiclass Objecttrait Matchableclass AnyShow all
How the reward calculation rates the pools, ledger-rules spec [ES-1], [ES-1a].
How the reward calculation rates the pools, ledger-rules spec [ES-1], [ES-1a].
In the Instant preset each tx makes one block, at any slot, so the blocks made are far below the expected blocks and Measured rewards are close to 0. Ideal, the default, pays what a node where every pool is perfect pays.
Attributes
- Companion
- object
- Supertypes
-
trait Enumtrait Producttrait Equalsclass Enum[PoolPerformance]trait Serializabletrait Comparable[PoolPerformance]trait Constableclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- enum
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
PoolPerformance.type
One pool in a StakeSnapshot, the ledger's StakePoolSnapShot without the derived spssStakeRatio (cardano-ledger-core State/SnapShots.hs:160-185), ledger-rules spec [DM-10b], [SN-8].
One pool in a StakeSnapshot, the ledger's StakePoolSnapShot without the derived spssStakeRatio (cardano-ledger-core State/SnapShots.hs:160-185), ledger-rules spec [DM-10b], [SN-8].
Value parameters
- cost
-
the fixed cost of the pool params
- margin
-
the margin of the pool params
- numDelegators
-
the number of registered accounts that delegate to the pool, whatever their stake
- pledge
-
the pledge of the pool params
- rewardAccount
-
the credential of the reward account of the pool params
- selfDelegatedOwners
-
the owners whose key credential is a registered account that delegates to the pool
- selfDelegatedOwnersStake
-
the sum of the active stake of
selfDelegatedOwners - stake
-
the sum of the active stake of the credentials that delegate to the pool
- vrfKeyHash
-
the VRF key of the pool params
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The result of one RATIFY run, the ledger's RatifyState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs:257-275), ledger-rules spec [DM-12a].
The result of one RATIFY run, the ledger's RatifyState (eras/conway/impl/src/Cardano/Ledger/Conway/Governance/Internal.hs:257-275), ledger-rules spec [DM-12a].
Value parameters
- delayed
-
whether an enacted delaying action stopped the run from enacting more, spec [RT-5c]
- enactState
-
the enact state after the run
- enacted
-
the ids of the enacted actions, in the order RATIFY enacted them
- expired
-
the ids of the actions that expired unenacted, spec [RT-10]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The reward update one epoch boundary computes and the next applies, the ledger's RewardUpdate without nonMyopic (shelley RewardUpdate.hs:111-131), ledger-rules spec [DM-11a].
The reward update one epoch boundary computes and the next applies, the ledger's RewardUpdate without nonMyopic (shelley RewardUpdate.hs:111-131), ledger-rules spec [DM-11a].
The four parts sum to 0, spec [RW-9]: deltaT + deltaR + Σ rewards + deltaF = 0.
Value parameters
- deltaF
-
the change to the fees, minus the fee snapshot
- deltaR
-
the change to the reserves, with its sign: what was not paid out minus what was taken
- deltaT
-
the change to the treasury,
floor(tau · rPot) - rewards
-
the reward of each credential, the leader and member rewards of one credential summed, spec [RW-7]. A member reward of 0 is not an entry; the leader reward of every pool that earns is, also when it is 0, spec [RW-8a]
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The three stake snapshots and the fee snapshot of an epoch boundary, the ledger's SnapShots (cardano-ledger-core State/SnapShots.hs), ledger-rules spec [DM-9a].
The three stake snapshots and the fee snapshot of an epoch boundary, the ledger's SnapShots (cardano-ledger-core State/SnapShots.hs), ledger-rules spec [DM-9a].
SNAP makes a new mark at every boundary and moves the others down one: go := set, set := mark, spec [EB-6]. Rewards read go, the stake of two boundaries ago.
Value parameters
- fee
-
the fees of the ledger at the last boundary,
ssFee - go
-
the stake at the boundary before that,
ssStakeGo - mark
-
the stake at the last boundary,
ssStakeMark - set
-
the stake at the boundary before,
ssStakeSet
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The stake of one boundary, the ledger's SnapShot, ledger-rules spec [DM-10a].
The stake of one boundary, the ledger's SnapShot, ledger-rules spec [DM-10a].
Value parameters
- activeStake
-
the stake of each registered credential that delegates to a pool and has stake above 0: the coin of its base-address outputs plus its reward balance, spec [SN-2] to [SN-5]
- delegations
-
the pool each credential of
activeStakedelegates to, with the same keys - pools
-
one entry per registered pool at the boundary, also a pool with no stake, spec [SN-7]
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
StakeSnapshot.type