Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Protocol.TPraos.Rules.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
-
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 Cardano.Protocol.TPraos.Rules.Prtcl
type
Rep
(
PrtclEnv
crypto) =
D1
('
MetaData
"PrtclEnv" "Cardano.Protocol.TPraos.Rules.Prtcl" "cardano-protocol-tpraos-0.1.0.0-La5Cvz4HrqgBuFHns9l3Vn" '
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 Source #
Descriptive type for the possible failures which might cause a transition to fail.
As a convention,
PredicateFailure
s 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
PredicateFailure
s 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 #