mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into some-blob-reprocessing-work
This commit is contained in:
@@ -230,7 +230,7 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
let mut blob_list_results = HashMap::new();
|
||||
for id in request.blob_ids.into_iter() {
|
||||
// First attempt to get the blobs from the RPC cache.
|
||||
if let Some(blob) = self.chain.data_availability_checker.get_blob(&id) {
|
||||
if let Ok(Some(blob)) = self.chain.data_availability_checker.get_blob(&id) {
|
||||
self.send_response(peer_id, Response::BlobsByRoot(Some(blob)), request_id);
|
||||
send_blob_count += 1;
|
||||
} else {
|
||||
@@ -625,7 +625,7 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
);
|
||||
|
||||
// Should not send more than max request blocks
|
||||
if req.count > MAX_REQUEST_BLOB_SIDECARS {
|
||||
if req.count * T::EthSpec::max_blobs_per_block() as u64 > MAX_REQUEST_BLOB_SIDECARS {
|
||||
return self.send_error_response(
|
||||
peer_id,
|
||||
RPCResponseErrorCode::InvalidRequest,
|
||||
@@ -808,28 +808,15 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
.slot()
|
||||
.unwrap_or_else(|_| self.chain.slot_clock.genesis_slot());
|
||||
|
||||
if blobs_sent < (req.count as usize) {
|
||||
debug!(
|
||||
self.log,
|
||||
"BlobsByRange Response processed";
|
||||
"peer" => %peer_id,
|
||||
"msg" => "Failed to return all requested blobs",
|
||||
"start_slot" => req.start_slot,
|
||||
"current_slot" => current_slot,
|
||||
"requested" => req.count,
|
||||
"returned" => blobs_sent
|
||||
);
|
||||
} else {
|
||||
debug!(
|
||||
self.log,
|
||||
"BlobsByRange Response processed";
|
||||
"peer" => %peer_id,
|
||||
"start_slot" => req.start_slot,
|
||||
"current_slot" => current_slot,
|
||||
"requested" => req.count,
|
||||
"returned" => blobs_sent
|
||||
);
|
||||
}
|
||||
debug!(
|
||||
self.log,
|
||||
"BlobsByRange Response processed";
|
||||
"peer" => %peer_id,
|
||||
"start_slot" => req.start_slot,
|
||||
"current_slot" => current_slot,
|
||||
"requested" => req.count,
|
||||
"returned" => blobs_sent
|
||||
);
|
||||
|
||||
if send_response {
|
||||
// send the stream terminator
|
||||
|
||||
Reference in New Issue
Block a user