Skip to content
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

[PAN-3155] Handle discovery peers with updated endpoints #12

Conversation

mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Sep 16, 2019

PR description

Update discovery logic to consider a peer with an unknown discovery endpoint to be unknown regardless of whether we've encountered a peer with the same node id before. This makes the discovery logic more forgiving in the face of node restarts.

If nodeA bonds with nodeB, then nodeB leaves the network and later comes back with a different ip address or listening port, nodeA would previously continue trying to communicate with nodeB at its original address. With these changes, nodeA will now treat the restarted nodeB as a new peer and communicate with it on its updated endpoint. Additionally, nodeB's information will be updated in the peer table so that neighbors requests return updated information on this node.

@mbaxter mbaxter force-pushed the PAN-3155/handle-discovery-peers-with-updated-endpoints branch from eb90775 to 6fe18b1 Compare September 17, 2019 15:58
NicolasMassart
NicolasMassart previously approved these changes Sep 17, 2019
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks very well done to me. Tests are a bit complicated but it seems to do what's expected.

Signed-off-by: Meredith Baxter <[email protected]>
@shemnon shemnon merged commit 1d74e60 into hyperledger:master Sep 17, 2019
sambacha pushed a commit to blockarraygroup/besu that referenced this pull request Nov 22, 2019
shemnon referenced this pull request in shemnon/besu Oct 21, 2020
@matkt matkt mentioned this pull request May 3, 2021
1 task
fab-10 added a commit to fab-10/besu that referenced this pull request Jan 10, 2024
Signed-off-by: Fabio Di Fabio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants