Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PeerScoreParams pubsub.PeerScoreParams = pubsub.PeerScoreParams{ AppSpecificScore: func(p peer.ID) float64 { return 0 }, AppSpecificWeight: 1, IPColocationFactorThreshold: 5, IPColocationFactorWeight: -100, IPColocationFactorWhitelist: []*net.IPNet{}, BehaviourPenaltyThreshold: 6, BehaviourPenaltyWeight: -10, BehaviourPenaltyDecay: pubsub.ScoreParameterDecay(time.Hour), DecayInterval: pubsub.DefaultDecayInterval, DecayToZero: pubsub.DefaultDecayToZero, RetainScore: 6 * time.Hour, Topics: map[string]*pubsub.TopicScoreParams{}, }
values copied from https://github.com/filecoin-project/lotus/blob/42d2f4d7e48104c4b8c6f19720e4eef369976442/node/modules/lp2p/pubsub.go
View Source
var PeerScoreThresholds pubsub.PeerScoreThresholds = pubsub.PeerScoreThresholds{
GossipThreshold: -500,
PublishThreshold: -1000,
GraylistThreshold: -2500,
AcceptPXThreshold: 1000,
OpportunisticGraftThreshold: 3.5,
}
values copied from https://github.com/filecoin-project/lotus/blob/42d2f4d7e48104c4b8c6f19720e4eef369976442/node/modules/lp2p/pubsub.go
Functions ¶
func MessageIdFn ¶
use blake2b because it's faster than sha, copied from https://github.com/filecoin-project/lotus/blob/42d2f4d7e48104c4b8c6f19720e4eef369976442/node/modules/lp2p/pubsub.go
func NewPeerScoreParams ¶
func NewPeerScoreParams(validator Validator) pubsub.PeerScoreParams
Types ¶
type PeerStatistics ¶
type PeerStatistics struct {
// contains filtered or unexported fields
}
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func (Validator) AppSpecificScore ¶
Click to show internal directories.
Click to hide internal directories.