cardano-protocol-0.2.0.0: Cardano Protocol: shared crypto and block-header definitions
Safe HaskellNone
LanguageHaskell2010

Cardano.Protocol.Praos.VRF

Description

Synopsis

Documentation

data InputVRF Source #

Input to the verifiable random function. Consists of the hash of the slot and the epoch nonce.

Instances

Instances details
ToCBOR InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

Methods

toCBOR ∷ InputVRF → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy InputVRF → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [InputVRF] → Size Source #

SignableRepresentation InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

Generic InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

Associated Types

type Rep InputVRF 
Instance details

Defined in Cardano.Protocol.Praos.VRF

type Rep InputVRF = D1 ('MetaData "InputVRF" "Cardano.Protocol.Praos.VRF" "cardano-protocol-0.2.0.0-inplace" 'True) (C1 ('MetaCons "InputVRF" 'PrefixI 'True) (S1 ('MetaSel ('Just "unInputVRF") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash Blake2b_256 InputVRF))))

Methods

from ∷ InputVRF → Rep InputVRF x #

to ∷ Rep InputVRF x → InputVRF #

Show InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

Methods

showsPrec ∷ Int → InputVRF → ShowS #

show ∷ InputVRF → String #

showList ∷ [InputVRF] → ShowS #

Eq InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

Methods

(==) ∷ InputVRF → InputVRF → Bool #

(/=) ∷ InputVRF → InputVRF → Bool #

Ord InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

NoThunks InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

type Rep InputVRF Source # 
Instance details

Defined in Cardano.Protocol.Praos.VRF

type Rep InputVRF = D1 ('MetaData "InputVRF" "Cardano.Protocol.Praos.VRF" "cardano-protocol-0.2.0.0-inplace" 'True) (C1 ('MetaCons "InputVRF" 'PrefixI 'True) (S1 ('MetaSel ('Just "unInputVRF") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash Blake2b_256 InputVRF))))

data VRFUsage Source #

Indicate the usage of the VRF result.

Constructors

VRFLeader

The VRF value will be used to establish whether the issuing node is indeed a leader for this slot.

VRFNonce

The VRF value will be used to contribute to the evolving nonce.

mkInputVRF Source #

Arguments

∷ SlotNo 
→ Nonce

Epoch nonce

→ InputVRF 

Construct a unified VRF value

vrfLeaderValue ∷ proxy c → CertifiedVRF (VRF c) InputVRF → BoundedNatural Source #

Range-extend a VRF output to be used for leader checks from the relevant hash. See section 4.1 of the linked paper for details.

vrfNonceValue ∷ proxy c → CertifiedVRF (VRF c) InputVRF → Nonce Source #

Range-extend a VRF output to be used for the evolving nonce. See section 4.1 of the linked paper for details.