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>
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::LLMQParams & | params |
CFinalCommitment | qc |
const CBlockIndex * | pindexQuorum |
uint256 | minedBlockHash |
std::vector< CDeterministicMNCPtr > | members |
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.
Constructor & Destructor Documentation
◆ CQuorum()
|
inline |
◆ ~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 |
Definition at line 82 of file quorums.cpp.
References blsCache, CBLSWorkerCache::BuildPubKeyShare(), CBLSId::FromHash(), members, qc, quorumVvec, and llmq::CFinalCommitment::validMembers.
◆ 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()
|
private |
Definition at line 118 of file quorums.cpp.
References llmq::DB_QUORUM_QUORUM_VVEC, llmq::DB_QUORUM_SK_SHARE, evoDb, llmq::MakeQuorumKey(), quorumVvec, and skShare.
◆ StartCachePopulatorThread()
|
staticprivate |
Definition at line 136 of file quorums.cpp.
References cxxtimer::Timer::count(), BCLog::LLMQ, LogPrint, RenameThread(), and ShutdownRequested().
Referenced by llmq::CQuorumManager::BuildQuorumFromCommitment().
◆ WriteContributions()
|
private |
Definition at line 106 of file quorums.cpp.
References llmq::DB_QUORUM_QUORUM_VVEC, llmq::DB_QUORUM_SK_SHARE, evoDb, CBLSWrapper< ImplType, _SerSize, C >::IsValid(), llmq::MakeQuorumKey(), quorumVvec, and skShare.
Friends And Related Function Documentation
◆ CQuorumManager
|
friend |
Member Data Documentation
◆ blsCache
|
mutableprivate |
Definition at line 51 of file quorums.h.
Referenced by GetPubKeyShare().
◆ cachePopulatorThread
|
private |
Definition at line 53 of file quorums.h.
Referenced by ~CQuorum().
◆ members
std::vector<CDeterministicMNCPtr> llmq::CQuorum::members |
Definition at line 42 of file quorums.h.
Referenced by GetMemberIndex(), GetPubKeyShare(), Init(), IsMember(), IsValidMember(), and llmq::MakeQuorumKey().
◆ minedBlockHash
uint256 llmq::CQuorum::minedBlockHash |
◆ 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 |
◆ 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
|
private |
Definition at line 52 of file quorums.h.
Referenced by ~CQuorum().
The documentation for this class was generated from the following files:
- src/llmq/quorums.h
- src/llmq/quorums.cpp