Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
The quorum manager maintains quorums which were mined on chain. More...
#include <quorums.h>
Public Member Functions | |
CQuorumManager (CEvoDB &_evoDb, CBLSWorker &_blsWorker, CDKGSessionManager &_dkgManager) | |
void | UpdatedBlockTip (const CBlockIndex *pindexNew, bool fInitialDownload) |
bool | HasQuorum (Consensus::LLMQType llmqType, const uint256 &quorumHash) |
CQuorumCPtr | GetQuorum (Consensus::LLMQType llmqType, const uint256 &quorumHash) |
std::vector< CQuorumCPtr > | ScanQuorums (Consensus::LLMQType llmqType, size_t maxCount) |
std::vector< CQuorumCPtr > | ScanQuorums (Consensus::LLMQType llmqType, const CBlockIndex *pindexStart, size_t maxCount) |
Private Member Functions | |
void | EnsureQuorumConnections (Consensus::LLMQType llmqType, const CBlockIndex *pindexNew) |
bool | BuildQuorumFromCommitment (const CFinalCommitment &qc, const CBlockIndex *pindexQuorum, const uint256 &minedBlockHash, std::shared_ptr< CQuorum > &quorum) const |
bool | BuildQuorumContributions (const CFinalCommitment &fqc, std::shared_ptr< CQuorum > &quorum) const |
CQuorumCPtr | GetQuorum (Consensus::LLMQType llmqType, const CBlockIndex *pindex) |
Private Attributes | |
CEvoDB & | evoDb |
CBLSWorker & | blsWorker |
CDKGSessionManager & | dkgManager |
CCriticalSection | quorumsCacheCs |
std::map< std::pair< Consensus::LLMQType, uint256 >, CQuorumPtr > | quorumsCache |
unordered_lru_cache< std::pair< Consensus::LLMQType, uint256 >, std::vector< CQuorumCPtr >, StaticSaltedHasher, 32 > | scanQuorumsCache |
Detailed Description
The quorum manager maintains quorums which were mined on chain.
When a quorum is requested from the manager, it will lookup the commitment (through CQuorumBlockProcessor) and build a CQuorum object from it.
It is also responsible for initialization of the inter-quorum connections for new quorums.
Constructor & Destructor Documentation
◆ CQuorumManager()
llmq::CQuorumManager::CQuorumManager | ( | CEvoDB & | _evoDb, |
CBLSWorker & | _blsWorker, | ||
CDKGSessionManager & | _dkgManager | ||
) |
Definition at line 158 of file quorums.cpp.
Member Function Documentation
◆ BuildQuorumContributions()
|
private |
Definition at line 238 of file quorums.cpp.
References CBLSWorker::AggregateSecretKeys(), blsWorker, CBLSWorker::BuildQuorumVerificationVector(), cxxtimer::Timer::count(), dkgManager, llmq::CDKGSessionManager::GetVerifiedContributions(), CBLSWrapper< ImplType, _SerSize, C >::IsValid(), BCLog::LLMQ, llmq::CFinalCommitment::llmqType, LogPrint, quorum(), cxxtimer::Timer::stop(), and llmq::CFinalCommitment::validMembers.
Referenced by BuildQuorumFromCommitment().
◆ BuildQuorumFromCommitment()
|
private |
Definition at line 207 of file quorums.cpp.
References BuildQuorumContributions(), evoDb, llmq::CLLMQUtils::GetAllQuorumMembers(), CBlockIndex::GetBlockHash(), BCLog::LLMQ, llmq::CFinalCommitment::llmqType, LogPrint, quorum(), llmq::CFinalCommitment::quorumHash, llmq::CQuorum::StartCachePopulatorThread(), and base_blob< BITS >::ToString().
Referenced by GetQuorum().
◆ EnsureQuorumConnections()
|
private |
Definition at line 176 of file quorums.cpp.
References activeMasternodeInfo, llmq::DEFAULT_WATCH_QUORUMS, llmq::CLLMQUtils::EnsureQuorumConnections(), g_connman, gArgs, CBlockIndex::GetAncestor(), CBlockIndex::GetBlockHash(), ArgsManager::GetBoolArg(), CChainParams::GetConsensus(), BCLog::LLMQ, Consensus::Params::llmqs, LogPrint, CBlockIndex::nHeight, Params(), CActiveMasternodeInfo::proTxHash, quorum(), and ScanQuorums().
Referenced by UpdatedBlockTip().
◆ GetQuorum() [1/2]
CQuorumCPtr llmq::CQuorumManager::GetQuorum | ( | Consensus::LLMQType | llmqType, |
const uint256 & | quorumHash | ||
) |
Definition at line 337 of file quorums.cpp.
References cs_main, BCLog::LLMQ, LOCK, LogPrint, mapBlockIndex, and base_blob< BITS >::ToString().
Referenced by llmq::CSigSharesManager::Cleanup(), llmq::CSigningManager::CollectPendingRecoveredSigsToVerify(), llmq::CSigSharesManager::CollectPendingSigSharesToVerify(), llmq::CSigningManager::PreVerifyRecoveredSig(), llmq::CSigSharesManager::ProcessMessageSigSesAnn(), llmq::CSigSharesManager::ProcessMessageSigShare(), quorum_info(), quorum_sigs_cmd(), and ScanQuorums().
◆ GetQuorum() [2/2]
|
private |
Definition at line 353 of file quorums.cpp.
References blsWorker, BuildQuorumFromCommitment(), CBlockIndex::GetBlockHash(), CChainParams::GetConsensus(), llmq::CQuorumBlockProcessor::GetMinedCommitment(), HasQuorum(), Consensus::Params::llmqs, LOCK, Params(), quorum(), llmq::quorumBlockProcessor, quorumsCache, and quorumsCacheCs.
◆ HasQuorum()
bool llmq::CQuorumManager::HasQuorum | ( | Consensus::LLMQType | llmqType, |
const uint256 & | quorumHash | ||
) |
Definition at line 274 of file quorums.cpp.
References llmq::CQuorumBlockProcessor::HasMinedCommitment(), and llmq::quorumBlockProcessor.
Referenced by GetQuorum().
◆ ScanQuorums() [1/2]
std::vector< CQuorumCPtr > llmq::CQuorumManager::ScanQuorums | ( | Consensus::LLMQType | llmqType, |
size_t | maxCount | ||
) |
Definition at line 279 of file quorums.cpp.
References chainActive, cs_main, LOCK, and CChain::Tip().
Referenced by EnsureQuorumConnections(), llmq::CLLMQUtils::IsQuorumActive(), quorum_list(), and quorum_memberof().
◆ ScanQuorums() [2/2]
std::vector< CQuorumCPtr > llmq::CQuorumManager::ScanQuorums | ( | Consensus::LLMQType | llmqType, |
const CBlockIndex * | pindexStart, | ||
size_t | maxCount | ||
) |
Definition at line 289 of file quorums.cpp.
References unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::get(), CBlockIndex::GetBlockHash(), CChainParams::GetConsensus(), llmq::CQuorumBlockProcessor::GetMinedCommitmentsUntilBlock(), GetQuorum(), unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::insert(), Consensus::Params::llmqs, LOCK, Params(), quorum(), llmq::quorumBlockProcessor, quorumsCacheCs, and scanQuorumsCache.
◆ UpdatedBlockTip()
void llmq::CQuorumManager::UpdatedBlockTip | ( | const CBlockIndex * | pindexNew, |
bool | fInitialDownload | ||
) |
Definition at line 165 of file quorums.cpp.
References EnsureQuorumConnections(), CChainParams::GetConsensus(), CMasternodeSync::IsBlockchainSynced(), Consensus::Params::llmqs, masternodeSync, and Params().
Referenced by CDSNotificationInterface::UpdatedBlockTip().
Member Data Documentation
◆ blsWorker
|
private |
Definition at line 85 of file quorums.h.
Referenced by BuildQuorumContributions(), and GetQuorum().
◆ dkgManager
|
private |
Definition at line 86 of file quorums.h.
Referenced by BuildQuorumContributions().
◆ evoDb
|
private |
Definition at line 84 of file quorums.h.
Referenced by BuildQuorumFromCommitment().
◆ quorumsCache
|
private |
Definition at line 89 of file quorums.h.
Referenced by GetQuorum().
◆ quorumsCacheCs
|
private |
Definition at line 88 of file quorums.h.
Referenced by GetQuorum(), and ScanQuorums().
◆ scanQuorumsCache
|
private |
Definition at line 90 of file quorums.h.
Referenced by ScanQuorums().
The documentation for this class was generated from the following files:
- src/llmq/quorums.h
- src/llmq/quorums.cpp