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

chore: add p2p-circuit component to multiaddr that supports it #1531

Closed
wants to merge 1 commit into from

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 requested a review from a team as a code owner September 4, 2023 18:57
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 28.67 KB (0%) 574 ms (0%) 517 ms (+34.92% 🔺) 1.1 s
Waku Simple Light Node 298.53 KB (+0.02% 🔺) 6 s (+0.02% 🔺) 1.5 s (+17.48% 🔺) 7.5 s
ECIES encryption 28.68 KB (0%) 574 ms (0%) 424 ms (-21.02% 🔽) 997 ms
Symmetric encryption 28.68 KB (0%) 574 ms (0%) 583 ms (+13.46% 🔺) 1.2 s
DNS discovery 118.64 KB (+0.03% 🔺) 2.4 s (+0.03% 🔺) 874 ms (-23.33% 🔽) 3.3 s
Privacy preserving protocols 122.62 KB (0%) 2.5 s (0%) 981 ms (-4.38% 🔽) 3.5 s
Light protocols 28.68 KB (0%) 574 ms (0%) 306 ms (-28.94% 🔽) 880 ms
History retrieval protocols 27.92 KB (0%) 559 ms (0%) 431 ms (-12.81% 🔽) 990 ms
Deterministic Message Hashing 5.64 KB (0%) 113 ms (0%) 123 ms (-6.95% 🔽) 236 ms

// if the multiaddr contains `p2p`, it means that it supports `p2p-circuit`
// this is avoided from the ENR to save space
// we should add it
if (ma.toString().includes("/p2p/")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should handle particular case because to me it seems possible to accidentally get p2p/p2p-circuit or something.

if (hasP2p && isPeerId(left) && isPeerId(right)) {
  ...
}

Correct me here if I am wrong.

multiaddrs.push(multiaddr(multiaddrBytes));
let ma = multiaddr(multiaddrBytes);

// if the multiaddr contains `p2p`, it means that it supports `p2p-circuit`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide the full explanation as referred in the description of the PR (that p2p-circuit is not encoded due to space constraint in the ENR, in what form are multiaddr encoded and what is the valid final form of the multiaddr).

@danisharora099 danisharora099 marked this pull request as draft September 7, 2023 09:30
@danisharora099
Copy link
Collaborator Author

moving to draft until we investigate more on how to handle p2p-circuit relay better with js-waku
#1527

@weboko
Copy link
Collaborator

weboko commented Sep 22, 2023

posting not to forget:

@danisharora099
Copy link
Collaborator Author

superseded by #1619

@danisharora099 danisharora099 deleted the feat/p2p-circuit-ma branch October 18, 2023 14:41
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.

None yet

3 participants