From c476f1dfcfa4f3cc6f9856c91c59ee91d87c19f9 Mon Sep 17 00:00:00 2001 From: Bowen Date: Fri, 3 Jan 2025 10:36:31 -0800 Subject: [PATCH] fix lint --- bin/host/src/eigenda_fetcher/mod.rs | 11 +++++------ crates/eigenda/src/eigenda_data.rs | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/host/src/eigenda_fetcher/mod.rs b/bin/host/src/eigenda_fetcher/mod.rs index 5d5e02c..9334dc9 100644 --- a/bin/host/src/eigenda_fetcher/mod.rs +++ b/bin/host/src/eigenda_fetcher/mod.rs @@ -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}; @@ -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. @@ -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(), )?; } diff --git a/crates/eigenda/src/eigenda_data.rs b/crates/eigenda/src/eigenda_data.rs index 73ef422..1133fc7 100644 --- a/crates/eigenda/src/eigenda_data.rs +++ b/crates/eigenda/src/eigenda_data.rs @@ -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 {