Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Specs necessary to generate, environment, state, and signal for the CERT rule
Synopsis
- certEnvSpec ∷ ∀ fn era. (EraSpecPParams era, IsConwayUniv fn) ⇒ WitUniv era → Specification fn (CertEnv era)
- delegateeSpec ∷ (IsConwayUniv fn, Era era) ⇒ WitUniv era → Specification fn (Set (Credential 'DRepRole))
- certStateSpec ∷ ∀ fn era. (IsConwayUniv fn, EraSpecDeleg era, Era era) ⇒ WitUniv era → Set (Credential 'DRepRole) → Map RewardAccount Coin → Specification fn (CertState era)
- conwayTxCertSpec ∷ ∀ fn era. (IsConwayUniv fn, era ~ ConwayEra) ⇒ WitUniv era → CertEnv era → CertState era → Specification fn (ConwayTxCert era)
- genesisDelegCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, IsConwayUniv fn, Era era) ⇒ DState era → Specification fn GenesisDelegCert
- computeSets ∷ DState era → (KeyHash 'Genesis → Set (VRFVerKeyHash 'GenDelegVRF), KeyHash 'Genesis → Set (KeyHash 'GenesisDelegate))
- shelleyTxCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, EraSpecPParams era, IsConwayUniv fn) ⇒ WitUniv era → CertEnv era → CertState era → Specification fn (ShelleyTxCert era)
- class (IsConwayUniv fn, HasSpec fn (TxCert era), Era era) ⇒ EraSpecCert era fn where
- txCertSpec ∷ WitUniv era → CertEnv era → CertState era → Specification fn (TxCert era)
- txCertKey ∷ TxCert era → CertKey
- data CertKey
- = StakeKey !(Credential 'Staking)
- | PoolKey !(KeyHash 'StakePool)
- | DRepKey !(Credential 'DRepRole)
- | ColdKey !(Credential 'ColdCommitteeRole)
- | GenesisKey !(KeyHash 'Genesis)
- | MirKey !MIRPot
- conwayTxCertKey ∷ ConwayTxCert era → CertKey
- shelleyTxCertKey ∷ ShelleyTxCert era → CertKey
- testGenesisCert ∷ ∀ era. (AtMostEra BabbageEra era, EraSpecDeleg era, EraSpecPParams era, GenScript era) ⇒ Gen Property
- testShelleyCert ∷ ∀ era. (Era era, AtMostEra BabbageEra era, EraSpecPParams era, EraSpecDeleg era, GenScript era) ⇒ Gen Property
- testConwayCert ∷ Gen Property
Documentation
certEnvSpec ∷ ∀ fn era. (EraSpecPParams era, IsConwayUniv fn) ⇒ WitUniv era → Specification fn (CertEnv era) Source #
delegateeSpec ∷ (IsConwayUniv fn, Era era) ⇒ WitUniv era → Specification fn (Set (Credential 'DRepRole)) Source #
certStateSpec ∷ ∀ fn era. (IsConwayUniv fn, EraSpecDeleg era, Era era) ⇒ WitUniv era → Set (Credential 'DRepRole) → Map RewardAccount Coin → Specification fn (CertState era) Source #
conwayTxCertSpec ∷ ∀ fn era. (IsConwayUniv fn, era ~ ConwayEra) ⇒ WitUniv era → CertEnv era → CertState era → Specification fn (ConwayTxCert era) Source #
genesisDelegCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, IsConwayUniv fn, Era era) ⇒ DState era → Specification fn GenesisDelegCert Source #
Genesis delegations only work through the Babbage era. Hence the (AtMostEra BabbageEra era)
computeSets ∷ DState era → (KeyHash 'Genesis → Set (VRFVerKeyHash 'GenDelegVRF), KeyHash 'Genesis → Set (KeyHash 'GenesisDelegate)) Source #
Compute 2 functions from the DState. Each function, given a KeyHash,
returns a Set of Hashes
, we expect certain things to be in those sets.
This mimics what happens in the Cardano.Ledger.Shelley.Rules.Deleg module
shelleyTxCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, EraSpecPParams era, IsConwayUniv fn) ⇒ WitUniv era → CertEnv era → CertState era → Specification fn (ShelleyTxCert era) Source #
class (IsConwayUniv fn, HasSpec fn (TxCert era), Era era) ⇒ EraSpecCert era fn where Source #
txCertSpec ∷ WitUniv era → CertEnv era → CertState era → Specification fn (TxCert era) Source #
Instances
IsConwayUniv fn ⇒ EraSpecCert AllegraEra fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert AlonzoEra fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert BabbageEra fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert ConwayEra fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert MaryEra fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert ShelleyEra fn Source # | |
Used to aggregate the key used in registering a Certificate. Different certificates use different kinds of Keys, that allows us to use one type to represent all kinds of keys (Similar to DepositPurpose)
StakeKey !(Credential 'Staking) | |
PoolKey !(KeyHash 'StakePool) | |
DRepKey !(Credential 'DRepRole) | |
ColdKey !(Credential 'ColdCommitteeRole) | |
GenesisKey !(KeyHash 'Genesis) | |
MirKey !MIRPot |
conwayTxCertKey ∷ ConwayTxCert era → CertKey Source #
Compute the aggregate key type of a Certificater
shelleyTxCertKey ∷ ShelleyTxCert era → CertKey Source #
testGenesisCert ∷ ∀ era. (AtMostEra BabbageEra era, EraSpecDeleg era, EraSpecPParams era, GenScript era) ⇒ Gen Property Source #
testShelleyCert ∷ ∀ era. (Era era, AtMostEra BabbageEra era, EraSpecPParams era, EraSpecDeleg era, GenScript era) ⇒ Gen Property Source #