cl: keep Gloas payload status when EL validation is cut short #24828
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.75 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.075
Real PR Conversation Timeline
1 comments
"Review active on #24828"
general
weight: 0.35
domiwei
Part of #24620.
First of the focused PRs that replace #24643. This one holds the core fix for the stuck head; the other parts land after it or independently (see the landing order on #24620).
Problem
After a restart or a deep forward sync, Gloas payloads that were persisted without an EL verdict had no payload status, and EL calls cut short by our own context were recorded as
None. Fork choice then saw such payloads as unavailable, kept the EMPTY variant and could not move the head past them.Changes
NotValidatedfor an envelope it persists without an EL call (no engine, orvalidate=falseas in forward sync), under its lock, so fork choice can build on the FULL variant. A verdict already on record is kept. Main has the same rule since #24878. See "Decision" below.None:-
ErrPayloadValidationInterrupted(was the privateerrPayloadValidationAdmission) marks a NewPayload that ended with our own context, while waiting for admission or inside the EL call.- The pending drain, the verification sweep and the stored-parent replay keep the payload pending instead of recording
None.- The direct client answers no verdict, instead of
NotValidated, when its head read fails because the caller's context ended. This applies to every fork, so a pre-Gloas block import in that window is delayed once instead of accepted optimistically.- A timeout of the engine client's own request, with our context still alive, is not covered: the engine client returns
Nonewith the error, which fork choice records beforeerrELBehindpersists and queues the envelope, and the drain and sweep retry under their 2 s budget without a verdict while the EL stays slow. This is pre-existing and affects only a remote EL; a follow-up is proposed (classify Gloas envelopes by the error chain: persist,NotValidated, queue; keep pre-Gloas IGNORE).- An interruption after the consensus checks is treated like a queued envelope:
202, published, and the gossip event emitted. Fork choice parks such an envelope without persisting it, so the handler does not mark it seen and keeps its retry record; the client's re-POST is processed again.- Every branch publishes on a context detached from the request, bounded by one slot from the start of the publish, so a client that gave up during validation does not stop it.
- Under
consensusandconsensus_and_equivocation, an interruption during the consensus pre-validation still answers400and is not broadcast (#24853 tracks queuing it).StoreAnchorEnveloperecordsNotValidateduntil the EL answers, with any execution client.Validatedonto a sibling root (payloadValidatedLocked) is base behaviour that main tests encode; making it root-specific for Gloas is proposed as a follow-up together with INVALID by hash.reorgTooDeepDepthbelow its head, then answersNotValidatedwithout validating it. It reports that bound (SkipsValidationBelow, 0 when it validates every block) and whether it is known: it is not while the EL head cannot be read.- The drain, the replay, the sweep and the anchor retry still send such payloads to the EL, so they reach it, and only skip the requeue after a
NotValidatedanswer below the bound. The bound is read once per pass.- Only the EL's own
NotValidatedanswer, recorded as such, counts: an error answer keeps a recordedNotValidated, and an interrupted call is not an answer, so both are retried. The sweep and the anchor retry remember such roots after the call. While such a root is still below the current depth, which follows the EL head, the sweep skips it and walks on to its ancestors, which an interrupted batch may have left unsent, and the anchor retry skips the anchor before loading its state. The sweep also skips a remembered root among its selected and immediate heads, so it is not read and sent again on every pass. An unreadable EL head keeps the remembered roots in both, and a known zero depth checks them again. Remembered sweep roots are pruned at finalization.- Other EL clients report no bound and keep the old retry behaviour.
Decision: forward-synced payloads without an EL call
NotValidatedfrom forward sync makes the payload FULL-eligible without a data-availability check, and Gloas roots are not reported as optimistic. Main already takes this shortcut for pre-Gloas forward-synced blocks, and with the default direct client those payloads were executed by the EL during forward sync. This PR keeps it as the Gloas form of that shortcut. Gloas-aware optimistic tracking and a DA check for forward-synced envelopes (with #24704) are proposed as follow-ups.Tests
Each behaviour change has a test that failed before the change, or a mutation check.
on_execution_payload_test.go:- an EL call cut by the context inside NewPayload leaves the envelope pending, with no status recorded. It fails without the admission wrap;
- an envelope persisted without an EL call is
NotValidated, with no engine and withvalidate=false.execution_client_engine_test.go:- a client timeout is no verdict, for Gloas and Electra;
-
ValidationInterrupted.payload_build_test.go:- the direct client's ended-context window, through a real execution module;
-
SkipsValidationBelow.gloas_drain_test.go,gloas_payload_test.go,chain_tip_sync_recovery_test.go:- interrupted drain, sweep and replay, through the real store admission;
- below the validation depth the EL is still asked and the payload is not requeued (drain, replay); the sweep and the anchor retry ask once and stop while the root stays below the depth, also with an unreadable EL head, and again at a known zero depth; a remembered selected head is not sent again; the sweep walks past a remembered root; an interrupted forward-sync anchor validation records nothing; the sweep's pruning;
- the anchor status and gas limit with and without an engine.
epbs_test.go:- an interrupted and a validated envelope POST on three routes, with the request context cancelled during validation;
- a re-POST after an interrupted validation is processed, on three routes;
- the publish deadline starts at the publish, not before the validation.
Mutation checks (each makes a test fail): requeue regardless of the depth, no sweep or anchor memo, dropping the memo on an unreadable head, skipping the EL call below the depth, no anchor gas limit, marking an interrupted POST seen, a publish window that includes the validation, no
NotValidatedwithout validation in fork choice.go test -racepasses forcl/beacon/handler,cl/phase1/{forkchoice,stages,execution_client,network}/...;make lintclean twice.TDD note: the sentinel rename in
on_block.go,on_block_lock_scope_test.goandon_execution_payload_test.gois mechanical, so it has no new tests.