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!: discourage the use of relay in browsers #1778

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 commented Jan 10, 2024

This PR:

  • moves createRelayNode behind @waku/sdk/relay instead of @waku/sdk
  • adds a comment to createRelayNode discouraging the use of Relay in browsers to library consumers.

@danisharora099 danisharora099 requested a review from a team as a code owner January 10, 2024 07:31
Copy link

github-actions bot commented Jan 10, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 82.02 KB (0%) 1.7 s (0%) 1.8 s (-0.81% 🔽) 3.5 s
Waku Simple Light Node 261.45 KB (-0.01% 🔽) 5.3 s (-0.01% 🔽) 4 s (+12.21% 🔺) 9.2 s
ECIES encryption 31.97 KB (0%) 640 ms (0%) 1.1 s (+7.58% 🔺) 1.8 s
Symmetric encryption 31.96 KB (0%) 640 ms (0%) 996 ms (-16.9% 🔽) 1.7 s
DNS discovery 123.17 KB (0%) 2.5 s (0%) 2.1 s (-5.23% 🔽) 4.6 s
Privacy preserving protocols 119.34 KB (0%) 2.4 s (0%) 1.9 s (+17.25% 🔺) 4.3 s
Light protocols 79.44 KB (0%) 1.6 s (0%) 1.5 s (+12.44% 🔺) 3.1 s
History retrieval protocols 78.33 KB (0%) 1.6 s (0%) 685 ms (-43.16% 🔽) 2.3 s
Deterministic Message Hashing 5.92 KB (0%) 119 ms (0%) 223 ms (+6.74% 🔺) 342 ms

@@ -80,6 +80,12 @@ export async function createLightNode(
/**
* Create a Waku node that uses Waku Relay to send and receive messages,
* enabling some privacy preserving properties.
* * @remarks
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 also remove direct export of it all together and hide it behind @waku/sdk/relay or something.

Another thing is that we should not have it mentioned on docs.waku.org. Couldn't find any but @LordGhostX can you confirm, please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure. Having it export it via @waku/sdk/relay discourages it more :D

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I removed all references to relay a long time ago

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sounds good, thanks!
i'll move createRelayNode behind @waku/sdk/relay

@adklempner adklempner self-requested a review January 10, 2024 20:04
@danisharora099 danisharora099 changed the title chore: add comment discouraging use of relay in browsers chore!: discourage the use of relay in browsers Jan 11, 2024
@danisharora099 danisharora099 merged commit 906c933 into master Jan 11, 2024
9 of 11 checks passed
@danisharora099 danisharora099 deleted the chore/relay-discourage branch January 11, 2024 13:38
@weboko weboko mentioned this pull request Mar 4, 2024
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.

4 participants