Bitcoin ABC 0.30.5
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 hasFinalizedTip () const EXCLUSIVE_LOCKS_REQUIRED(!cs_finalizationTip)
 Whether there is a finalized tip. More...
 
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...
 
void addStakeContender (const ProofRef &proof) EXCLUSIVE_LOCKS_REQUIRED(cs_main
 Track votes on stake contenders. More...
 
int getStakeContenderStatus (const StakeContenderId &contenderId) const EXCLUSIVE_LOCKS_REQUIRED(!cs_stakeContenderCache
 
void promoteStakeContendersToTip () EXCLUSIVE_LOCKS_REQUIRED(!cs_stakeContenderCache
 Promote stake contender cache entries to the latest chain tip. 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

const bool m_preConsensus {false}
 
const bool m_stakingPreConsensus {false}
 
bool !cs_finalizedItems
 
bool !cs_invalidatedBlocks
 
bool !cs_finalizationTip
 
bool !cs_stakingRewards
 
void !cs_stakeContenderCache
 
bool !cs_stakeContenderCache
 
void !cs_delayedAvahelloNodeIds
 
int !cs_stakingRewards
 
void !cs_peerManager
 
void !cs_finalizationTip
 

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)
 
StakeContenderCache stakeContenderCache GUARDED_BY (cs_stakeContenderCache)
 
 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, bool stakingPreConsensus)
 
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
 
Mutex cs_stakeContenderCache
 
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 149 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 185 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,
bool  stakingPreConsensus 
)
private

Definition at line 142 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 205 of file processor.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ addStakeContender()

void avalanche::Processor::addStakeContender ( const ProofRef proof)

Track votes on stake contenders.

Definition at line 994 of file processor.cpp.

Here is the call graph for this function:

◆ addToReconcile()

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

Definition at line 417 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 767 of file processor.cpp.

Here is the call graph for this function:

◆ canShareLocalProof()

bool avalanche::Processor::canShareLocalProof ( )

Definition at line 867 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 918 of file processor.cpp.

◆ clearFinalizedItems()

void avalanche::Processor::clearFinalizedItems ( )

Definition at line 486 of file processor.cpp.

◆ clearTimedoutRequests()

void avalanche::Processor::clearTimedoutRequests ( )
private

Definition at line 1163 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 881 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 913 of file processor.cpp.

◆ FinalizeNode()

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

Handle removal of a node.

Definition at line 986 of file processor.cpp.

◆ getAvaproofsNodeCounter()

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

Definition at line 334 of file processor.h.

◆ getConfidence()

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

Definition at line 468 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 1202 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 451 of file processor.h.

Here is the caller graph for this function:

◆ getLocalProof()

ProofRef avalanche::Processor::getLocalProof ( ) const

Definition at line 748 of file processor.cpp.

Here is the caller graph for this function:

◆ getLocalProofRegistrationState()

ProofRegistrationState avalanche::Processor::getLocalProofRegistrationState ( ) const

Definition at line 752 of file processor.cpp.

◆ getSessionPubKey()

CPubKey avalanche::Processor::getSessionPubKey ( ) const

Definition at line 687 of file processor.cpp.

Here is the call graph for this function:

◆ getStakeContenderStatus()

int avalanche::Processor::getStakeContenderStatus ( const StakeContenderId contenderId) const

Definition at line 1001 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 948 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 935 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 1248 of file processor.cpp.

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

◆ GUARDED_BY() [1/7]

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/7]

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

Definition at line 228 of file processor.h.

◆ GUARDED_BY() [3/7]

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

Definition at line 422 of file processor.h.

◆ GUARDED_BY() [4/7]

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

Definition at line 409 of file processor.h.

◆ GUARDED_BY() [5/7]

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

◆ GUARDED_BY() [6/7]

StakeContenderCache stakeContenderCache avalanche::Processor::GUARDED_BY ( cs_stakeContenderCache  )
private

◆ GUARDED_BY() [7/7]

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

◆ hasFinalizedTip()

bool avalanche::Processor::hasFinalizedTip ( ) const
inline

Whether there is a finalized tip.

Definition at line 324 of file processor.h.

Here is the caller graph for this function:

◆ InitializeNode()

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

Definition at line 359 of file processor.h.

◆ isAccepted()

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

Definition at line 454 of file processor.cpp.

Here is the call graph for this function:

◆ isAvalancheServiceAvailable()

bool avalanche::Processor::isAvalancheServiceAvailable ( )
inline

Definition at line 321 of file processor.h.

◆ isQuorumEstablished()

bool avalanche::Processor::isQuorumEstablished ( )

Definition at line 788 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 482 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 1333 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 219 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 361 of file processor.h.

◆ promoteStakeContendersToTip()

void avalanche::Processor::promoteStakeContendersToTip ( )

Promote stake contender cache entries to the latest chain tip.

Definition at line 1020 of file processor.cpp.

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

◆ 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 435 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 527 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 1095 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 731 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 726 of file processor.cpp.

Here is the call graph for this function:

◆ sendHelloInternal()

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

Definition at line 691 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 365 of file processor.h.

◆ sendResponse()

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

Definition at line 520 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 964 of file processor.cpp.

Here is the call graph for this function:

◆ startEventLoop()

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

Definition at line 758 of file processor.cpp.

Here is the call graph for this function:

◆ stopEventLoop()

bool avalanche::Processor::stopEventLoop ( )

Definition at line 763 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 1089 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 1037 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 297 of file processor.h.

Friends And Related Function Documentation

◆ ::avalanche::AvalancheTest

friend struct ::avalanche::AvalancheTest
friend

Definition at line 455 of file processor.h.

Member Data Documentation

◆ !cs_delayedAvahelloNodeIds

void avalanche::Processor::!cs_delayedAvahelloNodeIds

Definition at line 372 of file processor.h.

◆ !cs_finalizationTip [1/2]

void avalanche::Processor::!cs_finalizationTip

Definition at line 294 of file processor.h.

◆ !cs_finalizationTip [2/2]

void avalanche::Processor::!cs_finalizationTip

Definition at line 383 of file processor.h.

◆ !cs_finalizedItems [1/3]

void avalanche::Processor::!cs_finalizedItems

Definition at line 280 of file processor.h.

◆ !cs_finalizedItems [2/3]

void avalanche::Processor::!cs_finalizedItems
private

Definition at line 387 of file processor.h.

◆ !cs_finalizedItems [3/3]

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

Definition at line 396 of file processor.h.

◆ !cs_invalidatedBlocks

bool avalanche::Processor::!cs_invalidatedBlocks

Definition at line 294 of file processor.h.

◆ !cs_peerManager

void avalanche::Processor::!cs_peerManager

Definition at line 382 of file processor.h.

◆ !cs_stakeContenderCache [1/2]

void avalanche::Processor::!cs_stakeContenderCache

Definition at line 346 of file processor.h.

◆ !cs_stakeContenderCache [2/2]

bool avalanche::Processor::!cs_stakeContenderCache

Definition at line 356 of file processor.h.

◆ !cs_stakingRewards [1/3]

bool avalanche::Processor::!cs_stakingRewards

Definition at line 338 of file processor.h.

◆ !cs_stakingRewards [2/3]

int avalanche::Processor::!cs_stakingRewards

Definition at line 378 of file processor.h.

◆ !cs_stakingRewards [3/3]

void avalanche::Processor::!cs_stakingRewards
private

Definition at line 392 of file processor.h.

◆ avaconfig

Config avalanche::Processor::avaconfig
private

Definition at line 150 of file processor.h.

◆ avaproofsNodeCounter

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

Definition at line 217 of file processor.h.

◆ chainman

ChainstateManager& avalanche::Processor::chainman
private

Definition at line 152 of file processor.h.

◆ chainNotificationsHandler

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

Definition at line 225 of file processor.h.

◆ connman

CConnman* avalanche::Processor::connman
private

Definition at line 151 of file processor.h.

◆ cs_delayedAvahelloNodeIds

Mutex avalanche::Processor::cs_delayedAvahelloNodeIds
mutableprivate

Definition at line 230 of file processor.h.

◆ cs_finalizationTip

Mutex avalanche::Processor::cs_finalizationTip
mutableprivate

Definition at line 227 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 421 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 408 of file processor.h.

◆ cs_peerManager

Mutex avalanche::Processor::cs_peerManager
mutableprivate

Keep track of the peers and associated infos.

Definition at line 168 of file processor.h.

◆ cs_stakeContenderCache

Mutex avalanche::Processor::cs_stakeContenderCache
mutableprivate

Definition at line 248 of file processor.h.

◆ cs_stakingRewards

Mutex avalanche::Processor::cs_stakingRewards
mutableprivate

Definition at line 244 of file processor.h.

◆ eventLoop

EventLoop avalanche::Processor::eventLoop
private

Event loop machinery.

Definition at line 207 of file processor.h.

◆ m_canShareLocalProof

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

Definition at line 215 of file processor.h.

◆ m_preConsensus

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

Definition at line 261 of file processor.h.

◆ m_stakingPreConsensus

const bool avalanche::Processor::m_stakingPreConsensus {false}

Definition at line 262 of file processor.h.

◆ mempool

CTxMemPool* avalanche::Processor::mempool
private

Definition at line 153 of file processor.h.

◆ minAvaproofsNodeCount

int64_t avalanche::Processor::minAvaproofsNodeCount
private

Definition at line 216 of file processor.h.

◆ minQuorumConnectedScoreRatio

double avalanche::Processor::minQuorumConnectedScoreRatio
private

Definition at line 213 of file processor.h.

◆ minQuorumScore

uint32_t avalanche::Processor::minQuorumScore
private

Quorum management.

Definition at line 212 of file processor.h.

◆ peerData

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

Definition at line 203 of file processor.h.

◆ queries

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

Definition at line 199 of file processor.h.

◆ quorumIsEstablished

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

Definition at line 214 of file processor.h.

◆ round

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

Keep track of peers and queries sent.

Definition at line 163 of file processor.h.

◆ sessionKey

CKey avalanche::Processor::sessionKey
private

Definition at line 204 of file processor.h.

◆ staleVoteFactor

const uint32_t avalanche::Processor::staleVoteFactor
private

Definition at line 221 of file processor.h.

◆ staleVoteThreshold

const uint32_t avalanche::Processor::staleVoteThreshold
private

Voting parameters.

Definition at line 220 of file processor.h.

◆ voteRecords

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

Items to run avalanche on.

Definition at line 158 of file processor.h.


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