libp2p/protocols/pubsub/gossipsub/scoring

    Dark Mode
Search:
Group by:
  Source   Edit

Procs

proc addCapped[T](stat: var T; diff, cap: T) {....raises: [Defect].}
  Source   Edit
func byScore(x, y: PubSubPeer): int {....raises: [Defect], tags: [].}
  Source   Edit
proc init(_: type[TopicParams]): TopicParams {....raises: [Defect].}
  Source   Edit
proc punishInvalidMessage(g: GossipSub; peer: PubSubPeer; topics: seq[string]) {.
    ...raises: [Defect], tags: [RootEffect].}
  Source   Edit
proc rewardDelivered(g: GossipSub; peer: PubSubPeer; topics: openArray[string];
                     first: bool; delay = ZeroDuration) {....raises: [Defect],
    tags: [RootEffect].}
  Source   Edit
proc scoringHeartbeat(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe,
    raises: [Defect], raises: [Defect], tags: [RootEffect].}
  Source   Edit
proc updateScores(g: GossipSub) {....raises: [Defect],
                                  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: [Defect].}) {....raises: [Defect],
    tags: [RootEffect].}
Add or update peer statistics for a particular peer id - the statistics are retained across multiple connections until they expire   Source   Edit