{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Cardano.Ledger.Dijkstra.Transition (
TransitionConfig (..),
seatInitialLeiosCommittee,
) where
import Cardano.Ledger.Alonzo.Transition (AlonzoEraTransition)
import Cardano.Ledger.Conway
import Cardano.Ledger.Conway.Transition (
ConwayEraTransition,
conwayInjectIntoTestState,
)
import Cardano.Ledger.Dijkstra.Era
import Cardano.Ledger.Dijkstra.Genesis
import Cardano.Ledger.Dijkstra.PParams (ppLeiosCommitteeSizeL)
import Cardano.Ledger.Dijkstra.Rules.Snap (kesMaxKeyAgeEpochs)
import Cardano.Ledger.Dijkstra.Translation ()
import Cardano.Ledger.Shelley.Genesis (ShelleyGenesis (..))
import Cardano.Ledger.Shelley.LedgerState (
NewEpochState,
curPParamsEpochStateL,
esLStateL,
esSnapshotsL,
lsCertStateL,
nesELL,
nesEsL,
)
import Cardano.Ledger.Shelley.Transition
import Cardano.Ledger.State (
certPStateL,
mkGoSnapShot,
mkMarkSnapShot,
mkSetSnapShot,
msSnapShotL,
populateBlsKeyHashes,
populateVRFKeyHashes,
ssStakeGoL,
ssStakeMarkL,
ssStakeSetL,
)
import GHC.Generics
import Lens.Micro
import NoThunks.Class (NoThunks (..))
instance EraTransition DijkstraEra where
data TransitionConfig DijkstraEra = DijkstraTransitionConfig
{ TransitionConfig DijkstraEra -> DijkstraGenesis
dtcDijkstraGenesis :: !DijkstraGenesis
, TransitionConfig DijkstraEra -> TransitionConfig ConwayEra
dtcConwayTransitionConfig :: !(TransitionConfig ConwayEra)
}
deriving (Int -> TransitionConfig DijkstraEra -> ShowS
[TransitionConfig DijkstraEra] -> ShowS
TransitionConfig DijkstraEra -> String
(Int -> TransitionConfig DijkstraEra -> ShowS)
-> (TransitionConfig DijkstraEra -> String)
-> ([TransitionConfig DijkstraEra] -> ShowS)
-> Show (TransitionConfig DijkstraEra)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransitionConfig DijkstraEra -> ShowS
showsPrec :: Int -> TransitionConfig DijkstraEra -> ShowS
$cshow :: TransitionConfig DijkstraEra -> String
show :: TransitionConfig DijkstraEra -> String
$cshowList :: [TransitionConfig DijkstraEra] -> ShowS
showList :: [TransitionConfig DijkstraEra] -> ShowS
Show, TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool
(TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool)
-> (TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool)
-> Eq (TransitionConfig DijkstraEra)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool
== :: TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool
$c/= :: TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool
/= :: TransitionConfig DijkstraEra
-> TransitionConfig DijkstraEra -> Bool
Eq, (forall x.
TransitionConfig DijkstraEra
-> Rep (TransitionConfig DijkstraEra) x)
-> (forall x.
Rep (TransitionConfig DijkstraEra) x
-> TransitionConfig DijkstraEra)
-> Generic (TransitionConfig DijkstraEra)
forall x.
Rep (TransitionConfig DijkstraEra) x
-> TransitionConfig DijkstraEra
forall x.
TransitionConfig DijkstraEra
-> Rep (TransitionConfig DijkstraEra) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
TransitionConfig DijkstraEra
-> Rep (TransitionConfig DijkstraEra) x
from :: forall x.
TransitionConfig DijkstraEra
-> Rep (TransitionConfig DijkstraEra) x
$cto :: forall x.
Rep (TransitionConfig DijkstraEra) x
-> TransitionConfig DijkstraEra
to :: forall x.
Rep (TransitionConfig DijkstraEra) x
-> TransitionConfig DijkstraEra
Generic)
mkTransitionConfig :: TranslationContext DijkstraEra
-> TransitionConfig (PreviousEra DijkstraEra)
-> TransitionConfig DijkstraEra
mkTransitionConfig = TranslationContext DijkstraEra
-> TransitionConfig (PreviousEra DijkstraEra)
-> TransitionConfig DijkstraEra
DijkstraGenesis
-> TransitionConfig ConwayEra -> TransitionConfig DijkstraEra
DijkstraTransitionConfig
injectIntoTestState :: forall (m :: * -> *) h.
(HasCallStack, MonadST m, MonadThrow m) =>
HasFS m h
-> TransitionConfig DijkstraEra
-> NewEpochState DijkstraEra
-> m (NewEpochState DijkstraEra)
injectIntoTestState HasFS m h
hasFS TransitionConfig DijkstraEra
cfg NewEpochState DijkstraEra
nes =
TransitionConfig DijkstraEra
-> NewEpochState DijkstraEra -> NewEpochState DijkstraEra
seatInitialLeiosCommittee TransitionConfig DijkstraEra
cfg
(NewEpochState DijkstraEra -> NewEpochState DijkstraEra)
-> (NewEpochState DijkstraEra -> NewEpochState DijkstraEra)
-> NewEpochState DijkstraEra
-> NewEpochState DijkstraEra
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(EpochState era -> f (EpochState era))
-> NewEpochState era -> f (NewEpochState era)
nesEsL ((EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> ((PState DijkstraEra -> Identity (PState DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> (PState DijkstraEra -> Identity (PState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (LedgerState DijkstraEra -> Identity (LedgerState DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(LedgerState era -> f (LedgerState era))
-> EpochState era -> f (EpochState era)
esLStateL ((LedgerState DijkstraEra -> Identity (LedgerState DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> ((PState DijkstraEra -> Identity (PState DijkstraEra))
-> LedgerState DijkstraEra -> Identity (LedgerState DijkstraEra))
-> (PState DijkstraEra -> Identity (PState DijkstraEra))
-> EpochState DijkstraEra
-> Identity (EpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (CertState DijkstraEra -> Identity (CertState DijkstraEra))
-> LedgerState DijkstraEra -> Identity (LedgerState DijkstraEra)
(ConwayCertState DijkstraEra
-> Identity (ConwayCertState DijkstraEra))
-> LedgerState DijkstraEra -> Identity (LedgerState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(CertState era -> f (CertState era))
-> LedgerState era -> f (LedgerState era)
lsCertStateL ((ConwayCertState DijkstraEra
-> Identity (ConwayCertState DijkstraEra))
-> LedgerState DijkstraEra -> Identity (LedgerState DijkstraEra))
-> ((PState DijkstraEra -> Identity (PState DijkstraEra))
-> ConwayCertState DijkstraEra
-> Identity (ConwayCertState DijkstraEra))
-> (PState DijkstraEra -> Identity (PState DijkstraEra))
-> LedgerState DijkstraEra
-> Identity (LedgerState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (PState DijkstraEra -> Identity (PState DijkstraEra))
-> CertState DijkstraEra -> Identity (CertState DijkstraEra)
(PState DijkstraEra -> Identity (PState DijkstraEra))
-> ConwayCertState DijkstraEra
-> Identity (ConwayCertState DijkstraEra)
forall era. EraCertState era => Lens' (CertState era) (PState era)
Lens' (CertState DijkstraEra) (PState DijkstraEra)
certPStateL ((PState DijkstraEra -> Identity (PState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> (PState DijkstraEra -> PState DijkstraEra)
-> NewEpochState DijkstraEra
-> NewEpochState DijkstraEra
forall s t a b. ASetter s t a b -> (a -> b) -> s -> t
%~ PState DijkstraEra -> PState DijkstraEra
forall era. PState era -> PState era
populateBlsKeyHashes (PState DijkstraEra -> PState DijkstraEra)
-> (PState DijkstraEra -> PState DijkstraEra)
-> PState DijkstraEra
-> PState DijkstraEra
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PState DijkstraEra -> PState DijkstraEra
forall era. PState era -> PState era
populateVRFKeyHashes)
(NewEpochState DijkstraEra -> NewEpochState DijkstraEra)
-> m (NewEpochState DijkstraEra) -> m (NewEpochState DijkstraEra)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> HasFS m h
-> TransitionConfig DijkstraEra
-> NewEpochState DijkstraEra
-> m (NewEpochState DijkstraEra)
forall era (m :: * -> *) h.
(ConwayEraTransition era, HasCallStack, MonadST m, MonadThrow m) =>
HasFS m h
-> TransitionConfig era
-> NewEpochState era
-> m (NewEpochState era)
conwayInjectIntoTestState HasFS m h
hasFS TransitionConfig DijkstraEra
cfg NewEpochState DijkstraEra
nes
tcPreviousEraConfigL :: EraTransition (PreviousEra DijkstraEra) =>
Lens'
(TransitionConfig DijkstraEra)
(TransitionConfig (PreviousEra DijkstraEra))
tcPreviousEraConfigL =
(TransitionConfig DijkstraEra -> TransitionConfig ConwayEra)
-> (TransitionConfig DijkstraEra
-> TransitionConfig ConwayEra -> TransitionConfig DijkstraEra)
-> Lens
(TransitionConfig DijkstraEra)
(TransitionConfig DijkstraEra)
(TransitionConfig ConwayEra)
(TransitionConfig ConwayEra)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens TransitionConfig DijkstraEra -> TransitionConfig ConwayEra
dtcConwayTransitionConfig (\TransitionConfig DijkstraEra
dtc TransitionConfig ConwayEra
pc -> TransitionConfig DijkstraEra
dtc {dtcConwayTransitionConfig = pc})
tcTranslationContextL :: Lens'
(TransitionConfig DijkstraEra) (TranslationContext DijkstraEra)
tcTranslationContextL =
(TransitionConfig DijkstraEra -> DijkstraGenesis)
-> (TransitionConfig DijkstraEra
-> DijkstraGenesis -> TransitionConfig DijkstraEra)
-> Lens
(TransitionConfig DijkstraEra)
(TransitionConfig DijkstraEra)
DijkstraGenesis
DijkstraGenesis
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
lens TransitionConfig DijkstraEra -> DijkstraGenesis
dtcDijkstraGenesis (\TransitionConfig DijkstraEra
dtc DijkstraGenesis
ag -> TransitionConfig DijkstraEra
dtc {dtcDijkstraGenesis = ag})
instance AlonzoEraTransition DijkstraEra
seatInitialLeiosCommittee ::
TransitionConfig DijkstraEra -> NewEpochState DijkstraEra -> NewEpochState DijkstraEra
seatInitialLeiosCommittee :: TransitionConfig DijkstraEra
-> NewEpochState DijkstraEra -> NewEpochState DijkstraEra
seatInitialLeiosCommittee TransitionConfig DijkstraEra
cfg NewEpochState DijkstraEra
nes =
NewEpochState DijkstraEra
nes
NewEpochState DijkstraEra
-> (NewEpochState DijkstraEra -> NewEpochState DijkstraEra)
-> NewEpochState DijkstraEra
forall a b. a -> (a -> b) -> b
& (EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(EpochState era -> f (EpochState era))
-> NewEpochState era -> f (NewEpochState era)
nesEsL ((EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> ((MarkSnapShot -> Identity MarkSnapShot)
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> (MarkSnapShot -> Identity MarkSnapShot)
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(SnapShots era -> f (SnapShots era))
-> EpochState era -> f (EpochState era)
esSnapshotsL ((SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> ((MarkSnapShot -> Identity MarkSnapShot)
-> SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> (MarkSnapShot -> Identity MarkSnapShot)
-> EpochState DijkstraEra
-> Identity (EpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (MarkSnapShot -> Identity MarkSnapShot)
-> SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(MarkSnapShot -> f MarkSnapShot)
-> SnapShots era -> f (SnapShots era)
ssStakeMarkL ((MarkSnapShot -> Identity MarkSnapShot)
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> MarkSnapShot
-> NewEpochState DijkstraEra
-> NewEpochState DijkstraEra
forall s t a b. ASetter s t a b -> b -> s -> t
.~ MarkSnapShot
markSnapShot
NewEpochState DijkstraEra
-> (NewEpochState DijkstraEra -> NewEpochState DijkstraEra)
-> NewEpochState DijkstraEra
forall a b. a -> (a -> b) -> b
& (EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(EpochState era -> f (EpochState era))
-> NewEpochState era -> f (NewEpochState era)
nesEsL ((EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> ((SetSnapShot -> Identity SetSnapShot)
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> (SetSnapShot -> Identity SetSnapShot)
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(SnapShots era -> f (SnapShots era))
-> EpochState era -> f (EpochState era)
esSnapshotsL ((SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> ((SetSnapShot -> Identity SetSnapShot)
-> SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> (SetSnapShot -> Identity SetSnapShot)
-> EpochState DijkstraEra
-> Identity (EpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SetSnapShot -> Identity SetSnapShot)
-> SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(SetSnapShot -> f SetSnapShot)
-> SnapShots era -> f (SnapShots era)
ssStakeSetL ((SetSnapShot -> Identity SetSnapShot)
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> SetSnapShot
-> NewEpochState DijkstraEra
-> NewEpochState DijkstraEra
forall s t a b. ASetter s t a b -> b -> s -> t
.~ SetSnapShot
setSnapShot
NewEpochState DijkstraEra
-> (NewEpochState DijkstraEra -> NewEpochState DijkstraEra)
-> NewEpochState DijkstraEra
forall a b. a -> (a -> b) -> b
& (EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(EpochState era -> f (EpochState era))
-> NewEpochState era -> f (NewEpochState era)
nesEsL ((EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> ((GoSnapShot -> Identity GoSnapShot)
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> (GoSnapShot -> Identity GoSnapShot)
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(SnapShots era -> f (SnapShots era))
-> EpochState era -> f (EpochState era)
esSnapshotsL ((SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> EpochState DijkstraEra -> Identity (EpochState DijkstraEra))
-> ((GoSnapShot -> Identity GoSnapShot)
-> SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra))
-> (GoSnapShot -> Identity GoSnapShot)
-> EpochState DijkstraEra
-> Identity (EpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (GoSnapShot -> Identity GoSnapShot)
-> SnapShots DijkstraEra -> Identity (SnapShots DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(GoSnapShot -> f GoSnapShot) -> SnapShots era -> f (SnapShots era)
ssStakeGoL ((GoSnapShot -> Identity GoSnapShot)
-> NewEpochState DijkstraEra
-> Identity (NewEpochState DijkstraEra))
-> GoSnapShot
-> NewEpochState DijkstraEra
-> NewEpochState DijkstraEra
forall s t a b. ASetter s t a b -> b -> s -> t
.~ SetSnapShot -> GoSnapShot
mkGoSnapShot SetSnapShot
setSnapShot
where
genesis :: ShelleyGenesis
genesis = TransitionConfig DijkstraEra
cfg TransitionConfig DijkstraEra
-> Getting
ShelleyGenesis (TransitionConfig DijkstraEra) ShelleyGenesis
-> ShelleyGenesis
forall s a. s -> Getting a s a -> a
^. Getting
ShelleyGenesis (TransitionConfig DijkstraEra) ShelleyGenesis
forall era.
EraTransition era =>
Lens' (TransitionConfig era) ShelleyGenesis
Lens' (TransitionConfig DijkstraEra) ShelleyGenesis
tcShelleyGenesisL
maxKeyAge :: EpochInterval
maxKeyAge =
Word64 -> Word64 -> EpochSize -> EpochInterval
kesMaxKeyAgeEpochs
(ShelleyGenesis -> Word64
sgMaxKESEvolutions ShelleyGenesis
genesis)
(ShelleyGenesis -> Word64
sgSlotsPerKESPeriod ShelleyGenesis
genesis)
(ShelleyGenesis -> EpochSize
sgEpochLength ShelleyGenesis
genesis)
markSnapShot :: MarkSnapShot
markSnapShot =
SnapShot -> EpochNo -> Word16 -> EpochInterval -> MarkSnapShot
mkMarkSnapShot
(NewEpochState DijkstraEra
nes NewEpochState DijkstraEra
-> Getting SnapShot (NewEpochState DijkstraEra) SnapShot
-> SnapShot
forall s a. s -> Getting a s a -> a
^. (EpochState DijkstraEra -> Const SnapShot (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Const SnapShot (NewEpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(EpochState era -> f (EpochState era))
-> NewEpochState era -> f (NewEpochState era)
nesEsL ((EpochState DijkstraEra
-> Const SnapShot (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Const SnapShot (NewEpochState DijkstraEra))
-> ((SnapShot -> Const SnapShot SnapShot)
-> EpochState DijkstraEra
-> Const SnapShot (EpochState DijkstraEra))
-> Getting SnapShot (NewEpochState DijkstraEra) SnapShot
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SnapShots DijkstraEra -> Const SnapShot (SnapShots DijkstraEra))
-> EpochState DijkstraEra
-> Const SnapShot (EpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(SnapShots era -> f (SnapShots era))
-> EpochState era -> f (EpochState era)
esSnapshotsL ((SnapShots DijkstraEra -> Const SnapShot (SnapShots DijkstraEra))
-> EpochState DijkstraEra
-> Const SnapShot (EpochState DijkstraEra))
-> ((SnapShot -> Const SnapShot SnapShot)
-> SnapShots DijkstraEra -> Const SnapShot (SnapShots DijkstraEra))
-> (SnapShot -> Const SnapShot SnapShot)
-> EpochState DijkstraEra
-> Const SnapShot (EpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (MarkSnapShot -> Const SnapShot MarkSnapShot)
-> SnapShots DijkstraEra -> Const SnapShot (SnapShots DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(MarkSnapShot -> f MarkSnapShot)
-> SnapShots era -> f (SnapShots era)
ssStakeMarkL ((MarkSnapShot -> Const SnapShot MarkSnapShot)
-> SnapShots DijkstraEra -> Const SnapShot (SnapShots DijkstraEra))
-> ((SnapShot -> Const SnapShot SnapShot)
-> MarkSnapShot -> Const SnapShot MarkSnapShot)
-> (SnapShot -> Const SnapShot SnapShot)
-> SnapShots DijkstraEra
-> Const SnapShot (SnapShots DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (SnapShot -> Const SnapShot SnapShot)
-> MarkSnapShot -> Const SnapShot MarkSnapShot
Lens' MarkSnapShot SnapShot
msSnapShotL)
(NewEpochState DijkstraEra
nes NewEpochState DijkstraEra
-> Getting EpochNo (NewEpochState DijkstraEra) EpochNo -> EpochNo
forall s a. s -> Getting a s a -> a
^. Getting EpochNo (NewEpochState DijkstraEra) EpochNo
forall era (f :: * -> *).
Functor f =>
(EpochNo -> f EpochNo)
-> NewEpochState era -> f (NewEpochState era)
nesELL)
(NewEpochState DijkstraEra
nes NewEpochState DijkstraEra
-> Getting Word16 (NewEpochState DijkstraEra) Word16 -> Word16
forall s a. s -> Getting a s a -> a
^. (EpochState DijkstraEra -> Const Word16 (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Const Word16 (NewEpochState DijkstraEra)
forall era (f :: * -> *).
Functor f =>
(EpochState era -> f (EpochState era))
-> NewEpochState era -> f (NewEpochState era)
nesEsL ((EpochState DijkstraEra -> Const Word16 (EpochState DijkstraEra))
-> NewEpochState DijkstraEra
-> Const Word16 (NewEpochState DijkstraEra))
-> ((Word16 -> Const Word16 Word16)
-> EpochState DijkstraEra -> Const Word16 (EpochState DijkstraEra))
-> Getting Word16 (NewEpochState DijkstraEra) Word16
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (PParams DijkstraEra -> Const Word16 (PParams DijkstraEra))
-> EpochState DijkstraEra -> Const Word16 (EpochState DijkstraEra)
forall era. EraGov era => Lens' (EpochState era) (PParams era)
Lens' (EpochState DijkstraEra) (PParams DijkstraEra)
curPParamsEpochStateL ((PParams DijkstraEra -> Const Word16 (PParams DijkstraEra))
-> EpochState DijkstraEra -> Const Word16 (EpochState DijkstraEra))
-> ((Word16 -> Const Word16 Word16)
-> PParams DijkstraEra -> Const Word16 (PParams DijkstraEra))
-> (Word16 -> Const Word16 Word16)
-> EpochState DijkstraEra
-> Const Word16 (EpochState DijkstraEra)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Word16 -> Const Word16 Word16)
-> PParams DijkstraEra -> Const Word16 (PParams DijkstraEra)
forall era. DijkstraEraPParams era => Lens' (PParams era) Word16
Lens' (PParams DijkstraEra) Word16
ppLeiosCommitteeSizeL)
EpochInterval
maxKeyAge
setSnapShot :: SetSnapShot
setSnapShot = MarkSnapShot -> SetSnapShot
mkSetSnapShot MarkSnapShot
markSnapShot
instance ConwayEraTransition DijkstraEra
instance NoThunks (TransitionConfig DijkstraEra)