Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <quorums_signing.h>

+ Collaboration diagram for llmq::CSigningManager:

Public Member Functions

 CSigningManager (CDBWrapper &llmqDb, bool fMemory)
 
bool AlreadyHave (const CInv &inv)
 
bool GetRecoveredSigForGetData (const uint256 &hash, CRecoveredSig &ret)
 
void ProcessMessage (CNode *pnode, const std::string &strCommand, CDataStream &vRecv, CConnman &connman)
 
void PushReconstructedRecoveredSig (const CRecoveredSig &recoveredSig, const CQuorumCPtr &quorum)
 
void TruncateRecoveredSig (Consensus::LLMQType llmqType, const uint256 &id)
 
void RegisterRecoveredSigsListener (CRecoveredSigsListener *l)
 
void UnregisterRecoveredSigsListener (CRecoveredSigsListener *l)
 
bool AsyncSignIfMember (Consensus::LLMQType llmqType, const uint256 &id, const uint256 &msgHash, bool allowReSign=false)
 
bool HasRecoveredSig (Consensus::LLMQType llmqType, const uint256 &id, const uint256 &msgHash)
 
bool HasRecoveredSigForId (Consensus::LLMQType llmqType, const uint256 &id)
 
bool HasRecoveredSigForSession (const uint256 &signHash)
 
bool GetRecoveredSigForId (Consensus::LLMQType llmqType, const uint256 &id, CRecoveredSig &retRecSig)
 
bool IsConflicting (Consensus::LLMQType llmqType, const uint256 &id, const uint256 &msgHash)
 
bool HasVotedOnId (Consensus::LLMQType llmqType, const uint256 &id)
 
bool GetVoteForId (Consensus::LLMQType llmqType, const uint256 &id, uint256 &msgHashRet)
 
std::vector< CQuorumCPtrGetActiveQuorumSet (Consensus::LLMQType llmqType, int signHeight)
 
CQuorumCPtr SelectQuorumForSigning (Consensus::LLMQType llmqType, const uint256 &selectionHash, int signHeight=-1, int signOffset=SIGN_HEIGHT_OFFSET)
 
bool VerifyRecoveredSig (Consensus::LLMQType llmqType, int signedAtHeight, const uint256 &id, const uint256 &msgHash, const CBLSSignature &sig)
 

Private Member Functions

void ProcessMessageRecoveredSig (CNode *pfrom, const CRecoveredSig &recoveredSig, CConnman &connman)
 
bool PreVerifyRecoveredSig (NodeId nodeId, const CRecoveredSig &recoveredSig, bool &retBan)
 
void CollectPendingRecoveredSigsToVerify (size_t maxUniqueSessions, std::unordered_map< NodeId, std::list< CRecoveredSig >> &retSigShares, std::unordered_map< std::pair< Consensus::LLMQType, uint256 >, CQuorumCPtr, StaticSaltedHasher > &retQuorums)
 
void ProcessPendingReconstructedRecoveredSigs ()
 
bool ProcessPendingRecoveredSigs (CConnman &connman)
 
void ProcessRecoveredSig (NodeId nodeId, const CRecoveredSig &recoveredSig, const CQuorumCPtr &quorum, CConnman &connman)
 
void Cleanup ()
 

Private Attributes

CCriticalSection cs
 
CRecoveredSigsDb db
 
std::unordered_map< NodeId, std::list< CRecoveredSig > > pendingRecoveredSigs
 
std::unordered_map< uint256, std::pair< CRecoveredSig, CQuorumCPtr >, StaticSaltedHasherpendingReconstructedRecoveredSigs
 
FastRandomContext rnd
 
int64_t lastCleanupTime {0}
 
std::vector< CRecoveredSigsListener * > recoveredSigsListeners
 

Static Private Attributes

static const int64_t DEFAULT_MAX_RECOVERED_SIGS_AGE = 60 * 60 * 24 * 7
 
static const int SIGN_HEIGHT_OFFSET = 8
 

Friends

class CSigSharesManager
 

Detailed Description

Definition at line 112 of file quorums_signing.h.

Constructor & Destructor Documentation

◆ CSigningManager()

llmq::CSigningManager::CSigningManager ( CDBWrapper llmqDb,
bool  fMemory 
)

Definition at line 442 of file quorums_signing.cpp.

Member Function Documentation

◆ AlreadyHave()

bool llmq::CSigningManager::AlreadyHave ( const CInv inv)

◆ AsyncSignIfMember()

◆ Cleanup()

void llmq::CSigningManager::Cleanup ( )
private

◆ CollectPendingRecoveredSigsToVerify()

void llmq::CSigningManager::CollectPendingRecoveredSigsToVerify ( size_t  maxUniqueSessions,
std::unordered_map< NodeId, std::list< CRecoveredSig >> &  retSigShares,
std::unordered_map< std::pair< Consensus::LLMQType, uint256 >, CQuorumCPtr, StaticSaltedHasher > &  retQuorums 
)
private

◆ GetActiveQuorumSet()

std::vector<CQuorumCPtr> llmq::CSigningManager::GetActiveQuorumSet ( Consensus::LLMQType  llmqType,
int  signHeight 
)

◆ GetRecoveredSigForGetData()

bool llmq::CSigningManager::GetRecoveredSigForGetData ( const uint256 hash,
CRecoveredSig ret 
)

◆ GetRecoveredSigForId()

bool llmq::CSigningManager::GetRecoveredSigForId ( Consensus::LLMQType  llmqType,
const uint256 id,
llmq::CRecoveredSig retRecSig 
)

Definition at line 861 of file quorums_signing.cpp.

◆ GetVoteForId()

bool llmq::CSigningManager::GetVoteForId ( Consensus::LLMQType  llmqType,
const uint256 id,
uint256 msgHashRet 
)

Definition at line 890 of file quorums_signing.cpp.

Referenced by llmq::CInstantSendManager::ProcessTx().

◆ HasRecoveredSig()

bool llmq::CSigningManager::HasRecoveredSig ( Consensus::LLMQType  llmqType,
const uint256 id,
const uint256 msgHash 
)

◆ HasRecoveredSigForId()

◆ HasRecoveredSigForSession()

◆ HasVotedOnId()

bool llmq::CSigningManager::HasVotedOnId ( Consensus::LLMQType  llmqType,
const uint256 id 
)

Definition at line 885 of file quorums_signing.cpp.

◆ IsConflicting()

bool llmq::CSigningManager::IsConflicting ( Consensus::LLMQType  llmqType,
const uint256 id,
const uint256 msgHash 
)

Definition at line 869 of file quorums_signing.cpp.

Referenced by llmq::CInstantSendManager::ProcessTx(), and quorum_sigs_cmd().

◆ PreVerifyRecoveredSig()

◆ ProcessMessage()

void llmq::CSigningManager::ProcessMessage ( CNode pnode,
const std::string &  strCommand,
CDataStream vRecv,
CConnman connman 
)

Definition at line 474 of file quorums_signing.cpp.

References ProcessMessageRecoveredSig(), and NetMsgType::QSIGREC.

Referenced by ProcessMessage().

◆ ProcessMessageRecoveredSig()

◆ ProcessPendingReconstructedRecoveredSigs()

void llmq::CSigningManager::ProcessPendingReconstructedRecoveredSigs ( )
private

◆ ProcessPendingRecoveredSigs()

◆ ProcessRecoveredSig()

void llmq::CSigningManager::ProcessRecoveredSig ( NodeId  nodeId,
const CRecoveredSig recoveredSig,
const CQuorumCPtr quorum,
CConnman connman 
)
private

◆ PushReconstructedRecoveredSig()

void llmq::CSigningManager::PushReconstructedRecoveredSig ( const CRecoveredSig recoveredSig,
const CQuorumCPtr quorum 
)

◆ RegisterRecoveredSigsListener()

void llmq::CSigningManager::RegisterRecoveredSigsListener ( CRecoveredSigsListener l)

◆ SelectQuorumForSigning()

CQuorumCPtr llmq::CSigningManager::SelectQuorumForSigning ( Consensus::LLMQType  llmqType,
const uint256 selectionHash,
int  signHeight = -1,
int  signOffset = SIGN_HEIGHT_OFFSET 
)

◆ TruncateRecoveredSig()

void llmq::CSigningManager::TruncateRecoveredSig ( Consensus::LLMQType  llmqType,
const uint256 id 
)

◆ UnregisterRecoveredSigsListener()

void llmq::CSigningManager::UnregisterRecoveredSigsListener ( CRecoveredSigsListener l)

◆ VerifyRecoveredSig()

bool llmq::CSigningManager::VerifyRecoveredSig ( Consensus::LLMQType  llmqType,
int  signedAtHeight,
const uint256 id,
const uint256 msgHash,
const CBLSSignature sig 
)

Friends And Related Function Documentation

◆ CSigSharesManager

friend class CSigSharesManager
friend

Definition at line 114 of file quorums_signing.h.

Member Data Documentation

◆ cs

◆ db

◆ DEFAULT_MAX_RECOVERED_SIGS_AGE

const int64_t llmq::CSigningManager::DEFAULT_MAX_RECOVERED_SIGS_AGE = 60 * 60 * 24 * 7
staticprivate

Definition at line 115 of file quorums_signing.h.

◆ lastCleanupTime

int64_t llmq::CSigningManager::lastCleanupTime {0}
private

Definition at line 134 of file quorums_signing.h.

◆ pendingReconstructedRecoveredSigs

std::unordered_map<uint256, std::pair<CRecoveredSig, CQuorumCPtr>, StaticSaltedHasher> llmq::CSigningManager::pendingReconstructedRecoveredSigs
private

◆ pendingRecoveredSigs

std::unordered_map<NodeId, std::list<CRecoveredSig> > llmq::CSigningManager::pendingRecoveredSigs
private

◆ recoveredSigsListeners

std::vector<CRecoveredSigsListener*> llmq::CSigningManager::recoveredSigsListeners
private

Definition at line 136 of file quorums_signing.h.

◆ rnd

FastRandomContext llmq::CSigningManager::rnd
private

Definition at line 132 of file quorums_signing.h.

Referenced by CollectPendingRecoveredSigsToVerify().

◆ SIGN_HEIGHT_OFFSET

const int llmq::CSigningManager::SIGN_HEIGHT_OFFSET = 8
staticprivate

Definition at line 120 of file quorums_signing.h.


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