-
Notifications
You must be signed in to change notification settings - Fork 990
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
Fix peer dropping #2780
Fix peer dropping #2780
Conversation
It turns out that we drop connection if we fail to process a message because of chain/store/internal error, eg we have a header already, so we refuse it and drop the peer. This pr doesn't forward this error to the peer error channel so the connection will not be dropped.
😱 Let me take a closer look later on but this is a great discovery. |
This how it looks:
|
I wish it said 12% of the network was running Grin++, but I'll settle for a p2p network that doesn't drop connections left and right. Excellent find @hashmap! |
I've checked this out locally to do some testing. Still need to go over it a bit closer but what happens with "ban-able" errors? Edit: So we have 3 different responses for the various handlers -
Are we sure we still handle the Related - This makes me wonder if having a |
@antiochp yes, we handle it, eg https://github.com/mimblewimble/grin/blob/master/p2p/src/peers.rs#L557 Not sure, I think it's easier to miss this error kind somewhere, but need a second thought |
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.
👍 🚀
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.
Fixes peer churn somewhat, and Grin++ peers are stable. Awesome work!
It turns out that we drop connection if we fail to process a message
because of chain/store/internal error, eg we have a header already, so
we refuse it and drop the peer.
This pr doesn't forward this error to the peer error channel so the
connection will not be dropped.
With this fix my node doesn't drop healthy peers, some peers close connection of course, hopefully I see that Grin++ nodes (which doesn't have this bug) stay forever so now I have 3 grin++ of 25 peers which says something