PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
llmq::CQuorum Class Reference

An object of this class represents a quorum which was mined on-chain (through a quorum commitment) It at least contains information about the members and the quorum public key which is needed to verify recovered signatures from this quorum. More...

#include <quorums.h>

Collaboration diagram for llmq::CQuorum:
[legend]

Public Member Functions

 CQuorum (const Consensus::LLMQParams &_params, CBLSWorker &_blsWorker)
 
 ~CQuorum ()
 
void Init (const CFinalCommitment &_qc, const CBlockIndex *_pindexQuorum, const uint256 &_minedBlockHash, const std::vector< CDeterministicMNCPtr > &_members)
 
bool IsMember (const uint256 &proTxHash) const
 
bool IsValidMember (const uint256 &proTxHash) const
 
int GetMemberIndex (const uint256 &proTxHash) const
 
CBLSPublicKey GetPubKeyShare (size_t memberIdx) const
 
CBLSSecretKey GetSkShare () const
 

Public Attributes

const Consensus::LLMQParamsparams
 
CFinalCommitment qc
 
const CBlockIndexpindexQuorum
 
uint256 minedBlockHash
 
std::vector< CDeterministicMNCPtrmembers
 
BLSVerificationVectorPtr quorumVvec
 
CBLSSecretKey skShare
 

Private Member Functions

void WriteContributions (CEvoDB &evoDb)
 
bool ReadContributions (CEvoDB &evoDb)
 

Static Private Member Functions

static void StartCachePopulatorThread (std::shared_ptr< CQuorum > _this)
 

Private Attributes

CBLSWorkerCache blsCache
 
std::atomic< bool > stopCachePopulatorThread
 
std::thread cachePopulatorThread
 

Friends

class CQuorumManager
 

Detailed Description

An object of this class represents a quorum which was mined on-chain (through a quorum commitment) It at least contains information about the members and the quorum public key which is needed to verify recovered signatures from this quorum.

In case the local node is a member of the same quorum and successfully participated in the DKG, the quorum object will also contain the secret key share and the quorum verification vector. The quorum vvec is then used to recover the public key shares of individual members, which are needed to verify signature shares of these members.

Definition at line 32 of file quorums.h.

Constructor & Destructor Documentation

◆ CQuorum()

llmq::CQuorum::CQuorum ( const Consensus::LLMQParams _params,
CBLSWorker _blsWorker 
)
inline

Definition at line 55 of file quorums.h.

◆ ~CQuorum()

llmq::CQuorum::~CQuorum ( )

Definition at line 44 of file quorums.cpp.

Member Function Documentation

◆ GetMemberIndex()

int llmq::CQuorum::GetMemberIndex ( const uint256 proTxHash) const

Definition at line 97 of file quorums.cpp.

◆ GetPubKeyShare()

CBLSPublicKey llmq::CQuorum::GetPubKeyShare ( size_t  memberIdx) const

Definition at line 83 of file quorums.cpp.

Here is the call graph for this function:

◆ GetSkShare()

CBLSSecretKey llmq::CQuorum::GetSkShare ( ) const

Definition at line 92 of file quorums.cpp.

◆ Init()

void llmq::CQuorum::Init ( const CFinalCommitment _qc,
const CBlockIndex _pindexQuorum,
const uint256 _minedBlockHash,
const std::vector< CDeterministicMNCPtr > &  _members 
)

Definition at line 55 of file quorums.cpp.

◆ IsMember()

bool llmq::CQuorum::IsMember ( const uint256 proTxHash) const

Definition at line 63 of file quorums.cpp.

◆ IsValidMember()

bool llmq::CQuorum::IsValidMember ( const uint256 proTxHash) const

Definition at line 73 of file quorums.cpp.

◆ ReadContributions()

bool llmq::CQuorum::ReadContributions ( CEvoDB evoDb)
private

Definition at line 119 of file quorums.cpp.

◆ StartCachePopulatorThread()

void llmq::CQuorum::StartCachePopulatorThread ( std::shared_ptr< CQuorum _this)
staticprivate

Definition at line 137 of file quorums.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteContributions()

void llmq::CQuorum::WriteContributions ( CEvoDB evoDb)
private

Definition at line 107 of file quorums.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ CQuorumManager

friend class CQuorumManager
friend

Definition at line 34 of file quorums.h.

Member Data Documentation

◆ blsCache

CBLSWorkerCache llmq::CQuorum::blsCache
mutableprivate

Definition at line 50 of file quorums.h.

◆ cachePopulatorThread

std::thread llmq::CQuorum::cachePopulatorThread
private

Definition at line 52 of file quorums.h.

◆ members

std::vector<CDeterministicMNCPtr> llmq::CQuorum::members

Definition at line 41 of file quorums.h.

◆ minedBlockHash

uint256 llmq::CQuorum::minedBlockHash

Definition at line 40 of file quorums.h.

◆ params

const Consensus::LLMQParams& llmq::CQuorum::params

Definition at line 37 of file quorums.h.

◆ pindexQuorum

const CBlockIndex* llmq::CQuorum::pindexQuorum

Definition at line 39 of file quorums.h.

◆ qc

CFinalCommitment llmq::CQuorum::qc

Definition at line 38 of file quorums.h.

◆ quorumVvec

BLSVerificationVectorPtr llmq::CQuorum::quorumVvec

Definition at line 44 of file quorums.h.

◆ skShare

CBLSSecretKey llmq::CQuorum::skShare

Definition at line 45 of file quorums.h.

◆ stopCachePopulatorThread

std::atomic<bool> llmq::CQuorum::stopCachePopulatorThread
private

Definition at line 51 of file quorums.h.


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