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

Feature: Build a StakeNet API that returns stakenet information in JSON format #8

Open
buffalu opened this issue Dec 19, 2023 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@buffalu
Copy link
Collaborator

buffalu commented Dec 19, 2023

Is your feature request related to a problem? Please describe.
If users want to explore StakeNet data, they need to use solana libraries and anchor. There should be an API implementation that anyone can host that acts as a proxy, cache, and translation layer which allows easily querying of the ValidatorHistoryAccount in a JSON format.

This API can be useful for any website that wants to show historical information on validator performance!

Describe the solution you'd like
A rust, axum-based API in this repository that allows one to query StakeNet data over a variety of endpoints to get information on validator performance.

The server arguments should include the bind IP and port, an RPC URL, the stakenet program IDs (validator history for now), and others. It should spin up an HTTP server and host a variety of endpoints that allow querying the performance of validators at given points in time.

Some of these endpoints can look like the following (I am not an API engineer, please take this with a grain of salt):

  • GET /api/v1/validator_history/{vote_account}
  • GET /api/v1/validator_history/{vote_account}?epoch={epoch}
@buffalu buffalu added the good first issue Good for newcomers label Dec 19, 2023
@dhruvsol
Copy link

Hey,
Can I take this? @buffalu

@buffalu
Copy link
Collaborator Author

buffalu commented Dec 20, 2023

Hey, Can I take this? @buffalu

yes @dhruvsol! feel free to ping us in discord if you need help.

here's a good start for an axum server we previously built leveraging an RPC client as a translation layer:
https://github.com/jito-foundation/distributor/blob/97e134a5f3b3da28130648d93da34100726e6dc9/api/src/main.rs#L51

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

No branches or pull requests

2 participants