You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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 ofPeerRecord
s.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
The text was updated successfully, but these errors were encountered: