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

bug: peer management of subscriptions is questionable #2120

Open
weboko opened this issue Aug 31, 2024 · 1 comment
Open

bug: peer management of subscriptions is questionable #2120

weboko opened this issue Aug 31, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@weboko
Copy link
Collaborator

weboko commented Aug 31, 2024

This is a bug report

Problem

Filter subscription's peer management is not ideal so that ping has no peers to use because this.getPeers returns empty array, probably, due to previous renewals.

But at the same time subscription is functioning so that all previously used peers are still returning messages.

image

Proposed Solutions

This issue requires investigation.

Once renewal has happened - previously used peer should not be used and has to be removed properly.

@weboko weboko added the bug Something isn't working label Aug 31, 2024
@chair28980 chair28980 added this to Waku Aug 31, 2024
@weboko weboko moved this to Triage in Waku Aug 31, 2024
@weboko weboko self-assigned this Sep 1, 2024
@weboko
Copy link
Collaborator Author

weboko commented Oct 13, 2024

Figured the bug. This issue happens due to how renewal logic works:

private async renewAndSubscribePeer(

During renewal - we add new peer and create a subscription to it without unsubscribing from previous peer AND without disconnecting.
At the same time libp2p still awaits for filter-push here

And once previously "used" peer pushes messages to js-waku - it successfully receives it.

For now it is not a critical bug for functionality of Filter but it definitely is not expected behavior.

Fix:

  • unsubscribe on renewal
  • potentially drop connections to renewed peers

Blocked by #2158 and potentially #1969 (as we need to improve connection management before).

@weboko weboko moved this from Priority to Blocked in Waku Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Blocked
Development

No branches or pull requests

1 participant