mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-16 18:28:42 +00:00
Merge branch 'unstable' into gloas-lookup-sync-fixes
Rebase the gloas lookup-sync work onto #9391's RequestState trait-removal design: payload-envelope request reuses the generic SingleLookupRequestState, concrete BlockRequest/DataRequest/PayloadRequest, parent-imported gate against awaiting_parent: Option<Hash256>. (Some gloas custody-failure tests still fail — known peer-attribution issue, pushed for visibility.)
This commit is contained in:
@@ -41,8 +41,8 @@
|
||||
pub use crate::scheduler::BeaconProcessorQueueLengths;
|
||||
use crate::scheduler::work_queue::WorkQueues;
|
||||
use crate::work_reprocessing_queue::{
|
||||
QueuedBackfillBatch, QueuedColumnReconstruction, QueuedGossipBlock, QueuedGossipEnvelope,
|
||||
ReprocessQueueMessage,
|
||||
QueuedBackfillBatch, QueuedColumnReconstruction, QueuedGossipBlock, QueuedGossipDataColumn,
|
||||
QueuedGossipEnvelope, ReprocessQueueMessage,
|
||||
};
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use futures::task::Poll;
|
||||
@@ -304,6 +304,10 @@ impl<E: EthSpec> From<ReadyWork> for WorkEvent<E> {
|
||||
work: Work::ColumnReconstruction(process_fn),
|
||||
}
|
||||
}
|
||||
ReadyWork::DataColumn(QueuedGossipDataColumn { process_fn, .. }) => Self {
|
||||
drop_during_sync: true,
|
||||
work: Work::UnknownBlockDataColumn { process_fn },
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -369,6 +373,9 @@ pub enum Work<E: EthSpec> {
|
||||
UnknownBlockAttestation {
|
||||
process_fn: BlockingFn,
|
||||
},
|
||||
UnknownBlockDataColumn {
|
||||
process_fn: BlockingFn,
|
||||
},
|
||||
GossipAttestationBatch {
|
||||
attestations: GossipAttestationBatch,
|
||||
process_batch: Box<dyn FnOnce(GossipAttestationBatch) + Send + Sync>,
|
||||
@@ -466,6 +473,7 @@ pub enum WorkType {
|
||||
GossipAttestation,
|
||||
GossipAttestationToConvert,
|
||||
UnknownBlockAttestation,
|
||||
UnknownBlockDataColumn,
|
||||
GossipAttestationBatch,
|
||||
GossipAggregate,
|
||||
UnknownBlockAggregate,
|
||||
@@ -571,6 +579,7 @@ impl<E: EthSpec> Work<E> {
|
||||
Work::LightClientFinalityUpdateRequest(_) => WorkType::LightClientFinalityUpdateRequest,
|
||||
Work::LightClientUpdatesByRangeRequest(_) => WorkType::LightClientUpdatesByRangeRequest,
|
||||
Work::UnknownBlockAttestation { .. } => WorkType::UnknownBlockAttestation,
|
||||
Work::UnknownBlockDataColumn { .. } => WorkType::UnknownBlockDataColumn,
|
||||
Work::UnknownBlockAggregate { .. } => WorkType::UnknownBlockAggregate,
|
||||
Work::UnknownLightClientOptimisticUpdate { .. } => {
|
||||
WorkType::UnknownLightClientOptimisticUpdate
|
||||
@@ -844,6 +853,9 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
Some(item)
|
||||
} else if let Some(item) = work_queues.gossip_data_column_queue.pop() {
|
||||
Some(item)
|
||||
} else if let Some(item) = work_queues.unknown_block_data_column_queue.pop()
|
||||
{
|
||||
Some(item)
|
||||
} else if let Some(item) =
|
||||
work_queues.gossip_partial_data_column_queue.pop()
|
||||
{
|
||||
@@ -1240,6 +1252,9 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
Work::UnknownBlockAttestation { .. } => {
|
||||
work_queues.unknown_block_attestation_queue.push(work)
|
||||
}
|
||||
Work::UnknownBlockDataColumn { .. } => work_queues
|
||||
.unknown_block_data_column_queue
|
||||
.push(work, work_id),
|
||||
Work::UnknownBlockAggregate { .. } => {
|
||||
work_queues.unknown_block_aggregate_queue.push(work)
|
||||
}
|
||||
@@ -1290,6 +1305,9 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
WorkType::UnknownBlockAttestation => {
|
||||
work_queues.unknown_block_attestation_queue.len()
|
||||
}
|
||||
WorkType::UnknownBlockDataColumn => {
|
||||
work_queues.unknown_block_data_column_queue.len()
|
||||
}
|
||||
WorkType::GossipAttestationBatch => 0, // No queue
|
||||
WorkType::GossipAggregate => work_queues.aggregate_queue.len(),
|
||||
WorkType::UnknownBlockAggregate => {
|
||||
@@ -1506,6 +1524,7 @@ impl<E: EthSpec> BeaconProcessor<E> {
|
||||
}),
|
||||
Work::UnknownBlockAttestation { process_fn }
|
||||
| Work::UnknownBlockAggregate { process_fn }
|
||||
| Work::UnknownBlockDataColumn { process_fn }
|
||||
| Work::UnknownLightClientOptimisticUpdate { process_fn, .. } => {
|
||||
task_spawner.spawn_blocking(process_fn)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user