-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
refactor: remove assumption of 3 intervals per slot #7067
base: unstable
Are you sure you want to change the base?
Conversation
1847a6e
to
82fc1b0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7067 +/- ##
============================================
+ Coverage 50.84% 50.87% +0.02%
============================================
Files 597 598 +1
Lines 39835 39900 +65
Branches 2064 2068 +4
============================================
+ Hits 20255 20298 +43
- Misses 19580 19602 +22 |
Performance Report✔️ no performance regression detected Full benchmark results
|
*/ | ||
/* eslint-disable @typescript-eslint/no-duplicate-enum-values */ | ||
export enum SlotInterval { | ||
BLOCK_PROPAGATION = 0, |
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.
Wondering if the name here is accurate because the interval includes block production (local and builder) while propagation (via gossipsub) of the block a lot of the time happens at 2 seconds or later into the slot.
There are a lot of places in Lodestar codebase that assume 3 intervals per slot and thus hard code
3
when calculating seconds into the slot.In preparation of ePBS, or future protocol upgrades that might potentially introduce more intervals per slot, we should refactor our codebase to remove such assumption.
1 / 3
,2 / 3
hardcodedSlotInterval
to explicitly lay out what validator actions should happen at which interval