status-im / nimbus-eth2

Nim implementation of the Ethereum Beacon Chain
https://nimbus.guide
Other
523 stars 227 forks source link

Metric for next sync committee indicates start of committee #6510

Open jakubgs opened 1 month ago

jakubgs commented 1 month ago

An issue with validator_monitor_validator_in_next_sync_committee was discovered, where the value turns from 0 to 1 when sync committee starts, and not before, which is what you would expect from the help message describing the metric:

# HELP validator_monitor_validator_in_next_sync_committee Is the validator in the next sync committee (1 for true and 0 for false)
# TYPE validator_monitor_validator_in_next_sync_committee gauge
validator_monitor_validator_in_next_sync_committee{validator="total"} 1.0
validator_monitor_validator_in_next_sync_committee_created{validator="total"} 1724751190.0

This can be seen in a graph:

image

Where we can see that the in_next_sync_committee metric changed into 1 about 15 seconds before beacon_sync_committee_messages_received_total did. It seems to me that it should alert about participation in next sync committee earlier within the duration of the current one to be useful in any way.

This was observed on v24.7.0-99f657-stateofus version of beacon node.