waku-org / js-waku

JavaScript implementation of Waku v2
https://js.waku.org
Apache License 2.0
169 stars 42 forks source link

peer-exchange: investigate p2p-circuit address discovery & connection #1527

Open danisharora099 opened 1 year ago

danisharora099 commented 1 year ago

Problem

This issue is meant to track investigation/work around being able to find and connect to p2p-circuit addresses through peer-exchange in js-waku

Notes

danisharora099 commented 1 year ago

some findings:


danisharora099 commented 1 year ago

update: js-libp2p supports circuit-relay: https://github.com/libp2p/js-libp2p/blob/a6be8f0f4bbd81826c2ca5d48ea6175b1fdf3ab9/doc/migrations/v0.42-v0.43.md?plain=1#L29

danisharora099 commented 1 year ago

blocked with https://github.com/libp2p/js-libp2p/issues/2024

danisharora099 commented 1 year ago

currently blocked until a sync with go-waku @richard-ramos (who is currently travelling) can be scheduled as there is an interop bug

danisharora099 commented 1 year ago

the work enabling & testing circuit relay connections is being tracked in #1619


  1. for go-waku, a few changes had to be made to allow for seamless testing, and some improvements are still pending. changes made: https://github.com/waku-org/nwaku/issues/2130#issuecomment-1766308592 improvements required (tracking here: https://github.com/waku-org/go-waku/issues/815)

    • allowing to use a local node for circuit relay server
    • looks like there is a limitation from go-libp2p that does not allow using a node on the same as a circuit relay server (TBC)
    • discard requirement on a secure websocket connection and allow unsecure socket connections
    • allow to read a log line to know when the ENR is populated with a p2p-circuit addrs (this currently takes ~20/25 seconds and we're manually awaiting this delay)
  2. for nwaku, we need to coordinate the same functionality & flags between both implementations (tracking here https://github.com/waku-org/nwaku/issues/2130)

fryorcraken commented 1 year ago

Removed from epic as agreed not needed at this point in time.