-
Notifications
You must be signed in to change notification settings - Fork 15
Consider replacing with stardust? (I've rewritten ws-star, and this time it's good) #70
Comments
The key pain point end users had with ws-star was "suiciding js-ipfs startup if any of ws-star servers is down". Does the rewrite plan to address that? |
I will go through stardust either later today or tomorrow and put together some notes. @lidel, we've got a ticket together for |
Kinda. I just hacked in a tiny change that allows passing a But it also solves another bunch of problems:
|
Another thing: Can I move this thing to the libp2p org? |
Note that currently stardust is using the |
Btw here is the roadmap to v0.1.0: libp2p/js-libp2p-stardust#1 Feel free to comment if something is missing |
@mkg20001 I've gone through stardust and overall it's much easier to digest, it would be great to get that replacing websocket-star. I didn't do a thorough code review since that can probably wait till it's about ready to go. In looking to replace websocket-star, it seems like right now you're looking to deprecate this in favor of stardust. Would it be better to just replace the code here? We'd want everyone to transition over, but the upgrade path looks like it will be pretty easy. What were your thoughts on making it a different module? |
@jacobheun Mainly the fact that this is something completely new that in no way has any relation to the current ws-star protocol, aside from the functionality it provides. ws-star is a socket.io based non-caching sort-of-but-not-really event-based muxer-disaster stardust is a ws+multistream+protobuf based protocol that runs over an existing muxer and reuses some of libp2p's concepts in the Effectively 0% of what currently is stardust was copied from ws-star, which also means that no smooth upgrade path is there (ok, not really 0%, this part - 6 lines was copied 😄 ) The reason for making them separate modules is to make the upgrades as smooth as possible: My idea would be to add stardust to the current js-ipfs, then warn everyone that they should switch to stardust ASAP and then completely get rid of ws-star in the next major version |
@mkg20001 that sounds reasonable to me. We could also deploy an update to the rendezvous server with a warning message about it going away once we have a better idea of a target date for that, in addition to other warnings that people are more likely to see. 👍 for moving stardust under libp2p. |
🎉 https://github.com/libp2p/js-libp2p-stardust I've made myself the lead maintainer for this project for now. @libp2p/javascript-team Is this okay? Also: I'll take some time this weekend to polish stardust. Should be ready soon |
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference Note: This PR depends on this pr to be merged and the package being updated first: multiformats/js-multiaddr#78
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference
My potential plan: Getting this released in js-ipfs master ASAP, possibly even before v0.1.0 I know that the IPFS project can't just release half-working things into production. But it certainly can release them behind a flag and with a warning about their potential instability. I'd rather give this thing a second pass after getting some feedback, instead of finalizing it instantly and making the same mistake as was done with websocket-star. And shortening the feedback-cycle is key to achieving that. Opinions? Objections? |
👍 on short feedback loops - having it behind a flag makes lots of sense IMO. |
An experimental flag rollout makes sense to me. @alanshaw is back next week, I'm sure he'd like to weigh in on the roll out to js-ipfs. |
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference Relates to multiformats/multiaddr#84 (review)
This adds support for the stardust protocol behind the flag EXPERIMENTAL.stardust This pr is part of the endeavour to replace ws-star with stardust for the time being until a better solution is found. See the discussion at libp2p/js-libp2p-websocket-star#70 (comment) for more information
This adds support for the stardust protocol behind the flag EXPERIMENTAL.stardust This pr is part of the endeavour to replace ws-star with stardust for the time being until a better solution is found. See the discussion at libp2p/js-libp2p-websocket-star#70 (comment) for more information
@jacobheun Currently developing that in here: ipfs/js-ipfs#1812 Note that this depends on libp2p/js-libp2p-crypto#125 being finished first |
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference Note: This PR depends on this pr to be merged and the package being updated first: multiformats/js-multiaddr#78
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference Note: This PR depends on this pr to be merged and the package being updated first: multiformats/js-multiaddr#78
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference Note: This PR depends on this pr to be merged and the package being updated first: multiformats/js-multiaddr#78
This is part of the endeavor to replace ws-star with the newly created stardust protocol. See libp2p/js-libp2p-websocket-star#70 for a reference Note: This PR depends on this pr to be merged and the package being updated first: multiformats/js-multiaddr#78
Since #57 is an actual security problem and could likely only be addressed with a change that would break compatibility with previous clients, I'd suggest that we should look at deperacting ws-star and/or replacing it with stardust again, since I'm not seeing any progress in this issue. |
Parallel proposal: Sunset the *-star protocols 🌅 |
Ws-star is still used. Since stardust is now ready to use and feature-compatible, I wonder if it would be a great idea to use the refactor to make a switch, since that would allow us to get rid of the inefficient socket.io-based streaming-hack that ws-star uses. |
@jacobheun @alanshaw @daviddias Rationale#57 is a real issue that could block adoption of js-libp2p if a thorough security audit is performed before we have p2p rendezvous protocol implemented (which I don't think will be production ready in next 6 months). We could hit this problem with Brave's security team (ipfs/ipfs-companion#716) at some point (I did not switch Brave to stardust yet only due to the lack of stable stardust server). Migration pathRight now, we provide ws-star server at: If we go with this, there should be a stardust service at It should be backward-compatible: Thoughts? |
This would solve the security concern in Brave right? Can you also configure js-ipfs in Brave to use stardust? It doesn't have to be bundled by default in js-ipfs for you to use it right? I've also said before that I'd be willing to document stardust on the js-ipfs README. |
As long as adding transports is a possibility, it should work. Also, de-bundling ws-star and replacing documentation about ws-star with stardust is IMO the best path forward.
The server mentioned in the stardust readme is currently online & up-to-date. If protocol labs wants to run another, feel free to.
A DNS alias could help, but certainly don't want this service to be named ws-star2 primarly, since it's no longer socket.io based. |
Overall I am in favor of replacing websocket-star with stardust. Refactoring websocket-star to async await is not worth the effort, and we don't yet have the appropriate peer discovery replacement that websocket-star gives us. Circuit Relay combined with better peer discovery mechanisms like Rendezvous, Peer Exchange, or possibly the DHT are more ideal approaches imo, but they're not ready yet. Stardust does rely on RSA key encryption, so anyone using non RSA keys won't be able to use it. I believe there are some users not using RSA who are currently using websocket-star, so they would not be able to make this switch. We currently have 3 servers for ws-star, but only really point to one. I think It would be reasonable to repurpose at least one of those for stardust, in addition to what @mkg20001 has already provided. I have not done a full review of the latest stardust code. I think this is something we can do as part of the migration of that to async/await. @mkg20001 since that is part of the libp2p org we need to make sure to go through the normal PR process going forward. |
Isn't secp256k1 usable for enc/dec as well?
👍
:nods: |
@mkg20001 would you be able to send me a PR? |
Against current master, right? |
@alanshaw Just realizing: Due to the way ws-star & stardust work, it's hard to add it without bundling it. The user would have to first get the peer id, then create the stardust/ws-star instance and then add the transport and the discovery from the already instantiated instance. This is a bit complex, especially getting the peer-id beforehand. |
I believe this is why you can pass a function as libp2p config - it is passed the peer ID. |
@alanshaw The problem with this is that it fully overrides the bundle. I just want to extend it. I've added a proposed solution to this in my pr. |
I've been working on a complete rewrite of ws-star
https://github.com/mkg20001/js-libp2p-stardust
This project, among other things:
Note that while the code works, the APIs currently don't perfectly match those of the interface-transport spec because I literally "just made this"
I'd appreciate feedback and would like to see ws-star replaced with that. (After all I made this mess here so I might just clean it up as well)
The text was updated successfully, but these errors were encountered: