-
Notifications
You must be signed in to change notification settings - Fork 150
fix: slot-ticker rename, eventsync log accuracy, ProbeAll error masking #2896
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
base: stage
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,11 +18,11 @@ type Provider func() SlotTicker | |
| // Note, the caller is RESPONSIBLE for calling Next method periodically in order for | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be worth updating this — the doc still says calling Next method periodically, but the method is now |
||
| // SlotTicker to advance forward (to keep ticking) to newer slots. | ||
| type SlotTicker interface { | ||
| // Next returns a channel that will relay 1 tick signaling that "freshest" slot has started. | ||
| // Advance returns a channel that will relay 1 tick signaling that "freshest" slot has started. | ||
| // It advances slot number SlotTicker keeps track of (potentially jumping several slots ahead) | ||
| // and returns a channel that will signal once the time corresponding to that "freshest" slot | ||
| // comes. | ||
| Next() <-chan time.Time | ||
| Advance() <-chan time.Time | ||
| // Slot returns the slot number that corresponds to Next. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here: corresponds to Next should now read |
||
| Slot() phase0.Slot | ||
| } | ||
|
|
@@ -75,9 +75,9 @@ func newWithCustomTimer(logger *zap.Logger, cfg Config, timerProvider TimerProvi | |
| } | ||
| } | ||
|
|
||
| // Next implements SlotTicker.Next. | ||
| // Advance implements SlotTicker.Advance. | ||
| // Note, this method is not thread-safe. | ||
| func (s *slotTicker) Next() <-chan time.Time { | ||
| func (s *slotTicker) Advance() <-chan time.Time { | ||
| timeSinceGenesis := time.Since(s.genesisTime) | ||
| if timeSinceGenesis < 0 { | ||
| // we are waiting for slotTicker to tick at s.genesisTime (signaling 0th slot start) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Worth considering a regression test for the masking path this guard fixes?
All current cases in prober_test.go use
retryDelay: 0, so the retry-waitselectis never where a siblingcancel()lands — the exact scenario this addresses isn't exercised.A two-component test (one failing fast, one with a non-zero
retryDelay) would lock the fix in.