ouroboros-consensus-protocol-0.1.0.1: Cardano consensus protocols.
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.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
Eq InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

Ord InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

Show InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

Generic InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

ToCBOR InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

SignableRepresentation InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

NoThunks InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

type Rep InputVRF Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

type Rep InputVRF = D1 (' MetaData "InputVRF" "Ouroboros.Consensus.Protocol.Praos.VRF" "ouroboros-consensus-protocol-0.1.0.1-zKRBoYOfUlKsvZd6xB0lb" ' 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 :: forall c proxy. Crypto c => 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 2.1 of the linked paper for details.

vrfNonceValue :: forall c proxy. Crypto c => proxy c -> CertifiedVRF ( VRF c) InputVRF -> Nonce Source #

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