Skip to content

Conversation

chong-he
Copy link
Member

Issue Addressed

Proposed Changes

Display 0 if optimistic sync and 1 for normal sync

Additional Info

Tested and it is working, the optimistic sync is triggered by running lcli mock-el without the flag --all-payloads-valid true, so the beacon node sync is optimistic under this situation.

Screenshot from 2025-09-16 18-37-51

@chong-he chong-he added ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! UX-and-logs labels Sep 16, 2025
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-hanging-fruit Easy to resolve, get it before someone else does! UX-and-logs waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants