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

Exclude Epoch Boundary from Health Check #105

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jedleggett
Copy link
Collaborator

No description provided.

// 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);
Copy link
Contributor

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 {
Copy link
Contributor

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
Copy link
Contributor

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?

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.

None yet

4 participants