| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Chain.Delegation.Validation.Scheduling
Contents
Synopsis
- data Environment = Environment {}
- data State = State {}
- data Error
- data ScheduledDelegation = ScheduledDelegation {}
- scheduleCertificate ∷ MonadError Error m ⇒ Environment → State → ACertificate ByteString → m State
Scheduling
data Environment Source #
Constructors
| Environment | |
Fields | |
Instances
Constructors
| State | |
Fields | |
Instances
| FromCBOR State Source # | |||||
| ToCBOR State Source # | |||||
| DecCBOR State Source # | |||||
| EncCBOR State Source # | |||||
| NFData State Source # | |||||
| Generic State Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Associated Types
| |||||
| Show State Source # | |||||
| Eq State Source # | |||||
| NoThunks State Source # | |||||
| type Rep State Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling type Rep State = D1 ('MetaData "State" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.3.0.0-inplace" 'False) (C1 ('MetaCons "State" 'PrefixI 'True) (S1 ('MetaSel ('Just "scheduledDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Seq ScheduledDelegation)) :*: S1 ('MetaSel ('Just "keyEpochDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (EpochNumber, KeyHash))))) | |||||
Constructors
| InvalidCertificate | The delegation certificate has an invalid signature |
| MultipleDelegationsForEpoch EpochNumber KeyHash | This delegator has already delegated for the given epoch |
| MultipleDelegationsForSlot SlotNumber KeyHash | This delegator has already delgated in this slot |
| NonGenesisDelegator KeyHash | This delegator is not one of the allowed genesis keys |
| WrongEpoch EpochNumber EpochNumber | This delegation is for a past or for a too future epoch |
data ScheduledDelegation Source #
Constructors
| ScheduledDelegation | |
Fields
| |
Instances
| FromCBOR ScheduledDelegation Source # | |||||
| ToCBOR ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods toCBOR ∷ ScheduledDelegation → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ScheduledDelegation → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ScheduledDelegation] → Size Source # | |||||
| DecCBOR ScheduledDelegation Source # | |||||
| EncCBOR ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods | |||||
| NFData ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods rnf ∷ ScheduledDelegation → () # | |||||
| Generic ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Associated Types
Methods | |||||
| Show ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods showsPrec ∷ Int → ScheduledDelegation → ShowS # show ∷ ScheduledDelegation → String # showList ∷ [ScheduledDelegation] → ShowS # | |||||
| Eq ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods | |||||
| NoThunks ScheduledDelegation Source # | |||||
| type Rep ScheduledDelegation Source # | |||||
Defined in Cardano.Chain.Delegation.Validation.Scheduling type Rep ScheduledDelegation = D1 ('MetaData "ScheduledDelegation" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.3.0.0-inplace" 'False) (C1 ('MetaCons "ScheduledDelegation" 'PrefixI 'True) (S1 ('MetaSel ('Just "sdSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNumber) :*: (S1 ('MetaSel ('Just "sdDelegator") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KeyHash) :*: S1 ('MetaSel ('Just "sdDelegate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KeyHash)))) | |||||
scheduleCertificate ∷ MonadError Error m ⇒ Environment → State → ACertificate ByteString → m State Source #
Update the delegation State with a Certificate if it passes
all the validation rules. This is an implementation of the delegation
scheduling inference rule from the ledger specification.