mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-06 20:13:59 -05:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user