Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- mkSeedFromWords ∷ RawSeed → Seed
- mkCertifiedVRF ∷ (Signable v a, VRFAlgorithm v, ContextVRF v ~ (), Coercible b (CertifiedVRF v a)) ⇒ a → SignKeyVRF v → b
- epochFromSlotNo ∷ SlotNo → EpochNo
- evolveKESUntil ∷ (UnsoundPureKESAlgorithm c, ContextKES c ~ ()) ⇒ UnsoundPureSignKeyKES c → KESPeriod → KESPeriod → Maybe (UnsoundPureSignKeyKES c)
- slotFromEpoch ∷ EpochNo → SlotNo
- epochSize ∷ EpochNo → EpochSize
- mkHash ∷ ∀ a h. HashAlgorithm h ⇒ Int → Hash h a
- mkKeyPair ∷ ∀ kd. RawSeed → (SignKeyDSIGN DSIGN, VKey kd)
- mkKeyPair' ∷ RawSeed → KeyPair kd
- mkGenKey ∷ RawSeed → (SignKeyDSIGN DSIGN, VKey kd)
- mkKESKeyPair ∷ Crypto c ⇒ RawSeed → KESKeyPair c
- mkVRFKeyPair ∷ Crypto c ⇒ RawSeed → VRFKeyPair c
- runShelleyBase ∷ ShelleyBase a → a
- maxKESIterations ∷ Word64
- slotsPerKESIteration ∷ Word64
- runSTS ∷ ∀ rule era. (BaseM (EraRule rule era) ~ ShelleyBase, STS (EraRule rule era)) ⇒ Globals → Environment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → Either (NonEmpty (PredicateFailure (EraRule rule era))) (State (EraRule rule era), [Event (EraRule rule era)])
- testSTS ∷ ∀ s. (BaseM s ~ ShelleyBase, STS s, Eq (State s), Show (State s), ToExpr (State s)) ⇒ Environment s → State s → Signal s → Either (NonEmpty (PredicateFailure s)) (State s) → Assertion
- maxLLSupply ∷ Coin
- applySTSTest ∷ ∀ s m (rtype ∷ RuleType). (STS s, RuleTypeRep rtype, m ~ BaseM s) ⇒ RuleContext rtype s → m (Either (NonEmpty (PredicateFailure s)) (State s))
- type GenesisKeyPair c = KeyPair 'Genesis
- getBlockNonce ∷ ∀ era. Block (BHeader MockCrypto) era → Nonce
- type ChainProperty era = (ApplyBlock era, GetLedgerView era, EraTx era)
- data RawSeed = RawSeed !Word64 !Word64 !Word64 !Word64 !Word64
- class Split v where
- module Test.Cardano.Ledger.Core.Utils
Documentation
mkSeedFromWords ∷ RawSeed → Seed Source #
Construct a seed from a bunch of Word64s
We multiply these words by some extra stuff to make sure they contain enough bits for our seed.
mkCertifiedVRF ∷ (Signable v a, VRFAlgorithm v, ContextVRF v ~ (), Coercible b (CertifiedVRF v a)) ⇒ a → SignKeyVRF v → b Source #
For testing purposes, create a VRF value
∷ (UnsoundPureKESAlgorithm c, ContextKES c ~ ()) | |
⇒ UnsoundPureSignKeyKES c | |
→ KESPeriod | Current KES period |
→ KESPeriod | Target KES period |
→ Maybe (UnsoundPureSignKeyKES c) |
Try to evolve KES key until specific KES period is reached, given the current KES period.
mkKeyPair ∷ ∀ kd. RawSeed → (SignKeyDSIGN DSIGN, VKey kd) Source #
For testing purposes, generate a deterministic key pair given a seed.
mkKeyPair' ∷ RawSeed → KeyPair kd Source #
For testing purposes, generate a deterministic key pair given a seed.
mkGenKey ∷ RawSeed → (SignKeyDSIGN DSIGN, VKey kd) Source #
For testing purposes, generate a deterministic genesis key pair given a seed.
mkKESKeyPair ∷ Crypto c ⇒ RawSeed → KESKeyPair c Source #
For testing purposes, generate a deterministic KES key pair given a seed.
mkVRFKeyPair ∷ Crypto c ⇒ RawSeed → VRFKeyPair c Source #
For testing purposes, generate a deterministic VRF key pair given a seed.
runShelleyBase ∷ ShelleyBase a → a Source #
runSTS ∷ ∀ rule era. (BaseM (EraRule rule era) ~ ShelleyBase, STS (EraRule rule era)) ⇒ Globals → Environment (EraRule rule era) → State (EraRule rule era) → Signal (EraRule rule era) → Either (NonEmpty (PredicateFailure (EraRule rule era))) (State (EraRule rule era), [Event (EraRule rule era)]) Source #
testSTS ∷ ∀ s. (BaseM s ~ ShelleyBase, STS s, Eq (State s), Show (State s), ToExpr (State s)) ⇒ Environment s → State s → Signal s → Either (NonEmpty (PredicateFailure s)) (State s) → Assertion Source #
applySTSTest ∷ ∀ s m (rtype ∷ RuleType). (STS s, RuleTypeRep rtype, m ~ BaseM s) ⇒ RuleContext rtype s → m (Either (NonEmpty (PredicateFailure s)) (State s)) Source #
Apply STS checking assertions.
type GenesisKeyPair c = KeyPair 'Genesis Source #
getBlockNonce ∷ ∀ era. Block (BHeader MockCrypto) era → Nonce Source #
type ChainProperty era = (ApplyBlock era, GetLedgerView era, EraTx era) Source #