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

feat: support fp stats #161

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

feat: support fp stats #161

wants to merge 19 commits into from

Conversation

gusin13
Copy link
Contributor

@gusin13 gusin13 commented Nov 30, 2024

This pr

  1. deletes v1 queue client related code
  2. deletes all old tests
  3. cleans up queues (earlier multiple q's were uses, now only 2 are needed active/unbonding)
  4. injects stats in v2/finality-providers endpoint
  5. adds more information in v2/overall-stats endpoint
  6. cleans up message handlers (only active/unbonding required)

Note:
re - active_finality_providers and total_finality_providers in v2/overall-stats
for now i am querying directly the finality_provider_details indexer db to get this data but ideally this should come from indexer->queues->api->stats db

@@ -34,12 +35,35 @@ func (s *V2Service) GetOverallStats(ctx context.Context) (*OverallStatsPublic, *
return nil, types.NewInternalServiceError(err)
}

activeStakersCount, err := s.DbClients.V2DBClient.GetActiveStakersCount(ctx)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will have performance issue when we have very big data set tho.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, added a todo for now and logged ticket
#165

Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with some comments

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

Successfully merging this pull request may close these issues.

2 participants