Fix flaky e2e test evaluators

- Sync participation: Skip all fork transition slots (Altair through Fulu),
  not just Altair/Bellatrix, to handle participation drops during transitions
- Metrics check: Allow 1-slot tolerance for race condition between
  calculating current slot and fetching chain head
- Validator participation: Lower threshold from 99% to 98% to account
  for minor attestation losses during initialization
This commit is contained in:
james-prysm
2026-01-04 22:13:27 -06:00
parent 3df4a868cf
commit d6a3c3f7bd

View File

@@ -119,8 +119,8 @@ func metricsTest(_ *types.EvaluationContext, conns ...*grpc.ClientConn) error {
timeSlot := slots.CurrentSlot(genesisResp.GenesisTime.AsTime())
// Allow 1 slot tolerance due to race between calculating current slot
// and fetching chain head - a slot boundary may occur between these calls.
slotDiff := int64(timeSlot) - int64(chainHead.HeadSlot)
if slotDiff < 0 || slotDiff > 1 {
// Check: chainHead.HeadSlot <= timeSlot <= chainHead.HeadSlot + 1
if uint64(chainHead.HeadSlot) > uint64(timeSlot) || uint64(timeSlot) > uint64(chainHead.HeadSlot)+1 {
return fmt.Errorf("expected metrics slot to equal chain head slot, expected %d, received %d", timeSlot, chainHead.HeadSlot)
}