Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <quorums_dkgsessionmgr.h>
Collaboration diagram for llmq::CDKGSessionManager:Classes | |
| struct | ContributionsCacheEntry |
| struct | ContributionsCacheKey |
Public Member Functions | |
| CDKGSessionManager (CDBWrapper &_llmqDb, CBLSWorker &_blsWorker) | |
| ~CDKGSessionManager () | |
| void | StartThreads () |
| void | StopThreads () |
| void | UpdatedBlockTip (const CBlockIndex *pindexNew, bool fInitialDownload) |
| void | ProcessMessage (CNode *pfrom, const std::string &strCommand, CDataStream &vRecv, CConnman &connman) |
| bool | AlreadyHave (const CInv &inv) const |
| bool | GetContribution (const uint256 &hash, CDKGContribution &ret) const |
| bool | GetComplaint (const uint256 &hash, CDKGComplaint &ret) const |
| bool | GetJustification (const uint256 &hash, CDKGJustification &ret) const |
| bool | GetPrematureCommitment (const uint256 &hash, CDKGPrematureCommitment &ret) const |
| void | WriteVerifiedVvecContribution (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &proTxHash, const BLSVerificationVectorPtr &vvec) |
| void | WriteVerifiedSkContribution (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &proTxHash, const CBLSSecretKey &skContribution) |
| bool | GetVerifiedContributions (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const std::vector< bool > &validMembers, std::vector< uint16_t > &memberIndexesRet, std::vector< BLSVerificationVectorPtr > &vvecsRet, BLSSecretKeyVector &skContributionsRet) |
| bool | GetVerifiedContribution (Consensus::LLMQType llmqType, const CBlockIndex *pindexQuorum, const uint256 &proTxHash, BLSVerificationVectorPtr &vvecRet, CBLSSecretKey &skContributionRet) |
Private Member Functions | |
| void | CleanupCache () |
Private Attributes | |
| CDBWrapper & | llmqDb |
| CBLSWorker & | blsWorker |
| std::map< Consensus::LLMQType, CDKGSessionHandler > | dkgSessionHandlers |
| CCriticalSection | contributionsCacheCs |
| std::map< ContributionsCacheKey, ContributionsCacheEntry > | contributionsCache |
Static Private Attributes | |
| static const int64_t | MAX_CONTRIBUTION_CACHE_TIME = 60 * 1000 |
Detailed Description
Definition at line 19 of file quorums_dkgsessionmgr.h.
Constructor & Destructor Documentation
◆ CDKGSessionManager()
| llmq::CDKGSessionManager::CDKGSessionManager | ( | CDBWrapper & | _llmqDb, |
| CBLSWorker & | _blsWorker | ||
| ) |
Definition at line 24 of file quorums_dkgsessionmgr.cpp.
References blsWorker, dkgSessionHandlers, and Params().
◆ ~CDKGSessionManager()
| llmq::CDKGSessionManager::~CDKGSessionManager | ( | ) |
Definition at line 35 of file quorums_dkgsessionmgr.cpp.
Member Function Documentation
◆ AlreadyHave()
| bool llmq::CDKGSessionManager::AlreadyHave | ( | const CInv & | inv | ) | const |
Definition at line 106 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers, CInv::hash, CSporkManager::IsSporkActive(), SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
Referenced by AlreadyHave().
◆ CleanupCache()
|
private |
Definition at line 266 of file quorums_dkgsessionmgr.cpp.
References contributionsCache, contributionsCacheCs, GetTimeMillis(), LOCK, and MAX_CONTRIBUTION_CACHE_TIME.
Referenced by UpdatedBlockTip().
◆ GetComplaint()
| bool llmq::CDKGSessionManager::GetComplaint | ( | const uint256 & | hash, |
| CDKGComplaint & | ret | ||
| ) | const |
Definition at line 143 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers, CSporkManager::IsSporkActive(), LOCK2, llmq::QuorumPhase_Complain, llmq::QuorumPhase_Contribute, SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
◆ GetContribution()
| bool llmq::CDKGSessionManager::GetContribution | ( | const uint256 & | hash, |
| CDKGContribution & | ret | ||
| ) | const |
Definition at line 123 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers, CSporkManager::IsSporkActive(), LOCK2, llmq::QuorumPhase_Contribute, llmq::QuorumPhase_Initialized, SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
◆ GetJustification()
| bool llmq::CDKGSessionManager::GetJustification | ( | const uint256 & | hash, |
| CDKGJustification & | ret | ||
| ) | const |
Definition at line 163 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers, CSporkManager::IsSporkActive(), LOCK2, llmq::QuorumPhase_Complain, llmq::QuorumPhase_Justify, SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
◆ GetPrematureCommitment()
| bool llmq::CDKGSessionManager::GetPrematureCommitment | ( | const uint256 & | hash, |
| CDKGPrematureCommitment & | ret | ||
| ) | const |
Definition at line 183 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers, CSporkManager::IsSporkActive(), LOCK2, llmq::QuorumPhase_Commit, llmq::QuorumPhase_Justify, SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
◆ GetVerifiedContribution()
| bool llmq::CDKGSessionManager::GetVerifiedContribution | ( | Consensus::LLMQType | llmqType, |
| const CBlockIndex * | pindexQuorum, | ||
| const uint256 & | proTxHash, | ||
| BLSVerificationVectorPtr & | vvecRet, | ||
| CBLSSecretKey & | skContributionRet | ||
| ) |
Definition at line 239 of file quorums_dkgsessionmgr.cpp.
References contributionsCache, contributionsCacheCs, llmq::DB_SKCONTRIB, llmq::DB_VVEC, CBlockIndex::GetBlockHash(), GetTimeMillis(), llmqDb, LOCK, and CDBWrapper::Read().
Referenced by GetVerifiedContributions().
◆ GetVerifiedContributions()
| bool llmq::CDKGSessionManager::GetVerifiedContributions | ( | Consensus::LLMQType | llmqType, |
| const CBlockIndex * | pindexQuorum, | ||
| const std::vector< bool > & | validMembers, | ||
| std::vector< uint16_t > & | memberIndexesRet, | ||
| std::vector< BLSVerificationVectorPtr > & | vvecsRet, | ||
| BLSSecretKeyVector & | skContributionsRet | ||
| ) |
Definition at line 213 of file quorums_dkgsessionmgr.cpp.
References llmq::CLLMQUtils::GetAllQuorumMembers(), and GetVerifiedContribution().
Referenced by llmq::CQuorumManager::BuildQuorumContributions(), llmq::CDKGSession::ReceiveMessage(), and llmq::CDKGSession::SendCommitment().
◆ ProcessMessage()
| void llmq::CDKGSessionManager::ProcessMessage | ( | CNode * | pfrom, |
| const std::string & | strCommand, | ||
| CDataStream & | vRecv, | ||
| CConnman & | connman | ||
| ) |
Definition at line 71 of file quorums_dkgsessionmgr.cpp.
References CDataStream::begin(), cs_main, dkgSessionHandlers, CNode::GetId(), CSporkManager::IsSporkActive(), LOCK, Misbehaving(), NetMsgType::QCOMPLAINT, NetMsgType::QCONTRIB, NetMsgType::QJUSTIFICATION, NetMsgType::QPCOMMITMENT, NetMsgType::QWATCH, CNode::qwatch, CDataStream::size(), SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
Referenced by ProcessMessage().
◆ StartThreads()
| void llmq::CDKGSessionManager::StartThreads | ( | ) |
Definition at line 39 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers.
Referenced by llmq::StartLLMQSystem().
◆ StopThreads()
| void llmq::CDKGSessionManager::StopThreads | ( | ) |
Definition at line 46 of file quorums_dkgsessionmgr.cpp.
References dkgSessionHandlers.
Referenced by llmq::StopLLMQSystem().
◆ UpdatedBlockTip()
| void llmq::CDKGSessionManager::UpdatedBlockTip | ( | const CBlockIndex * | pindexNew, |
| bool | fInitialDownload | ||
| ) |
Definition at line 53 of file quorums_dkgsessionmgr.cpp.
References CleanupCache(), deterministicMNManager, dkgSessionHandlers, CChainParams::GetConsensus(), CSporkManager::IsSporkActive(), CBlockIndex::nHeight, Params(), SPORK_17_QUORUM_DKG_ENABLED, and sporkManager.
Referenced by CDSNotificationInterface::UpdatedBlockTip().
◆ WriteVerifiedSkContribution()
| void llmq::CDKGSessionManager::WriteVerifiedSkContribution | ( | Consensus::LLMQType | llmqType, |
| const CBlockIndex * | pindexQuorum, | ||
| const uint256 & | proTxHash, | ||
| const CBLSSecretKey & | skContribution | ||
| ) |
Definition at line 208 of file quorums_dkgsessionmgr.cpp.
References llmq::DB_SKCONTRIB, CBlockIndex::GetBlockHash(), llmqDb, and CDBWrapper::Write().
Referenced by llmq::CDKGSession::ReceiveMessage(), and llmq::CDKGSession::VerifyPendingContributions().
◆ WriteVerifiedVvecContribution()
| void llmq::CDKGSessionManager::WriteVerifiedVvecContribution | ( | Consensus::LLMQType | llmqType, |
| const CBlockIndex * | pindexQuorum, | ||
| const uint256 & | proTxHash, | ||
| const BLSVerificationVectorPtr & | vvec | ||
| ) |
Definition at line 203 of file quorums_dkgsessionmgr.cpp.
References llmq::DB_VVEC, CBlockIndex::GetBlockHash(), llmqDb, and CDBWrapper::Write().
Referenced by llmq::CDKGSession::ReceiveMessage().
Member Data Documentation
◆ blsWorker
|
private |
Definition at line 25 of file quorums_dkgsessionmgr.h.
Referenced by CDKGSessionManager().
◆ contributionsCache
|
private |
Definition at line 46 of file quorums_dkgsessionmgr.h.
Referenced by CleanupCache(), and GetVerifiedContribution().
◆ contributionsCacheCs
|
private |
Definition at line 29 of file quorums_dkgsessionmgr.h.
Referenced by CleanupCache(), and GetVerifiedContribution().
◆ dkgSessionHandlers
|
private |
Definition at line 27 of file quorums_dkgsessionmgr.h.
Referenced by AlreadyHave(), CDKGSessionManager(), GetComplaint(), GetContribution(), GetJustification(), GetPrematureCommitment(), ProcessMessage(), StartThreads(), StopThreads(), and UpdatedBlockTip().
◆ llmqDb
|
private |
Definition at line 24 of file quorums_dkgsessionmgr.h.
Referenced by GetVerifiedContribution(), WriteVerifiedSkContribution(), and WriteVerifiedVvecContribution().
◆ MAX_CONTRIBUTION_CACHE_TIME
|
staticprivate |
Definition at line 21 of file quorums_dkgsessionmgr.h.
Referenced by CleanupCache().
The documentation for this class was generated from the following files:
- src/llmq/quorums_dkgsessionmgr.h
- src/llmq/quorums_dkgsessionmgr.cpp

