shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.STS.Chain

Synopsis

Documentation

data CHAIN era Source #

Instances

Instances details
(Era era, ShelleyBased era) => Embed TICKN (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

(Era era, c ~ Crypto era, ShelleyBased era, Embed (BBODY era) (CHAIN era), Embed TICKN (CHAIN era), Embed (TICK era) (CHAIN era), Embed (PRTCL (Crypto era)) (CHAIN era), DSignable c (OCertSignable c), DSignable c (Hash c EraIndependentTxBody), KESignable c (BHBody c), Signable (VRF c) Seed) => STS (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Associated Types

type State (CHAIN era) Source #

type Signal (CHAIN era) Source #

type Environment (CHAIN era) Source #

type BaseM (CHAIN era) :: Type -> Type Source #

type PredicateFailure (CHAIN era) = (b :: Type) Source #

(Era era, ShelleyBased era, STS (TICK era)) => Embed (TICK era) (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

(Era era, c ~ Crypto era, ShelleyBased era, STS (PRTCL c)) => Embed (PRTCL c) (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

(Era era, ShelleyBased era, STS (BBODY era)) => Embed (BBODY era) (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type PredicateFailure (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type BaseM (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type BaseM (CHAIN era) = ShelleyBase
type Environment (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Environment (CHAIN era) = ()
type Signal (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Signal (CHAIN era) = Block era
type State (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type State (CHAIN era) = ChainState era

data ChainState era Source #

Instances

Instances details
ShelleyBased era => Eq (ChainState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Methods

(==) :: ChainState era -> ChainState era -> Bool #

(/=) :: ChainState era -> ChainState era -> Bool #

ShelleyBased era => Show (ChainState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Methods

showsPrec :: Int -> ChainState era -> ShowS #

show :: ChainState era -> String #

showList :: [ChainState era] -> ShowS #

Generic (ChainState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Associated Types

type Rep (ChainState era) :: Type -> Type #

Methods

from :: ChainState era -> Rep (ChainState era) x #

to :: Rep (ChainState era) x -> ChainState era #

Era era => NFData (ChainState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Methods

rnf :: ChainState era -> () #

type Rep (ChainState era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Rep (ChainState era) = D1 ('MetaData "ChainState" "Shelley.Spec.Ledger.STS.Chain" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "ChainState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "chainNes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NewEpochState era)) :*: (S1 ('MetaSel ('Just "chainOCertIssue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map (KeyHash 'BlockIssuer (Crypto era)) Word64)) :*: S1 ('MetaSel ('Just "chainEpochNonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce))) :*: ((S1 ('MetaSel ('Just "chainEvolvingNonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce) :*: S1 ('MetaSel ('Just "chainCandidateNonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce)) :*: (S1 ('MetaSel ('Just "chainPrevEpochNonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce) :*: S1 ('MetaSel ('Just "chainLastAppliedBlock") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithOrigin (LastAppliedBlock (Crypto era))))))))

data ChainPredicateFailure era Source #

Instances

Instances details
(ShelleyBased era, Eq (PredicateFailure (BBODY era))) => Eq (ChainPredicateFailure era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

(ShelleyBased era, Show (PredicateFailure (BBODY era))) => Show (ChainPredicateFailure era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Generic (ChainPredicateFailure era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Associated Types

type Rep (ChainPredicateFailure era) :: Type -> Type #

(ShelleyBased era, NoThunks (PredicateFailure (BBODY era))) => NoThunks (ChainPredicateFailure era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Rep (ChainPredicateFailure era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Rep (ChainPredicateFailure era) = D1 ('MetaData "ChainPredicateFailure" "Shelley.Spec.Ledger.STS.Chain" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (((C1 ('MetaCons "HeaderSizeTooLargeCHAIN" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural)) :+: C1 ('MetaCons "BlockSizeTooLargeCHAIN" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural))) :+: (C1 ('MetaCons "ObsoleteNodeCHAIN" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural)) :+: C1 ('MetaCons "BbodyFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PredicateFailure (BBODY era)))))) :+: ((C1 ('MetaCons "TickFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PredicateFailure (TICK era)))) :+: C1 ('MetaCons "TicknFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PredicateFailure TICKN)))) :+: (C1 ('MetaCons "PrtclFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PredicateFailure (PRTCL (Crypto era))))) :+: C1 ('MetaCons "PrtclSeqFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PrtlSeqFailure (Crypto era)))))))

type family PredicateFailure a = (b :: Type) | b -> a Source #

Descriptive type for the possible failures which might cause a transition to fail.

As a convention, PredicateFailures which are "structural" (meaning that they are not "throwable" in practice, and are used to pass control from one transition rule to another) are prefixed with S_.

Structural PredicateFailures represent conditions between rules where the disjunction of all rules' preconditions is equal to True. That is, either one rule will throw a structural PredicateFailure and the other will succeed, or vice-versa.

Instances

Instances details
type PredicateFailure TICKN Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Tickn

type PredicateFailure (UPDN crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Updn

type PredicateFailure (SNAP era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Snap

type PredicateFailure (RUPD era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Rupd

type PredicateFailure (PPUP era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Ppup

type PredicateFailure (UTXO (ShelleyEra c)) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Utxo

type PredicateFailure (UTXOW (ShelleyEra c)) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Utxow

type PredicateFailure (POOLREAP era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.PoolReap

type PredicateFailure (POOL era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Pool

type PredicateFailure (NEWPP era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Newpp

type PredicateFailure (MIR era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Mir

type PredicateFailure (EPOCH era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Epoch

type PredicateFailure (NEWEPOCH era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.NewEpoch

type PredicateFailure (TICKF era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Tick

type PredicateFailure (TICK era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Tick

type PredicateFailure (DELEG era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Deleg

type PredicateFailure (DELPL era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Delpl

type PredicateFailure (DELEGS era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Delegs

type PredicateFailure (LEDGER era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Ledger

type PredicateFailure (LEDGERS era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Ledgers

type PredicateFailure (OCERT crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Ocert

type PredicateFailure (OVERLAY crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Overlay

type PredicateFailure (PRTCL crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Prtcl

type PredicateFailure (BBODY era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Bbody

type PredicateFailure (CHAIN era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

initialShelleyState :: WithOrigin (LastAppliedBlock (Crypto era)) -> EpochNo -> UTxO era -> Coin -> Map (KeyHash 'Genesis (Crypto era)) (GenDelegPair (Crypto era)) -> PParams era -> Nonce -> ChainState era Source #

Creates a valid initial chain state

totalAda :: ShelleyBased era => ChainState era -> Coin Source #

Calculate the total ada in the chain state

totalAdaES :: ShelleyBased era => EpochState era -> Coin Source #

Calculate the total ada in the epoch state

totalAdaPots :: ShelleyBased era => ChainState era -> AdaPots Source #

Calculate the total ada pots in the chain state

data ChainChecksData Source #

Instances

Instances details
Eq ChainChecksData Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Show ChainChecksData Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Generic ChainChecksData Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

Associated Types

type Rep ChainChecksData :: Type -> Type #

NoThunks ChainChecksData Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Rep ChainChecksData Source # 
Instance details

Defined in Shelley.Spec.Ledger.STS.Chain

type Rep ChainChecksData = D1 ('MetaData "ChainChecksData" "Shelley.Spec.Ledger.STS.Chain" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "ChainChecksData" 'PrefixI 'True) (S1 ('MetaSel ('Just "ccMaxBHSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "ccMaxBBSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "ccProtocolVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ProtVer))))