libp2p/protocols/pubsub/gossipsub/scoring

    Dark Mode
Search:
Group by:
  Source   Edit

Procs

proc addCapped[T](stat: var T; diff, cap: T) {....raises: [].}
  Source   Edit
func byScore(x, y: PubSubPeer): int {....raises: [], tags: [].}
  Source   Edit
proc disconnectIfBadScorePeer(g: GossipSub; peer: PubSubPeer; score: float64) {.
    ...raises: [], tags: [WriteIOEffect, TimeEffect, RootEffect].}
  Source   Edit
proc disconnectPeer(g: GossipSub; peer: PubSubPeer): InternalRaisesFuture[void,
    void] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [],
            tags: [RootEffect].}
  Source   Edit
proc init(_: type[TopicParams]): TopicParams {....raises: [].}
  Source   Edit
proc punishInvalidMessage(g: GossipSub; peer: PubSubPeer; msg: Message): InternalRaisesFuture[
    void, (PeerRateLimitError,)] {.stackTrace: false, ...raises: [], gcsafe,
                                   raises: [], raises: [], tags: [RootEffect].}
  Source   Edit
proc rewardDelivered(g: GossipSub; peer: PubSubPeer; topic: string; first: bool;
                     delay = ZeroDuration) {....raises: [], tags: [RootEffect].}
  Source   Edit
proc scoringHeartbeat(g: GossipSub): InternalRaisesFuture[void,
    (CancelledError,)] {.stackTrace: false, ...raises: [], gcsafe, raises: [],
                         raises: [], tags: [RootEffect].}
  Source   Edit
proc updateScores(g: GossipSub) {....raises: [],
                                  tags: [WriteIOEffect, TimeEffect, RootEffect].}
https://github.com/libp2p/specs/blob/master/pubsub/gossipsub/gossipsub-v1.1.md#the-score-function   Source   Edit
proc withPeerStats(g: GossipSub; peerId: PeerId;
                   action: proc (stats: var PeerStats) {....gcsafe, raises: [].}) {.
    ...raises: [], tags: [RootEffect].}
Add or update peer statistics for a particular peer id - the statistics are retained across multiple connections until they expire   Source   Edit