Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions beacon_node/lighthouse_network/src/rpc/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ impl SupportedProtocol {
supported.extend_from_slice(&[
ProtocolId::new(SupportedProtocol::BlobsByRootV1, Encoding::SSZSnappy),
ProtocolId::new(SupportedProtocol::BlobsByRangeV1, Encoding::SSZSnappy),
// TODO(das): add to PeerDAS fork
ProtocolId::new(SupportedProtocol::DataColumnsByRootV1, Encoding::SSZSnappy),
]);
}
supported
Expand Down
32 changes: 28 additions & 4 deletions beacon_node/network/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,11 +638,35 @@ impl<T: BeaconChainTypes> Router<T> {
/// Handle a `DataColumnsByRoot` response from the peer.
pub fn on_data_columns_by_root_response(
&mut self,
_peer_id: PeerId,
_request_id: RequestId,
_data_column_sidecar: Option<Arc<DataColumnSidecar<T::EthSpec>>>,
peer_id: PeerId,
request_id: RequestId,
data_column: Option<Arc<DataColumnSidecar<T::EthSpec>>>,
) {
// TODO(das) implement `DataColumnsByRoot` response handling
let request_id = match request_id {
RequestId::Sync(sync_id) => match sync_id {
id @ SyncId::DataColumnsByRoot { .. } => id,
other => {
crit!(self.log, "DataColumnsByRoot response on incorrect request"; "request" => ?other);
return;
}
},
RequestId::Router => {
crit!(self.log, "All DataColumnsByRoot requests belong to sync"; "peer_id" => %peer_id);
return;
}
};

trace!(
self.log,
"Received DataColumnsByRoot Response";
"peer" => %peer_id,
);
self.send_to_sync(SyncMessage::RpcDataColumn {
request_id,
peer_id,
data_column,
seen_timestamp: timestamp_now(),
});
}

fn handle_beacon_processor_send_result(
Expand Down