-
Notifications
You must be signed in to change notification settings - Fork 27
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
Exclude Epoch Boundary from Health Check #105
base: master
Are you sure you want to change the base?
Conversation
// Don't perform health updates within +/- 75 slots of epoch boundary | ||
// Note: This is not necessarily correct for local testing | ||
let slot_index = slot % DEFAULT_SLOTS_PER_EPOCH; | ||
outside_epoch_boundary = 75 < slot_index && slot_index < (DEFAULT_SLOTS_PER_EPOCH - 75); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to add a const for 75 with a comment on why the specific value
"relayer-health-state", | ||
("health_state", new_health_state, i64) | ||
); | ||
if outside_epoch_boundary { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move the check of outside_epoch_boundary into the match statement/if/else for health state? may be helpful to continue emitting data points during that time
} | ||
recv(slot_receiver) -> maybe_slot => { | ||
let slot = maybe_slot.expect("error receiving slot, exiting"); | ||
// Don't perform health updates within +/- 75 slots of epoch boundary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughts on moving this logic to the health state stuff above?
No description provided.