Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
•All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
quorums.h
Go to the documentation of this file.
49 // Recovery of public key shares is very slow, so we start a background thread that pre-populates a cache so that
56 CQuorum(const Consensus::LLMQParams& _params, CBLSWorker& _blsWorker) : params(_params), blsCache(_blsWorker), stopCachePopulatorThread(false) {}
58 void Init(const CFinalCommitment& _qc, const CBlockIndex* _pindexQuorum, const uint256& _minedBlockHash, const std::vector<CDeterministicMNCPtr>& _members);
90 unordered_lru_cache<std::pair<Consensus::LLMQType, uint256>, std::vector<CQuorumCPtr>, StaticSaltedHasher, 32> scanQuorumsCache;
104 std::vector<CQuorumCPtr> ScanQuorums(Consensus::LLMQType llmqType, const CBlockIndex* pindexStart, size_t maxCount);
110 bool BuildQuorumFromCommitment(const CFinalCommitment& qc, const CBlockIndex* pindexQuorum, const uint256& minedBlockHash, std::shared_ptr<CQuorum>& quorum) const;
111 bool BuildQuorumContributions(const CFinalCommitment& fqc, std::shared_ptr<CQuorum>& quorum) const;
Definition: bls_worker.h:150
unordered_lru_cache< std::pair< Consensus::LLMQType, uint256 >, std::vector< CQuorumCPtr >, StaticSaltedHasher, 32 > scanQuorumsCache
Definition: quorums.h:90
Definition: quorums_commitment.h:24
Definition: evodb.h:32
Definition: unordered_lru_cache.h:11
Definition: bls.h:238
Definition: bls_worker.h:21
std::atomic< bool > stopCachePopulatorThread
Definition: quorums.h:52
std::map< std::pair< Consensus::LLMQType, uint256 >, CQuorumPtr > quorumsCache
Definition: quorums.h:89
An object of this class represents a quorum which was mined on-chain (through a quorum commitment) It...
Definition: quorums.h:34
std::vector< CQuorumCPtr > ScanQuorums(Consensus::LLMQType llmqType, size_t maxCount)
Definition: quorums.cpp:279
Definition: deterministicmns.h:26
void Init(const CFinalCommitment &_qc, const CBlockIndex *_pindexQuorum, const uint256 &_minedBlockHash, const std::vector< CDeterministicMNCPtr > &_members)
Definition: quorums.cpp:54
bool BuildQuorumContributions(const CFinalCommitment &fqc, std::shared_ptr< CQuorum > &quorum) const
Definition: quorums.cpp:238
Definition: saltedhasher.h:64
static void StartCachePopulatorThread(std::shared_ptr< CQuorum > _this)
Definition: quorums.cpp:136
void EnsureQuorumConnections(Consensus::LLMQType llmqType, const CBlockIndex *pindexNew)
Definition: quorums.cpp:176
CBLSPublicKey GetPubKeyShare(size_t memberIdx) const
Definition: quorums.cpp:82
std::shared_ptr< BLSVerificationVector > BLSVerificationVectorPtr
Definition: bls.h:471
int GetMemberIndex(const uint256 &proTxHash) const
Definition: quorums.cpp:96
The quorum manager maintains quorums which were mined on chain.
Definition: quorums.h:81
void UpdatedBlockTip(const CBlockIndex *pindexNew, bool fInitialDownload)
Definition: quorums.cpp:165
bool IsValidMember(const uint256 &proTxHash) const
Definition: quorums.cpp:72
Definition: bls.h:263
Definition: params.h:65
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
bool HasQuorum(Consensus::LLMQType llmqType, const uint256 &quorumHash)
Definition: quorums.cpp:274
CQuorum(const Consensus::LLMQParams &_params, CBLSWorker &_blsWorker)
Definition: quorums.h:56
CQuorumCPtr GetQuorum(Consensus::LLMQType llmqType, const uint256 &quorumHash)
Definition: quorums.cpp:337
bool BuildQuorumFromCommitment(const CFinalCommitment &qc, const CBlockIndex *pindexQuorum, const uint256 &minedBlockHash, std::shared_ptr< CQuorum > &quorum) const
Definition: quorums.cpp:207
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
CQuorumManager(CEvoDB &_evoDb, CBLSWorker &_blsWorker, CDKGSessionManager &_dkgManager)
Definition: quorums.cpp:158