Ratify

scalus.cardano.ledger.epoch.internal.Ratify
object Ratify

RATIFY and ENACT, ledger-rules spec section 15.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Ratify.type

Members list

Value members

Concrete methods

Whether update holds a field of the security group, so that the SPOs vote on it, spec [GV-11a], [RT-5e] (isSecurityRelevant, conway Governance/Internal.hs:396-400), D32, D90.

Whether update holds a field of the security group, so that the SPOs vote on it, spec [GV-11a], [RT-5e] (isSecurityRelevant, conway Governance/Internal.hs:396-400), D32, D90.

Attributes

def dRepDistribution(ledger: State): Map[DRep, Coin]

The stake each DRep votes with, spec [RT-3], [RT-3a] (computeDRepDistr, conway Governance/DRepPulser.hs:208-249): for every account with a DRep delegation, its base-address coin in the UTxO, its balance and the deposits of the proposals it is the return account of. The entry is added also when it is 0. A credential DRep counts only when it is registered. Read from the ledger after the boundary, spec [EB-20a].

The stake each DRep votes with, spec [RT-3], [RT-3a] (computeDRepDistr, conway Governance/DRepPulser.hs:208-249): for every account with a DRep delegation, its base-address coin in the UTxO, its balance and the deposits of the proposals it is the return account of. The entry is added also when it is 0. A credential DRep counts only when it is registered. Read from the ledger after the boundary, spec [EB-20a].

Attributes

def enact(state: EnactState, treasury: Coin, id: GovActionId, action: GovAction): (EnactState, Coin)

ENACT of the action id (conway Rules/Enact.hs:83-115), spec [EN-1]: the enact state after action, and the treasury of the RATIFY run after it.

ENACT of the action id (conway Rules/Enact.hs:83-115), spec [EN-1]: the enact state after action, and the treasury of the RATIFY run after it.

  • ParameterChange: the update applied to the pparams, spec [EN-2], [EN-2a].
  • HardForkInitiation: its protocol version in the pparams.
  • TreasuryWithdrawals: each amount added to withdrawals under the credential of its reward account, and the sum taken from treasury, spec [EN-6]. RATIFY enacts it only when the sum is at most the treasury, spec [RT-5d].
  • NoConfidence: no committee. UpdateCommittee: [EN-5]. NewConstitution: the constitution.
  • InfoAction: nothing.

Each action with a purpose becomes the root of its purpose.

Attributes

def enactStateOf(govState: GovState, params: ProtocolParams): EnactState

The enact state of govState with the pparams params and no withdrawals, mkEnactState (conway Governance.hs:327-337): the start of a RATIFY run, spec [EB-20a], and of the genesis, spec [DM-9c].

The enact state of govState with the pparams params and no withdrawals, mkEnactState (conway Governance.hs:327-337): the start of a RATIFY run, spec [EB-20a], and of the genesis, spec [DM-9c].

Attributes

def envOf(ledger: State, mark: StakeSnapshot, currentEpoch: EpochNo): RatifyEnv

The environment of a run at currentEpoch over ledger, its SPO distribution from mark, spec [EB-20a].

The environment of a run at currentEpoch over ledger, its SPO distribution from mark, spec [EB-20a].

Attributes

def isConwayAction(action: GovAction): Boolean

Whether action stays within the Conway rules the Emulator runs: false for a HardForkInitiation to major 12 or more, spec [EN-4a], D91 (owner, Q8). RATIFY MUST take such an action as not accepted after the checks of [RT-5a] to [RT-5d], so it delays nothing and expires by [RT-10]. The ledger has no such rule: running Conway rules under a PV 12 label would give wrong results silently.

Whether action stays within the Conway rules the Emulator runs: false for a HardForkInitiation to major 12 or more, spec [EN-4a], D91 (owner, Q8). RATIFY MUST take such an action as not accepted after the checks of [RT-5a] to [RT-5d], so it delays nothing and expires by [RT-10]. The ledger has no such rule: running Conway rules under a PV 12 label would give wrong results silently.

Attributes

The groups of the fields update holds, modifiedPPGroups (conway PParams.hs:643-708), spec [EN-2a]: the DRep threshold of a ParameterChange is the largest of these groups'.

The groups of the fields update holds, modifiedPPGroups (conway PParams.hs:643-708), spec [EN-2a]: the DRep threshold of a ParameterChange is the largest of these groups'.

Attributes

The result of a run that enacts and expires nothing, as at the genesis, spec [DM-9c].

The result of a run that enacts and expires nothing, as at the genesis, spec [DM-9c].

Attributes

The stake each pool votes with, spec [RT-4], [RT-4a]: the pools of mark with a delegator, with their stake, and the total of mark (calculatePoolDistr', cardano-ledger-core State/SnapShots.hs:449-465); then the proposal deposits of each account that delegates to a pool of it, added to the pool and to the total (addToPoolDistr, conway Governance/DRepPulser.hs:228-236). The accounts are those of ledger after POOLREAP, so a delegator of a pool that retired at the boundary adds nothing.

The stake each pool votes with, spec [RT-4], [RT-4a]: the pools of mark with a delegator, with their stake, and the total of mark (calculatePoolDistr', cardano-ledger-core State/SnapShots.hs:449-465); then the proposal deposits of each account that delegates to a pool of it, added to the pool and to the total (addToPoolDistr, conway Governance/DRepPulser.hs:228-236). The accounts are those of ledger after POOLREAP, so a delegator of a pool that retired at the boundary adds nothing.

Attributes

def ratify(env: RatifyEnv, enactState: EnactState, treasury: Coin, proposals: Vector[GovActionState]): RatifyState

RATIFY, ratifyTransition (conway Rules/Ratify.hs:318-360), spec [RT-1] to [RT-18]: the proposals, in the order they were made and sorted stably by priority (reorderActions, conway Governance/Internal.hs:542-552), each enacted on the enact state when all the checks hold, in the ledger's order (:337-341): its parent is the root of its purpose [RT-5a], its committee terms are within the max term length [RT-5b], no delaying action was enacted before it in the run [RT-5c], its withdrawals fit the treasury of the run [RT-5d], it is within the Conway rules [EN-4a], and the committee, the SPOs and the DReps accept it [RT-5e]. Every check reads the enact state as the actions enacted before it left it, spec [RT-17]. An action that is not enacted expires when expiresAfter < currentEpoch, spec [RT-10].

RATIFY, ratifyTransition (conway Rules/Ratify.hs:318-360), spec [RT-1] to [RT-18]: the proposals, in the order they were made and sorted stably by priority (reorderActions, conway Governance/Internal.hs:542-552), each enacted on the enact state when all the checks hold, in the ledger's order (:337-341): its parent is the root of its purpose [RT-5a], its committee terms are within the max term length [RT-5b], no delaying action was enacted before it in the run [RT-5c], its withdrawals fit the treasury of the run [RT-5d], it is within the Conway rules [EN-4a], and the committee, the SPOs and the DReps accept it [RT-5e]. Every check reads the enact state as the actions enacted before it left it, spec [RT-17]. An action that is not enacted expires when expiresAfter < currentEpoch, spec [RT-10].

The ledger recurses and inserts the expired ids after the rest of the run; the expiry of an action reads nothing the run changes, so one fold gives the same sets. delayed is set to whether the enacted action delays (rsDelayedL .~, :348).

Value parameters

treasury

the treasury after the boundary, ensTreasury of the run (conway Governance.hs:511); the run ends it at 0 (:360), so the result does not keep it (D86)

Attributes