Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data AllIssuerKeys c (r ∷ KeyRole) = AllIssuerKeys {
- aikCold ∷ KeyPair r
- aikVrf ∷ VRFKeyPair c
- aikHot ∷ NonEmpty (KESPeriod, KESKeyPair c)
- aikColdKeyHash ∷ KeyHash r
- data KESKeyPair c = KESKeyPair {
- kesSignKey ∷ !(UnsoundPureSignKeyKES (KES c))
- kesVerKey ∷ !(VerKeyKES (KES c))
- data VRFKeyPair c = VRFKeyPair {
- vrfSignKey ∷ !(SignKeyVRF (VRF c))
- vrfVerKey ∷ !(VerKeyVRF (VRF c))
- mkOCert ∷ ∀ c r. Crypto c ⇒ AllIssuerKeys c r → Word64 → KESPeriod → OCert c
- mkBHBody ∷ (ContextVRF (VRF c) ~ (), Signable (VRF c) Seed, VRFAlgorithm (VRF c)) ⇒ ProtVer → HashHeader → AllIssuerKeys c r → SlotNo → BlockNo → Nonce → OCert c → Word32 → Hash HASH EraIndependentBlockBody → BHBody c
- mkBHBodyFakeVRF ∷ (ContextVRF (VRF c) ~ (), Signable (VRF c) (WithResult Seed), VRFAlgorithm (VRF c)) ⇒ NatNonce → UnitInterval → ProtVer → HashHeader → AllIssuerKeys c r → SlotNo → BlockNo → Nonce → OCert c → Word32 → Hash HASH EraIndependentBlockBody → BHBody c
- mkBHeader ∷ (Crypto c, Signable (KES c) (BHBody c)) ⇒ AllIssuerKeys c r → Word → Word → BHBody c → BHeader c
- mkBlock ∷ ∀ era r c. (Crypto c, EraSegWits era, Signable (VRF c) Seed, Signable (KES c) (BHBody c)) ⇒ HashHeader → AllIssuerKeys c r → [Tx era] → SlotNo → BlockNo → Nonce → Word → Word → OCert c → Block (BHeader c) era
- mkBlockFakeVRF ∷ ∀ era r c. (Crypto c, EraSegWits era, Signable (VRF c) (WithResult Seed), Signable (KES c) (BHBody c)) ⇒ HashHeader → AllIssuerKeys c r → [Tx era] → SlotNo → BlockNo → Nonce → NatNonce → UnitInterval → Word → Word → OCert c → Block (BHeader c) era
- evolveKESUntil ∷ (UnsoundPureKESAlgorithm c, ContextKES c ~ ()) ⇒ UnsoundPureSignKeyKES c → KESPeriod → KESPeriod → Maybe (UnsoundPureSignKeyKES c)
Documentation
data AllIssuerKeys c (r ∷ KeyRole) Source #
AllIssuerKeys | |
|
Instances
(Show (SignKeyVRF (VRF c)), Show (VerKeyVRF (VRF c)), Show (VerKeyKES (KES c))) ⇒ Show (AllIssuerKeys c r) Source # | |
Defined in Test.Cardano.Protocol.TPraos.Create |
data KESKeyPair c Source #
KESKeyPair | |
|
Instances
Show (VerKeyKES (KES c)) ⇒ Show (KESKeyPair c) Source # | |
Defined in Test.Cardano.Protocol.Crypto.KES |
data VRFKeyPair c Source #
VRFKeyPair | |
|
Instances
(Show (SignKeyVRF (VRF c)), Show (VerKeyVRF (VRF c))) ⇒ Show (VRFKeyPair c) Source # | |
Defined in Test.Cardano.Protocol.Crypto.VRF |
mkBHBody ∷ (ContextVRF (VRF c) ~ (), Signable (VRF c) Seed, VRFAlgorithm (VRF c)) ⇒ ProtVer → HashHeader → AllIssuerKeys c r → SlotNo → BlockNo → Nonce → OCert c → Word32 → Hash HASH EraIndependentBlockBody → BHBody c Source #
mkBHBodyFakeVRF ∷ (ContextVRF (VRF c) ~ (), Signable (VRF c) (WithResult Seed), VRFAlgorithm (VRF c)) ⇒ NatNonce → UnitInterval → ProtVer → HashHeader → AllIssuerKeys c r → SlotNo → BlockNo → Nonce → OCert c → Word32 → Hash HASH EraIndependentBlockBody → BHBody c Source #
∷ ∀ era r c. (Crypto c, EraSegWits era, Signable (VRF c) Seed, Signable (KES c) (BHBody c)) | |
⇒ HashHeader | Hash of previous block |
→ AllIssuerKeys c r | All keys in the stake pool |
→ [Tx era] | Transactions to record |
→ SlotNo | Current slot |
→ BlockNo | Block numberchain lengthchain "difficulty" |
→ Nonce | EpochNo nonce |
→ Word | Period of KES (key evolving signature scheme) |
→ Word | KES period of key registration |
→ OCert c | Operational certificate |
→ Block (BHeader c) era |
∷ ∀ era r c. (Crypto c, EraSegWits era, Signable (VRF c) (WithResult Seed), Signable (KES c) (BHBody c)) | |
⇒ HashHeader | Hash of previous block |
→ AllIssuerKeys c r | All keys in the stake pool |
→ [Tx era] | Transactions to record |
→ SlotNo | Current slot |
→ BlockNo | Block number/chain length/chain "difficulty" |
→ Nonce | EpochNo nonce |
→ NatNonce | Block nonce |
→ UnitInterval | Praos leader value |
→ Word | Period of KES (key evolving signature scheme) |
→ Word | KES period of key registration |
→ OCert c | Operational certificate |
→ Block (BHeader c) era |
Create a block with a faked VRF result.
∷ (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.