From f818612795587b5bdb22a64dd1238a42353fa781 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 7 May 2026 13:47:55 +0000 Subject: [PATCH 1/2] fix: remove premature on_valid_payload_envelope_received + disable backfill for GLOaS 1. Remove on_valid_payload_envelope_received call before process_block in chain segment import. The block isn't in fork choice yet, so it always fails with NodeUnknown. import_envelope_from_range_sync handles this correctly after process_block. 2. Disable backfill sync when GLOaS is scheduled. Backfill calls into_available_block which panics on GLOaS RangeSyncBlock variant. Backfill for GLOaS is not yet implemented. --- beacon_node/beacon_chain/src/beacon_chain.rs | 16 ++++------------ .../network/src/sync/backfill_sync/mod.rs | 5 +++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index e76c258e0c..717f9e41f2 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -3257,18 +3257,10 @@ impl BeaconChain { error: BlockError::BeaconChainError(Box::new(e.into())), }; } - if let Err(e) = self - .canonical_head - .fork_choice_write_lock() - .on_valid_payload_envelope_received(block_root) - { - return ChainSegmentResult::Failed { - imported_blocks, - error: BlockError::BeaconChainError(Box::new( - BeaconChainError::ForkChoiceError(e), - )), - }; - } + // Note: we do NOT call on_valid_payload_envelope_received here + // because the block hasn't been added to fork choice yet (that + // happens in process_block below). The fork choice update is + // handled by import_envelope_from_range_sync after process_block. } match self diff --git a/beacon_node/network/src/sync/backfill_sync/mod.rs b/beacon_node/network/src/sync/backfill_sync/mod.rs index 0f80138d24..c690d5e584 100644 --- a/beacon_node/network/src/sync/backfill_sync/mod.rs +++ b/beacon_node/network/src/sync/backfill_sync/mod.rs @@ -215,6 +215,11 @@ impl BackFillSync { &mut self, network: &mut SyncNetworkContext, ) -> Result { + // Skip backfill sync for GLOaS — not yet implemented for this fork. + if self.beacon_chain.spec.gloas_fork_epoch.is_some_and(|e| e != Epoch::max_value()) { + return Ok(SyncStart::NotSyncing); + } + match self.state() { BackFillState::Syncing => {} // already syncing ignore. BackFillState::Paused => { From c52cee9d9517f2265a34a74060aefd8001f020d1 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Thu, 7 May 2026 14:53:36 +0000 Subject: [PATCH 2/2] Allow optimistic payload verification for GLOaS envelopes Remove the OptimisticSyncNotSupported check in into_executed_payload_envelope. When the EL returns SYNCING (optimistic) for a payload envelope's newPayload call, the envelope import should proceed rather than being rejected. This commonly occurs after range sync imports blocks that the EL hasn't yet validated - subsequent envelopes arriving via gossip would be rejected because the EL is still catching up. The downstream import path already handles optimistic status correctly: - fork choice marks the payload as received regardless of EL status - the payload_verification_status is propagated to SSE events/metrics - if the payload is later found invalid, the normal invalidation mechanism handles it (same as for blocks) --- .../src/payload_envelope_verification/import.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs index a8e8a59ede..88b021e8a6 100644 --- a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs +++ b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs @@ -192,13 +192,11 @@ impl BeaconChain { .map_err(BeaconChainError::TokioJoin)? .ok_or(BeaconChainError::RuntimeShutdown)??; - // TODO(gloas): optimistic sync is not supported for Gloas, maybe we could re-add it - if payload_verification_outcome - .payload_verification_status - .is_optimistic() - { - return Err(BlockError::OptimisticSyncNotSupported { block_root }); - } + // NOTE: We allow optimistic (SYNCING) payload verification status here. + // This can happen when the EL is still catching up (e.g., after range sync imports + // blocks that the EL hasn't validated yet). The envelope import will proceed and + // fork choice will mark the payload as received. If the payload is later found to + // be invalid, the normal invalidation mechanism will handle it. Ok(AvailabilityPendingExecutedEnvelope::new( signed_envelope,