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

fix: remove window reference and improve waitForRemotePeer #2194

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

weboko
Copy link
Collaborator

@weboko weboko commented Nov 5, 2024

Problem

This PR resolves cold start issue and reference window issue.

Solution

For cold start issue - we should start checking new connections as early as possible.

Notes

@weboko weboko requested a review from a team as a code owner November 5, 2024 19:06
@@ -40,57 +40,76 @@ export async function waitForRemotePeer(
throw Error("Waku node is not started");
}

for (const protocol of protocols) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this improves error handling since Promise.any propagates differently

Copy link

github-actions bot commented Nov 5, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 86.63 KB (+0.28% 🔺) 1.8 s (+0.28% 🔺) 8.5 s (-30.57% 🔽) 10.2 s
Waku Simple Light Node 136.82 KB (-0.1% 🔽) 2.8 s (-0.1% 🔽) 11.5 s (-33.7% 🔽) 14.3 s
ECIES encryption 22.88 KB (0%) 458 ms (0%) 4.3 s (+11.04% 🔺) 4.7 s
Symmetric encryption 22.37 KB (0%) 448 ms (0%) 3.7 s (-14.19% 🔽) 4.2 s
DNS discovery 70.54 KB (-0.1% 🔽) 1.5 s (-0.1% 🔽) 12.5 s (+24.44% 🔺) 13.9 s
Peer Exchange discovery 71.82 KB (-0.05% 🔽) 1.5 s (-0.05% 🔽) 9.2 s (+15.29% 🔺) 10.6 s
Local Peer Cache Discovery 65.17 KB (0%) 1.4 s (0%) 8.4 s (-14.38% 🔽) 9.7 s
Privacy preserving protocols 76.16 KB (+0.24% 🔺) 1.6 s (+0.24% 🔺) 10.8 s (+0.58% 🔺) 12.3 s
Waku Filter 80.98 KB (+0.05% 🔺) 1.7 s (+0.05% 🔺) 13.9 s (+32.49% 🔺) 15.6 s
Waku LightPush 75.72 KB (+0.06% 🔺) 1.6 s (+0.06% 🔺) 9 s (-21.16% 🔽) 10.6 s
History retrieval protocols 77.63 KB (-0.11% 🔽) 1.6 s (-0.11% 🔽) 7.3 s (-18.17% 🔽) 8.9 s
Deterministic Message Hashing 7.39 KB (0%) 148 ms (0%) 1.1 s (-49.04% 🔽) 1.2 s

@weboko weboko merged commit 88e33a9 into master Nov 8, 2024
10 of 11 checks passed
@weboko weboko deleted the weboko/waitForPeers-bugs branch November 8, 2024 05:34
@weboko weboko mentioned this pull request Nov 8, 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.

bug: filter subscription is not working on cold start
2 participants