Repository navigation
Description
What happens
A finalized Gloas block can report execution_optimistic: false while the payload it builds on was never validated. It needs the execution client to be syncing across the Fulu to Gloas boundary.
Found by the AI review of #989 and judged pre-existing: #983 and #989 do not cause it and do not fix it (#983 lists it under "Not changed").
Cause
From Gloas a block's flag is the verdict of the latest FULL payload it builds on. When that payload belongs to a pre-Gloas block, the flag is read from the optimistic set entry of that block (Store::is_beacon_block_optimistic, crates/storage/src/execution_optimistic.rs; VerdictSource::OptimisticSet once #983 is in).
Store::prune_beacon_optimistic_roots(finalized_slot, keep) drops every optimistic root below the finalized slot except the finalized root itself. A missing entry in that set reads as validated.
The first Gloas block builds on the last Fulu block's payload. So when finality reaches the fork epoch, the finalized block is normally that first Gloas block, the Fulu block it reads is below the bound and is not the finalized root, and its marker is dropped. If it was still optimistic at that moment, the answer flips to false with nothing having validated it.
When it shows
All of these together:
- the last pre-Gloas block was imported optimistically (the execution client answered
SYNCING) and is still not validated when finality reaches the fork epoch, two or more epochs after the fork; - the finalized block's latest FULL payload is that pre-Gloas one. That is always so for the first Gloas block, and for later ones only while every Gloas payload below them was withheld.
Then, until finality moves to a block that builds on a Gloas payload:
- the finalized block reads
false; - with fix(storage): keep the payload verdict the finalized block's execution_optimistic flag is read from #983, every block it descends from reads
falseas well, since they answer with its flag; - an unfinalized Gloas block that still builds on that pre-Gloas payload reads
falsetoo.
Answers for a head that builds on a Gloas payload, and /eth/v1/node/syncing, are not affected: they read a payload verdict, where a missing entry is NOT_VALIDATED.
Fix
The same three pieces #983 added for a Gloas payload, for a pre-Gloas one:
prune_beacon_optimistic_rootsalso keeps the pre-Gloas root the finalized block's flag is read from (whatfinalized_verdict_sourcereturns asOptimisticSet).- A
VALIDanswer for a head that builds on that payload removes it from the set.mark_payloads_validatedwalks the execution chain down to the finalized block and stops, one block short of it. - Check what a restart does with it: the set is in memory, and a resume rebuilds it for the unfinalized window only.
Related
execution_optimisticistruefor finalized blocks on a network past Gloas #981, fix(storage): keep the payload verdict the finalized block's execution_optimistic flag is read from #983 (the Gloas half), fix(storage): keep the payload verdict the finalized block's execution_optimistic flag is read from #989 (backport, where the review reported this).
Activity