diff --git "a/tatuq\033\033" "b/tatuq\033\033" deleted file mode 100644 index f7b66c322..000000000 --- "a/tatuq\033\033" +++ /dev/null @@ -1,115 +0,0 @@ -diff --git a/crates/derive/src/sources/ethereum.rs b/crates/derive/src/sources/ethereum.rs -index 22e01bc..97d5e69 100644 ---- a/crates/derive/src/sources/ethereum.rs -+++ b/crates/derive/src/sources/ethereum.rs -@@ -3,7 +3,7 @@ -  - use crate::{ - sources::{BlobSource, CalldataSource}, -- traits::{BlobProvider, ChainProvider, DataAvailabilityProvider}, -+ traits::{AltDAProvider, BlobProvider, ChainProvider, DataAvailabilityProvider}, - types::PipelineResult, - }; - use alloc::{boxed::Box, fmt::Debug}; -@@ -14,50 +14,53 @@ use op_alloy_protocol::BlockInfo; -  - /// A factory for creating an Ethereum data source provider. - #[derive(Debug, Clone)] --pub struct EthereumDataSource -+pub struct EthereumDataSource - where - C: ChainProvider + Send + Clone, - B: BlobProvider + Send + Clone, -+ A: AltDAProvider + Send + Clone, - { - /// The ecotone timestamp. - pub ecotone_timestamp: Option, - /// The blob source. - pub blob_source: BlobSource, - /// The calldata source. -- pub calldata_source: CalldataSource, -+ pub calldata_source: CalldataSource, - } -  --impl EthereumDataSource -+impl EthereumDataSource - where - C: ChainProvider + Send + Clone + Debug, - B: BlobProvider + Send + Clone + Debug, -+ A: AltDAProvider + Send + Clone + Debug, - { - /// Instantiates a new [EthereumDataSource]. - pub const fn new( - blob_source: BlobSource, -- calldata_source: CalldataSource, -+ calldata_source: CalldataSource, - cfg: &RollupConfig, - ) -> Self { - Self { ecotone_timestamp: cfg.ecotone_time, blob_source, calldata_source } - } -  - /// Instantiates a new [EthereumDataSource] from parts. -- pub fn new_from_parts(provider: C, blobs: B, cfg: &RollupConfig) -> Self { -+ pub fn new_from_parts(provider: C, blobs: B, altda_provider: Option, cfg: &RollupConfig) -> Self { - let signer = - cfg.genesis.system_config.as_ref().map(|sc| sc.batcher_address).unwrap_or_default(); - Self { - ecotone_timestamp: cfg.ecotone_time, - blob_source: BlobSource::new(provider.clone(), blobs, cfg.batch_inbox_address, signer), -- calldata_source: CalldataSource::new(provider, cfg.batch_inbox_address, signer), -+ calldata_source: CalldataSource::new(provider, altda_provider, cfg.batch_inbox_address, signer), - } - } - } -  - #[async_trait] --impl DataAvailabilityProvider for EthereumDataSource -+impl DataAvailabilityProvider for EthereumDataSource - where - C: ChainProvider + Send + Sync + Clone + Debug, - B: BlobProvider + Send + Sync + Clone + Debug, -+ A: AltDAProvider + Send + Sync + Clone + Debug, - { - type Item = Bytes; -  -@@ -82,7 +85,7 @@ mod tests { - use super::*; - use crate::{ - sources::BlobData, -- test_utils::{TestBlobProvider, TestChainProvider}, -+ test_utils::{TestAltDAProvider, TestBlobProvider, TestChainProvider}, - }; - use alloy_consensus::TxEnvelope; - use alloy_eips::eip2718::Decodable2718; -@@ -103,7 +106,8 @@ mod tests { - let chain = TestChainProvider::default(); - let blob = TestBlobProvider::default(); - let cfg = RollupConfig::default(); -- let mut calldata = CalldataSource::new(chain.clone(), Address::ZERO, Address::ZERO); -+ let altda = TestAltDAProvider::default(); -+ let mut calldata = CalldataSource::new(chain.clone(), Some(altda), Address::ZERO, Address::ZERO); - calldata.calldata.insert(0, Default::default()); - calldata.open = true; - let mut blob = BlobSource::new(chain, blob, Address::ZERO, Address::ZERO); -@@ -124,7 +128,8 @@ mod tests { - let mut blob = default_test_blob_source(); - blob.open = true; - blob.data.push(BlobData { data: None, calldata: Some(Bytes::default()) }); -- let calldata = CalldataSource::new(chain.clone(), Address::ZERO, Address::ZERO); -+ let altda = TestAltDAProvider::default(); -+ let calldata = CalldataSource::new(chain.clone(), Some(altda), Address::ZERO, Address::ZERO); - let cfg = RollupConfig { ecotone_time: Some(0), ..Default::default() }; -  - // Should successfully retrieve a blob batch from the block -@@ -149,9 +154,10 @@ mod tests { - let raw_batcher_tx = include_bytes!("../../testdata/raw_batcher_tx.hex"); - let tx = TxEnvelope::decode_2718(&mut raw_batcher_tx.as_ref()).unwrap(); - chain.insert_block_with_transactions(10, block_ref, alloc::vec![tx]); -+ let altda = TestAltDAProvider::default(); -  - // Should successfully retrieve a calldata batch from the block -- let mut data_source = EthereumDataSource::new_from_parts(chain, blob, &cfg); -+ let mut data_source = EthereumDataSource::new_from_parts(chain, blob,Some(altda), &cfg); - let calldata_batch = data_source.next(&block_ref).await.unwrap(); - assert_eq!(calldata_batch.len(), 119823); - }