update code paths in the network crate (#4065)

* wip

* fix router

* arc the byroot responses we send

* add placeholder for blob verification

* respond to blobs by range and blobs by root request in the most horrible and gross way ever

* everything in sync is now unimplemented

* fix compiation issues

* http_pi change is very small, just add it

* remove ctrl-c ctrl-v's docs
This commit is contained in:
Divma
2023-03-10 06:22:31 -05:00
committed by GitHub
parent 3898cf7be8
commit 140bdd370d
11 changed files with 138 additions and 122 deletions

View File

@@ -204,13 +204,13 @@ impl<T: BeaconChainTypes> Router<T> {
self.processor
.on_blocks_by_root_response(peer_id, request_id, beacon_block);
}
Response::BlobsByRange(beacon_blob) => {
Response::BlobsByRange(blob) => {
self.processor
.on_blobs_by_range_response(peer_id, request_id, beacon_blob);
.on_blobs_by_range_response(peer_id, request_id, blob);
}
Response::BlobsByRoot(beacon_blob) => {
Response::BlobsByRoot(blob) => {
self.processor
.on_blobs_by_root_response(peer_id, request_id, beacon_blob);
.on_blobs_by_root_response(peer_id, request_id, blob);
}
Response::LightClientBootstrap(_) => unreachable!(),
}
@@ -250,12 +250,14 @@ impl<T: BeaconChainTypes> Router<T> {
block,
);
}
PubsubMessage::BeaconBlockAndBlobsSidecars(block_and_blobs) => {
self.processor.on_block_and_blobs_sidecar_gossip(
PubsubMessage::BlobSidecar(data) => {
let (blob_index, signed_blob) = *data;
self.processor.on_blob_sidecar_gossip(
id,
peer_id,
self.network_globals.client(&peer_id),
block_and_blobs,
blob_index,
Arc::new(signed_blob),
);
}
PubsubMessage::VoluntaryExit(exit) => {