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

Take into account peer state for standard API #66

Closed
michaelsproul opened this issue Oct 27, 2020 · 2 comments
Closed

Take into account peer state for standard API #66

michaelsproul opened this issue Oct 27, 2020 · 2 comments

Comments

@michaelsproul
Copy link

Lighthouse nodes currently have their peer count overstated on eth2stats.io because eth2stats-client ignores the peer states when reading /eth/v1/node/peers. I think it should use the state field to work out which peers are connected.

E.g. eth2-stats reports this number:

$ curl -s "http://localhost:5052/eth/v1/node/peers" | jq '.data | length'
244

when it should report:

$ curl -s "http://localhost:5052/eth/v1/node/peers" | jq '.data | map(select(.state == "connected")) | length'
50
@michaelsproul
Copy link
Author

Related ethereum/beacon-APIs#101 (adds peer filtering by state to the API)

@protolambda
Copy link
Collaborator

implementing this now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@michaelsproul @protolambda and others