Open romanzac opened 2 months ago
To discuss whether and/or how to apply limits during DaBlob <> Bincode serde to prevent certain types of DOS attacks.
async fn stream_disperse( mut stream: DispersalStream, message: DaBlob, subnetwork_id: SubnetworkId, ) -> Result<StreamHandlerFutureSuccess, DispersalError> { println!("I have been called!"); let blob_id = message.id(); let blob = bincode::serialize(&message).map_err(|error| DispersalError::Serialization { error, blob_id: blob_id.clone().try_into().unwrap(), subnetwork_id, })?; . . . }
https://docs.rs/bincode/1.3.3/bincode/config/trait.Options.html
Proposed change
To discuss whether and/or how to apply limits during DaBlob <> Bincode serde to prevent certain types of DOS attacks.
Code snippet for reference:
Bincode docs
https://docs.rs/bincode/1.3.3/bincode/config/trait.Options.html