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

p2p, api: add api to return information about your peers #4778

Closed
dshulyak opened this issue Aug 5, 2023 · 0 comments
Closed

p2p, api: add api to return information about your peers #4778

dshulyak opened this issue Aug 5, 2023 · 0 comments
Assignees

Comments

@dshulyak
Copy link
Contributor

dshulyak commented Aug 5, 2023

add an api endpoint that will return list of peers from host.Network().Peers() and additionally provide information if that peers has a special role (such as bootnode or direct peer). in future we can collect interesting stats about peers and add that to the same endpoint, so format should allow to extend it without significant pain in future

one option is below

[{
  "id": "...",
  "addresses": "...",
  "uptime": "99h", // or maybe connection timestamp
  "tag": ["bootnode", "direct"] 
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants