shelley-spec-ledger-0.1.0.0
Safe HaskellNone
LanguageHaskell98

Shelley.Spec.Ledger.API.Validation

Description

Interface to the block validation and chain extension logic in the Shelley API.

Documentation

class (ChainData (Block era), AnnotatedData (Block era), ChainData (BHeader (Crypto era)), AnnotatedData (BHeader (Crypto era)), ChainData (NewEpochState era), SerialisableData (NewEpochState era), ChainData (BlockTransitionError era), ChainData (PredicateFailure (CHAIN era))) ⇒ ApplyBlock era where Source #

Minimal complete definition

Nothing

Methods

applyTickGlobalsNewEpochState era → SlotNoNewEpochState era Source #

Apply the header level ledger transition.

This handles checks and updates that happen on a slot tick, as well as a few header level checks, such as size constraints.

default applyTickShelleyBased era ⇒ GlobalsNewEpochState era → SlotNoNewEpochState era Source #

applyBlockMonadError (BlockTransitionError era) m ⇒ GlobalsNewEpochState era → Block era → m (NewEpochState era) Source #

Apply the block level ledger transition.

default applyBlock ∷ (STS (BBODY era), MonadError (BlockTransitionError era) m) ⇒ GlobalsNewEpochState era → Block era → m (NewEpochState era) Source #

reapplyBlockGlobalsNewEpochState era → Block era → NewEpochState era Source #

Re-apply a ledger block to the same state it has been applied to before.

This function does no validation of whether the block applies successfully; the caller implicitly guarantees that they have previously called applyBlockTransition on the same block and that this was successful.

default reapplyBlockSTS (BBODY era) ⇒ GlobalsNewEpochState era → Block era → NewEpochState era Source #

Instances

Instances details
PraosCrypto crypto ⇒ ApplyBlock (ShelleyEra crypto) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

newtype TickTransitionError era Source #

Instances

Instances details
Eq (PredicateFailure (TICK era)) ⇒ Eq (TickTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Show (PredicateFailure (TICK era)) ⇒ Show (TickTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Generic (TickTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Associated Types

type Rep (TickTransitionError era) ∷ TypeType #

NoThunks (PredicateFailure (TICK era)) ⇒ NoThunks (TickTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Methods

noThunks ∷ Context → TickTransitionError era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → TickTransitionError era → IO (Maybe ThunkInfo)

showTypeOfProxy (TickTransitionError era) → String

type Rep (TickTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

type Rep (TickTransitionError era) = D1 ('MetaData "TickTransitionError" "Shelley.Spec.Ledger.API.Validation" "shelley-spec-ledger-0.1.0.0-inplace" 'True) (C1 ('MetaCons "TickTransitionError" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PredicateFailure (TICK era)])))

newtype BlockTransitionError era Source #

Instances

Instances details
Eq (PredicateFailure (BBODY era)) ⇒ Eq (BlockTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Show (PredicateFailure (BBODY era)) ⇒ Show (BlockTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Generic (BlockTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Associated Types

type Rep (BlockTransitionError era) ∷ TypeType #

NoThunks (PredicateFailure (BBODY era)) ⇒ NoThunks (BlockTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

Methods

noThunks ∷ Context → BlockTransitionError era → IO (Maybe ThunkInfo)

wNoThunks ∷ Context → BlockTransitionError era → IO (Maybe ThunkInfo)

showTypeOfProxy (BlockTransitionError era) → String

type Rep (BlockTransitionError era) Source # 
Instance details

Defined in Shelley.Spec.Ledger.API.Validation

type Rep (BlockTransitionError era) = D1 ('MetaData "BlockTransitionError" "Shelley.Spec.Ledger.API.Validation" "shelley-spec-ledger-0.1.0.0-inplace" 'True) (C1 ('MetaCons "BlockTransitionError" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [PredicateFailure (BBODY era)])))

chainChecks ∷ ∀ era m. (Era era, MonadError (PredicateFailure (CHAIN era)) m) ⇒ GlobalsChainChecksDataBHeader (Crypto era) → m () Source #