Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

ContributionVerifier Struct Reference
+ Collaboration diagram for ContributionVerifier:

Classes

struct  BatchState
 

Public Member Functions

 ContributionVerifier (const CBLSId &_forId, const std::vector< BLSVerificationVectorPtr > &_vvecs, const BLSSecretKeyVector &_skShares, size_t _batchSize, bool _parallel, bool _aggregated, ctpl::thread_pool &_workerPool, std::function< void(const std::vector< bool > &)> _doneCallback)
 
void Start ()
 
void Finish ()
 
void AsyncAggregate (size_t batchIdx)
 
void HandleAggVvecDone (size_t batchIdx, const BLSVerificationVectorPtr &vvec)
 
void HandleAggSkShareDone (size_t batchIdx, const CBLSSecretKey &skShare)
 
void HandleVerifyDone (size_t batchIdx, size_t count)
 
void HandleAggDone (size_t batchIdx)
 
void AsyncAggregatedVerifyBatch (size_t batchIdx)
 
void AsyncVerifyBatchOneByOne (size_t batchIdx)
 
bool Verify (const BLSVerificationVectorPtr &vvec, const CBLSSecretKey &skShare)
 
template<typename Callable >
void PushOrDoWork (Callable &&f)
 

Public Attributes

CBLSId forId
 
const std::vector< BLSVerificationVectorPtr > & vvecs
 
const BLSSecretKeyVectorskShares
 
size_t batchSize
 
bool parallel
 
bool aggregated
 
ctpl::thread_poolworkerPool
 
size_t batchCount
 
size_t verifyCount
 
std::vector< BatchStatebatchStates
 
std::atomic< size_t > verifyDoneCount {0}
 
std::function< void(const std::vector< bool > &)> doneCallback
 

Detailed Description

Definition at line 399 of file bls_worker.cpp.

Constructor & Destructor Documentation

◆ ContributionVerifier()

ContributionVerifier::ContributionVerifier ( const CBLSId _forId,
const std::vector< BLSVerificationVectorPtr > &  _vvecs,
const BLSSecretKeyVector _skShares,
size_t  _batchSize,
bool  _parallel,
bool  _aggregated,
ctpl::thread_pool _workerPool,
std::function< void(const std::vector< bool > &)>  _doneCallback 
)
inline

Definition at line 434 of file bls_worker.cpp.

Member Function Documentation

◆ AsyncAggregate()

void ContributionVerifier::AsyncAggregate ( size_t  batchIdx)
inline

◆ AsyncAggregatedVerifyBatch()

void ContributionVerifier::AsyncAggregatedVerifyBatch ( size_t  batchIdx)
inline

◆ AsyncVerifyBatchOneByOne()

void ContributionVerifier::AsyncVerifyBatchOneByOne ( size_t  batchIdx)
inline

Definition at line 564 of file bls_worker.cpp.

References batchStates, count, HandleVerifyDone(), PushOrDoWork(), skShares, Verify(), and vvecs.

Referenced by AsyncAggregatedVerifyBatch(), and Start().

◆ Finish()

void ContributionVerifier::Finish ( )
inline

Definition at line 481 of file bls_worker.cpp.

References batchSize, batchStates, doneCallback, and vvecs.

Referenced by HandleVerifyDone().

◆ HandleAggDone()

void ContributionVerifier::HandleAggDone ( size_t  batchIdx)
inline

◆ HandleAggSkShareDone()

void ContributionVerifier::HandleAggSkShareDone ( size_t  batchIdx,
const CBLSSecretKey skShare 
)
inline

Definition at line 515 of file bls_worker.cpp.

References batchStates, and HandleAggDone().

Referenced by AsyncAggregate().

◆ HandleAggVvecDone()

void ContributionVerifier::HandleAggVvecDone ( size_t  batchIdx,
const BLSVerificationVectorPtr vvec 
)
inline

Definition at line 507 of file bls_worker.cpp.

References batchStates, and HandleAggDone().

Referenced by AsyncAggregate().

◆ HandleVerifyDone()

void ContributionVerifier::HandleVerifyDone ( size_t  batchIdx,
size_t  count 
)
inline

◆ PushOrDoWork()

template<typename Callable >
void ContributionVerifier::PushOrDoWork ( Callable &&  f)
inline

◆ Start()

void ContributionVerifier::Start ( )
inline

◆ Verify()

bool ContributionVerifier::Verify ( const BLSVerificationVectorPtr vvec,
const CBLSSecretKey skShare 
)
inline

Member Data Documentation

◆ aggregated

bool ContributionVerifier::aggregated

Definition at line 423 of file bls_worker.cpp.

Referenced by Start().

◆ batchCount

size_t ContributionVerifier::batchCount

Definition at line 427 of file bls_worker.cpp.

Referenced by Start().

◆ batchSize

size_t ContributionVerifier::batchSize

Definition at line 421 of file bls_worker.cpp.

Referenced by Finish(), and Start().

◆ batchStates

std::vector<BatchState> ContributionVerifier::batchStates

◆ doneCallback

std::function<void(const std::vector<bool>&)> ContributionVerifier::doneCallback

Definition at line 432 of file bls_worker.cpp.

Referenced by Finish().

◆ forId

CBLSId ContributionVerifier::forId

Definition at line 418 of file bls_worker.cpp.

Referenced by Verify().

◆ parallel

bool ContributionVerifier::parallel

Definition at line 422 of file bls_worker.cpp.

Referenced by AsyncAggregate(), and PushOrDoWork().

◆ skShares

const BLSSecretKeyVector& ContributionVerifier::skShares

Definition at line 420 of file bls_worker.cpp.

Referenced by AsyncAggregate(), and AsyncVerifyBatchOneByOne().

◆ verifyCount

size_t ContributionVerifier::verifyCount

Definition at line 428 of file bls_worker.cpp.

Referenced by HandleVerifyDone(), and Start().

◆ verifyDoneCount

std::atomic<size_t> ContributionVerifier::verifyDoneCount {0}

Definition at line 431 of file bls_worker.cpp.

Referenced by HandleVerifyDone().

◆ vvecs

const std::vector<BLSVerificationVectorPtr>& ContributionVerifier::vvecs

Definition at line 419 of file bls_worker.cpp.

Referenced by AsyncAggregate(), AsyncVerifyBatchOneByOne(), Finish(), and Start().

◆ workerPool

ctpl::thread_pool& ContributionVerifier::workerPool

Definition at line 425 of file bls_worker.cpp.

Referenced by AsyncAggregate(), and PushOrDoWork().


The documentation for this struct was generated from the following file:
Released under the MIT license