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: refactor ConnectionManager for readability & maintainability #1658

Merged
merged 6 commits into from
Oct 13, 2023

Conversation

danisharora099
Copy link
Collaborator

This PR restructures the way we gauge if a peer should be dialed for readability:

  • moves the topic configuration check part of shouldDialPeer
  • abstracts discovery emission into a function

This also helps set some foundation for #1657

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 83.42 KB (+0.11% 🔺) 1.7 s (+0.11% 🔺) 2.1 s (-28.15% 🔽) 3.8 s
Waku Simple Light Node 263.38 KB (+0.04% 🔺) 5.3 s (+0.04% 🔺) 5.3 s (-8.25% 🔽) 10.6 s
ECIES encryption 79.29 KB (+0.12% 🔺) 1.6 s (+0.12% 🔺) 2.3 s (-28.32% 🔽) 3.9 s
Symmetric encryption 79.29 KB (+0.12% 🔺) 1.6 s (+0.12% 🔺) 3.6 s (+5.13% 🔺) 5.2 s
DNS discovery 110.92 KB (0%) 2.3 s (0%) 4 s (+0.77% 🔺) 6.3 s
Privacy preserving protocols 131.43 KB (0%) 2.7 s (0%) 4 s (+7.9% 🔺) 6.6 s
Light protocols 81.12 KB (0%) 1.7 s (0%) 1.7 s (-32.26% 🔽) 3.3 s
History retrieval protocols 80.22 KB (0%) 1.7 s (0%) 2.5 s (-18.5% 🔽) 4.1 s
Deterministic Message Hashing 5.65 KB (0%) 113 ms (0%) 471 ms (-29.31% 🔽) 584 ms

Copy link
Collaborator

@weboko weboko left a comment

Choose a reason for hiding this comment

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

nice spot

@danisharora099 danisharora099 merged commit b8d006b into master Oct 13, 2023
@danisharora099 danisharora099 deleted the chore/conn-manager-refactor branch October 13, 2023 12:38
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.

2 participants