-
Notifications
You must be signed in to change notification settings - Fork 247
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: use automatic peer selection for filter. #4531
Conversation
Jenkins BuildsClick to see older builds (19)
|
@kaichaosun @chaitanyaprem been trying to recall why exactly I think that it was planned to improve So maybe another option to try is improving
Alternatively, go-waku's automatic peer selection could be modified in order to take into account the above two points. |
The For sorting FilterManager.peers by priority, this is another story, and I see it can be used not only by filter, should we design and spec it first before implement it? Go-waku already provides peer selection based on delay, I believe there could be other dimensions of |
You are right. This is something that will have to be done eventually(but for now it makes sense to keep it simple since we are dealing with only fleet nodes which are not of large number). For now, to keep it simple we can use RTT probably for this. |
Do you mean use |
This would work better in a more decentralized operator environment where there are more service nodes which i think would be how the status communities would function in the long run. |
wakuv2/filter_manager.go
Outdated
// Create sub placeholder in order to avoid potentially too many subs | ||
tempID := uuid.NewString() | ||
subs[tempID] = nil | ||
mgr.subscribeToFilter(filterID, tempID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain a bit more on why removing goroutine helps with avoiding subscribing to the same peer? Having all calls to go-waku's FilterLightnode
asynchronous is important for the functionality of FilterManager, as far as i recall - some of these subscribes/unsubscribes might take a long time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back goroutine and depend on go-waku for dedupliate subscribing to same peer.
1795605
to
f8d2249
Compare
f8d2249
to
de02268
Compare
Use automatic peer selection from waku helps reduce duplicate logic and increase performance when static shards apply.
Important changes:
WithAutomaticPeerSelection
when subscribeCloses #4463