ouroboros-consensus-cardano-0.16.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.ByronSpec.Ledger.Rules

Description

Thin wrapper around the Byron spec rules

Intended for qualified import

import qualified Ouroboros.Consensus.ByronSpec.Ledger.Rules as Rules

Synopsis

Ledger

applyChainTickByronSpecGenesisSlotState CHAINState CHAIN Source #

Chain tick

There isn't something in the spec that directly corresponds to this, so we have to combine a few different things:

  1. Apply the epoch rule (update the update state)
  2. Apply any scheduled delegations
  3. Set the slot number

This matches quite closely what applyChainTick in Ouroboros.Consensus.Ledger.Byron.Auxiliary does.

Lift STS transition rules to the chain level

liftCHAINByronSpecGenesis → LiftedRule CHAIN Source #

Apply a block

This is a "trivial" (identity) lift.

liftSDELEGByronSpecGenesis → LiftedRule SDELEG Source #

Apply delegation certificate

liftUPIREGByronSpecGenesis → LiftedRule UPIREG Source #

Apply update proposal

liftUPIVOTEByronSpecGenesis → LiftedRule UPIVOTE Source #

Apply update vote

liftUTXOWByronSpecGenesis → LiftedRule UTXOW Source #

Apply transaction

STS initial rules

Rule context (exported for the benefit of the tests

data RuleContext sts Source #

Context required to apply a rule to the top-level CHAIN state

The environment for these rules pull in some information from the (abstract) genesis config and some information from the state; the reason is that although some values come from the state, as far as these rules are concerned, they are constants.