|
| ~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...
|
|
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...
|
|
|
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< CInv > | getInvsForNextPoll (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) |
|
void | setContenderStatusForLocalWinner (const CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(!cs_stakeContenderCache |
| Helper to set the local winner in the contender cache. More...
|
|
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 |
|
Definition at line 149 of file processor.h.
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 428 of file processor.h.