Remove reprocess channel (#7437)

Partially https://github.com/sigp/lighthouse/issues/6291


  This PR removes the reprocess event channel from being externally exposed. All work events are now sent through the single `BeaconProcessorSend` channel. I've introduced a new `Work::Reprocess` enum variant which we then use to schedule jobs for reprocess. I've also created a new scheduler module which will eventually house the different scheduler impls.

This is all needed as an initial step to generalize the beacon processor

A "full" implementation for the generalized beacon processor can be found here
https://github.com/sigp/lighthouse/pull/6448

I'm going to try to break up the full implementation into smaller PR's so it can actually be reviewed
This commit is contained in:
Eitan Seri-Levi
2025-06-20 05:52:16 +03:00
committed by GitHub
parent dd98534158
commit f67084a571
17 changed files with 186 additions and 152 deletions

View File

@@ -4,7 +4,7 @@ use beacon_chain::{
test_utils::{AttestationStrategy, BlockStrategy, LightClientStrategy, SyncCommitteeStrategy},
ChainConfig,
};
use beacon_processor::work_reprocessing_queue::ReprocessQueueMessage;
use beacon_processor::{work_reprocessing_queue::ReprocessQueueMessage, Work, WorkEvent};
use eth2::types::ProduceBlockV3Response;
use eth2::types::{DepositContractData, StateId};
use execution_layer::{ForkchoiceState, PayloadAttributes};
@@ -923,14 +923,16 @@ async fn queue_attestations_from_http() {
.unwrap();
tester
.ctx
.beacon_processor_reprocess_send
.beacon_processor_send
.as_ref()
.unwrap()
.send(ReprocessQueueMessage::BlockImported {
block_root,
parent_root,
.try_send(WorkEvent {
drop_during_sync: false,
work: Work::Reprocess(ReprocessQueueMessage::BlockImported {
block_root,
parent_root,
}),
})
.await
.unwrap();
attestation_future.await.unwrap();