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

Refactor : Peer Store #579

Closed
chaitanyaprem opened this issue Jun 23, 2023 · 5 comments
Closed

Refactor : Peer Store #579

chaitanyaprem opened this issue Jun 23, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@chaitanyaprem
Copy link
Collaborator

chaitanyaprem commented Jun 23, 2023

Issue

This issue will be used to track the refactor and various improvements pertaining to peer store. Peer and connection managment related enhancements are being tracked by #594.

As the objectives of go-waku are different from nwaku and js-waku, changes required would be identified by
going through the improvements done in nwaku and js-waku along with study on improvements specific to go-waku.

Following are the list of items/considerations for the refactor.

Some high level thoughts for consideration

  1. Persisting peers - Implement persistent peer-store, and remove dependency from libp2p peer-store due to this. Establish connections from persisted peers during initialization, only use discover if not enough peers are available.
  2. Limit peerStorage capacity similar to - feat(networking): prune peers from peerstore exceeding capacity nwaku#1513
  3. Review Peer related metrics and useful reporting and see if any enhancements are required.
  4. Usage specific behaviours (what kind of config to be provided to user layers in order to tune the peer management) Considering service node and light client usage of go-waku - To be analyzed
@chaitanyaprem chaitanyaprem added the enhancement New feature or request label Jun 23, 2023
@chaitanyaprem chaitanyaprem changed the title Have own in-memory/persisted peer metadata separate from go-libp2p peerstore Refactor : Peer Store and Peer Management Jun 30, 2023
@chaitanyaprem chaitanyaprem self-assigned this Jun 30, 2023
@fryorcraken fryorcraken added this to Waku Aug 16, 2023
@chaitanyaprem chaitanyaprem changed the title Refactor : Peer Store and Peer Management Refactor : Peer Store Aug 17, 2023
@chaitanyaprem chaitanyaprem removed their assignment Aug 17, 2023
@chaitanyaprem
Copy link
Collaborator Author

As per discussion here, waku has a special case where each time a wakunode is restarted or in status desktop case a user logs out and logs in a new peerID is generated which can bloat up peerStore.

For now a workaround has been implemented which is not clean.

Taking a look at Prysm, noticed that they don't use libp2p peerStore at all and have their own peerStore defined.
We should also take this approach as Waku's dynamically changing peerID concept doesn't go well with the way libp2p peerstore is implemented.

@chair28980
Copy link
Contributor

Review issue's status in January '24.

@chair28980
Copy link
Contributor

Add to Doha agenda for review.

@chaitanyaprem
Copy link
Collaborator Author

Refer #852 as well during discussion

@chaitanyaprem
Copy link
Collaborator Author

This would no longer be required as nwaku would be replacing go-waku in status by end of 2024.
Hence closing this as there is no plan to implement it.

@github-project-automation github-project-automation bot moved this from To Do to Done in Waku Jun 7, 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: Done
Development

No branches or pull requests

2 participants