-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
Currently, we are facing a problem regarding the interop of the pubsub topic.
Considering all this and that IPNS over Pubsub is still an experimental feature, I have been talking with @Stebalien about changing the topic format to a standard encoding, such as |
So, some history: we used to use However, given that record-store keys are binary (arguably, they should also just be strings...), we could use However, I'd also like to consider just making pubsub topics arbitrary binary strings. We already do this for the DHT and forcing users to use UTF-8 for pubsub topics will likely cause issues like this in the future as well (some implementations will enforce it, others won't). |
I've hashed this out with @vyzo on IRC. He agrees we should probably be nice and use UTF8. So, the only remaining question is: How? Personally, I'd vote for either |
Thanks for your analysis @Stebalien . I would go with |
5c46bc3
to
9b9de01
Compare
9b9de01
to
9e55042
Compare
Instead of using bare keys (binary), use `/record/base64url(key)`. This: 1. Pubsub keys must be UTF-8. Record-store keys definitely are not. 2. The prefix may help with validators in the future (namespace *everything*). See: ipfs/interop#39
@vyzo suggested base32 to be consistent with everything else we do. However, I really don't mind either way. To get this ball rolling: libp2p/go-libp2p-pubsub-router#17 |
I'd use base64 since this is internal, and we send these topics to all peers we are pubsubbing with, so b64 saves us a few bytes each time we connect to someone. |
9e55042
to
68592aa
Compare
Interop between JS: ipfs/js-ipfs#1559 with ipfs/js-datastore-pubsub/pull/9 for fixing the interop Go: @Stebalien do you have any eta for the new @alanshaw maybe we can add this to v0.34.0 RELEASE 🚀 |
68592aa
to
3c0f3e1
Compare
before(function (done) { | ||
this.timeout(100 * 1000) | ||
|
||
parallel([ |
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.
Suggestion: async/each
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 think it is better to use async/parallel
here, since using async/each
here would require an extra array to keep the data with all the ids, which I feel unnecessary just for 2 elements.
nodeBId = ids[1] | ||
|
||
nodes[0].api.swarm.connect(ids[1].addresses[0], () => { | ||
setTimeout(done, 60000) // wait for republish as we can receive the republish message first |
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.
This is such a long wait, it would be great if this was somehow configurable...
@Stebalien is it possible in go-ipfs?
@vasco-santos perhaps add a console.log
line here to inform the user this pause is happening...?
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.
go-ipfs
already accepts the republish
configuration through the node config. For JS Land, it is one of the things that I want to integrate during this quarter.
Meanwhile, I can add a console.log
here!
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.
Oh wait, go-ipfs
allows the RepublishPeriod
and RecordLifetime
, but not the time for the first InitialRebroadcastDelay
, afaik!
48c5089
to
abdb8b3
Compare
@vasco-santos mind rebasing master onto this PR and test it with js-ipfs master? |
@vasco-santos what's the status of this? Can we get it merged plz 🙏? |
abdb8b3
to
7fef266
Compare
48f1bc6
to
2353dbc
Compare
Subscribe in I just tested this using the latest |
2353dbc
to
d63ee61
Compare
@alanshaw it is 💚 🎊 |
PR containing a set of tests aimimg to test the IPNS over Pubsub interoperability between
go-ipfs
andjs-ipfs
.It needs the following:
go-ipfs
released with libp2p/go-libp2p-pubsub-router#17js-ipfs
released with ipfs/js-ipfs/pull/1559cc @bigs