Add optimistic_sync metric#8059
Merged
Merged
Conversation
| pub static IS_OPTIMISTIC_SYNC: LazyLock<Result<IntGauge>> = LazyLock::new(|| { | ||
| try_create_int_gauge( | ||
| "optimistic_sync", | ||
| "Metric to check if the beacon chain is in optimistic sync mode. 0 if optimistic sync and 1 if synced", |
Member
There was a problem hiding this comment.
I think this is counterintuitive. In my original comment I was thinking we would name the metric something like execution_verified 0|1, with 0 representing the optimistic case and 1 representing full sync. Or if we keep the optimistic_sync name I think we should swap it so that 1 = optimistic, 0 = not optimistic. That might actually be the clearest. We would just need to display the 0 as "good" in our grafana chart
Member
Author
There was a problem hiding this comment.
Revised in revise
If you think the metric should be placed in another place (e.g., execution layer metrics) and rename to execution_verified, then I can revise to that
michaelsproul
approved these changes
Nov 12, 2025
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
Proposed Changes
Display
0if optimistic sync and1for normal syncAdditional Info
Tested and it is working, the optimistic sync is triggered by running
lcli mock-elwithout the flag--all-payloads-valid true, so the beacon node sync is optimistic under this situation.