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: improve node bootstrapping #2121

Merged
merged 6 commits into from
Sep 5, 2024
Merged

fix: improve node bootstrapping #2121

merged 6 commits into from
Sep 5, 2024

Conversation

weboko
Copy link
Collaborator

@weboko weboko commented Sep 1, 2024

Problem

When js-waku node is bootstrapped with default setting AND broken bootstrap node is used it fails sometimes.
And in that case application using js-waku has bad experience.

As explained in this comment:

The problem occurs when dns discovery gets us a broken bootstrap node is attempted to be used.

Solution

Increase amount of bootstrap nodes used and at the same time respect our good defaults: 2 filter and light push + 1 store nodes.

Improve dialing as when it fails for bootstrap nodes we should try using others.

Notes

@weboko weboko requested a review from a team as a code owner September 1, 2024 20:43
Copy link

github-actions bot commented Sep 1, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 82.97 KB (+0.18% 🔺) 1.7 s (+0.18% 🔺) 3.1 s (-14.49% 🔽) 4.8 s
Waku Simple Light Node 134.85 KB (+0.18% 🔺) 2.7 s (+0.18% 🔺) 3.9 s (-1.14% 🔽) 6.6 s
ECIES encryption 22.94 KB (0%) 459 ms (0%) 1.1 s (+30.06% 🔺) 1.6 s
Symmetric encryption 22.39 KB (0%) 448 ms (0%) 1.3 s (-18.04% 🔽) 1.7 s
DNS discovery 72.28 KB (-0.15% 🔽) 1.5 s (-0.15% 🔽) 2 s (-39.59% 🔽) 3.5 s
Peer Exchange discovery 73.79 KB (+0.09% 🔺) 1.5 s (+0.09% 🔺) 2.8 s (-37.75% 🔽) 4.2 s
Local Peer Cache Discovery 67.63 KB (+0.01% 🔺) 1.4 s (+0.01% 🔺) 2 s (-27.95% 🔽) 3.3 s
Privacy preserving protocols 74.8 KB (0%) 1.5 s (0%) 2.8 s (-0.06% 🔽) 4.3 s
Waku Filter 78.06 KB (0%) 1.6 s (0%) 3 s (+0.21% 🔺) 4.6 s
Waku LightPush 75.58 KB (0%) 1.6 s (0%) 2.2 s (+30.57% 🔺) 3.7 s
History retrieval protocols 75.96 KB (0%) 1.6 s (0%) 2.3 s (-2.94% 🔽) 3.9 s
Deterministic Message Hashing 7.38 KB (0%) 148 ms (0%) 701 ms (+47.69% 🔺) 848 ms

@@ -7,19 +7,13 @@ import {
} from "@waku/discovery";
import { type Libp2pComponents, PubsubTopic } from "@waku/interfaces";

const DEFAULT_NODE_REQUIREMENTS = {
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 one is not needed as there is another on in the dns_discovery/const

@@ -15,7 +15,7 @@ export const DEFAULT_BOOTSTRAP_TAG_VALUE = 50;
export const DEFAULT_BOOTSTRAP_TAG_TTL = 100_000_000;

export const DEFAULT_NODE_REQUIREMENTS: Partial<NodeCapabilityCount> = {
store: 2,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

matches RFC and decreases changes of hitting bad DNS node (tho it shouldn't)

@weboko weboko merged commit 0263cb8 into master Sep 5, 2024
10 of 11 checks passed
@weboko weboko deleted the weboko/fix-bootstrap branch September 5, 2024 23:10
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: investigate bootstrap and improve bootstrap experience with broken nodes
2 participants