Implement beacon_blocks_by_head (#9237)

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
Lion - dapplion
2026-05-06 20:41:01 -06:00
committed by GitHub
parent 31e5f308c3
commit 7148bfcdd1
14 changed files with 637 additions and 8 deletions

View File

@@ -243,6 +243,13 @@ impl<T: BeaconChainTypes> Router<T> {
request,
),
),
RequestType::BlocksByHead(request) => self.handle_beacon_processor_send_result(
self.network_beacon_processor.send_blocks_by_head_request(
peer_id,
inbound_request_id,
request,
),
),
RequestType::PayloadEnvelopesByRoot(request) => self
.handle_beacon_processor_send_result(
self.network_beacon_processor
@@ -346,6 +353,11 @@ impl<T: BeaconChainTypes> Router<T> {
Response::PayloadEnvelopesByRoot(_) | Response::PayloadEnvelopesByRange(_) => {
debug!("Requesting envelopes by root and by range not supported yet");
}
// Lighthouse currently only serves BlocksByHead and does not issue it as a client,
// so receiving a response is unexpected. Drop it without crashing.
Response::BlocksByHead(_) => {
debug!("BlocksByHead response received but not requested by lighthouse");
}
// Light client responses should not be received
Response::LightClientBootstrap(_)
| Response::LightClientOptimisticUpdate(_)