Skip to content
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

Metrics request: highest possible slot #4586

Closed
handelaar2 opened this issue Jan 19, 2020 · 13 comments · Fixed by #5545
Closed

Metrics request: highest possible slot #4586

handelaar2 opened this issue Jan 19, 2020 · 13 comments · Fixed by #5545
Labels
Enhancement New feature or request Good First Issue Good for newcomers Help Wanted Extra attention is needed

Comments

@handelaar2
Copy link

handelaar2 commented Jan 19, 2020

The node monitoring site eth2stats.io shows a nice timebased counter of the highest possible slot (slot counter increasing every 12 secs). It would be nice to add this slot-value to the metrics page. This way we can create measurements how far the node's head slot is away from this highest possible value (and how fast the delta is decreasing or increasing).

It seems the value itself is already there, at least in initial-sync. See below screenprint

Screenshot 2020-01-27 at 08 28 23

And maybe the same for Epoch #

@0xKiwi 0xKiwi added the Enhancement New feature or request label Jan 21, 2020
@prestonvanloon prestonvanloon added Good First Issue Good for newcomers Help Wanted Extra attention is needed labels Jan 21, 2020
@garyschulte
Copy link
Contributor

It looks like the sync block counter is implemented by taking the time since genesis and dividing by seconds per slot. Is that a reliable way to calculate this metric or is there likely to be some accumulated drift?

@rauljordan
Copy link
Contributor

Hi @garyschulte we do have this prometheus metric live in our nodes, it is called beacon_slot here

beaconSlot = promauto.NewGauge(prometheus.GaugeOpts{

@handelaar2
Copy link
Author

handelaar2 commented Feb 4, 2020

@rauljordan Then it is lagging (at least for me). I refreshed my metric page and immediately took a screenshot.
beacon_slot here is 11 slots behind the calculated "seconds since genesis" divided by 12" as shown by eth2stats. For me they are not the same.

Screenshot 2020-02-04 at 18 05 30

@garyschulte
Copy link
Contributor

garyschulte commented Feb 4, 2020

@rauljordan Then it is lagging (at least for me). I refreshed my metric page and immediately took a screenshot.
beacon_slot here is 11 slots behind the calculated "seconds since genesis" divided by 12" as shown by eth2stats. For me they are not the same.

I noticed the same behavior. I am charting beacon_slot and beacon_head_slot, and head slot does definitely lag for whatever reason. Perhaps whatever code path that is emitting that metric is not being triggered during those periods

@handelaar2
Copy link
Author

This (already closed) issue has resolved itself via #4754

2020-02-05_19-00-54

It is ok now as can be seen in the screen print.
(I only observed a max of 1 slot behind the "ticker".

Thanks @terencechain

@handelaar2
Copy link
Author

handelaar2 commented Feb 6, 2020

Still different things I would say (my_headslot<>others_headslot<>slot_ticker). I guess (it seems) we need to create our own additional value outside the metrics-page to be able to also track the blue "slot_ticker". Confusing (and disappointing).

2020-02-06_09-43-50

@prestonvanloon prestonvanloon added the Need-Info Need more information from author label Apr 10, 2020
@prestonvanloon
Copy link
Member

@handelaar2 Based on your comments after closing, is this still an issue we should look into?

@rauljordan
Copy link
Contributor

@handelaar2 please let us know if this is still a problem

@handelaar2
Copy link
Author

Can only confirm in a few days after the restart of the testnet (don't have a proper beacon running right now)

@no-response no-response bot removed the Need-Info Need more information from author label Apr 15, 2020
@handelaar2
Copy link
Author

I still see this as an issue.
We are missing a kind of "CurrentSlot" in the metrics as defined in process_block_helpers.go That one is "timebased" (using now() ) .

beacon_head_slot and beacon_slot are not (not sure where they get their values from).

func reportSlotMetrics(currentSlot uint64, headSlot uint64, finalizedCheckpoint *ethpb.Checkpoint) {

_

CurrentSlot (looks pure timebased to me):

func (s *Service) CurrentSlot() uint64 {

_

To clarify again what I mean, below screenprint shows this timebased slot number:
the blue value on eth2stats at the top. As also can be seen in the screenprint, both metric "slot values" are lagging (not showing this timebased (theoretical best) slot). So I would like to see a metrics value which says for this example: 3990
2020-04-18_15-18-34

@mcdee
Copy link
Contributor

mcdee commented Apr 18, 2020

There are two different metrics: the current slot of the chain, which is calculated purely from genesis timestamp and current time, and the current slot of the node, which is equivalent to the node's head slot as above.

There are discussions going on at ethereum/beacon-APIs#25 regarding making this and other information available via a standard API.

@handelaar2
Copy link
Author

That is my point Jim, we currently don't have in the metrics that "current slot of the chain" ((now-genesis)/12) as you call it. It is not there. So that is the value I would like to make available to prometheus/grafana (not via the api).

@handelaar2
Copy link
Author

Thanks!
2020-04-21_08-26-00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Good First Issue Good for newcomers Help Wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants