TARAXA
taraxa::vrf_wrapper::VrfSortitionBase Class Reference

#include <vrf_wrapper.hpp>

Collaboration diagram for taraxa::vrf_wrapper::VrfSortitionBase:

Public Member Functions

 VrfSortitionBase ()=default
 
 VrfSortitionBase (vrf_sk_t const &sk, bytes const &msg, uint16_t vote_count=1)
 
bool verify (const vrf_pk_t &pk, const bytes &msg, uint16_t vote_count=1, bool strict=true) const
 
bool operator== (VrfSortitionBase const &other) const
 
virtual std::ostream & print (std::ostream &strm) const
 

Static Public Member Functions

static dev::bytes makeVrfInput (taraxa::level_t level, const dev::h256 &period_hash)
 

Public Attributes

vrf_proof_t proof_
 
vrf_output_t output_
 
uint16_t threshold_
 

Private Member Functions

void thresholdFromOutput (uint16_t vote_count) const
 

Friends

std::ostream & operator<< (std::ostream &strm, VrfSortitionBase const &vrf_sortition)
 

Constructor & Destructor Documentation

◆ VrfSortitionBase() [1/2]

taraxa::vrf_wrapper::VrfSortitionBase::VrfSortitionBase ( )
default

◆ VrfSortitionBase() [2/2]

taraxa::vrf_wrapper::VrfSortitionBase::VrfSortitionBase ( vrf_sk_t const &  sk,
bytes const &  msg,
uint16_t  vote_count = 1 
)
inline

Member Function Documentation

◆ makeVrfInput()

dev::bytes taraxa::vrf_wrapper::VrfSortitionBase::makeVrfInput ( taraxa::level_t  level,
const dev::h256 period_hash 
)
static

◆ operator==()

bool taraxa::vrf_wrapper::VrfSortitionBase::operator== ( VrfSortitionBase const &  other) const
inline

◆ print()

virtual std::ostream& taraxa::vrf_wrapper::VrfSortitionBase::print ( std::ostream &  strm) const
inlinevirtual

◆ thresholdFromOutput()

void taraxa::vrf_wrapper::VrfSortitionBase::thresholdFromOutput ( uint16_t  vote_count) const
inlineprivate

◆ verify()

bool taraxa::vrf_wrapper::VrfSortitionBase::verify ( const vrf_pk_t pk,
const bytes msg,
uint16_t  vote_count = 1,
bool  strict = true 
) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  strm,
VrfSortitionBase const &  vrf_sortition 
)
friend

Member Data Documentation

◆ output_

vrf_output_t taraxa::vrf_wrapper::VrfSortitionBase::output_
mutable

◆ proof_

vrf_proof_t taraxa::vrf_wrapper::VrfSortitionBase::proof_

◆ threshold_

uint16_t taraxa::vrf_wrapper::VrfSortitionBase::threshold_
mutable

The documentation for this class was generated from the following files: