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: cycle peers in local storage #2018

Open
danisharora099 opened this issue May 15, 2024 · 1 comment
Open

feat: cycle peers in local storage #2018

danisharora099 opened this issue May 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@danisharora099
Copy link
Collaborator

This is a feature request

Problem

When a js-waku node is started and starts to discover nodes, using different discovery mechanisms, it starts to store successfully connected nodes in the local storage for faster bootstrapping when a js-waku node starts the next time.

This can lead to an aspect of potential centralisation where the node is attempting to connect to the same pool of nodes, stored in the localstorage.

Proposed Solutions

Cycle the list of nodes stored in localstorage when new nodes are found upon a restart.

Notes

@weboko
Copy link
Collaborator

weboko commented May 15, 2024

Adding quote from #1463 (comment):

It's probably a good idea to cache some peers, but I would try to flush out that cache as soon as possible after a startup and replace each of these subscriptions with a new one to a random node. This is to prevent a node from always using the same peers and so being vulnerable to bias.

@chair28980 chair28980 added the enhancement New feature or request label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Do
Development

No branches or pull requests

3 participants