lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

Remove interval slot timers from the slasher in favour of dynamic waits

Open michaelsproul opened this issue 3 years ago • 2 comments

Description

Currently Lighthouse has two ways of running regular tasks at an offset within a slot:

  1. Using interval timers which fire every 12 seconds beginning at the correct offset
  2. Using a duration to the desired offset in the slot, which is constantly remeasured using the slot clock

As time has gone on we've realised that (2) is superior in the presence of clock drift, and have ported instances of (1) to (2).

This issue tracks the removal of the remaining interval timers. There are some spots where an interval timer is fine, where the offset of the task from the slot is irrelevant.

Steps to resolve

Remove the slot-based interval timers from:

Other interval timers in eth1, monitoring_api, and lighthouse_network can remain, as they're not slot-related.

michaelsproul avatar Aug 28 '22 22:08 michaelsproul

I've fixed the notifier in this PR: https://github.com/sigp/lighthouse/pull/3519

I'm less sure of how to fix the slasher because it doesn't run every slot but instead runs on an arbitrary update_period. I'll think about it and come back to the slasher.

michaelsproul avatar Aug 28 '22 23:08 michaelsproul

Re-opening for the slasher

michaelsproul avatar Sep 01 '22 01:09 michaelsproul