-
Notifications
You must be signed in to change notification settings - Fork 186
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
refresh peer's rank on reconnect #280
Comments
I guess we can delete the peer address from.the map after it has been disconnected but disconnecting leads to punishment in the current design. |
I think it should just get refreshed on a reconnect, some people had problems with connecting to tor since the old ranking was used |
Old Ranking? Was there a different ranking before this? |
@Chinwendu20 - he means the rank value |
Thanks @ellemouton, we can fix this by deleting the peer from the ranking map when it disconnects, changing the current design. I can work on this but I do not know if the issue needs further triaging. |
That would work, but I think just resetting the value to defaultScore in AddPeer is a smaller patch. Maybe not as correct, but still should work |
Yeah that sounds great. |
Please I have a question about this, why is it important to fetch from this particular peer. If a peer has a bad score and other peers are present they can take on that task otherwise, the workmanager would still schedule the task to the bad scored peer if that peer is the only one on the list or all peers present have same score. |
Hmm, I don't remember anymore. @Roasbeef do you think this should be addressed given #280 (comment) |
Yeah @Chinwendu20 is right here imo, as is we still uniformly schedule tasks to all peers when we have a batch. If it's a series of one-off requests, then the highest ranking node will get the task. However if we have a batch of items, due to the way the initial allocation logic is setup, the load will be distributed to all peers. Making a more specific issue with an implementation plan for improving the state of the art here. |
In
peer_rank.go
we never refresh a peer's rank if we reconnect. It will use the old ranking we had for it. If we try to query a tor node and penalize it due to high latency, we should allow reconnecting to refresh the rank:neutrino/query/peer_rank.go
Lines 57 to 61 in cb61d7f
The text was updated successfully, but these errors were encountered: