Bitcoin ABC  0.26.3
P2P Digital Currency
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
avalanche::Processor Class Referencefinal

#include <processor.h>

Inheritance diagram for avalanche::Processor:
[legend]
Collaboration diagram for avalanche::Processor:
[legend]

Classes

struct  GetLocalAcceptance
 
struct  IsWorthPolling
 
class  NotificationsHandler
 
struct  PeerData
 
struct  Query
 
struct  StakingReward
 

Public Member Functions

 ~Processor ()
 
bool addToReconcile (const AnyVoteItem &item) EXCLUSIVE_LOCKS_REQUIRED(!cs_finalizedItems)
 
bool reconcileOrFinalize (const ProofRef &proof) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 Wrapper around the addToReconcile for proofs that adds back the finalization flag to the peer if it is not polled due to being recently finalized. More...
 
bool isAccepted (const AnyVoteItem &item) const
 
int getConfidence (const AnyVoteItem &item) const
 
bool isRecentlyFinalized (const uint256 &itemId) const EXCLUSIVE_LOCKS_REQUIRED(!cs_finalizedItems)
 
void clearFinalizedItems () EXCLUSIVE_LOCKS_REQUIRED(!cs_finalizedItems)
 
void sendResponse (CNode *pfrom, Response response) const
 
bool registerVotes (NodeId nodeid, const Response &response, std::vector< VoteItemUpdate > &updates, int &banscore, std::string &error) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 
template<typename Callable >
auto withPeerManager (Callable &&func) const EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager)
 
CPubKey getSessionPubKey () const
 
bool sendHello (CNode *pfrom) EXCLUSIVE_LOCKS_REQUIRED(!cs_delayedAvahelloNodeIds)
 Send a avahello message. More...
 
void sendDelayedAvahello () EXCLUSIVE_LOCKS_REQUIRED(!cs_delayedAvahelloNodeIds)
 
ProofRef getLocalProof () const
 
ProofRegistrationState getLocalProofRegistrationState () const
 
bool isAvalancheServiceAvailable ()
 
bool startEventLoop (CScheduler &scheduler)
 
bool stopEventLoop ()
 
void avaproofsSent (NodeId nodeid) LOCKS_EXCLUDED(cs_main) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager)
 
int64_t getAvaproofsNodeCounter () const
 
bool isQuorumEstablished () LOCKS_EXCLUDED(cs_main) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 
bool canShareLocalProof ()
 
bool computeStakingReward (const CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 
bool eraseStakingRewardWinner (const BlockHash &prevBlockHash) EXCLUSIVE_LOCKS_REQUIRED(!cs_stakingRewards)
 
void cleanupStakingRewards (const int minHeight) EXCLUSIVE_LOCKS_REQUIRED(!cs_stakingRewards)
 
bool getStakingRewardWinners (const BlockHash &prevBlockHash, std::vector< std::pair< ProofId, CScript >> &winners) const EXCLUSIVE_LOCKS_REQUIRED(!cs_stakingRewards)
 
bool getStakingRewardWinners (const BlockHash &prevBlockHash, std::vector< CScript > &payouts) const EXCLUSIVE_LOCKS_REQUIRED(!cs_stakingRewards)
 
bool setStakingRewardWinners (const CBlockIndex *pprev, const std::vector< CScript > &payouts) EXCLUSIVE_LOCKS_REQUIRED(!cs_stakingRewards)
 
void InitializeNode (const ::Config &config, CNode &pnode, ServiceFlags our_services) override
 
bool ProcessMessages (const ::Config &config, CNode *pnode, std::atomic< bool > &interrupt) override
 
bool SendMessages (const ::Config &config, CNode *pnode) override
 
void FinalizeNode (const ::Config &config, const CNode &node) override LOCKS_EXCLUDED(cs_main) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 Handle removal of a node. More...
 
- Public Member Functions inherited from NetEventsInterface
virtual void InitializeNode (const Config &config, CNode &node, ServiceFlags our_services)=0
 Initialize a peer (setup state, queue any initial messages) More...
 
virtual void FinalizeNode (const Config &config, const CNode &node)=0
 Handle removal of a peer (clear state) More...
 
virtual bool ProcessMessages (const Config &config, CNode *pnode, std::atomic< bool > &interrupt) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex)=0
 Process protocol messages received from a given node. More...
 
virtual bool SendMessages (const Config &config, CNode *pnode) EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex)=0
 Send queued protocol messages to a given node. More...
 

Static Public Member Functions

static std::unique_ptr< ProcessorMakeProcessor (const ArgsManager &argsman, interfaces::Chain &chain, CConnman *connman, ChainstateManager &chainman, CTxMemPool *mempoolIn, CScheduler &scheduler, bilingual_str &error)
 

Public Attributes

bool !cs_finalizedItems
 
bool !cs_invalidatedBlocks
 
bool !cs_finalizationTip
 
bool !cs_stakingRewards
 
void !cs_delayedAvahelloNodeIds
 

Private Types

using QuerySet = boost::multi_index_container< Query, boost::multi_index::indexed_by< boost::multi_index::hashed_unique< boost::multi_index::composite_key< Query, boost::multi_index::member< Query, NodeId, &Query::nodeid >, boost::multi_index::member< Query, uint64_t, &Query::round > >>, boost::multi_index::ordered_non_unique< boost::multi_index::tag< query_timeout >, boost::multi_index::member< Query, SteadyMilliseconds, &Query::timeout > >> >
 

Private Member Functions

std::unique_ptr< PeerManager > peerManager GUARDED_BY (cs_peerManager)
 
const CBlockIndex *finalizationTip GUARDED_BY (cs_finalizationTip)
 
std::unordered_set< NodeId > delayedAvahelloNodeIds GUARDED_BY (cs_delayedAvahelloNodeIds)
 A list of the nodes that did not get our proof announced via avahello yet because we had no inbound connection. More...
 
std::unordered_map< BlockHash, StakingReward, SaltedUint256Hasher > stakingRewards GUARDED_BY (cs_stakingRewards)
 
 Processor (Config avaconfig, interfaces::Chain &chain, CConnman *connmanIn, ChainstateManager &chainman, CTxMemPool *mempoolIn, CScheduler &scheduler, std::unique_ptr< PeerData > peerDataIn, CKey sessionKeyIn, uint32_t minQuorumTotalScoreIn, double minQuorumConnectedScoreRatioIn, int64_t minAvaproofsNodeCountIn, uint32_t staleVoteThresholdIn, uint32_t staleVoteFactorIn, Amount stakeUtxoDustThresholdIn, bool preConsensus)
 
void updatedBlockTip () EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 
void transactionAddedToMempool (const CTransactionRef &tx) EXCLUSIVE_LOCKS_REQUIRED(!cs_finalizedItems)
 
void runEventLoop () EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 
void clearTimedoutRequests () EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager)
 
std::vector< CInvgetInvsForNextPoll (bool forPoll=true) EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager
 
bool sendHelloInternal (CNode *pfrom) EXCLUSIVE_LOCKS_REQUIRED(cs_delayedAvahelloNodeIds)
 
AnyVoteItem getVoteItemFromInv (const CInv &inv) const EXCLUSIVE_LOCKS_REQUIRED(!cs_peerManager)
 
CRollingBloomFilter invalidatedBlocks GUARDED_BY (cs_invalidatedBlocks)
 
CRollingBloomFilter finalizedItems GUARDED_BY (cs_finalizedItems)
 
bool isWorthPolling (const AnyVoteItem &item) const EXCLUSIVE_LOCKS_REQUIRED(!cs_finalizedItems)
 
bool getLocalAcceptance (const AnyVoteItem &item) const
 

Private Attributes

Config avaconfig
 
CConnmanconnman
 
ChainstateManagerchainman
 
CTxMemPoolmempool
 
RWCollection< VoteMapvoteRecords
 Items to run avalanche on. More...
 
std::atomic< uint64_t > round
 Keep track of peers and queries sent. More...
 
Mutex cs_peerManager
 Keep track of the peers and associated infos. More...
 
RWCollection< QuerySetqueries
 
std::unique_ptr< PeerDatapeerData
 
CKey sessionKey
 
EventLoop eventLoop
 Event loop machinery. More...
 
uint32_t minQuorumScore
 Quorum management. More...
 
double minQuorumConnectedScoreRatio
 
std::atomic< bool > quorumIsEstablished {false}
 
std::atomic< bool > m_canShareLocalProof {false}
 
int64_t minAvaproofsNodeCount
 
std::atomic< int64_t > avaproofsNodeCounter {0}
 
const uint32_t staleVoteThreshold
 Voting parameters. More...
 
const uint32_t staleVoteFactor
 
std::unique_ptr< interfaces::HandlerchainNotificationsHandler
 
Mutex cs_finalizationTip
 
Mutex cs_delayedAvahelloNodeIds
 
Mutex cs_stakingRewards
 
const bool m_preConsensus {false}
 
void !cs_finalizedItems
 
void !cs_stakingRewards
 
std::vector< CInv!cs_finalizedItems
 
Mutex cs_invalidatedBlocks
 We don't need many blocks but a low false positive rate. More...
 
Mutex cs_finalizedItems
 Rolling bloom filter to track recently finalized inventory items of any type. More...
 

Friends

struct ::avalanche::AvalancheTest
 

Additional Inherited Members

- Static Public Attributes inherited from NetEventsInterface
static Mutex g_msgproc_mutex
 Mutex for anything that is only accessed via the msg processing thread. More...
 
- Protected Member Functions inherited from NetEventsInterface
 ~NetEventsInterface ()=default
 Protected destructor so that instances can only be deleted by derived classes. More...
 

Detailed Description

Definition at line 182 of file processor.h.

Member Typedef Documentation

◆ QuerySet

using avalanche::Processor::QuerySet = boost::multi_index_container< Query, boost::multi_index::indexed_by< boost::multi_index::hashed_unique<boost::multi_index::composite_key< Query, boost::multi_index::member<Query, NodeId, &Query::nodeid>, boost::multi_index::member<Query, uint64_t, &Query::round> >>, boost::multi_index::ordered_non_unique< boost::multi_index::tag<query_timeout>, boost::multi_index::member<Query, SteadyMilliseconds, &Query::timeout> >> >
private

Definition at line 218 of file processor.h.

Constructor & Destructor Documentation

◆ Processor()

avalanche::Processor::Processor ( Config  avaconfig,
interfaces::Chain chain,
CConnman connmanIn,
ChainstateManager chainman,
CTxMemPool mempoolIn,
CScheduler scheduler,
std::unique_ptr< PeerData peerDataIn,
CKey  sessionKeyIn,
uint32_t  minQuorumTotalScoreIn,
double  minQuorumConnectedScoreRatioIn,
int64_t  minAvaproofsNodeCountIn,
uint32_t  staleVoteThresholdIn,
uint32_t  staleVoteFactorIn,
Amount  stakeUtxoDustThresholdIn,
bool  preConsensus 
)
private

Definition at line 141 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~Processor()

avalanche::Processor::~Processor ( )

Definition at line 203 of file processor.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addToReconcile()

bool avalanche::Processor::addToReconcile ( const AnyVoteItem item)

Definition at line 407 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ avaproofsSent()

void avalanche::Processor::avaproofsSent ( NodeId  nodeid)

Definition at line 758 of file processor.cpp.

◆ canShareLocalProof()

bool avalanche::Processor::canShareLocalProof ( )

Definition at line 858 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanupStakingRewards()

void avalanche::Processor::cleanupStakingRewards ( const int  minHeight)

Definition at line 909 of file processor.cpp.

◆ clearFinalizedItems()

void avalanche::Processor::clearFinalizedItems ( )

Definition at line 476 of file processor.cpp.

◆ clearTimedoutRequests()

void avalanche::Processor::clearTimedoutRequests ( )
private

Definition at line 1097 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeStakingReward()

bool avalanche::Processor::computeStakingReward ( const CBlockIndex pindex)

Definition at line 872 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eraseStakingRewardWinner()

bool avalanche::Processor::eraseStakingRewardWinner ( const BlockHash prevBlockHash)

Definition at line 904 of file processor.cpp.

◆ FinalizeNode()

void avalanche::Processor::FinalizeNode ( const ::Config config,
const CNode node 
)
override

Handle removal of a node.

Definition at line 967 of file processor.cpp.

◆ getAvaproofsNodeCounter()

int64_t avalanche::Processor::getAvaproofsNodeCounter ( ) const
inline

Definition at line 357 of file processor.h.

◆ getConfidence()

int avalanche::Processor::getConfidence ( const AnyVoteItem item) const

Definition at line 458 of file processor.cpp.

Here is the call graph for this function:

◆ getInvsForNextPoll()

std::vector< CInv > avalanche::Processor::getInvsForNextPoll ( bool  forPoll = true)
private

Definition at line 1136 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getLocalAcceptance()

bool avalanche::Processor::getLocalAcceptance ( const AnyVoteItem item) const
inlineprivate

Definition at line 462 of file processor.h.

Here is the caller graph for this function:

◆ getLocalProof()

ProofRef avalanche::Processor::getLocalProof ( ) const

Definition at line 739 of file processor.cpp.

Here is the caller graph for this function:

◆ getLocalProofRegistrationState()

ProofRegistrationState avalanche::Processor::getLocalProofRegistrationState ( ) const

Definition at line 743 of file processor.cpp.

◆ getSessionPubKey()

CPubKey avalanche::Processor::getSessionPubKey ( ) const

Definition at line 678 of file processor.cpp.

Here is the call graph for this function:

◆ getStakingRewardWinners() [1/2]

bool avalanche::Processor::getStakingRewardWinners ( const BlockHash prevBlockHash,
std::vector< CScript > &  payouts 
) const

Definition at line 934 of file processor.cpp.

Here is the call graph for this function:

◆ getStakingRewardWinners() [2/2]

bool avalanche::Processor::getStakingRewardWinners ( const BlockHash prevBlockHash,
std::vector< std::pair< ProofId, CScript >> &  winners 
) const

Definition at line 921 of file processor.cpp.

Here is the caller graph for this function:

◆ getVoteItemFromInv()

AnyVoteItem avalanche::Processor::getVoteItemFromInv ( const CInv inv) const
private

Definition at line 1182 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GUARDED_BY() [1/6]

std::unordered_set<NodeId> delayedAvahelloNodeIds avalanche::Processor::GUARDED_BY ( cs_delayedAvahelloNodeIds  )
private

A list of the nodes that did not get our proof announced via avahello yet because we had no inbound connection.

◆ GUARDED_BY() [2/6]

const CBlockIndex* finalizationTip avalanche::Processor::GUARDED_BY ( cs_finalizationTip  )
inlineprivate

Definition at line 261 of file processor.h.

◆ GUARDED_BY() [3/6]

CRollingBloomFilter finalizedItems avalanche::Processor::GUARDED_BY ( cs_finalizedItems  )
inlineprivate

Definition at line 433 of file processor.h.

◆ GUARDED_BY() [4/6]

CRollingBloomFilter invalidatedBlocks avalanche::Processor::GUARDED_BY ( cs_invalidatedBlocks  )
inlineprivate

Definition at line 420 of file processor.h.

◆ GUARDED_BY() [5/6]

std::unique_ptr<PeerManager> peerManager avalanche::Processor::GUARDED_BY ( cs_peerManager  )
private

◆ GUARDED_BY() [6/6]

std::unordered_map<BlockHash, StakingReward, SaltedUint256Hasher> stakingRewards avalanche::Processor::GUARDED_BY ( cs_stakingRewards  )
private

◆ InitializeNode()

void avalanche::Processor::InitializeNode ( const ::Config config,
CNode pnode,
ServiceFlags  our_services 
)
inlineoverride

Definition at line 382 of file processor.h.

◆ isAccepted()

bool avalanche::Processor::isAccepted ( const AnyVoteItem item) const

Definition at line 444 of file processor.cpp.

Here is the call graph for this function:

◆ isAvalancheServiceAvailable()

bool avalanche::Processor::isAvalancheServiceAvailable ( )
inline

Definition at line 350 of file processor.h.

◆ isQuorumEstablished()

bool avalanche::Processor::isQuorumEstablished ( )

Definition at line 779 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRecentlyFinalized()

bool avalanche::Processor::isRecentlyFinalized ( const uint256 itemId) const

Definition at line 472 of file processor.cpp.

Here is the caller graph for this function:

◆ isWorthPolling()

bool avalanche::Processor::isWorthPolling ( const AnyVoteItem item) const
private

Definition at line 1255 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeProcessor()

std::unique_ptr< Processor > avalanche::Processor::MakeProcessor ( const ArgsManager argsman,
interfaces::Chain chain,
CConnman connman,
ChainstateManager chainman,
CTxMemPool mempoolIn,
CScheduler scheduler,
bilingual_str error 
)
static

Definition at line 217 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessMessages()

bool avalanche::Processor::ProcessMessages ( const ::Config config,
CNode pnode,
std::atomic< bool > &  interrupt 
)
inlineoverride

Definition at line 384 of file processor.h.

◆ reconcileOrFinalize()

bool avalanche::Processor::reconcileOrFinalize ( const ProofRef proof)

Wrapper around the addToReconcile for proofs that adds back the finalization flag to the peer if it is not polled due to being recently finalized.

Definition at line 425 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ registerVotes()

bool avalanche::Processor::registerVotes ( NodeId  nodeid,
const Response response,
std::vector< VoteItemUpdate > &  updates,
int &  banscore,
std::string &  error 
)

Definition at line 517 of file processor.cpp.

Here is the call graph for this function:

◆ runEventLoop()

void avalanche::Processor::runEventLoop ( )
private

If we lost contact to that node, then we remove it from nodeids, but never add the request to queries, which ensures bad nodes get cleaned up over time.

Definition at line 1029 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendDelayedAvahello()

void avalanche::Processor::sendDelayedAvahello ( )

Definition at line 722 of file processor.cpp.

Here is the call graph for this function:

◆ sendHello()

bool avalanche::Processor::sendHello ( CNode pfrom)

Send a avahello message.

Parameters
pfromThe node to send the message to
Returns
True if a non-null delegation has been announced

Definition at line 717 of file processor.cpp.

Here is the call graph for this function:

◆ sendHelloInternal()

bool avalanche::Processor::sendHelloInternal ( CNode pfrom)
private

Definition at line 682 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendMessages()

bool avalanche::Processor::SendMessages ( const ::Config config,
CNode pnode 
)
inlineoverride

Definition at line 388 of file processor.h.

◆ sendResponse()

void avalanche::Processor::sendResponse ( CNode pfrom,
Response  response 
) const

Definition at line 510 of file processor.cpp.

Here is the call graph for this function:

◆ setStakingRewardWinners()

bool avalanche::Processor::setStakingRewardWinners ( const CBlockIndex pprev,
const std::vector< CScript > &  payouts 
)

Definition at line 950 of file processor.cpp.

Here is the call graph for this function:

◆ startEventLoop()

bool avalanche::Processor::startEventLoop ( CScheduler scheduler)

Definition at line 749 of file processor.cpp.

Here is the call graph for this function:

◆ stopEventLoop()

bool avalanche::Processor::stopEventLoop ( )

Definition at line 754 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transactionAddedToMempool()

void avalanche::Processor::transactionAddedToMempool ( const CTransactionRef tx)
private

Definition at line 1023 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatedBlockTip()

void avalanche::Processor::updatedBlockTip ( )
private

Definition at line 975 of file processor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ withPeerManager()

template<typename Callable >
auto avalanche::Processor::withPeerManager ( Callable &&  func) const
inline

Definition at line 326 of file processor.h.

Friends And Related Function Documentation

◆ ::avalanche::AvalancheTest

friend struct ::avalanche::AvalancheTest
friend

Definition at line 466 of file processor.h.

Member Data Documentation

◆ !cs_delayedAvahelloNodeIds

void avalanche::Processor::!cs_delayedAvahelloNodeIds

Definition at line 395 of file processor.h.

◆ !cs_finalizationTip

bool avalanche::Processor::!cs_finalizationTip

Definition at line 323 of file processor.h.

◆ !cs_finalizedItems [1/3]

void avalanche::Processor::!cs_finalizedItems

Definition at line 309 of file processor.h.

◆ !cs_finalizedItems [2/3]

void avalanche::Processor::!cs_finalizedItems
private

Definition at line 399 of file processor.h.

◆ !cs_finalizedItems [3/3]

std::vector<CInv> avalanche::Processor::!cs_finalizedItems
private

Definition at line 407 of file processor.h.

◆ !cs_invalidatedBlocks

bool avalanche::Processor::!cs_invalidatedBlocks

Definition at line 323 of file processor.h.

◆ !cs_stakingRewards [1/2]

bool avalanche::Processor::!cs_stakingRewards

Definition at line 361 of file processor.h.

◆ !cs_stakingRewards [2/2]

void avalanche::Processor::!cs_stakingRewards
private

Definition at line 403 of file processor.h.

◆ avaconfig

Config avalanche::Processor::avaconfig
private

Definition at line 183 of file processor.h.

◆ avaproofsNodeCounter

std::atomic<int64_t> avalanche::Processor::avaproofsNodeCounter {0}
private

Definition at line 250 of file processor.h.

◆ chainman

ChainstateManager& avalanche::Processor::chainman
private

Definition at line 185 of file processor.h.

◆ chainNotificationsHandler

std::unique_ptr<interfaces::Handler> avalanche::Processor::chainNotificationsHandler
private

Definition at line 258 of file processor.h.

◆ connman

CConnman* avalanche::Processor::connman
private

Definition at line 184 of file processor.h.

◆ cs_delayedAvahelloNodeIds

Mutex avalanche::Processor::cs_delayedAvahelloNodeIds
mutableprivate

Definition at line 263 of file processor.h.

◆ cs_finalizationTip

Mutex avalanche::Processor::cs_finalizationTip
mutableprivate

Definition at line 260 of file processor.h.

◆ cs_finalizedItems

Mutex avalanche::Processor::cs_finalizedItems
mutableprivate

Rolling bloom filter to track recently finalized inventory items of any type.

Once placed in this filter, those items will not be polled again unless they roll out. Note that this one filter tracks all types so blocks may be rolled out by transaction activity for example.

We want a low false positive rate to prevent accidentally not polling for an item when it is first seen.

Definition at line 432 of file processor.h.

◆ cs_invalidatedBlocks

Mutex avalanche::Processor::cs_invalidatedBlocks
mutableprivate

We don't need many blocks but a low false positive rate.

In the event of a false positive the node might skip polling this block. Such a block will not get marked as finalized until it is reconsidered for polling (if the filter changed its state) or another block is found.

Definition at line 419 of file processor.h.

◆ cs_peerManager

Mutex avalanche::Processor::cs_peerManager
mutableprivate

Keep track of the peers and associated infos.

Definition at line 201 of file processor.h.

◆ cs_stakingRewards

Mutex avalanche::Processor::cs_stakingRewards
mutableprivate

Definition at line 277 of file processor.h.

◆ eventLoop

EventLoop avalanche::Processor::eventLoop
private

Event loop machinery.

Definition at line 240 of file processor.h.

◆ m_canShareLocalProof

std::atomic<bool> avalanche::Processor::m_canShareLocalProof {false}
private

Definition at line 248 of file processor.h.

◆ m_preConsensus

const bool avalanche::Processor::m_preConsensus {false}
private

Definition at line 281 of file processor.h.

◆ mempool

CTxMemPool* avalanche::Processor::mempool
private

Definition at line 186 of file processor.h.

◆ minAvaproofsNodeCount

int64_t avalanche::Processor::minAvaproofsNodeCount
private

Definition at line 249 of file processor.h.

◆ minQuorumConnectedScoreRatio

double avalanche::Processor::minQuorumConnectedScoreRatio
private

Definition at line 246 of file processor.h.

◆ minQuorumScore

uint32_t avalanche::Processor::minQuorumScore
private

Quorum management.

Definition at line 245 of file processor.h.

◆ peerData

std::unique_ptr<PeerData> avalanche::Processor::peerData
private

Definition at line 236 of file processor.h.

◆ queries

RWCollection<QuerySet> avalanche::Processor::queries
private

Definition at line 232 of file processor.h.

◆ quorumIsEstablished

std::atomic<bool> avalanche::Processor::quorumIsEstablished {false}
private

Definition at line 247 of file processor.h.

◆ round

std::atomic<uint64_t> avalanche::Processor::round
private

Keep track of peers and queries sent.

Definition at line 196 of file processor.h.

◆ sessionKey

CKey avalanche::Processor::sessionKey
private

Definition at line 237 of file processor.h.

◆ staleVoteFactor

const uint32_t avalanche::Processor::staleVoteFactor
private

Definition at line 254 of file processor.h.

◆ staleVoteThreshold

const uint32_t avalanche::Processor::staleVoteThreshold
private

Voting parameters.

Definition at line 253 of file processor.h.

◆ voteRecords

RWCollection<VoteMap> avalanche::Processor::voteRecords
private

Items to run avalanche on.

Definition at line 191 of file processor.h.


The documentation for this class was generated from the following files: