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 53f551b commit 5bb22cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 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::{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};
Expand Down Expand Up @@ -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();
Expand Down
10 changes: 4 additions & 6 deletions crates/eigenda/src/codec.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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<Bytes, BlobDecodingError> {
if blob.len() < 32 {
Expand All @@ -48,8 +47,7 @@ pub fn decode_eigenda_blob(blob: &Bytes) -> Result<Bytes, BlobDecodingError> {
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 {
Expand Down

0 comments on commit 5bb22cc

Please sign in to comment.