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: add validator count field to group summary #1052

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions backend/pkg/api/types/validator_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ type VDBSummaryTableRow struct {
type GetValidatorDashboardSummaryResponse ApiPagingResponse[VDBSummaryTableRow]

type VDBGroupSummaryColumnItem struct {
StatusCount StatusCount `json:"status_count"`
Validators []uint64 `json:"validators,omitempty"`
StatusCount StatusCount `json:"status_count"`
Validators []uint64 `json:"validators,omitempty"` // fill with up to 3 validator indexes
ValidatorCount uint64 `json:"validator_count"` // number of distinct validators
}

type VDBGroupSummarySyncCount struct {
Expand All @@ -87,11 +88,12 @@ type VDBGroupSummaryData struct {
AttestationEfficiency float64 `json:"attestation_efficiency"`
AttestationAvgInclDist float64 `json:"attestation_avg_incl_dist"`

SyncCommittee VDBGroupSummaryColumnItem `json:"sync"`
SyncCommitteeCount VDBGroupSummarySyncCount `json:"sync_count"`
Slashings VDBGroupSummaryColumnItem `json:"slashings"` // Failed slashings are count of validators in the group that were slashed
ProposalValidators []uint64 `json:"proposal_validators"`
MissedRewards VDBGroupSummaryMissedRewards `json:"missed_rewards"`
SyncCommittee VDBGroupSummaryColumnItem `json:"sync"`
SyncCommitteeCount VDBGroupSummarySyncCount `json:"sync_count"`
Slashings VDBGroupSummaryColumnItem `json:"slashings"` // Failed slashings are count of validators in the group that were slashed
ProposalValidators []uint64 `json:"proposal_validators"` // fill with up to 3 validator indexes
ProposalValidatorCount uint64 `json:"proposal_validator_count"` // number of distinct validators
MissedRewards VDBGroupSummaryMissedRewards `json:"missed_rewards"`

Apr ClElValue[float64] `json:"apr"`

Expand Down
6 changes: 4 additions & 2 deletions frontend/types/api/validator_dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export interface VDBSummaryTableRow {
export type GetValidatorDashboardSummaryResponse = ApiPagingResponse<VDBSummaryTableRow>;
export interface VDBGroupSummaryColumnItem {
status_count: StatusCount;
validators?: number /* uint64 */[];
validators?: number /* uint64 */[]; // fill with up to 3 validator indexes
validator_count: number /* uint64 */; // number of distinct validators
}
export interface VDBGroupSummarySyncCount {
current_validators: number /* uint64 */;
Expand All @@ -75,7 +76,8 @@ export interface VDBGroupSummaryData {
sync: VDBGroupSummaryColumnItem;
sync_count: VDBGroupSummarySyncCount;
slashings: VDBGroupSummaryColumnItem; // Failed slashings are count of validators in the group that were slashed
proposal_validators: number /* uint64 */[];
proposal_validators: number /* uint64 */[]; // fill with up to 3 validator indexes
proposal_validator_count: number /* uint64 */; // number of distinct validators
missed_rewards: VDBGroupSummaryMissedRewards;
apr: ClElValue<number /* float64 */>;
luck: Luck;
Expand Down
Loading