-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add a log message during an epoch transition #6470
base: v0.37
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v0.37 #6470 +/- ##
==========================================
- Coverage 41.51% 41.50% -0.01%
==========================================
Files 2017 2017
Lines 144007 144013 +6
==========================================
- Hits 59778 59771 -7
- Misses 78028 78039 +11
- Partials 6201 6203 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Looks good, depending on what we want. Some notes:
- This will not log the first height for epochs beginning after a spork
- if people are using these height values primarily to check the reward payout events, then the height we record for post-spork epochs in this way would not contain the reward payouts anyway
- for post-spork epochs, the height for getting rewards would be the height of the
resetEpoch
transaction
- We actually do have a metric tracking the first height of the current epoch:
consensus_compliance_last_epoch_transition_height
. It's a gauge that increases at every epoch transition (it also doesn't seem to handle post-spork epochs properly, though...).
@@ -884,6 +884,12 @@ func (m *FollowerState) epochMetricsAndEventsOnBlockFinalized(parentEpochState, | |||
m.metrics.CurrentDKGPhaseViews(childEpochSetup.DKGPhase1FinalView, childEpochSetup.DKGPhase2FinalView, childEpochSetup.DKGPhase3FinalView) | |||
}, | |||
) | |||
m.logger.Info(). | |||
Uint64("new_epoch_counter", childEpochSetup.Counter). | |||
Uint64("new_epoch_height", finalized.Height). |
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.
Uint64("new_epoch_height", finalized.Height). | |
Uint64("new_epoch_first_height", finalized.Height). |
Example log if we want one line per epoch transition.