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: use yamux instead of mplex #1894

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

feat: use yamux instead of mplex #1894

wants to merge 1 commit into from

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 commented Mar 7, 2024

Problem

From libp2p docs:

Yamux natively supports flow control, it is better suited for applications that require the transfer of large amounts of data.
Until recently, the reason mplex was still supported was compatibility with js-libp2p, which didn’t have yamux support. Now that js-libp2p has gained yamux support, mplex should only be used to provide backward-compatibility with legacy nodes.

Solution

Use yamux instead of mplex

Notes

TODO

  • remove mplex

Contribution checklist:

  • covered by unit tests;
  • covered by e2e test;
  • add ! in title if breaks public API;

Copy link

github-actions bot commented Mar 7, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 83.98 KB (+0.5% 🔺) 1.7 s (+0.5% 🔺) 1.9 s (-25.21% 🔽) 3.5 s
Waku Simple Light Node 138.06 KB (+2.14% 🔺) 2.8 s (+2.14% 🔺) 2.6 s (-23.06% 🔽) 5.4 s
ECIES encryption 22.88 KB (-0.3% 🔽) 458 ms (-0.3% 🔽) 975 ms (+3.5% 🔺) 1.5 s
Symmetric encryption 22.37 KB (-0.12% 🔽) 448 ms (-0.12% 🔽) 1.6 s (+65.42% 🔺) 2.1 s
DNS discovery 72.79 KB (+0.71% 🔺) 1.5 s (+0.71% 🔺) 2.8 s (+4.28% 🔺) 4.3 s
Peer Exchange discovery 74.31 KB (+0.71% 🔺) 1.5 s (+0.71% 🔺) 2.2 s (+53.27% 🔺) 3.7 s
Local Peer Cache Discovery 68.07 KB (+0.65% 🔺) 1.4 s (+0.65% 🔺) 1.9 s (+5.18% 🔺) 3.3 s
Privacy preserving protocols 75.31 KB (+0.7% 🔺) 1.6 s (+0.7% 🔺) 2.8 s (+25.71% 🔺) 4.3 s
Waku Filter 79.17 KB (+0.84% 🔺) 1.6 s (+0.84% 🔺) 3 s (+21.85% 🔺) 4.6 s
Waku LightPush 77.26 KB (+0.61% 🔺) 1.6 s (+0.61% 🔺) 2.6 s (+6.84% 🔺) 4.2 s
History retrieval protocols 76.48 KB (+0.61% 🔺) 1.6 s (+0.61% 🔺) 1.6 s (-21.34% 🔽) 3.1 s
Deterministic Message Hashing 7.39 KB (+0.15% 🔺) 148 ms (+0.15% 🔺) 582 ms (+136.68% 🔺) 730 ms

@danisharora099 danisharora099 marked this pull request as ready for review March 12, 2024 09:15
@danisharora099 danisharora099 requested a review from a team as a code owner March 12, 2024 09:15
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.

chore: use yamux instead of mplex
2 participants