-
Notifications
You must be signed in to change notification settings - Fork 17
Conversation
8c85540
to
04f35c4
Compare
123c1ad
to
44360e8
Compare
BREAKING CHANGE: Switch to using async/await and async iterators.
44360e8
to
9df6594
Compare
@jacobheun per our discussion earlier, I made the first iteration on the proposal for extracting the need for the libp2p instance in pubsub system. Moreover, the dialing layer within pubsub/dht/... is intended to be removed, as we are currently duplicating a lot of dialing management within subsystems, like tracking dials and having dial queues, which could be controlled by https://gist.github.com/vasco-santos/2c39ab16d15a87c573bef4f916472831 I am not particularly convinced about the register side of things yet. First, I think we can have a better naming. Then, we can add other option features like |
6cf5a47
to
5e164c6
Compare
src/index.js
Outdated
* @param {function} registrar.unregister | ||
* @param {Object} [options] | ||
* @param {boolean} [options.signMessages] if messages should be signed, defaults to true | ||
* @param {boolean} [options.strictSigning] if message signing should be required, defaults to true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea here is to add the topology to the options, which would overwrite the ones defined by the protocol. Should we do it here, or iterate the registrar topology in a following PR? My main concern is to add docs to stuff that we will not support yet
5e164c6
to
bac8bf3
Compare
d31659e
to
f75548b
Compare
f75548b
to
97bfa5c
Compare
@jacobheun Already migrated this and did the same for |
ec808e0
to
f60da79
Compare
} | ||
``` | ||
|
||
## API | ||
|
||
The following specified API should be the base API for a pubsub implementation on top of `libp2p`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite follow this statement, is it necessary? How does this API related to https://github.com/ipfs/interface-js-ipfs-core/blob/master/SPEC/PUBSUB.md ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not necessary. But, taking into account that we want to remove the pubsub
function mapping from js-libp2p
, and just keep it's instance there, all the implementations should provide the same API.
Regarding the ipfs
spec one, I don't think the ls
and peers
API is understandable, and we already updated those in libp2p-daemon
/libp2p-daemon-client
. They will have to get that updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now libp2p points to that API for docs, https://github.com/libp2p/js-libp2p#libp2ppubsub. We should either get the ipfs api corrected, or if we're looking to have a different API for libp2p, make sure we have appropriate doc references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being worked on libp2p/js-libp2p#467 and will also be pointed in this repo afterward
a49d632
to
0b67775
Compare
bbc18b7
to
dc0b982
Compare
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
dc0b982
to
5b4f41b
Compare
afd1049
to
56ac766
Compare
59c7850
to
b187da7
Compare
b187da7
to
4f94cd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good, I noticed there aren't any tests yet for the new getPeersSubscribed
. It might be good to add some to make sure we're getting back what we expect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🚀
BREAKING CHANGE: Switch to using async/await and async iterators.
Needs: