Gloas serve envelope rpc (#8896)

Serves envelope by range and by root requests. Added PayloadEnvelopeStreamer so that we dont need to alter upstream code when we introduce blinded payload envelopes.


  


Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
This commit is contained in:
Eitan Seri-Levi
2026-03-25 15:45:24 +09:00
committed by GitHub
parent 7ffc637eef
commit c7055b604f
26 changed files with 1778 additions and 13 deletions

View File

@@ -954,6 +954,35 @@ where
return;
}
}
RequestType::PayloadEnvelopesByRange(request) => {
let max_allowed = spec.max_request_payloads;
if request.count > max_allowed {
self.events_out.push(HandlerEvent::Err(HandlerErr::Inbound {
id: self.current_inbound_substream_id,
proto: Protocol::PayloadEnvelopesByRange,
error: RPCError::InvalidData(format!(
"requested exceeded limit. allowed: {}, requested: {}",
max_allowed, request.count
)),
}));
return;
}
}
RequestType::DataColumnsByRange(request) => {
let max_requested = request.max_requested::<E>();
let max_allowed = spec.max_request_data_column_sidecars;
if max_requested > max_allowed {
self.events_out.push(HandlerEvent::Err(HandlerErr::Inbound {
id: self.current_inbound_substream_id,
proto: Protocol::DataColumnsByRange,
error: RPCError::InvalidData(format!(
"requested exceeded limit. allowed: {}, requested: {}",
max_allowed, max_requested
)),
}));
return;
}
}
_ => {}
};