Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
quorums_dkgsession.h
Go to the documentation of this file.
33 CDKGLogger(const std::string& _llmqTypeName, const uint256& _quorumHash, int _height, bool _areWeMember, const std::string& _func);
198 return CLLMQUtils::BuildCommitmentHash(llmqType, quorumHash, validMembers, quorumPublicKey, quorumVvecHash);
271 // we expect to only receive a single vvec and contribution per member, but we must also be able to relay
272 // conflicting messages as otherwise an attacker might be able to broadcast conflicting (valid+invalid) messages
286 CDKGSession(const Consensus::LLMQParams& _params, CBLSWorker& _blsWorker, CDKGSessionManager& _dkgManager) :
289 bool Init(const CBlockIndex* pindexQuorum, const std::vector<CDeterministicMNCPtr>& mns, const uint256& _myProTxHash);
322 void SendJustification(CDKGPendingMessages& pendingMessages, const std::set<uint256>& forMembers);
329 bool PreVerifyMessage(const uint256& hash, const CDKGPrematureCommitment& qc, bool& retBan) const;
Acts as a FIFO queue for incoming DKG messages.
Definition: quorums_dkgsessionhandler.h:36
void SetSimulatedDKGErrorRate(const std::string &type, double rate)
Definition: quorums_dkgsession.cpp:41
Definition: bls_worker.h:150
BLSSecretKeyVector skContributions
Definition: quorums_dkgsession.h:259
void ReceiveMessage(const uint256 &hash, const CDKGContribution &qc, bool &retBan)
Definition: quorums_dkgsession.cpp:261
ADD_SERIALIZE_METHODS void SerializationOp(Stream &s, Operation ser_action)
Definition: quorums_dkgsession.h:105
Definition: bls_worker.h:21
std::map< uint256, CDKGComplaint > complaints
Definition: quorums_dkgsession.h:276
std::map< uint256, CDKGPrematureCommitment > prematureCommitments
Definition: quorums_dkgsession.h:278
std::set< uint256 > justifications
Definition: quorums_dkgsession.h:213
Definition: univalue.h:20
CDKGPrematureCommitment()
Definition: quorums_dkgsession.h:172
CDKGSession(const Consensus::LLMQParams &_params, CBLSWorker &_blsWorker, CDKGSessionManager &_dkgManager)
Definition: quorums_dkgsession.h:286
void SendCommitment(CDKGPendingMessages &pendingMessages)
Definition: quorums_dkgsession.cpp:931
std::vector< std::unique_ptr< CDKGMember > > members
Definition: quorums_dkgsession.h:255
void SerializeWithoutSig(Stream &s) const
Definition: quorums_dkgsession.h:48
std::shared_ptr< const CDeterministicMN > CDeterministicMNCPtr
Definition: deterministicmns.h:249
Definition: deterministicmns.h:26
std::set< uint256 > contributions
Definition: quorums_dkgsession.h:211
Definition: quorums_dkgsession.h:202
std::vector< bool > validMembers
Definition: quorums_dkgsession.h:163
std::set< uint256 > prematureCommitments
Definition: quorums_dkgsession.h:214
std::map< uint256, CDKGJustification > justifications
Definition: quorums_dkgsession.h:277
int CountValidMembers() const
Definition: quorums_dkgsession.h:175
std::map< uint256, CDKGContribution > contributions
Definition: quorums_dkgsession.h:275
CDKGMember * GetMember(const uint256 &proTxHash) const
Definition: quorums_dkgsession.cpp:1289
uint256 SerializeHash(const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
Compute the 256-bit hash of an object's serialization.
Definition: hash.h:254
bool PreVerifyMessage(const uint256 &hash, const CDKGContribution &qc, bool &retBan) const
Definition: quorums_dkgsession.cpp:213
std::shared_ptr< BLSVerificationVector > BLSVerificationVectorPtr
Definition: bls.h:471
static uint256 BuildCommitmentHash(Consensus::LLMQType llmqType, const uint256 &blockHash, const std::vector< bool > &validMembers, const CBLSPublicKey &pubKey, const uint256 &vvecHash)
Definition: quorums_utils.cpp:26
CBLSPublicKey quorumPublicKey
Definition: quorums_dkgsession.h:165
size_t GetMyMemberIndex() const
Definition: quorums_dkgsession.h:291
void MarkBadMember(size_t idx)
Definition: quorums_dkgsession.cpp:1298
Definition: bls.h:263
void VerifyPendingContributions()
Definition: quorums_dkgsession.cpp:360
#define ADD_SERIALIZE_METHODS
Implement three methods for serializable objects.
Definition: serialize.h:174
Definition: bls.h:286
Definition: bls_ies.h:113
Definition: quorums_dkgsession.h:123
void VerifyAndComplain(CDKGPendingMessages &pendingMessages)
Definition: quorums_dkgsession.cpp:409
ADD_SERIALIZE_METHODS void SerializationOp(Stream &s, Operation ser_action)
Definition: quorums_dkgsession.h:136
void VerifyAndJustify(CDKGPendingMessages &pendingMessages)
Definition: quorums_dkgsession.cpp:636
ADD_SERIALIZE_METHODS void SerializationOp(Stream &s, Operation ser_action)
Definition: quorums_dkgsession.h:184
void VerifyConnectionAndMinProtoVersions()
Definition: quorums_dkgsession.cpp:447
std::vector< BLSVerificationVectorPtr > receivedVvecs
Definition: quorums_dkgsession.h:262
Definition: params.h:65
void RelayInvToParticipants(const CInv &inv) const
Definition: quorums_dkgsession.cpp:1311
std::vector< size_t > pendingContributionVerifications
Definition: quorums_dkgsession.h:280
The DKG session is a single instance of the DKG process.
Definition: quorums_dkgsession.h:239
Definition: quorums_dkgsession.h:29
void Contribute(CDKGPendingMessages &pendingMessages)
The following sets of methods are for the first 4 phases handled in the session.
Definition: quorums_dkgsession.cpp:140
Definition: quorums_dkgsession.h:36
CDKGMember(CDeterministicMNCPtr _dmn, size_t _idx)
Definition: quorums_dkgsession.cpp:84
BLSSecretKeyVector receivedSkContributions
Definition: quorums_dkgsession.h:264
std::vector< CFinalCommitment > FinalizeCommitments()
Definition: quorums_dkgsession.cpp:1192
std::set< uint256 > badMemberVotes
Definition: quorums_dkgsession.h:216
void SendComplaint(CDKGPendingMessages &pendingMessages)
Definition: quorums_dkgsession.cpp:485
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:170
Definition: quorums_dkgsession.h:88
void VerifyAndCommit(CDKGPendingMessages &pendingMessages)
Definition: quorums_dkgsession.cpp:888
bool Init(const CBlockIndex *pindexQuorum, const std::vector< CDeterministicMNCPtr > &mns, const uint256 &_myProTxHash)
Definition: quorums_dkgsession.cpp:92
std::vector< std::pair< uint32_t, CBLSSecretKey > > contributions
Definition: quorums_dkgsession.h:129
Consensus::LLMQType llmqType
Definition: quorums_dkgsession.h:160
std::map< uint256, size_t > membersMap
Definition: quorums_dkgsession.h:256
BLSVerificationVectorPtr vvecContribution
Definition: quorums_dkgsession.h:258
std::set< uint256 > complaintsFromOthers
Definition: quorums_dkgsession.h:217
std::vector< bool > complainForMembers
Definition: quorums_dkgsession.h:95
uint256 quorumVvecHash
Definition: quorums_dkgsession.h:166
Handles multiple sequential sessions of one specific LLMQ type.
Definition: quorums_dkgsessionhandler.h:96
uint256 GetSignHash() const
Definition: quorums_dkgsession.h:196
std::set< uint256 > validCommitments
Definition: quorums_dkgsession.h:283
void SendJustification(CDKGPendingMessages &pendingMessages, const std::set< uint256 > &forMembers)
Definition: quorums_dkgsession.cpp:676
void SendContributions(CDKGPendingMessages &pendingMessages)
Definition: quorums_dkgsession.cpp:160
CDKGLogger(const CDKGSession &_quorumDkg, const std::string &_func)
Definition: quorums_dkgsession.cpp:63
Definition: batchedlogger.h:10
Definition: serialize.h:162
Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the re...
Definition: sync.h:94
std::shared_ptr< CBLSIESMultiRecipientObjects< CBLSSecretKey > > contributions
Definition: quorums_dkgsession.h:43