dotnet-libp2p icon indicating copy to clipboard operation
dotnet-libp2p copied to clipboard

Add Peer Scoring according to Gossipsub v1.1

Open namay26 opened this issue 5 months ago • 0 comments

(Work in Progress)

Summary This PR introduces peer scoring configurations based on the Gossipsub v1.1 specification.

Issue : #139

Key Changes

  • Added PeerState class to track topic scores for each peer, and it is initialized and managed in PubsubRouter.cs
  • Introduced PeerScoreManager class, which is responsible for calculating and updating peer scores according to Gossipsub v1.1 rules
  • Updated PubsubSettings.cs to include peer scoring parameters (P1–P7) as defined in the Gossipsub spec

To-Do

  • Integrate PeerScoreManager into the heartbeat function for periodic score updates
  • Run a pubsub connection test to validate scoring behavior
  • Add comprehensive unit tests to cover various scoring scenarios

namay26 avatar Sep 07 '25 13:09 namay26