You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Report relay peer health per shard based from peerManager(as it already tracks relay connections)
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)
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:
We can consider 3 states for peerConnHealth:
The following would indicate the peerConnHealth:
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
The text was updated successfully, but these errors were encountered: