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) ⇒ Specification fn (CertEnv era)
- certStateSpec ∷ (IsConwayUniv fn, EraSpecDeleg era) ⇒ Term fn (Set (Credential 'DRepRole (EraCrypto era))) → Specification fn (CertState era)
- certStateSpecEx ∷ (IsConwayUniv fn, EraSpecDeleg era) ⇒ Specification fn (CertState era)
- conwayTxCertSpec ∷ IsConwayUniv fn ⇒ CertEnv (ConwayEra StandardCrypto) → CertState (ConwayEra StandardCrypto) → Specification fn (ConwayTxCert (ConwayEra StandardCrypto))
- genesisDelegCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, IsConwayUniv fn, Era era) ⇒ DState era → Specification fn (GenesisDelegCert (EraCrypto era))
- computeSets ∷ DState era → (KeyHash 'Genesis (EraCrypto era) → Set (VRFVerKeyHash 'GenDelegVRF (EraCrypto era)), KeyHash 'Genesis (EraCrypto era) → Set (KeyHash 'GenesisDelegate (EraCrypto era)))
- shelleyTxCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, EraSpecPParams era, IsConwayUniv fn) ⇒ CertEnv era → CertState era → Specification fn (ShelleyTxCert era)
- class (Era era, IsConwayUniv fn, HasSpec fn (TxCert era)) ⇒ EraSpecCert era fn where
- txCertSpec ∷ CertEnv era → CertState era → Specification fn (TxCert era)
- txCertKey ∷ TxCert era → CertKey (EraCrypto era)
- data CertKey c
- = StakeKey !(Credential 'Staking c)
- | PoolKey !(KeyHash 'StakePool c)
- | DRepKey !(Credential 'DRepRole c)
- | ColdKey !(Credential 'ColdCommitteeRole c)
- | GenesisKey !(KeyHash 'Genesis c)
- | MirKey !MIRPot
- conwayTxCertKey ∷ ConwayTxCert era → CertKey (EraCrypto era)
- shelleyTxCertKey ∷ ShelleyTxCert era → CertKey (EraCrypto era)
- testGenesisCert ∷ ∀ era. (AtMostEra BabbageEra era, EraSpecDeleg era, EraSpecPParams era) ⇒ Gen Property
- testShelleyCert ∷ ∀ era. (AtMostEra BabbageEra era, EraSpecPParams era, EraSpecDeleg era) ⇒ Gen Property
- testConwayCert ∷ Gen Property
Documentation
certEnvSpec ∷ ∀ fn era. (EraSpecPParams era, IsConwayUniv fn) ⇒ Specification fn (CertEnv era) Source #
certStateSpec ∷ (IsConwayUniv fn, EraSpecDeleg era) ⇒ Term fn (Set (Credential 'DRepRole (EraCrypto era))) → Specification fn (CertState era) Source #
certStateSpecEx ∷ (IsConwayUniv fn, EraSpecDeleg era) ⇒ Specification fn (CertState era) Source #
conwayTxCertSpec ∷ IsConwayUniv fn ⇒ CertEnv (ConwayEra StandardCrypto) → CertState (ConwayEra StandardCrypto) → Specification fn (ConwayTxCert (ConwayEra StandardCrypto)) Source #
genesisDelegCertSpec ∷ ∀ fn era. (AtMostEra BabbageEra era, IsConwayUniv fn, Era era) ⇒ DState era → Specification fn (GenesisDelegCert (EraCrypto era)) Source #
Genesis delegations only work through the Babbage era. Hence the (AtMostEra BabbageEra era)
computeSets ∷ DState era → (KeyHash 'Genesis (EraCrypto era) → Set (VRFVerKeyHash 'GenDelegVRF (EraCrypto era)), KeyHash 'Genesis (EraCrypto era) → Set (KeyHash 'GenesisDelegate (EraCrypto era))) 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) ⇒ CertEnv era → CertState era → Specification fn (ShelleyTxCert era) Source #
class (Era era, IsConwayUniv fn, HasSpec fn (TxCert era)) ⇒ EraSpecCert era fn where Source #
txCertSpec ∷ CertEnv era → CertState era → Specification fn (TxCert era) Source #
Instances
IsConwayUniv fn ⇒ EraSpecCert Allegra fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert Alonzo fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert Babbage fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert Conway fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert Mary fn Source # | |
IsConwayUniv fn ⇒ EraSpecCert Shelley 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 c) | |
PoolKey !(KeyHash 'StakePool c) | |
DRepKey !(Credential 'DRepRole c) | |
ColdKey !(Credential 'ColdCommitteeRole c) | |
GenesisKey !(KeyHash 'Genesis c) | |
MirKey !MIRPot |
Instances
Show (CertKey c) Source # | |
Eq (CertKey c) Source # | |
Ord (CertKey c) Source # | |
Defined in Test.Cardano.Ledger.Constrained.Conway.Cert |
conwayTxCertKey ∷ ConwayTxCert era → CertKey (EraCrypto era) Source #
Compute the aggregate key type of a Certificater
shelleyTxCertKey ∷ ShelleyTxCert era → CertKey (EraCrypto era) Source #
testGenesisCert ∷ ∀ era. (AtMostEra BabbageEra era, EraSpecDeleg era, EraSpecPParams era) ⇒ Gen Property Source #
testShelleyCert ∷ ∀ era. (AtMostEra BabbageEra era, EraSpecPParams era, EraSpecDeleg era) ⇒ Gen Property Source #