Skip to content

Commit

Permalink
Disable mean reward for new peers
Browse files Browse the repository at this point in the history
Newly added peers where given a boost up to the mean score.
That gives too much of a bonus for them which means that they can out
compete usefull, but not top performing peers.

The code is commented out and the reward set to zero for now. In the
future we can decide what, if any, reward should be given to new peers.
  • Loading branch information
karknu committed Feb 8, 2024
1 parent a23a36c commit 1283a97
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@ adjustAvg :: PeerMetricsConfiguration
-> SlotNo -- ^ current slot
-> Int
-> Int
adjustAvg PeerMetricsConfiguration { maxEntriesToTrack } minSlotNo joinedSlotNo lastSlotNo avg
adjustAvg _ _ _ _ _ = 0
{-adjustAvg PeerMetricsConfiguration { maxEntriesToTrack } minSlotNo joinedSlotNo lastSlotNo avg
-- when there are only a few results in the 'PeerMetricsState' we don't
-- take into account the average. This allows the system to start, without
-- penalising the peers which we connected to early.
Expand All @@ -613,4 +614,4 @@ adjustAvg PeerMetricsConfiguration { maxEntriesToTrack } minSlotNo joinedSlotNo
minSlot, lastSlot, joinedSlot :: Int
minSlot = maybe 1 slotToInt minSlotNo
lastSlot = slotToInt lastSlotNo
joinedSlot = slotToInt joinedSlotNo
joinedSlot = slotToInt joinedSlotNo -}

0 comments on commit 1283a97

Please sign in to comment.