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

(cont) fix: use floodsub events to simplify discovery #200

Merged
merged 22 commits into from
Dec 19, 2018
Merged

Conversation

pgte
Copy link
Contributor

@pgte pgte commented Dec 11, 2018

Continued from #176

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 11, 2018

I think this approach of explicitly ending the protocol handlers when the collaboration shuts down makes sense, it's more reliable that way.

In the collaboration ConnectionManager._resetConnections(), should there be an await for each call to GlobalConnectionManager.disconnect()? That would require modifying GlobalConnectionManager to return a Promise on hang up (which is probably a good idea)

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 11, 2018

By the way I love the branch name, it sounds like I've discovered something very important 👍

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 12, 2018

Once the connections issue is resolved we should merge in the resultant version of libp2p: https://github.com/libp2p/js-libp2p-switch/issues/288

@pgte
Copy link
Contributor Author

pgte commented Dec 12, 2018

Quick FYI: I'm working on checking out some test failures I'm observing on this branch (probably not related).

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 12, 2018

Ok thanks for the heads up.

I realized I need to rethink the way ring management and redials work - it's too aggressive in removing peers from the ring, and is trying too many times to reconnect to nodes that go down. I will clean it up in the next couple of hours.

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 12, 2018

I made ring removal less aggressive. There are still a couple of test failures, although they don't appear t to fail consistently

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 13, 2018

We should also make sure libp2p/js-libp2p-floodsub#63 is included because it sometimes causes the tests to fail. It was included in release 0.15.3 but so far that has not yet made it into a js-libp2p release EDIT: Actually this was a minor release so it will be pulled in with libp2p2

@pgte
Copy link
Contributor Author

pgte commented Dec 13, 2018

@dirkmc this is a failure I'm getting frequently in my test runs (fresh install):

1__bash

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 13, 2018 via email

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 13, 2018

Fix in libp2p/js-libp2p-floodsub#65

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 14, 2018

Ok @pgte between your fixes and my fixes the tests are now passing 🎉

The outstanding issues I found in the course of this PR are:

These were already issues before I started working on this PR, although it would be nice to have them as part of the PR. What do you think?

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 18, 2018

It would simplify connection management a lot if we could specify to libp2p on hang up that we only want to hang up outbound connections. I created an issue on libp2p: libp2p/js-libp2p#299

@pgte
Copy link
Contributor Author

pgte commented Dec 19, 2018

@dirkmc for me the tests pass consistently. What do you say about merging this into master and talking about future work on this area (discovery, membership, connection management) on other issues?

@dirkmc
Copy link
Collaborator

dirkmc commented Dec 19, 2018 via email

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.

2 participants