js-libp2p icon indicating copy to clipboard operation
js-libp2p copied to clipboard

Implement Circuit Relay v2 in JS

Open lidel opened this issue 3 years ago • 10 comments

go-ipfs 0.11 will ship with circuits v2, js-ipfs should be able to talk to them.

Ref. https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md

lidel avatar Nov 19 '21 15:11 lidel

@lidel Any update on this issue?

Winterhuman avatar Feb 09 '22 15:02 Winterhuman

I would like to take this on. Should I rip circuit out of libp2p and develop it in separate repository?

mpetrunic avatar Feb 11 '22 11:02 mpetrunic

@achingbrain We agreed on a call to do it in a separate repo, but I just saw there is already https://github.com/libp2p/js-libp2p-circuit deprecated repo. Do you know why this stuff was pulled back into js-libp2p? If we still wanna do it in a separate repo, should we unarchive this repo?

mpetrunic avatar Feb 15 '22 09:02 mpetrunic

cc @jacobheun maybe you can shed some light here.

mpetrunic avatar Feb 15 '22 09:02 mpetrunic

@mpetrunic the original consolidation effort is at https://github.com/libp2p/js-libp2p/issues/384, and it links to a larger discussion in js-ipfs. The main reasoning for pulling in these core modules to js-libp2p is to reduce the overhead of having to do independent releases and rollups for modules that don't provide any value as standalone modules. I don't think it makes much sense to have libp2p-circuit externalized to js-libp2p because I don't see it being used directly elsewhere, and it's just going to add overhead to feature/release cycles. If you want to do e2e testing with libp2p, that can also create additional testing overhead.

Unless there's something specific you're trying to achieve with it being a separate module, I'd recommend keeping it here to avoid the overhead. Circuit is pretty core to libp2p, regardless of environment, whereas some of the other standalone modules are arguably environment dependent customizations.

jacobheun avatar Feb 15 '22 10:02 jacobheun

Honestly, my only reasoning was that we could do it in typescript and ease in migration to typescript. Will open PR with circuit v2 on libp2p repo!

mpetrunic avatar Feb 15 '22 12:02 mpetrunic

:wave: libp2p steward, rust-libp2p maintainer here. I was involved in the final steps of the protocol design and implemented Circuit Relay v2 on the Rust side recently. Happy to help from the libp2p side, e.g. with deployments to test against. Unfortunately we don't have a test-suite you could develop against. @mpetrunic feel free to ping me here or on the various other communication channels.

mxinden avatar Feb 23 '22 09:02 mxinden

@mxinden Hey, tnx a lot for the offer, will ping you if I don't find anything. I'm currently struggling to get js-js test to pass 😅 Do you have some interop setup in you use?

mpetrunic avatar Feb 24 '22 14:02 mpetrunic

Do you have some interop setup in you use?

Unfortunately not. We are working on interop tests via https://github.com/testground/testground though that is still far from complete.

For now I can only offer Circuit Relay v2 deployments to test against @mpetrunic.

mxinden avatar Feb 28 '22 14:02 mxinden

@mpetrunic there are some interop tests go<->js via IPFS: https://github.com/ipfs/interop/tree/master/test/circuit

You can link libp2p in that repo and test it

vasco-santos avatar Mar 03 '22 17:03 vasco-santos

This is being taken up by @ckousik now, but for some reason cannot set the assignee

p-shahi avatar Nov 07 '22 22:11 p-shahi

@ckousik Could we get an update on this issue? (at some regular cadence -- e.g. once a month would be fine)

TinyTb avatar Dec 05 '22 23:12 TinyTb

For now this has been deprioritized in favor of go-libp2p WebRTC work per https://github.com/libp2p/go-libp2p/pull/1655#issuecomment-1319368953

p-shahi avatar Dec 06 '22 03:12 p-shahi

Reopening because there is followup work listed in https://github.com/libp2p/js-libp2p/pull/1533#pullrequestreview-1322333583

If we're tracking that somewhere else, please link and close.

BigLep avatar Mar 04 '23 00:03 BigLep

Being tracked here: https://github.com/libp2p/js-libp2p/issues/1608

p-shahi avatar Mar 04 '23 00:03 p-shahi