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: Report shard/pubsubTopic specific connection health/status #1021

Closed
chaitanyaprem opened this issue Feb 1, 2024 · 0 comments · Fixed by #1027
Closed

feat: Report shard/pubsubTopic specific connection health/status #1021

chaitanyaprem opened this issue Feb 1, 2024 · 0 comments · Fixed by #1027
Assignees
Labels
status-waku-integ All issues relating to the Status Waku integration.

Comments

@chaitanyaprem
Copy link
Collaborator

chaitanyaprem commented Feb 1, 2024

Problem

As of now peer connection is being reported to status-go based on number of peers connected ir-respective of shards.
Once multiple shards are to be supported either for communities or common ones like for 1:1 chat, the health should be reported separately per shard.

Suggested solution

As per initial discussion, following approach is to be taken:

  1. Report relay peer health per shard based from peerManager(as it already tracks relay connections)
  2. Report Filter and lightpush health from within status-go as peers are managed by it. This shall later be moved into SDK layer or within go-waku itself.

We can consider 3 states for peerConnHealth:

  • Minimally-Healthy
    • Relay Mode: less than 4(D) peers are connected and healthy
    • Light-Mode: 1 filter peer is connected
    • Light-Mode: 1 lightpush peer is available to be connected
  • Sufficiently-Healthy
    • Relay Mode: min 4 (D) peers are connected and healthy
    • Light-Mode: min-peers specified for filter are connected
    • Light-Mode: atleast 2 lightpush peers available
  • UnHealthy
    • Relay Mode: no peers are connected in relay-mode or connected peers are unhealthy
    • Light-Mode: no filter peers are connected
    • Light-Mode: lightpush peers not available

The following would indicate the peerConnHealth:

  • In Relay Mode: go-waku shall notify of this health based on number of peers connected and if scores of connected peers are also healthy . Health of relay peer is determined based on gossipsub score as below:
    • score more than 1000 is considered unhealthy
    • TBD - Need to identify if there are any other aspects to consider such as latency etc.
  • In lightMode: status-go shall derive peerConnHealth based on peer connections to Filter and lightpush(This shall be later migrated to SDK layer once Simplify FilterManager status-im/status-go#4665 is complete)

Alternatives considered

None

Additional context

Ref issue status-im/status-go#4628
Need to consider points from #1017 as well while implementing.

Acceptance criteria

Unit tests to verify health reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-waku-integ All issues relating to the Status Waku integration.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant