Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bxue-l2 committed Jan 3, 2025
1 parent 85e61bd commit c476f1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions bin/host/src/eigenda_fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use alloy_provider::ReqwestProvider;
use alloy_rlp::Decodable;
use anyhow::{anyhow, Result};
use core::panic;
use hokulea_eigenda::encode_eigenda_blob;
use hokulea_eigenda::BlobInfo;
use hokulea_eigenda::EigenDABlobData;
use hokulea_eigenda::BLOB_ENCODING_VERSION_0;
use hokulea_proof::hint::{ExtendedHint, ExtendedHintType};
use kona_host::{blobs::OnlineBlobProvider, fetcher::Fetcher, kv::KeyValueStore};
Expand Down Expand Up @@ -162,13 +162,12 @@ where
let data_size = cert_blob_info.blob_header.data_length as u64;
let blob_length: u64 = data_size / 32;

let raw_blob = encode_eigenda_blob(rollup_data.as_ref());
trace!(target: "fetcher_with_eigenda_support", "Fetching ssize size: {:?} {}", raw_blob.len() , data_size);
let eigenda_blob = EigenDABlobData::encode(rollup_data.as_ref());

if raw_blob.len() != data_size as usize {
if eigenda_blob.blob.len() != data_size as usize {
return Err(
anyhow!("data size from cert does not equal to reconstructed data codec_rollup_data_len {} data_size {}",
raw_blob.len(), data_size));
eigenda_blob.blob.len(), data_size));
}

// Write all the field elements to the key-value store.
Expand All @@ -192,7 +191,7 @@ where
)?;
kv_write_lock.set(
PreimageKey::new(*blob_key_hash, PreimageKeyType::GlobalGeneric).into(),
raw_blob[(i as usize) << 5..(i as usize + 1) << 5].to_vec(),
eigenda_blob.blob[(i as usize) << 5..(i as usize + 1) << 5].to_vec(),
)?;
}

Expand Down
2 changes: 1 addition & 1 deletion crates/eigenda/src/eigenda_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rust_kzg_bn254::helpers;
/// Represents the data structure for EigenDA Blob.
pub struct EigenDABlobData {
/// The calldata
pub(crate) blob: Bytes,
pub blob: Bytes,
}

impl EigenDABlobData {
Expand Down

0 comments on commit c476f1d

Please sign in to comment.