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

BEDS 1065/apps christmas miracle #1239

Merged
merged 6 commits into from
Jan 14, 2025
Merged

Conversation

LuccaBitfly
Copy link
Contributor

@LuccaBitfly LuccaBitfly commented Jan 8, 2025

Adds efficiency, balances and rewards field to validator dashboard group summary.
Rule-of-thumb performance estimates:

  • Balances: adds 500ms - 2.5s per request depending on dashboard size
  • Rewards: data is already there so no changes
  • Efficiency: data is mostly already there so no changes

Copy link

cloudflare-workers-and-pages bot commented Jan 9, 2025

Deploying beaconchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 02a0a6c
Status: ✅  Deploy successful!
Preview URL: https://6b623303.beaconchain.pages.dev
Branch Preview URL: https://beds-1065-apps-christmas-mir.beaconchain.pages.dev

View logs

@LuccaBitfly LuccaBitfly force-pushed the BEDS-1065/apps-christmas-miracle branch from df5ec40 to 53bc77d Compare January 9, 2025 13:15
Copy link
Contributor

@remoterami remoterami left a comment

Choose a reason for hiding this comment

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

Looks good overall, left a few comments. ptal

backend/pkg/api/data_access/vdb_summary.go Outdated Show resolved Hide resolved
backend/pkg/api/data_access/vdb_summary.go Outdated Show resolved Hide resolved
Comment on lines 842 to 859
rpOperatorInfo, err := d.getValidatorDashboardRpOperatorInfo(ctx, dashboardId)
if err != nil {
return nil, err
}
validatorMapping, err := d.services.GetCurrentValidatorMapping()
if err != nil {
return nil, err
}
balances, err := d.calculateValidatorDashboardBalance(ctx, rpOperatorInfo, validators, validatorMapping, protocolModes)
if err != nil {
return nil, err
}
ret.Balances = balances
Copy link
Contributor

@remoterami remoterami Jan 9, 2025

Choose a reason for hiding this comment

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

check: This would factor in the protocolModes for the new balances field, but the rest of the function does not yet use the parameter. I'm not 100% certain which other fields would also be affected, but apr might be a candidate.

  • If there are any, I would prefer to not return "mixed" data as that could be confusing. Rather either apply the calculation to all relevant fields, or (temporarily) apply it to none (hardcoding protocolModes.RocketPool to false)
  • If there are none (which might actually be the case, could be that the parameter is just a leftover from when we were briefly planning to add RP stats to the group summaries or something), the comment about it at the top of the method should be removed / clarified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're completely right. If you allow it, I'll create another ticket and keep this in scope for the minimum required app changes 🙏

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, sounds good 👍

@LuccaBitfly LuccaBitfly force-pushed the BEDS-1065/apps-christmas-miracle branch from 53bc77d to cee24af Compare January 14, 2025 09:26
Copy link
Contributor

@remoterami remoterami left a comment

Choose a reason for hiding this comment

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

lgtm 🎁 (just create ticket pls, see comment)

@LuccaBitfly LuccaBitfly force-pushed the BEDS-1065/apps-christmas-miracle branch from cee24af to 02a0a6c Compare January 14, 2025 11:21
@LuccaBitfly LuccaBitfly merged commit b16c30f into staging Jan 14, 2025
5 checks passed
@LuccaBitfly LuccaBitfly deleted the BEDS-1065/apps-christmas-miracle branch January 14, 2025 11:55
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