add reprocess queue

This commit is contained in:
Eitan Seri- Levi
2026-03-02 13:02:56 -08:00
parent a937802dc3
commit 73caa1d1b1
4 changed files with 166 additions and 5 deletions

View File

@@ -49,8 +49,8 @@ use beacon_processor::work_reprocessing_queue::QueuedColumnReconstruction;
use beacon_processor::{
DuplicateCache, GossipAggregatePackage, GossipAttestationBatch,
work_reprocessing_queue::{
QueuedAggregate, QueuedGossipBlock, QueuedLightClientUpdate, QueuedUnaggregate,
ReprocessQueueMessage,
QueuedAggregate, QueuedGossipBlock, QueuedGossipEnvelope, QueuedLightClientUpdate,
QueuedUnaggregate, ReprocessQueueMessage,
},
};
@@ -3347,7 +3347,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
// TODO(gloas) update metrics to note how early the envelope arrived
let inner_self = self.clone();
let _process_fn = Box::pin(async move {
let process_fn = Box::pin(async move {
inner_self
.process_gossip_verified_execution_payload_envelope(
peer_id,
@@ -3356,7 +3356,27 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
.await;
});
// TODO(gloas) send to reprocess queue
if self
.beacon_processor_send
.try_send(WorkEvent {
drop_during_sync: false,
work: Work::Reprocess(ReprocessQueueMessage::UnknownBlockEnvelope(
QueuedGossipEnvelope {
beacon_block_slot: envelope_slot,
beacon_block_root,
process_fn,
},
)),
})
.is_err()
{
error!(
%envelope_slot,
?beacon_block_root,
location = "envelope gossip",
"Failed to defer envelope import"
);
}
None
}
Ok(_) => Some(verified_envelope),