mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 13:17:09 +00:00
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)
This commit is contained in:
@@ -192,13 +192,11 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
.map_err(BeaconChainError::TokioJoin)?
|
.map_err(BeaconChainError::TokioJoin)?
|
||||||
.ok_or(BeaconChainError::RuntimeShutdown)??;
|
.ok_or(BeaconChainError::RuntimeShutdown)??;
|
||||||
|
|
||||||
// TODO(gloas): optimistic sync is not supported for Gloas, maybe we could re-add it
|
// NOTE: We allow optimistic (SYNCING) payload verification status here.
|
||||||
if payload_verification_outcome
|
// This can happen when the EL is still catching up (e.g., after range sync imports
|
||||||
.payload_verification_status
|
// blocks that the EL hasn't validated yet). The envelope import will proceed and
|
||||||
.is_optimistic()
|
// fork choice will mark the payload as received. If the payload is later found to
|
||||||
{
|
// be invalid, the normal invalidation mechanism will handle it.
|
||||||
return Err(BlockError::OptimisticSyncNotSupported { block_root });
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(AvailabilityPendingExecutedEnvelope::new(
|
Ok(AvailabilityPendingExecutedEnvelope::new(
|
||||||
signed_envelope,
|
signed_envelope,
|
||||||
|
|||||||
Reference in New Issue
Block a user