Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: circuit relay #1619

Closed
wants to merge 5 commits into from
Closed

feat: circuit relay #1619

wants to merge 5 commits into from

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 commented Sep 26, 2023

Problem

Through Peer Exchange, we are able to discover more and more peers.
Some of peers found using Peer Exchange might not have a directly reachable multiaddr (possibly behind NAT/firewall/etc but have a connection with a circuit relay server which can be used to establish a transient connection with this unreachable node.

js-waku currently does not support dialing a peer using a circuit relay

Solution

  • enable support for circuit relay dials
  • construct circuit relay addresses correctly based on the ENR limitation ()

Notes

Possible Improvements:

go-waku: waku-org/go-waku#815

  • allow a local go-waku node to be used as a circuit relay server instead of relying on a fleet node
    • iirc the blocker is actually on go-libp2p not being able to use a node on the same IP as a circuit relay server
  • 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)

@github-actions
Copy link

github-actions bot commented Sep 26, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 27.74 KB (-0.47% 🔽) 555 ms (-0.47% 🔽) 338 ms (+50.94% 🔺) 893 ms
Waku Simple Light Node 268.79 KB (+2.26% 🔺) 5.4 s (+2.26% 🔺) 592 ms (-34.57% 🔽) 6 s
ECIES encryption 29.56 KB (0%) 592 ms (0%) 303 ms (+3.99% 🔺) 894 ms
Symmetric encryption 29.56 KB (0%) 592 ms (0%) 322 ms (+11.24% 🔺) 913 ms
DNS discovery 110.68 KB (0%) 2.3 s (0%) 533 ms (+33.24% 🔺) 2.8 s
Privacy preserving protocols 117.31 KB (-0.12% 🔽) 2.4 s (-0.12% 🔽) 361 ms (-9.64% 🔽) 2.8 s
Light protocols 25.89 KB (-0.47% 🔽) 518 ms (-0.47% 🔽) 199 ms (-2.76% 🔽) 717 ms
History retrieval protocols 25.05 KB (-0.52% 🔽) 502 ms (-0.52% 🔽) 222 ms (-16.41% 🔽) 723 ms
Deterministic Message Hashing 5.65 KB (0%) 113 ms (0%) 84 ms (+17% 🔺) 197 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

peer-exchange: investigate p2p-circuit address discovery & connection
1 participant