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

core/validatorapi: return requested validators #3123

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

gsora
Copy link
Collaborator

@gsora gsora commented Jun 6, 2024

Instead of always returning the full cache on Validators() requests, only return whatever was requested originally.

Still check cache first, then upstream BN, then if anything comes up return to the caller.

Harden tests to check for this behavior.

Log a debug message when refreshing the validator cache.

Make sure to always refresh the validator cache as soon as the first observed epoch begins, then fall back to the standard refresh pattern (once every epoch).

category: bug
ticket: none

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 35.71429% with 27 lines in your changes missing coverage. Please review.

Project coverage is 56.78%. Comparing base (43979af) to head (7e4a750).

Files Patch % Lines
app/app.go 0.00% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3123      +/-   ##
==========================================
- Coverage   56.82%   56.78%   -0.04%     
==========================================
  Files         208      208              
  Lines       29276    29305      +29     
==========================================
+ Hits        16637    16642       +5     
- Misses      10801    10828      +27     
+ Partials     1838     1835       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Instead of always returning the full cache on Validators() requests, only return whatever was requested originally.

Still check cache first, then upstream BN, then if anything comes up return to the caller.

Harden tests to check for this behavior.

Log a debug message when refreshing the validator cache.

Make sure to always refresh the validator cache as soon as the first observed epoch begins, then fall back to the standard refresh pattern (once every epoch).
@gsora gsora force-pushed the gsora/validator-cache-return-only-requested branch from f153b3e to 7e4a750 Compare June 6, 2024 11:14
Copy link

sonarcloud bot commented Jun 6, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@gsora gsora added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jun 6, 2024
@obol-bulldozer obol-bulldozer bot merged commit ed1d55a into main Jun 6, 2024
12 checks passed
@obol-bulldozer obol-bulldozer bot deleted the gsora/validator-cache-return-only-requested branch June 6, 2024 12:42
gsora added a commit that referenced this pull request Jun 6, 2024
Instead of always returning the full cache on Validators() requests, only return whatever was requested originally.

Still check cache first, then upstream BN, then if anything comes up return to the caller.

Harden tests to check for this behavior.

Log a debug message when refreshing the validator cache.

Make sure to always refresh the validator cache as soon as the first observed epoch begins, then fall back to the standard refresh pattern (once every epoch).

category: bug
ticket: none
@gsora gsora mentioned this pull request Jun 6, 2024
obol-bulldozer bot pushed a commit that referenced this pull request Jun 6, 2024
- #3123 

category: misc
ticket: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants