cardano-ledger-byron-1.0.2.0: The blockchain layer of Cardano during the Byron era
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Chain.Delegation.Validation.Scheduling

Contents

Synopsis

Scheduling

data Environment Source #

Instances

Instances details
Generic Environment Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Associated Types

type Rep EnvironmentTypeType Source #

Show Environment Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

NFData Environment Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

rnfEnvironment → () Source #

Eq Environment Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

type Rep Environment Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

type Rep Environment = D1 ('MetaData "Environment" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "Environment" 'PrefixI 'True) ((S1 ('MetaSel ('Just "protocolMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Annotated ProtocolMagicId ByteString)) :*: S1 ('MetaSel ('Just "allowedDelegators") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set KeyHash))) :*: (S1 ('MetaSel ('Just "currentEpoch") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNumber) :*: (S1 ('MetaSel ('Just "currentSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNumber) :*: S1 ('MetaSel ('Just "k") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockCount)))))

data State Source #

Instances

Instances details
Generic State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Associated Types

type Rep StateTypeType Source #

Methods

fromStateRep State x Source #

toRep State x → State Source #

Show State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

FromCBOR State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

ToCBOR State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

toCBORStateEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy StateSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [State] → Size Source #

DecCBOR State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

EncCBOR State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

encCBORStateEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy StateSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [State] → Size Source #

NFData State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

rnfState → () Source #

Eq State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

(==)StateStateBool Source #

(/=)StateStateBool Source #

NoThunks State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

type Rep State Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

type Rep State = D1 ('MetaData "State" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.0.2.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)))))

data Error Source #

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

Instances

Instances details
Show Error Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

FromCBOR Error Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

ToCBOR Error Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

toCBORErrorEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ErrorSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Error] → Size Source #

DecCBOR Error Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

EncCBOR Error Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

encCBORErrorEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ErrorSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Error] → Size Source #

Eq Error Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

(==)ErrorErrorBool Source #

(/=)ErrorErrorBool Source #

data ScheduledDelegation Source #

Instances

Instances details
Generic ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Associated Types

type Rep ScheduledDelegationTypeType Source #

Show ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

FromCBOR ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

ToCBOR ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

DecCBOR ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

EncCBOR ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

NFData ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

Methods

rnfScheduledDelegation → () Source #

Eq ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

NoThunks ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

type Rep ScheduledDelegation Source # 
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

type Rep ScheduledDelegation = D1 ('MetaData "ScheduledDelegation" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.0.2.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))))

scheduleCertificateMonadError Error m ⇒ EnvironmentStateACertificate 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.