cardano-ledger-shelley-1.15.0.0: Shelley Ledger Executable Model
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Shelley.API.Validation

Description

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

Documentation

class (STS (EraRule "TICK" era), BaseM (EraRule "TICK" era) ~ ShelleyBase, Environment (EraRule "TICK" era) ~ (), State (EraRule "TICK" era) ~ NewEpochState era, Signal (EraRule "TICK" era) ~ SlotNo, STS (EraRule "BBODY" era), BaseM (EraRule "BBODY" era) ~ ShelleyBase, Environment (EraRule "BBODY" era) ~ BbodyEnv era, State (EraRule "BBODY" era) ~ ShelleyBbodyState era, Signal (EraRule "BBODY" era) ~ Block (BHeaderView (EraCrypto era)) era, EncCBORGroup (TxSeq era), State (EraRule "LEDGERS" era) ~ LedgerState era) ⇒ ApplyBlock era where Source #

Minimal complete definition

Nothing

Methods

applyTickOptsApplySTSOpts ep → GlobalsNewEpochState era → SlotNoEventReturnType ep (EraRule "TICK" era) (NewEpochState 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.

applyBlockOpts ∷ ∀ ep m. (EventReturnTypeRep ep, MonadError (BlockTransitionError era) m) ⇒ ApplySTSOpts ep → GlobalsNewEpochState era → Block (BHeaderView (EraCrypto era)) era → m (EventReturnType ep (EraRule "BBODY" era) (NewEpochState era)) Source #

Apply the block level ledger transition.

default applyBlockOpts ∷ ∀ ep m. (EventReturnTypeRep ep, MonadError (BlockTransitionError era) m, EraGov era) ⇒ ApplySTSOpts ep → GlobalsNewEpochState era → Block (BHeaderView (EraCrypto era)) era → m (EventReturnType ep (EraRule "BBODY" era) (NewEpochState era)) Source #

reapplyBlockGlobalsNewEpochState era → Block (BHeaderView (EraCrypto era)) 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 reapplyBlockEraGov era ⇒ GlobalsNewEpochState era → Block (BHeaderView (EraCrypto era)) era → NewEpochState era Source #

newtype TickTransitionError era Source #

Constructors

TickTransitionError (NonEmpty (PredicateFailure (EraRule "TICK" era))) 

Instances

Instances details
Generic (TickTransitionError era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.API.Validation

Associated Types

type Rep (TickTransitionError era) ∷ TypeType Source #

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

Defined in Cardano.Ledger.Shelley.API.Validation

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

Defined in Cardano.Ledger.Shelley.API.Validation

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

Defined in Cardano.Ledger.Shelley.API.Validation

type Rep (TickTransitionError era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.API.Validation

type Rep (TickTransitionError era) = D1 ('MetaData "TickTransitionError" "Cardano.Ledger.Shelley.API.Validation" "cardano-ledger-shelley-1.15.0.0-inplace" 'True) (C1 ('MetaCons "TickTransitionError" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (PredicateFailure (EraRule "TICK" era))))))

newtype BlockTransitionError era Source #

Constructors

BlockTransitionError (NonEmpty (PredicateFailure (EraRule "BBODY" era))) 

Instances

Instances details
Generic (BlockTransitionError era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.API.Validation

Associated Types

type Rep (BlockTransitionError era) ∷ TypeType Source #

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

Defined in Cardano.Ledger.Shelley.API.Validation

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

Defined in Cardano.Ledger.Shelley.API.Validation

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

Defined in Cardano.Ledger.Shelley.API.Validation

type Rep (BlockTransitionError era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.API.Validation

type Rep (BlockTransitionError era) = D1 ('MetaData "BlockTransitionError" "Cardano.Ledger.Shelley.API.Validation" "cardano-ledger-shelley-1.15.0.0-inplace" 'True) (C1 ('MetaCons "BlockTransitionError" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty (PredicateFailure (EraRule "BBODY" era))))))

chainChecks Source #

Arguments

∷ ∀ c m. MonadError ChainPredicateFailure m 
Version

Max major protocol version

ChainChecksPParams 
BHeaderView c 
→ m ()