Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <quorums_signing.h>
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 >, StaticSaltedHasher > | pendingReconstructedRecoveredSigs |
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 | ) |
Definition at line 447 of file quorums_signing.cpp.
References cs, db, CInv::hash, llmq::CRecoveredSigsDb::HasRecoveredSigForHash(), LOCK, MSG_QUORUM_RECOVERED_SIG, pendingReconstructedRecoveredSigs, and CInv::type.
Referenced by AlreadyHave().
◆ AsyncSignIfMember()
bool llmq::CSigningManager::AsyncSignIfMember | ( | Consensus::LLMQType | llmqType, |
const uint256 & | id, | ||
const uint256 & | msgHash, | ||
bool | allowReSign = false |
||
) |
Definition at line 784 of file quorums_signing.cpp.
References activeMasternodeInfo, llmq::CSigSharesManager::AsyncSign(), fMasternodeMode, llmq::CSigSharesManager::ForceReAnnouncement(), CChainParams::GetConsensus(), base_blob< BITS >::IsNull(), BCLog::LLMQ, Consensus::Params::llmqs, LOCK, LogPrint, LogPrintf, Params(), CActiveMasternodeInfo::proTxHash, quorum(), llmq::quorumSigSharesManager, and base_blob< BITS >::ToString().
Referenced by llmq::CInstantSendManager::ProcessTx(), quorum_sigs_cmd(), llmq::CChainLocksHandler::TrySignChainTip(), and llmq::CInstantSendManager::TrySignInstantSendLock().
◆ Cleanup()
|
private |
Definition at line 756 of file quorums_signing.cpp.
References gArgs, ArgsManager::GetArg(), and GetTimeMillis().
Referenced by llmq::CSigSharesManager::WorkThreadMain().
◆ CollectPendingRecoveredSigsToVerify()
|
private |
Definition at line 537 of file quorums_signing.cpp.
References llmq::CLLMQUtils::BuildSignHash(), cs, db, llmq::CQuorumManager::GetQuorum(), llmq::CRecoveredSigsDb::HasRecoveredSigForHash(), llmq::CLLMQUtils::IsQuorumActive(), llmq::CLLMQUtils::IterateNodesRandom(), BCLog::LLMQ, LOCK, LogPrint, pendingRecoveredSigs, quorum(), llmq::quorumManager, and rnd.
Referenced by ProcessPendingRecoveredSigs().
◆ GetActiveQuorumSet()
std::vector<CQuorumCPtr> llmq::CSigningManager::GetActiveQuorumSet | ( | Consensus::LLMQType | llmqType, |
int | signHeight | ||
) |
◆ GetRecoveredSigForGetData()
bool llmq::CSigningManager::GetRecoveredSigForGetData | ( | const uint256 & | hash, |
CRecoveredSig & | ret | ||
) |
Definition at line 462 of file quorums_signing.cpp.
References db, llmq::CRecoveredSigsDb::GetRecoveredSigByHash(), llmq::CLLMQUtils::IsQuorumActive(), llmq::CRecoveredSig::llmqType, and llmq::CRecoveredSig::quorumHash.
◆ 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 | ||
) |
Definition at line 846 of file quorums_signing.cpp.
Referenced by llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), quorum_sigs_cmd(), and llmq::CInstantSendManager::TrySignInstantSendLock().
◆ HasRecoveredSigForId()
bool llmq::CSigningManager::HasRecoveredSigForId | ( | Consensus::LLMQType | llmqType, |
const uint256 & | id | ||
) |
Definition at line 851 of file quorums_signing.cpp.
Referenced by llmq::CSigSharesManager::ProcessMessageBatchedSigShares(), llmq::CSigSharesManager::ProcessMessageSigShare(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::CSigSharesManager::ProcessPendingSigShares(), llmq::CSigSharesManager::ProcessSigShare(), llmq::CSigSharesManager::TryRecoverSig(), and llmq::CInstantSendManager::TrySignInstantSendLock().
◆ HasRecoveredSigForSession()
bool llmq::CSigningManager::HasRecoveredSigForSession | ( | const uint256 & | signHash | ) |
Definition at line 856 of file quorums_signing.cpp.
Referenced by llmq::CSigSharesManager::Cleanup(), llmq::CSigSharesManager::CollectSigSharesToRequest(), llmq::CSigSharesManager::CollectSigSharesToSend(), llmq::CSigSharesManager::ProcessMessageGetSigShares(), and llmq::CSigSharesManager::ProcessMessageSigSharesInv().
◆ 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()
|
private |
Definition at line 513 of file quorums_signing.cpp.
References CChainParams::GetConsensus(), llmq::CQuorumManager::GetQuorum(), llmq::CLLMQUtils::IsQuorumActive(), BCLog::LLMQ, Consensus::Params::llmqs, llmq::CRecoveredSig::llmqType, LogPrint, Params(), quorum(), llmq::CRecoveredSig::quorumHash, llmq::quorumManager, and base_blob< BITS >::ToString().
Referenced by ProcessMessageRecoveredSig().
◆ 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()
|
private |
Definition at line 483 of file quorums_signing.cpp.
References llmq::CLLMQUtils::BuildSignHash(), cs, cs_main, db, llmq::CRecoveredSig::GetHash(), CNode::GetId(), llmq::CRecoveredSigsDb::HasRecoveredSigForHash(), llmq::CRecoveredSig::id, BCLog::LLMQ, LOCK, LogPrint, Misbehaving(), llmq::CRecoveredSig::msgHash, pendingReconstructedRecoveredSigs, pendingRecoveredSigs, PreVerifyRecoveredSig(), and base_blob< BITS >::ToString().
Referenced by ProcessMessage().
◆ ProcessPendingReconstructedRecoveredSigs()
|
private |
Definition at line 603 of file quorums_signing.cpp.
References cs, g_connman, LOCK, pendingReconstructedRecoveredSigs, and ProcessRecoveredSig().
Referenced by ProcessPendingRecoveredSigs().
◆ ProcessPendingRecoveredSigs()
|
private |
Definition at line 615 of file quorums_signing.cpp.
References CBLSBatchVerifier< SourceId, MessageId >::badSources, llmq::CLLMQUtils::BuildSignHash(), CollectPendingRecoveredSigsToVerify(), cxxtimer::Timer::count(), cs_main, BCLog::LLMQ, LOCK, LogPrint, Misbehaving(), ProcessPendingReconstructedRecoveredSigs(), ProcessRecoveredSig(), CBLSBatchVerifier< SourceId, MessageId >::PushMessage(), quorum(), cxxtimer::Timer::stop(), and CBLSBatchVerifier< SourceId, MessageId >::Verify().
Referenced by llmq::CSigSharesManager::WorkThreadMain().
◆ ProcessRecoveredSig()
|
private |
Definition at line 681 of file quorums_signing.cpp.
References cs_main, EraseObjectRequest(), llmq::CRecoveredSig::GetHash(), llmq::CRecoveredSig::llmqType, LOCK, and MSG_QUORUM_RECOVERED_SIG.
Referenced by ProcessPendingReconstructedRecoveredSigs(), ProcessPendingRecoveredSigs(), and llmq::CSigSharesManager::TryRecoverSig().
◆ PushReconstructedRecoveredSig()
void llmq::CSigningManager::PushReconstructedRecoveredSig | ( | const CRecoveredSig & | recoveredSig, |
const CQuorumCPtr & | quorum | ||
) |
Definition at line 743 of file quorums_signing.cpp.
References llmq::CRecoveredSig::GetHash(), LOCK, and quorum().
Referenced by llmq::CInstantSendManager::ProcessPendingInstantSendLocks().
◆ RegisterRecoveredSigsListener()
void llmq::CSigningManager::RegisterRecoveredSigsListener | ( | CRecoveredSigsListener * | l | ) |
Definition at line 771 of file quorums_signing.cpp.
References LOCK.
Referenced by llmq::CSigSharesManager::RegisterAsRecoveredSigsListener(), llmq::CChainLocksHandler::Start(), and llmq::CInstantSendManager::Start().
◆ SelectQuorumForSigning()
CQuorumCPtr llmq::CSigningManager::SelectQuorumForSigning | ( | Consensus::LLMQType | llmqType, |
const uint256 & | selectionHash, | ||
int | signHeight = -1 , |
||
int | signOffset = SIGN_HEIGHT_OFFSET |
||
) |
Definition at line 895 of file quorums_signing.cpp.
References chainActive, cs_main, CChainParams::GetConsensus(), CChain::Height(), Consensus::Params::llmqs, LOCK, and Params().
Referenced by llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), and quorum_selectquorum().
◆ TruncateRecoveredSig()
void llmq::CSigningManager::TruncateRecoveredSig | ( | Consensus::LLMQType | llmqType, |
const uint256 & | id | ||
) |
Definition at line 751 of file quorums_signing.cpp.
Referenced by llmq::CInstantSendManager::HandleFullyConfirmedBlock(), and llmq::CInstantSendManager::TruncateRecoveredSigsForInputs().
◆ UnregisterRecoveredSigsListener()
void llmq::CSigningManager::UnregisterRecoveredSigsListener | ( | CRecoveredSigsListener * | l | ) |
Definition at line 777 of file quorums_signing.cpp.
References LOCK.
Referenced by llmq::CChainLocksHandler::Stop(), llmq::CInstantSendManager::Stop(), and llmq::CSigSharesManager::UnregisterAsRecoveredSigsListener().
◆ VerifyRecoveredSig()
bool llmq::CSigningManager::VerifyRecoveredSig | ( | Consensus::LLMQType | llmqType, |
int | signedAtHeight, | ||
const uint256 & | id, | ||
const uint256 & | msgHash, | ||
const CBLSSignature & | sig | ||
) |
Definition at line 931 of file quorums_signing.cpp.
References quorum(), and CBLSSignature::VerifyInsecure().
Referenced by llmq::CChainLocksHandler::ProcessNewChainLock().
Friends And Related Function Documentation
◆ CSigSharesManager
|
friend |
Definition at line 114 of file quorums_signing.h.
Member Data Documentation
◆ cs
|
private |
Definition at line 123 of file quorums_signing.h.
Referenced by AlreadyHave(), CollectPendingRecoveredSigsToVerify(), ProcessMessageRecoveredSig(), and ProcessPendingReconstructedRecoveredSigs().
◆ db
|
private |
Definition at line 125 of file quorums_signing.h.
Referenced by AlreadyHave(), CollectPendingRecoveredSigsToVerify(), GetRecoveredSigForGetData(), and ProcessMessageRecoveredSig().
◆ DEFAULT_MAX_RECOVERED_SIGS_AGE
|
staticprivate |
Definition at line 115 of file quorums_signing.h.
◆ lastCleanupTime
|
private |
Definition at line 134 of file quorums_signing.h.
◆ pendingReconstructedRecoveredSigs
|
private |
Definition at line 129 of file quorums_signing.h.
Referenced by AlreadyHave(), ProcessMessageRecoveredSig(), and ProcessPendingReconstructedRecoveredSigs().
◆ pendingRecoveredSigs
|
private |
Definition at line 128 of file quorums_signing.h.
Referenced by CollectPendingRecoveredSigsToVerify(), and ProcessMessageRecoveredSig().
◆ recoveredSigsListeners
|
private |
Definition at line 136 of file quorums_signing.h.
◆ rnd
|
private |
Definition at line 132 of file quorums_signing.h.
Referenced by CollectPendingRecoveredSigsToVerify().
◆ SIGN_HEIGHT_OFFSET
|
staticprivate |
Definition at line 120 of file quorums_signing.h.
The documentation for this class was generated from the following files:
- src/llmq/quorums_signing.h
- src/llmq/quorums_signing.cpp