ouroboros-consensus-byronspec- ByronSpec ledger integration in the Ouroboros consensus layer
Safe HaskellNone



Thin wrapper around the Byron spec rules

Intended for qualified import

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



applyChainTickByronSpecGenesis → Slot → State CHAIN → State 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.