diff --git a/bin/host/src/eigenda_fetcher/mod.rs b/bin/host/src/eigenda_fetcher/mod.rs index bbfb093..8001831 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::{BlobInfo}; use hokulea_eigenda::encode_eigenda_blob; +use hokulea_eigenda::BlobInfo; use hokulea_eigenda::BLOB_ENCODING_VERSION_0; use hokulea_proof::hint::{ExtendedHint, ExtendedHintType}; use kona_host::{blobs::OnlineBlobProvider, fetcher::Fetcher, kv::KeyValueStore}; @@ -152,7 +152,6 @@ where // Acquire a lock on the key-value store and set the preimages. let mut kv_write_lock = self.kv_store.write().await; - // the fourth because 0x01010000 in the beginning is metadata let item_slice = cert.as_ref(); let cert_blob_info = BlobInfo::decode(&mut &item_slice[4..]).unwrap(); diff --git a/crates/eigenda/src/codec.rs b/crates/eigenda/src/codec.rs index c886d40..bee8937 100644 --- a/crates/eigenda/src/codec.rs +++ b/crates/eigenda/src/codec.rs @@ -1,9 +1,9 @@ +use crate::BLOB_ENCODING_VERSION_0; +use alloc::vec::Vec; use alloy_primitives::Bytes; use bytes::buf::Buf; -use rust_kzg_bn254::helpers; -use crate::BLOB_ENCODING_VERSION_0; use kona_derive::errors::BlobDecodingError; -use alloc::vec::Vec; +use rust_kzg_bn254::helpers; /// encoded data into an eigenda blob. The output is always power of 2 pub fn encode_eigenda_blob(rollup_data: &[u8]) -> Bytes { @@ -31,7 +31,6 @@ pub fn encode_eigenda_blob(rollup_data: &[u8]) -> Bytes { Bytes::from(raw_blob) } - /// decode data into an eigenda blob pub fn decode_eigenda_blob(blob: &Bytes) -> Result { if blob.len() < 32 { @@ -48,8 +47,7 @@ pub fn decode_eigenda_blob(blob: &Bytes) -> Result { let codec_data = blob.slice(32..); // rust kzg bn254 impl already - let blob_content = - helpers::remove_empty_byte_from_padded_bytes_unchecked(codec_data.as_ref()); + let blob_content = helpers::remove_empty_byte_from_padded_bytes_unchecked(codec_data.as_ref()); let blob_content: Bytes = blob_content.into(); if blob_content.len() < content_size as usize {