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

[Merged by Bors] - Harden slot notifier against clock drift #3519

Closed

Conversation

michaelsproul
Copy link
Member

Issue Addressed

Partly resolves #3518

Proposed Changes

Change the slot notifier to use duration_to_next_slot rather than an interval timer. This makes it robust against underlying clock changes.

@michaelsproul michaelsproul added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! v3.1.0 labels Aug 28, 2022
Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Nice! This changes the behaviour slightly regarding degenerate cases, if the function takes longer than one slot to execute then we'll skip slots. Previously we'd form a queue and process them all at once.

I think this new behaviour is better since with the current queuing approach we'd end up producing multiple events for the same slot. That seems to have little value, if any.

Happy to merge!

@paulhauner paulhauner added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Aug 29, 2022
@michaelsproul
Copy link
Member Author

I think this new behaviour is better since with the current queuing approach we'd end up producing multiple events for the same slot. That seems to have little value, if any.

Yeah I think this might have been what @ethDreamer observed a few weeks ago!

@paulhauner
Copy link
Member

Penta-batch!

bors r+

@paulhauner
Copy link
Member

There are conflicts in this batch, but I'll let bors figure it out.

bors r+

@bors
Copy link

bors bot commented Aug 29, 2022

Already running a review

bors bot pushed a commit that referenced this pull request Aug 29, 2022
## Issue Addressed

Partly resolves #3518

## Proposed Changes

Change the slot notifier to use `duration_to_next_slot` rather than an interval timer. This makes it robust against underlying clock changes.
@bors
Copy link

bors bot commented Aug 29, 2022

Build failed (retrying...):

@paulhauner
Copy link
Member

bors r+

@bors
Copy link

bors bot commented Aug 29, 2022

Already running a review

bors bot pushed a commit that referenced this pull request Aug 29, 2022
## Issue Addressed

Partly resolves #3518

## Proposed Changes

Change the slot notifier to use `duration_to_next_slot` rather than an interval timer. This makes it robust against underlying clock changes.
@bors bors bot changed the title Harden slot notifier against clock drift [Merged by Bors] - Harden slot notifier against clock drift Aug 29, 2022
@bors bors bot closed this Aug 29, 2022
Woodpile37 pushed a commit to Woodpile37/lighthouse that referenced this pull request Jan 6, 2024
## Issue Addressed

Partly resolves sigp#3518

## Proposed Changes

Change the slot notifier to use `duration_to_next_slot` rather than an interval timer. This makes it robust against underlying clock changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge. v3.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants