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

initiating gossipsub connections from within gossipsub #97

Closed
wemeetagain opened this issue Jun 24, 2020 · 3 comments
Closed

initiating gossipsub connections from within gossipsub #97

wemeetagain opened this issue Jun 24, 2020 · 3 comments

Comments

@wemeetagain
Copy link
Member

gossipsub v1.1 features direct peers and peer exchange require gossipsub to initiate dialing new peers. We're also going to want access to the PeerStore to add the contents of PeerRecords.

Should gossipsub be passed a reference to the global Libp2p object so it can dialProtocol? Is there a better / different way to approach this?

If we have a reference to the global object, we might pick the connectionManager, registrar, peerStore, etc. from one place, rather than passing each submodule in explicitly.

@vasco-santos

@vasco-santos
Copy link
Collaborator

Yes, totally! We kind of moved away from having libp2p as a dev dependency because of circular dependency issues when breaking changes.
But mocking everything is painful and needing to provide everything separated is not the best dev xp.

@jacobheun
Copy link
Collaborator

Ideally I'd like to have libp2p passed to all modules (pubsub, transports, etc), we're already doing this for transports and discovery modules.

What I'd like to have is for modules to have libp2p as a peer and dev dependency. This should make it easier to do integration testing and for users to see the version range the modules work with. I think we can get around the circular dependency issue we had in the past by running the test suites of the various modules on libp2p release branches (and doing better mocking/api level testing on libp2p core). Since we've been doing beta releases of the modules, this should cut down on issues with breaking change collisions in CI for libp2p.

@wemeetagain
Copy link
Member Author

resolved in #101

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

No branches or pull requests

3 participants