#41489 [BC-Critical] Blob sizes remain unchecked leading to chain halt
Description
pub async fn execute(&self) -> Result<(), anyhow::Error> {
// Get the config
let mut client = MovementDaLightNodeClient::try_http2(self.light_node_url.as_str())
.await
.context("Failed to connect to light node")?;
let mut blocks_from_da = client
.stream_read_from_height(StreamReadFromHeightRequest { height: self.from_height })
.await
.context("Failed to stream blocks from DA")?;
info!("streaming blocks from DA");
while let Some(block_res) = blocks_from_da.next().await {
let response = block_res.context("Failed to get block")?;
let (_block_bytes, block_timestamp, block_id, da_height) = match response
.blob
.ok_or(anyhow::anyhow!("No blob in response"))?
.blob_type
.ok_or(anyhow::anyhow!("No blob type in response"))?
{
blob_response::BlobType::SequencedBlobBlock(blob) => {
tracing::info!("Receive SequencedBlobBlock blob");
(blob.data, blob.timestamp, blob.blob_id, blob.height)
}
blob_response::BlobType::PassedThroughBlob(blob) => {
tracing::info!("Receive PassedThroughBlob blob");
(blob.data, blob.timestamp, blob.blob_id, blob.height)
}
blob_response::BlobType::Heartbeat(_) => {
tracing::info!("Receive heartbeat blob");
continue;
}
_ => {
anyhow::bail!("Invalid blob type in response")
}
};
// pretty print (with labels) the block_id, block_timestamp, and da_height
tracing::info!(
"Block ID: {}, Block Timestamp: {:?}, DA Height: {}",
hex::encode(block_id),
// unix date string from the block timestamp which is in microseconds
chrono::DateTime::from_timestamp_micros(block_timestamp as i64)
.context("Failed to convert timestamp to date")?,
da_height
);
}
info!("Finished streaming blocks from DA");
Ok(())
}
}Impact
Recommendation
Proof of Concept
POC
Previous#41466 [BC-Medium] Incorrect sequence number tracking in mempool commitNext#41516 [BC-High] The attacker exceeds the number of transactions TOO_NEW_TOLERANCE and performs a DoS attack.
Was this helpful?