fix: use execution_payload_block_hash for Pending payload status in fcU

When gloas envelopes are imported optimistically (EL returns SYNCING),
the payload status is Pending. Previously, Pending used
execution_payload_parent_hash for the head_hash in forkchoiceUpdated,
which tells geth to stay at the parent — never advancing.

Fix: use execution_payload_block_hash (the bid's committed hash) for
Pending status, same as Full. This tells geth to sync to the new head,
which is the purpose of optimistic sync. Geth will validate it and
transition from SYNCING to VALID on subsequent newPayload calls.

Also re-enables backfill sync for gloas with a dedicated
import_historical_gloas_block_batch that properly handles RangeSyncBlock::Gloas
variants (storing envelopes alongside blocks).
This commit is contained in:
Eitan Seri-Levi
2026-05-08 08:53:25 +00:00
committed by Devnet Bot
parent daa3759523
commit b53a969c30
4 changed files with 311 additions and 76 deletions

View File

@@ -584,10 +584,10 @@ where
b.execution_status
.block_hash()
.or(match head_payload_status {
PayloadStatus::Full => b.execution_payload_block_hash,
PayloadStatus::Pending | PayloadStatus::Empty => {
b.execution_payload_parent_hash
PayloadStatus::Full | PayloadStatus::Pending => {
b.execution_payload_block_hash
}
PayloadStatus::Empty => b.execution_payload_parent_hash,
})
});
let justified_root = self.justified_checkpoint().root;