This commit is contained in:
Eitan Seri-Levi
2026-06-17 14:24:36 +03:00
parent c00dff7b7d
commit 7f827fbc81
3 changed files with 9 additions and 13 deletions

View File

@@ -173,6 +173,14 @@ 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
if payload_verification_outcome
.payload_verification_status
.is_optimistic()
{
return Err(EnvelopeError::OptimisticSyncNotSupported { block_root });
}
Ok(AvailabilityPendingExecutedEnvelope::new( Ok(AvailabilityPendingExecutedEnvelope::new(
signed_envelope, signed_envelope,
block_root, block_root,
@@ -222,14 +230,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
block_root: Hash256, block_root: Hash256,
payload_verification_status: PayloadVerificationStatus, payload_verification_status: PayloadVerificationStatus,
) -> Result<Hash256, EnvelopeError> { ) -> Result<Hash256, EnvelopeError> {
// TODO(gloas): optimistic sync is not supported for Gloas. Proto-array only tracks
// `payload_received` as a bool, so an optimistically-imported payload would be treated as
// valid with no way to invalidate it if the EL later rejects it. Reject here (covering both
// the gossip and range-sync paths) until fork choice can track optimistic payload status.
if payload_verification_status.is_optimistic() {
return Err(EnvelopeError::OptimisticSyncNotSupported { block_root });
}
// Everything in this initial section is on the hot path for processing the envelope. // Everything in this initial section is on the hot path for processing the envelope.
// Take an upgradable read lock on fork choice so we can check if this block has already // Take an upgradable read lock on fork choice so we can check if this block has already
// been imported. We don't want to repeat work importing a block that is already imported. // been imported. We don't want to repeat work importing a block that is already imported.

View File

@@ -168,11 +168,6 @@ pub enum EnvelopeError {
/// Error verifying the execution payload /// Error verifying the execution payload
ExecutionPayloadError(ExecutionPayloadError), ExecutionPayloadError(ExecutionPayloadError),
/// Optimistic sync is not supported for Gloas payload envelopes. /// Optimistic sync is not supported for Gloas payload envelopes.
///
/// Proto-array only tracks `payload_received` as a bool, so it cannot represent an
/// optimistically-imported payload that the EL may later invalidate. Until fork choice can
/// track optimistic payload status, we reject optimistic envelopes rather than treat them as
/// valid.
OptimisticSyncNotSupported { block_root: Hash256 }, OptimisticSyncNotSupported { block_root: Hash256 },
/// The envelope's beacon block was not present in fork choice at import time. /// The envelope's beacon block was not present in fork choice at import time.
/// ///

View File

@@ -3715,6 +3715,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
| EnvelopeError::BeaconStateError(_) | EnvelopeError::BeaconStateError(_)
// The following variants are produced during envelope import, not gossip // The following variants are produced during envelope import, not gossip
// verification, so they cannot be reached here. Ignore them to be safe. // verification, so they cannot be reached here. Ignore them to be safe.
| EnvelopeError::OptimisticSyncNotSupported { .. }
| EnvelopeError::BlockRootNotInForkChoice(_) | EnvelopeError::BlockRootNotInForkChoice(_)
| EnvelopeError::InternalError(_) => { | EnvelopeError::InternalError(_) => {
self.propagate_validation_result( self.propagate_validation_result(