mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Implement data columns by network boilerplate (#6224)
* Implement data columns by network boilerplate * Use correct quota values * Address PR review * Update currently_supported * Merge remote-tracking branch 'sigp/unstable' into peerdas-network-boilerplate * PR reviews * Fix data column rpc request not being sent due to incorrect limits set. (#6000)
This commit is contained in:
@@ -1204,6 +1204,12 @@ impl<E: EthSpec> Network<E> {
|
||||
Request::BlobsByRoot { .. } => {
|
||||
metrics::inc_counter_vec(&metrics::TOTAL_RPC_REQUESTS, &["blobs_by_root"])
|
||||
}
|
||||
Request::DataColumnsByRoot { .. } => {
|
||||
metrics::inc_counter_vec(&metrics::TOTAL_RPC_REQUESTS, &["data_columns_by_root"])
|
||||
}
|
||||
Request::DataColumnsByRange { .. } => {
|
||||
metrics::inc_counter_vec(&metrics::TOTAL_RPC_REQUESTS, &["data_columns_by_range"])
|
||||
}
|
||||
}
|
||||
NetworkEvent::RequestReceived {
|
||||
peer_id,
|
||||
@@ -1523,6 +1529,22 @@ impl<E: EthSpec> Network<E> {
|
||||
self.build_request(peer_request_id, peer_id, Request::BlobsByRoot(req));
|
||||
Some(event)
|
||||
}
|
||||
InboundRequest::DataColumnsByRoot(req) => {
|
||||
let event = self.build_request(
|
||||
peer_request_id,
|
||||
peer_id,
|
||||
Request::DataColumnsByRoot(req),
|
||||
);
|
||||
Some(event)
|
||||
}
|
||||
InboundRequest::DataColumnsByRange(req) => {
|
||||
let event = self.build_request(
|
||||
peer_request_id,
|
||||
peer_id,
|
||||
Request::DataColumnsByRange(req),
|
||||
);
|
||||
Some(event)
|
||||
}
|
||||
InboundRequest::LightClientBootstrap(req) => {
|
||||
let event = self.build_request(
|
||||
peer_request_id,
|
||||
@@ -1580,6 +1602,12 @@ impl<E: EthSpec> Network<E> {
|
||||
RPCResponse::BlobsByRoot(resp) => {
|
||||
self.build_response(id, peer_id, Response::BlobsByRoot(Some(resp)))
|
||||
}
|
||||
RPCResponse::DataColumnsByRoot(resp) => {
|
||||
self.build_response(id, peer_id, Response::DataColumnsByRoot(Some(resp)))
|
||||
}
|
||||
RPCResponse::DataColumnsByRange(resp) => {
|
||||
self.build_response(id, peer_id, Response::DataColumnsByRange(Some(resp)))
|
||||
}
|
||||
// Should never be reached
|
||||
RPCResponse::LightClientBootstrap(bootstrap) => {
|
||||
self.build_response(id, peer_id, Response::LightClientBootstrap(bootstrap))
|
||||
@@ -1602,6 +1630,8 @@ impl<E: EthSpec> Network<E> {
|
||||
ResponseTermination::BlocksByRoot => Response::BlocksByRoot(None),
|
||||
ResponseTermination::BlobsByRange => Response::BlobsByRange(None),
|
||||
ResponseTermination::BlobsByRoot => Response::BlobsByRoot(None),
|
||||
ResponseTermination::DataColumnsByRoot => Response::DataColumnsByRoot(None),
|
||||
ResponseTermination::DataColumnsByRange => Response::DataColumnsByRange(None),
|
||||
};
|
||||
self.build_response(id, peer_id, response)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user