| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Shelley.Spec.Ledger.STS.Prtcl
Synopsis
- data PRTCL crypto
- type family State a
- data PrtclEnv crypto = PrtclEnv UnitInterval (PoolDistr crypto) (GenDelegs crypto) Nonce
- data PrtclState crypto = PrtclState !(Map (KeyHash 'BlockIssuer crypto) Word64) !Nonce !Nonce
- data PrtclPredicateFailure crypto
- = OverlayFailure (PredicateFailure (OVERLAY crypto))
- | UpdnFailure (PredicateFailure (UPDN crypto))
- type family PredicateFailure a = (b :: Type) | b -> a
- data PrtlSeqFailure crypto
- = WrongSlotIntervalPrtclSeq SlotNo SlotNo
- | WrongBlockNoPrtclSeq (WithOrigin (LastAppliedBlock crypto)) BlockNo
- | WrongBlockSequencePrtclSeq (PrevHash crypto) (PrevHash crypto)
- prtlSeqChecks :: (MonadError (PrtlSeqFailure crypto) m, Crypto crypto) => WithOrigin (LastAppliedBlock crypto) -> BHeader crypto -> m ()
Documentation
Instances
Type of the state which the system transitions between.
Instances
Constructors
| PrtclEnv UnitInterval (PoolDistr crypto) (GenDelegs crypto) Nonce |
Instances
| Generic (PrtclEnv crypto) Source # | |
| NoThunks (PrtclEnv crypto) Source # | |
| type Rep (PrtclEnv crypto) Source # | |
Defined in Shelley.Spec.Ledger.STS.Prtcl type Rep (PrtclEnv crypto) = D1 ('MetaData "PrtclEnv" "Shelley.Spec.Ledger.STS.Prtcl" "shelley-spec-ledger-0.1.0.0-Is3EknyvW92LxCl96jGQVW" 'False) (C1 ('MetaCons "PrtclEnv" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UnitInterval) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PoolDistr crypto))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenDelegs crypto)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nonce)))) | |
data PrtclState crypto Source #
Constructors
| PrtclState | |
Instances
data PrtclPredicateFailure crypto Source #
Constructors
| OverlayFailure (PredicateFailure (OVERLAY crypto)) | |
| UpdnFailure (PredicateFailure (UPDN crypto)) |
Instances
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
data PrtlSeqFailure crypto Source #
Constructors
| WrongSlotIntervalPrtclSeq | |
| WrongBlockNoPrtclSeq | |
Fields
| |
| WrongBlockSequencePrtclSeq | |
Instances
prtlSeqChecks :: (MonadError (PrtlSeqFailure crypto) m, Crypto crypto) => WithOrigin (LastAppliedBlock crypto) -> BHeader crypto -> m () Source #