-
Notifications
You must be signed in to change notification settings - Fork 65
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
Respond to requests from peers with invalid ENRs #265
base: master
Are you sure you want to change the base?
Conversation
I'm testing this change with the |
Awesome. Thanks @ackintosh 🙏 |
@AgeManning During the testing, I noticed that the FINDNODE request (which is initiated from here) is timing out. Please see the attached image below. What do you think? |
Awesome!! Thanks for catching this! I was thinking in the transition its probably best to simply remove the transitioning peer from the local routing table. There is likely some time between us noticing it has changed its IP and it actually adjusting its IP. In the meantime we probably should prioritize better peers. I suspect also if we remove it from the table, when it does eventually update, it can then have a second chance of getting back in there. I've made this change. I'm hoping it now fixes the issue you've found. Thanks again! |
@AgeManning I have tested it again. The updated ENR doesn't get back into Node B's routing table unless the session has expired. 🤔 |
It can be the case that peers have invalid ENRs (i.e report socket addresses that do not match the socket src of the packet).
Previously discovery would drop packets from these peers and log a warning. This PR shifts this logic to instead respond to the src socket but exclude the ENR from reaching our routing table.
We will not advertise these peers, but we will respond to them.
I think this change will improve overall connectivity.
There are some legitimate cases where an ENR can be invalid, such as the external IP address changing or some funky NATs.