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: added optional filtering by shard to selectPeer() #2063

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

SionoiS
Copy link
Contributor

@SionoiS SionoiS commented Sep 21, 2023

Description

Tiny PR adding an optional shard filter when selecting a peer via peer manager.

Tracking #1941

@SionoiS SionoiS added the E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details label Sep 21, 2023
@SionoiS SionoiS self-assigned this Sep 21, 2023
@github-actions
Copy link

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:2063

Built from a72e6cf

Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

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

LGTM for now, but wondering if we'll always have the ENR for interesting peers available? The idea of some metadata exchange protocol, for example, would allow us to discover the shards for any peer even outside of ENR encoding. In other words, we may want to also index against the shard, cluster in the peerStore so that it's not a separate filter loop.

waku/node/peer_manager/peer_manager.nim Show resolved Hide resolved
@SionoiS
Copy link
Contributor Author

SionoiS commented Sep 22, 2023

LGTM for now, but wondering if we'll always have the ENR for interesting peers available? The idea of some metadata exchange protocol, for example, would allow us to discover the shards for any peer even outside of ENR encoding. In other words, we may want to also index against the shard, cluster in the peerStore so that it's not a separate filter loop.

I agree that sharding is not well integrated into peer management yet. I don't think that ENRs will be missing in many cases but we def should have something in place for those.

@SionoiS SionoiS merged commit 0d9e9fb into master Sep 22, 2023
10 checks passed
@SionoiS SionoiS deleted the feat--filter-select-peer branch September 22, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants