Skip to content

bug:Peers stats count looks inconsistent (/admin/v1/peers/stats) #3541

@AYAHASSAN287

Description

@AYAHASSAN287

Summary

When more than one relay peer is connected, GET /admin/v1/peers/stats reports an incorrect total under Relay peers. Specifically, "Total relay peers" is 1 while other sections (and GET /admin/v1/peers) indicate 2+ relay peers are connected.

Reproduction

Run test test_admin_peers_stats_counts and compare these values:

  • Relay peers["Total relay peers"]
  • By Protocols["/vac/waku/relay/2.0.0"]
  • The number of connected peers from GET /admin/v1/peers

Expected behavior

Relay peers["Total relay peers"] should equal the actual number of connected relay peers (e.g., 2 when two are connected). All counts within GET /admin/v1/peers/stats should be internally consistent and also match GET /admin/v1/peers.

Actual behavior

With two relay peers connected, the stats endpoint returns something like:

{
  "Relay peers": {
    "Total relay peers": 1
  },
  "By Protocols": {
    "/vac/waku/relay/2.0.0": 2
  }
}

Meanwhile, GET /admin/v1/peers (and the actual connections) show 2 relay peers.

Metadata

Metadata

Labels

bugSomething isn't workingeffort/hoursEstimated to be completed in a few hours

Type

No type

Projects

Status

Priority

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions