-
Notifications
You must be signed in to change notification settings - Fork 47
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: unsubscribe in case invalid push requests are received from server #1124
Comments
cc @waku-org/js-waku-developers @danisharora099. Happy to hear if there are any other alternative solutions for this. |
I'm curious to understand how this happens where when the internet connectivity is lost, two content topics have subscriptions with the node, but subscription with one content topic is still left? |
Well, this could happen if after reconnection the same peer(which before disconnection was used for all 3) but was selected for only C3. So serviceNode/peer thinks we still have subscription for all 3 as we keep pinging the node. Only way i can think of to handle this is to send unsubscribe to those contentTopics for which we are receiving messages and we are not subscribed to for that peer. i.e in this case on receiving messages for C2 from the peer, we have to unsubscribe C2 towards that peer. |
Problem
There are few scenarios noticed during dogfooding that Filter-Push is received for subscriptions LightNode no longer has.
One scenario where this could happen is
Suggested solution
When we receive an invalid push request, send a unsubscribe request to that peer for that specific contentTopic.
Alternatives considered
When we regain connectivity, send unsubscribeAll to all peers with which we had filter subscriptions before connectivityLoss.
Acceptance criteria
Have a test to validate this scenario.
The text was updated successfully, but these errors were encountered: