diff --git a/crates/derive/src/sources/blobs.rs b/crates/derive/src/sources/blobs.rs index 59405cac..2379f142 100644 --- a/crates/derive/src/sources/blobs.rs +++ b/crates/derive/src/sources/blobs.rs @@ -7,7 +7,7 @@ use crate::{ use alloc::{boxed::Box, vec::Vec}; use alloy_consensus::{Transaction, TxEip4844Variant, TxEnvelope, TxType}; use alloy_primitives::{Address, Bytes, TxKind}; -use anyhow::Result; +use anyhow::{anyhow, Result}; use async_trait::async_trait; use tracing::warn; @@ -101,7 +101,7 @@ where TxEnvelope::Eip4844(blob_tx_wrapper) => Some(blob_tx_wrapper.hash()), _ => None, }; - warn!("Blob tx has calldata, which will be ignored: {hash:?}"); + warn!(target: "blob-source", "Blob tx has calldata, which will be ignored: {hash:?}"); } let blob_hashes = if let Some(b) = blob_hashes { b @@ -138,8 +138,8 @@ where let blobs = self.blob_fetcher.get_blobs(&self.block_ref, &blob_hashes).await.map_err(|e| { - warn!("Failed to fetch blobs: {e}"); - anyhow::anyhow!("Failed to fetch blobs: {e}") + warn!(target: "blob-source", "Failed to fetch blobs: {e}"); + anyhow!("Failed to fetch blobs: {e}") })?; // Fill the blob pointers. @@ -196,7 +196,7 @@ where match next_data.decode() { Ok(d) => Some(Ok(d)), Err(_) => { - warn!("Failed to decode blob data, skipping"); + warn!(target: "blob-source", "Failed to decode blob data, skipping"); self.next().await } } diff --git a/crates/derive/src/sources/calldata.rs b/crates/derive/src/sources/calldata.rs index 5ccd8b3f..8d3c5ccb 100644 --- a/crates/derive/src/sources/calldata.rs +++ b/crates/derive/src/sources/calldata.rs @@ -7,6 +7,7 @@ use crate::{ use alloc::{boxed::Box, collections::VecDeque}; use alloy_consensus::{Transaction, TxEnvelope}; use alloy_primitives::{Address, Bytes, TxKind}; +use anyhow::Result; use async_trait::async_trait; /// A data iterator that reads from calldata. @@ -48,7 +49,7 @@ impl CalldataSource { } /// Loads the calldata into the source if it is not open. - async fn load_calldata(&mut self) -> anyhow::Result<()> { + async fn load_calldata(&mut self) -> Result<()> { if self.open { return Ok(()); }