Process envelopes correctly

This commit is contained in:
Pawan Dhananjay
2026-03-26 14:45:49 -07:00
parent 4ca10e95be
commit 2a2647411b
11 changed files with 219 additions and 40 deletions

View File

@@ -1390,7 +1390,10 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
return None;
}
// BlobNotRequired is unreachable. Only constructed in `process_gossip_blob`
Err(e @ BlockError::InternalError(_)) | Err(e @ BlockError::BlobNotRequired(_)) => {
// EnvelopeError is unreachable. Only constructed during range sync envelope processing.
Err(e @ BlockError::InternalError(_))
| Err(e @ BlockError::BlobNotRequired(_))
| Err(e @ BlockError::EnvelopeError(_)) => {
error!(error = %e, "Internal block gossip validation error");
return None;
}

View File

@@ -619,15 +619,6 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
return;
};
// TODO(gloas): Implement Gloas chain segment processing.
// Gloas blocks carry separate envelopes and need a different import path.
if downloaded_blocks
.iter()
.any(|b| matches!(b, RangeSyncBlock::Gloas { .. }))
{
todo!("Gloas chain segment processing");
}
let start_slot = downloaded_blocks.first().map(|b| b.slot().as_u64());
let end_slot = downloaded_blocks.last().map(|b| b.slot().as_u64());
let sent_blocks = downloaded_blocks.len();