Skip to content

fix(op-acceptance-tests): wait for EL labels in SafeHeadProgression#20852

Merged
ajsutton merged 1 commit into
developfrom
aj/fix/flake-safe-head-progression
May 19, 2026
Merged

fix(op-acceptance-tests): wait for EL labels in SafeHeadProgression#20852
ajsutton merged 1 commit into
developfrom
aj/fix/flake-safe-head-progression

Conversation

@ajsutton
Copy link
Copy Markdown
Contributor

Fixes the flake in TestSupernodeInterop_SafeHeadProgression (#20851).

The test polled the CL until CrossSafe / Finalized reached the target, then synchronously read the corresponding EL label. The EL label is updated by an engine-API ForkchoiceUpdated dispatched asynchronously after the CL advances, so a synchronous read can lag the CL by an FCU-propagation window — long enough under CI scheduling pressure to fail the >= finalTargetBlockNum assertion. Failing run had the CL at target=10 and the EL still at 9 ~9ms later.

Include the EL ReachedFn polls in the same dsl.CheckAll as the CL polls so each block waits for both CL and EL to reach the target before the synchronous BlockRefByLabel + GreaterOrEqual assertions run.

TestSupernodeInterop_SafeHeadProgression polled the CL until CrossSafe (and
later Finalized) reached the target block, then immediately read the EL
safe/finalized labels synchronously. The EL labels are updated asynchronously
by an engine-API ForkchoiceUpdated dispatched after the CL marks the block,
so a synchronous read can lag the CL by an FCU propagation window — long
enough under CI scheduling pressure to fail the assertion (observed: CL at
target=10, EL still at 9, ~9ms gap).

Include the EL ReachedFn polls in the same dsl.CheckAll as the CL polls so
each block confirms both CL and EL have reached the target before the
subsequent synchronous BlockRefByLabel + GreaterOrEqual assertions run.

Refs #20851
@ajsutton ajsutton force-pushed the aj/fix/flake-safe-head-progression branch from 53b31cb to 6c2703d Compare May 19, 2026 00:27
@ajsutton ajsutton marked this pull request as ready for review May 19, 2026 00:27
@ajsutton ajsutton requested a review from a team as a code owner May 19, 2026 00:27
Copy link
Copy Markdown
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

I wonder if we the ReachedFn could do this for the programmer. Where checking the CL auto-checks its corresponding EL as well by default.
The only reason why you'd possibly want to check the CL but not the CL is if you're testing some a weird FCU case.

@ajsutton
Copy link
Copy Markdown
Contributor Author

That's a pretty good point actually. Probably bigger than I want to try and take on here as it crosses some boundaries in the DSL but it would make a lot of sense to just have the CL/EL pair represented more as a whole.

@ajsutton ajsutton added this pull request to the merge queue May 19, 2026
Merged via the queue into develop with commit 568db25 May 19, 2026
66 checks passed
@ajsutton ajsutton deleted the aj/fix/flake-safe-head-progression branch May 19, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants