-
Notifications
You must be signed in to change notification settings - Fork 47
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
Implement needed functionality in JS libp2p libraries #11
Comments
After the call with the libp2p team, they will be extracting the base protocol from js-libp2p-floodsub so that it can be used to build other protocols on top of the base protocol. They are also in the process of writing interoperability tests for libp2p modelled on the ipfs interoperability tests. In the meantime, we can use the js-libp2p-daemon and go-libp2p-daemon. They are still working out the details of the connection manager. So, the work on that can be done later. |
I will keep you posted regarding the base protocol and interop tests moves! |
libp2p/js-libp2p-pubsub got its inital release and there is a PR for integrating it wth floodsub implementation libp2p/js-libp2p-floodsub#69. We now can iterate on Important note: we will have to migrate both codebases (floodsub and pubsub) to use async iterators, instead of callbacks, and by then level up our documentation. When I get to the async iterators, I will have to prioritize the DHT, but in the second step I will go with the pubsub modules. Anyway, I would recommend that you guys start with |
@vasco-santos beautiful! Thanks for getting on this so quickly 💪 |
Thank you very much @vasco-santos and @raulk. We will definitely be using |
Done.. |
I posted an issue in the libp2p github to tell them that we will be adding some extra functionality to some of the JS libp2p libraries in order to make them work like the same Go libp2p libraries.
These are the libraries that we will need to work on (may be extended):
js-libp2p-connection-manager with go-libp2p-connmgr and corresponding interface
Peers in the JS implementation aren't tagged
JS implementation doesn't have a grace period
JS implementation has a different peer weighting mechanism than the Go implementation. Also the ranges of the weights differ.
Go implementation has a trimming heuristic for removing extra peer connections. JS implementation evicts connections on demand. There's an issue discussing these differences.
js-libp2p-peer-info. There isn't an associated Go module but there is the js-libp2p module uses this in addition to the peer store for managing information about peers. The Go equivalent is go-libp2p-host.
[ x ] The creation of a separate router module. The concept of a router doesn't really get introduced until gossipsub. In floodsub, we can get away without using a router. There is a go-libp2p-pubsub-router module that manages this for the Go implementations of pubsub protocols.
Add support for determining the protocol a peer supports to js-peer-info. This issue addresses this problem. We might have to add this functionality to the swarm (inconsistently, called switch in JS) module since it handles dialling into peers.
Add interoperability tests with go-libp2p-pubsub. The interoperability repository is still in development.
The text was updated successfully, but these errors were encountered: