celestiaorg / go-header

Go library with all the services needed to request, sync and store blockchain headers.
Apache License 2.0
17 stars 16 forks source link

p2p: PeerTracker. rework scoring system #92

Open vgonkivs opened 11 months ago

vgonkivs commented 11 months ago

Currently, the score is calculated as an average value between the current request and the previous average value. I believe we can do better. For example, here they are using EVMA.

TLDR: This is a way of calculating the average value where previous values have a lower weight on some alpha(from 0.1 to 1) than a new one.

We should also consider this approach and try to test it.