Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

An object of this class represents a quorum which was mined on-chain (through a quorum commitment) It at least contains informations 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:

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 informations 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 34 of file quorums.h.

Constructor & Destructor Documentation

◆ CQuorum()

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

Definition at line 56 of file quorums.h.

◆ ~CQuorum()

llmq::CQuorum::~CQuorum ( )

Definition at line 43 of file quorums.cpp.

References cachePopulatorThread, and stopCachePopulatorThread.

Member Function Documentation

◆ GetMemberIndex()

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

Definition at line 96 of file quorums.cpp.

References members.

◆ GetPubKeyShare()

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

◆ GetSkShare()

CBLSSecretKey llmq::CQuorum::GetSkShare ( ) const

Definition at line 91 of file quorums.cpp.

References skShare.

◆ Init()

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

Definition at line 54 of file quorums.cpp.

References members, minedBlockHash, pindexQuorum, and qc.

◆ IsMember()

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

Definition at line 62 of file quorums.cpp.

References members.

◆ IsValidMember()

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

Definition at line 72 of file quorums.cpp.

References members, qc, and llmq::CFinalCommitment::validMembers.

◆ ReadContributions()

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

◆ StartCachePopulatorThread()

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

◆ WriteContributions()

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

Friends And Related Function Documentation

◆ CQuorumManager

friend class CQuorumManager
friend

Definition at line 36 of file quorums.h.

Member Data Documentation

◆ blsCache

CBLSWorkerCache llmq::CQuorum::blsCache
mutableprivate

Definition at line 51 of file quorums.h.

Referenced by GetPubKeyShare().

◆ cachePopulatorThread

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

Definition at line 53 of file quorums.h.

Referenced by ~CQuorum().

◆ members

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

◆ minedBlockHash

uint256 llmq::CQuorum::minedBlockHash

Definition at line 41 of file quorums.h.

Referenced by Init().

◆ params

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

Definition at line 38 of file quorums.h.

Referenced by llmq::MakeQuorumKey().

◆ pindexQuorum

const CBlockIndex* llmq::CQuorum::pindexQuorum

Definition at line 40 of file quorums.h.

Referenced by Init().

◆ qc

CFinalCommitment llmq::CQuorum::qc

Definition at line 39 of file quorums.h.

Referenced by GetPubKeyShare(), Init(), IsValidMember(), and llmq::MakeQuorumKey().

◆ quorumVvec

BLSVerificationVectorPtr llmq::CQuorum::quorumVvec

Definition at line 45 of file quorums.h.

Referenced by GetPubKeyShare(), ReadContributions(), and WriteContributions().

◆ skShare

CBLSSecretKey llmq::CQuorum::skShare

Definition at line 46 of file quorums.h.

Referenced by GetSkShare(), ReadContributions(), and WriteContributions().

◆ stopCachePopulatorThread

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

Definition at line 52 of file quorums.h.

Referenced by ~CQuorum().


The documentation for this class was generated from the following files:
Released under the MIT license