-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Peer Score Algorithm #248
Conversation
d80b3c9
to
9362881
Compare
9362881
to
aa2f098
Compare
aa2f098
to
9222988
Compare
…i-tendermint into yiren/peer-score * 'yiren/peer-score' of https://github.com/sei-protocol/sei-tendermint: rever block sync logic
9222988
to
7ec96bf
Compare
…i-tendermint into yiren/peer-score * 'yiren/peer-score' of https://github.com/sei-protocol/sei-tendermint: rever block sync logic
MutableScore int64 // updated by router | ||
MutableScore PeerScore // updated by router | ||
|
||
ConsecSuccessfulBlocks int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add another one called NumOfTimeouts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the timeout will trigger the Disconnected() method which has counted to decrease score. the flow is:
timeout detection -> peer.didTimeout = true -> pool.removePeer(id, true) -> peerManager.Disconnected()
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
==========================================
- Coverage 58.22% 58.18% -0.05%
==========================================
Files 249 249
Lines 34512 34549 +37
==========================================
+ Hits 20094 20101 +7
- Misses 12827 12856 +29
- Partials 1591 1592 +1
|
* feat: improve peer scoring algo * debug * debug * more debug * debug TryDiaNext * remove log * fix score type * rever block sync logic * rever block sync logic * rever block sync logic * Add block request log * Add apply block latency * add processEpeerEvent log back * update unit test * update unit test --------- Co-authored-by: yzang2019 <[email protected]>
* feat: improve peer scoring algo * debug * debug * more debug * debug TryDiaNext * remove log * fix score type * rever block sync logic * rever block sync logic * rever block sync logic * Add block request log * Add apply block latency * add processEpeerEvent log back * update unit test * update unit test --------- Co-authored-by: yzang2019 <[email protected]>
The current peer score algorithm is not working effectively. Introducing a new peer score algorithm: