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

Peer mngmt #639 #688

Merged
merged 6 commits into from
Dec 4, 2018
Merged

Peer mngmt #639 #688

merged 6 commits into from
Dec 4, 2018

Conversation

InoMurko
Copy link
Member

@InoMurko InoMurko commented Nov 30, 2018

This is the first step to establish exact requirements of #639.
What this does at the moment is that it passes a observer module down the supervision tree to workers. The workers are inbound and outbound connections. These worker processes link themselves to the observer module, so that in case of disconnect, the observer can catch the exit and:

  1. store the peer we were connected to, to one of the mapsets
  2. check the reason for the disconnect or process crash (while it also has access to the process state)

There's no logic yet when a connection gets dropped (either from ur or from them) - because I'm still figuring out what the logic should be. Like ... based on what should we pick a new peer?

The other part was that I removed the link between the PeerSupervisor and Kademlia. Kademlia now notifies the observer module of rounds and the flow of attaching dynamic children to outbound connections tree.

@InoMurko InoMurko changed the title Peer mngmt2 [WiP] Peer mngmt #639 Nov 30, 2018
@InoMurko InoMurko force-pushed the peer_mngmt2 branch 9 times, most recently from fa0dafc to d444f7c Compare December 3, 2018 15:20
@InoMurko InoMurko requested review from hayesgm, ayrat555 and willmeister and removed request for hayesgm December 3, 2018 16:29
@InoMurko InoMurko changed the title [WiP] Peer mngmt #639 Peer mngmt #639 Dec 3, 2018
.gitignore Outdated Show resolved Hide resolved
apps/ex_wire/lib/ex_wire/p2p/server.ex Outdated Show resolved Hide resolved
Copy link
Contributor

@hayesgm hayesgm left a comment

Choose a reason for hiding this comment

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

I think this looks really good. great approach.

@InoMurko InoMurko merged commit 8bbacfa into mana-ethereum:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants