package
5.2.0
Repository: https://github.com/prysmaticlabs/prysm.git
Documentation: pkg.go.dev

# Functions

NewService provides fully initialized peer scoring service.

# Constants

BadPeerScore defines score that is returned for a bad peer (all other metrics are ignored).
DefaultBadResponsesDecayInterval defines how often to decay previous statistics.
DefaultBadResponsesPenaltyFactor defines the penalty factor applied to a peer based on their bad response count.
DefaultBadResponsesThreshold defines how many bad responses to tolerate before peer is deemed bad.
DefaultBlockProviderDecay defines default blocks that are to be subtracted from stats on each decay interval.
DefaultBlockProviderDecayInterval defines how often the decaying routine is called.
DefaultBlockProviderProcessedBatchWeight is a default reward weight of a processed batch of blocks.
DefaultBlockProviderProcessedBlocksCap defines default value for processed blocks cap.
DefaultBlockProviderStalePeerRefreshInterval defines default interval at which peers should be given opportunity to provide blocks (their score gets boosted, up until they are selected for fetching).
ScoreRoundingFactor defines how many digits to keep in decimal part.

# Structs

BadResponsesScorer represents bad responses scoring service.
BadResponsesScorerConfig holds configuration parameters for bad response scoring service.
BlockProviderScorer represents block provider scoring service.
BlockProviderScorerConfig holds configuration parameters for block providers scoring service.
Config holds configuration parameters for scoring service.
GossipScorer represents scorer that evaluates peers based on their gossip performance.
GossipScorerConfig holds configuration parameters for gossip scoring service.
PeerStatusScorer represents scorer that evaluates peers based on their statuses.
PeerStatusScorerConfig holds configuration parameters for peer status scoring service.
Service manages peer scorers that are used to calculate overall peer score.

# Interfaces

Scorer defines minimum set of methods every peer scorer must expose.