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: disable libp2p autodial #1437

Merged
merged 1 commit into from
Jul 26, 2023
Merged

feat: disable libp2p autodial #1437

merged 1 commit into from
Jul 26, 2023

Conversation

danisharora099
Copy link
Collaborator

@danisharora099 danisharora099 commented Jul 26, 2023

Problem

Libp2p, with the upgrade, changed some config/API around toggling auto dials.

Libp2p autodials all discovered peers/peers that exist in the peerStore, until the minConnections limit is hit which means no cap on bootstrap peers.

Solution

Since we want a max cap on the number of bootstrap peers we want to connect to, we need to change the minConnections down to 1 without any recurring connection/drop off (which is currently happening as libp2p auto dials, our connection manager drops off, and this is repeated)

Reference: https://github.com/libp2p/js-libp2p/blob/7debe0312f6df68e27dc26410a745c98477abe59/doc/migrations/v0.42-v0.43.md?plain=1#L88

@github-actions
Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 29.78 KB (+0.01% 🔺) 596 ms (+0.01% 🔺) 294 ms (+50.26% 🔺) 889 ms
Waku Simple Light Node 235.17 KB (+0.01% 🔺) 4.8 s (+0.01% 🔺) 1.1 s (+46.97% 🔺) 5.8 s
ECIES encryption 28.54 KB (0%) 571 ms (0%) 346 ms (+61.02% 🔺) 917 ms
Symmetric encryption 28.55 KB (0%) 571 ms (0%) 333 ms (+52.8% 🔺) 904 ms
DNS discovery 108.35 KB (0%) 2.2 s (0%) 589 ms (+30.19% 🔺) 2.8 s
Privacy preserving protocols 122.47 KB (+0.01% 🔺) 2.5 s (+0.01% 🔺) 571 ms (+13.41% 🔺) 3.1 s
Light protocols 31.23 KB (+0.01% 🔺) 625 ms (+0.01% 🔺) 296 ms (+27.57% 🔺) 920 ms
History retrieval protocols 30.49 KB (+0.01% 🔺) 610 ms (+0.01% 🔺) 275 ms (+14.44% 🔺) 885 ms
Deterministic Message Hashing 5.78 KB (0%) 116 ms (0%) 115 ms (+1.79% 🔺) 230 ms

@danisharora099 danisharora099 merged commit 96b111d into master Jul 26, 2023
11 checks passed
@danisharora099 danisharora099 deleted the chore/fix-autodial branch July 26, 2023 06:50
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