Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Environment = Environment {}
- data State = State {}
- activateDelegations ∷ SlotNumber → State → State
- delegates ∷ State → VerificationKey → VerificationKey → Bool
- delegationMap ∷ State → Map
- initialState ∷ MonadError Error m ⇒ Environment → GenesisDelegation → m State
- tickDelegation ∷ EpochNumber → SlotNumber → State → State
- updateDelegation ∷ MonadError Error m ⇒ Environment → State → [ACertificate ByteString] → m State
Blockchain Interface
data Environment Source #
Instances
State shared between the blockchain and the ledger
Instances
Generic State Source # | |
Show State Source # | |
FromCBOR State Source # | |
ToCBOR State Source # | |
DecCBOR State Source # | |
EncCBOR State Source # | |
NFData State Source # | |
Eq State Source # | |
NoThunks State Source # | |
type Rep State Source # | |
Defined in Cardano.Chain.Delegation.Validation.Interface type Rep State = D1 ('MetaData "State" "Cardano.Chain.Delegation.Validation.Interface" "cardano-ledger-byron-1.0.2.0-inplace" 'False) (C1 ('MetaCons "State" 'PrefixI 'True) (S1 ('MetaSel ('Just "schedulingState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 State) :*: S1 ('MetaSel ('Just "activationState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 State))) |
activateDelegations ∷ SlotNumber → State → State Source #
Activate certificates up to this slot
delegates ∷ State → VerificationKey → VerificationKey → Bool Source #
Check whether a delegation is valid in the State
delegationMap ∷ State → Map Source #
initialState ∷ MonadError Error m ⇒ Environment → GenesisDelegation → m State Source #
The initial state maps each genesis key to itself and overrides this using certificates from the genesis block.
tickDelegation ∷ EpochNumber → SlotNumber → State → State Source #
Perform delegation update without adding certificates
updateDelegation ∷ MonadError Error m ⇒ Environment → State → [ACertificate ByteString] → m State Source #
Update the State
with a list of new Certificate
s
This corresponds to the DELEG
rule from the Byron ledger specification