Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Replace dep alloy-rs/op-alloy-protocol->op-rs/maili-protocol #890

Merged
merged 2 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
296 changes: 149 additions & 147 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ kona-std-fpvm = { path = "crates/proof-sdk/std-fpvm", version = "0.1.2", default
kona-preimage = { path = "crates/proof-sdk/preimage", version = "0.2.1", default-features = false }
kona-std-fpvm-proc = { path = "crates/proof-sdk/std-fpvm-proc", version = "0.1.2", default-features = false }

# Maili
maili-protocol = { version = "0.1.0", default-features = false }

# Alloy
alloy-rlp = { version = "0.3.10", default-features = false }
alloy-trie = { version = "0.7.8", default-features = false }
Expand All @@ -89,11 +92,10 @@ alloy-rpc-types-engine = { version = "0.9.2", default-features = false }
alloy-rpc-types-beacon = { version = "0.9.2", default-features = false }

# OP Alloy
op-alloy-genesis = { version = "0.9.1", default-features = false }
op-alloy-registry = { version = "0.9.1", default-features = false }
op-alloy-protocol = { version = "0.9.1", default-features = false }
op-alloy-consensus = { version = "0.9.1", default-features = false }
op-alloy-rpc-types-engine = { version = "0.9.1", default-features = false }
op-alloy-genesis = { version = "0.9.2", default-features = false }
op-alloy-registry = { version = "0.9.2", default-features = false }
op-alloy-consensus = { version = "0.9.2", default-features = false }
op-alloy-rpc-types-engine = { version = "0.9.2", default-features = false }

# General
lru = "0.12.5"
Expand Down
4 changes: 3 additions & 1 deletion bin/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ kona-proof.workspace = true
kona-std-fpvm.workspace = true
kona-std-fpvm-proc.workspace = true

# Maili
maili-protocol.workspace = true

# Alloy
alloy-rlp.workspace = true
alloy-eips.workspace = true
Expand All @@ -27,7 +30,6 @@ alloy-primitives.workspace = true
alloy-rpc-types-engine.workspace = true

# Op Alloy
op-alloy-protocol.workspace = true
op-alloy-consensus.workspace = true
op-alloy-genesis = { workspace = true, features = ["serde"] }
op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] }
Expand Down
4 changes: 3 additions & 1 deletion bin/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ kona-preimage = { workspace = true, features = ["std"] }
kona-proof = { workspace = true, features = ["std"] }
kona-client.workspace = true

# Maili
maili-protocol = { workspace = true, features = ["std", "serde"] }

# Alloy
alloy-rlp.workspace = true
alloy-eips = { workspace = true, features = ["kzg"] }
Expand All @@ -34,7 +37,6 @@ alloy-rpc-types-beacon.workspace = true

# Op Alloy
op-alloy-genesis = { workspace = true, features = ["std", "serde"] }
op-alloy-protocol = { workspace = true, features = ["std", "serde"] }
op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] }

# Revm
Expand Down
2 changes: 1 addition & 1 deletion bin/host/src/blobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use alloy_eips::eip4844::{BlobTransactionSidecarItem, IndexedBlobHash};
use alloy_rpc_types_beacon::sidecar::{BeaconBlobBundle, BlobData};
use kona_derive::errors::BlobProviderError;
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;
use reqwest::Client;

/// The config spec engine api method.
Expand Down
2 changes: 1 addition & 1 deletion bin/host/src/fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use alloy_rpc_types::{
use anyhow::{anyhow, Result};
use kona_preimage::{PreimageKey, PreimageKeyType};
use kona_proof::{Hint, HintType};
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;
use op_alloy_rpc_types_engine::OpPayloadAttributes;
use std::sync::Arc;
use tokio::sync::RwLock;
Expand Down
2 changes: 1 addition & 1 deletion book/src/sdk/pipeline/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ the [`PipelineBuilder`][builder] to instantiate a [`DerivationPipeline`][dp].
```rust,ignore
// Imports
use std::sync::Arc;
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;
use hilo_providers_alloy::*;

Expand Down
2 changes: 1 addition & 1 deletion book/src/sdk/pipeline/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ let pipeline = PipelineBuilder::new()
```rust
use async_trait::async_trait;
use alloy_primitives::Bytes;
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;
use kona_derive::traits::DataAvailabilityProvider;
use kona_derive::errors::PipelineResult;

Expand Down
6 changes: 4 additions & 2 deletions crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ homepage.workspace = true
workspace = true

[dependencies]
# Maili
maili-protocol.workspace = true

# Alloy
alloy-eips.workspace = true
alloy-rpc-types-engine.workspace = true
Expand All @@ -21,7 +24,6 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map"] }

# Op Alloy
op-alloy-genesis.workspace = true
op-alloy-protocol.workspace = true
op-alloy-rpc-types-engine.workspace = true
op-alloy-consensus = { workspace = true, features = ["k256"] }

Expand All @@ -47,10 +49,10 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitr
[features]
default = []
serde = [
"maili-protocol/serde",
"alloy-primitives/serde",
"alloy-consensus/serde",
"op-alloy-consensus/serde",
"op-alloy-protocol/serde",
"op-alloy-genesis/serde",
"op-alloy-rpc-types-engine/serde",
]
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/attributes/stateful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ use alloy_primitives::{address, Address, Bytes, B256};
use alloy_rlp::Encodable;
use alloy_rpc_types_engine::PayloadAttributes;
use async_trait::async_trait;
use maili_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH};
use op_alloy_consensus::{Hardfork, Hardforks};
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH};
use op_alloy_rpc_types_engine::OpPayloadAttributes;

/// The sequencer fee vault address.
Expand Down Expand Up @@ -236,8 +236,8 @@ mod tests {
use alloc::vec;
use alloy_consensus::Header;
use alloy_primitives::{Log, LogData, B256, U256, U64};
use maili_protocol::{BlockInfo, DepositError};
use op_alloy_genesis::SystemConfig;
use op_alloy_protocol::{BlockInfo, DepositError};

fn generate_valid_log() -> Log {
let deposit_contract = address!("1111111111111111111111111111111111111111");
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/errors/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use crate::errors::BuilderError;
use alloc::string::String;
use alloy_primitives::B256;
use maili_protocol::{DepositError, SpanBatchError};
use op_alloy_genesis::SystemConfigUpdateError;
use op_alloy_protocol::{DepositError, SpanBatchError};
use thiserror::Error;

/// [crate::ensure] is a short-hand for bubbling up errors in the case of a condition not being met.
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/errors/stages.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Error types for derivation pipeline stages.

use op_alloy_protocol::MAX_SPAN_BATCH_ELEMENTS;
use maili_protocol::MAX_SPAN_BATCH_ELEMENTS;
use thiserror::Error;

/// A frame decompression error.
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/pipeline/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::{
};
use alloc::sync::Arc;
use core::fmt::Debug;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::BlockInfo;

type L1TraversalStage<P> = L1Traversal<P>;
type L1RetrievalStage<DAP, P> = L1Retrieval<DAP, L1TraversalStage<P>>;
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/pipeline/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::{
use alloc::{boxed::Box, collections::VecDeque, sync::Arc};
use async_trait::async_trait;
use core::fmt::Debug;
use maili_protocol::{BlockInfo, L2BlockInfo};
use op_alloy_genesis::{RollupConfig, SystemConfig};
use op_alloy_protocol::{BlockInfo, L2BlockInfo};
use op_alloy_rpc_types_engine::OpAttributesWithParent;

/// The derivation pipeline is responsible for deriving L2 inputs from L1 data.
Expand Down Expand Up @@ -191,8 +191,8 @@ mod tests {
use crate::{pipeline::DerivationPipeline, test_utils::*};
use alloc::{string::ToString, sync::Arc};
use alloy_rpc_types_engine::PayloadAttributes;
use maili_protocol::L2BlockInfo;
use op_alloy_genesis::{RollupConfig, SystemConfig};
use op_alloy_protocol::L2BlockInfo;
use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes};

fn default_test_payload_attributes() -> OpAttributesWithParent {
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/sources/blobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use alloy_consensus::{Transaction, TxEip4844Variant, TxEnvelope, TxType};
use alloy_eips::eip4844::IndexedBlobHash;
use alloy_primitives::{Address, Bytes};
use async_trait::async_trait;
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;

/// A data iterator that reads from a blob.
#[derive(Debug, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/sources/calldata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use alloc::{boxed::Box, collections::VecDeque};
use alloy_consensus::{Transaction, TxEnvelope};
use alloy_primitives::{Address, Bytes};
use async_trait::async_trait;
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;

/// A data iterator that reads from calldata.
#[derive(Debug, Clone)]
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/sources/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::{
use alloc::{boxed::Box, fmt::Debug};
use alloy_primitives::Bytes;
use async_trait::async_trait;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::BlockInfo;

/// A factory for creating an Ethereum data source provider.
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -87,8 +87,8 @@ mod tests {
use alloy_consensus::TxEnvelope;
use alloy_eips::eip2718::Decodable2718;
use alloy_primitives::{address, Address};
use maili_protocol::BlockInfo;
use op_alloy_genesis::{RollupConfig, SystemConfig};
use op_alloy_protocol::BlockInfo;

fn default_test_blob_source() -> BlobSource<TestChainProvider, TestBlobProvider> {
let chain_provider = TestChainProvider::default();
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/sources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! to iterate over data for a given (L2) [BlockInfo].
//!
//! [DataAvailabilityProvider]: crate::traits::DataAvailabilityProvider
//! [BlockInfo]: op_alloy_protocol::BlockInfo
//! [BlockInfo]: maili_protocol::BlockInfo

mod blob_data;
pub use blob_data::BlobData;
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/sources/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ where
mod tests {
use super::*;
use crate::test_utils::TestChainProvider;
use op_alloy_protocol::BlockInfo;
use maili_protocol::BlockInfo;

use crate::{
sources::{BlobData, EthereumDataSourceVariant},
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/stages/attributes_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use crate::{
use alloc::{boxed::Box, sync::Arc};
use async_trait::async_trait;
use core::fmt::Debug;
use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes};

/// [AttributesQueue] accepts batches from the [BatchQueue] stage
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/stages/batch/batch_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::{
use alloc::{boxed::Box, sync::Arc};
use async_trait::async_trait;
use core::fmt::Debug;
use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{BlockInfo, L2BlockInfo, SingleBatch};

/// The [BatchProvider] stage is a mux between the [BatchQueue] and [BatchValidator] stages.
///
Expand Down Expand Up @@ -182,8 +182,8 @@ mod test {
types::ResetSignal,
};
use alloc::{sync::Arc, vec};
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::BlockInfo;

#[test]
fn test_batch_provider_validator_active() {
Expand Down
8 changes: 4 additions & 4 deletions crates/derive/src/stages/batch/batch_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use crate::{
use alloc::{boxed::Box, sync::Arc, vec::Vec};
use async_trait::async_trait;
use core::fmt::Debug;
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{
use maili_protocol::{
Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch,
};
use op_alloy_genesis::RollupConfig;

/// [BatchQueue] is responsible for o rdering unordered batches
/// and gnerating empty batches when the sequence window has passed.
Expand Down Expand Up @@ -51,7 +51,7 @@ where
pub(crate) batches: Vec<BatchWithInclusionBlock>,
/// A set of cached [SingleBatch]es derived from [SpanBatch]es.
///
/// [SpanBatch]: op_alloy_protocol::SpanBatch
/// [SpanBatch]: maili_protocol::SpanBatch
pub(crate) next_spans: Vec<SingleBatch>,
/// Used to validate the batches.
pub(crate) fetcher: BF,
Expand Down Expand Up @@ -468,9 +468,9 @@ mod tests {
use alloy_eips::{eip2718::Decodable2718, BlockNumHash};
use alloy_primitives::{address, b256, Address, Bytes, TxKind, B256, U256};
use alloy_rlp::{BytesMut, Encodable};
use maili_protocol::{BatchReader, L1BlockInfoBedrock, L1BlockInfoTx};
use op_alloy_consensus::{OpBlock, OpTxEnvelope, OpTxType, TxDeposit};
use op_alloy_genesis::{ChainGenesis, MAX_RLP_BYTES_PER_CHANNEL_FJORD};
use op_alloy_protocol::{BatchReader, L1BlockInfoBedrock, L1BlockInfoTx};
use tracing::Level;
use tracing_subscriber::layer::SubscriberExt;

Expand Down
6 changes: 3 additions & 3 deletions crates/derive/src/stages/batch/batch_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use crate::{
use alloc::{boxed::Box, collections::VecDeque, sync::Arc};
use async_trait::async_trait;
use core::fmt::Debug;
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{
use maili_protocol::{
Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch,
};
use op_alloy_genesis::RollupConfig;

/// Provides [Batch]es for the [BatchStream] stage.
#[async_trait]
Expand Down Expand Up @@ -226,7 +226,7 @@ mod test {
};
use alloc::vec;
use alloy_eips::NumHash;
use op_alloy_protocol::{SingleBatch, SpanBatchElement};
use maili_protocol::{SingleBatch, SpanBatchElement};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

#[tokio::test]
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/stages/batch/batch_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use crate::{
use alloc::{boxed::Box, sync::Arc, vec::Vec};
use async_trait::async_trait;
use core::fmt::Debug;
use maili_protocol::{Batch, BatchValidity, BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{Batch, BatchValidity, BlockInfo, L2BlockInfo, SingleBatch};

/// The [BatchValidator] stage is responsible for validating the [SingleBatch]es from
/// the [BatchStream] [AttributesQueue]'s consumption.
Expand Down Expand Up @@ -320,8 +320,8 @@ mod test {
use alloc::{sync::Arc, vec, vec::Vec};
use alloy_eips::{BlockNumHash, NumHash};
use alloy_primitives::B256;
use maili_protocol::{Batch, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch};
use op_alloy_genesis::RollupConfig;
use op_alloy_protocol::{Batch, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch};
use tracing::Level;
use tracing_subscriber::layer::SubscriberExt;

Expand Down
12 changes: 6 additions & 6 deletions crates/derive/src/stages/batch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
//! for streaming [SingleBatch]es from [SpanBatch]es, while the [BatchProvider] stage is responsible
//! for ordering and validating the [Batch]es for the [AttributesQueue] stage.
//!
//! [Batch]: op_alloy_protocol::Batch
//! [SingleBatch]: op_alloy_protocol::SingleBatch
//! [SpanBatch]: op_alloy_protocol::SpanBatch
//! [Batch]: maili_protocol::Batch
//! [SingleBatch]: maili_protocol::SingleBatch
//! [SpanBatch]: maili_protocol::SpanBatch
//! [ChannelReader]: crate::stages::channel::ChannelReader
//! [AttributesQueue]: crate::stages::attributes_queue::AttributesQueue

use crate::types::PipelineResult;
use alloc::boxed::Box;
use async_trait::async_trait;
use op_alloy_protocol::{Batch, BlockInfo, L2BlockInfo};
use maili_protocol::{Batch, BlockInfo, L2BlockInfo};

mod batch_stream;
pub use batch_stream::{BatchStream, BatchStreamProvider};
Expand Down Expand Up @@ -47,8 +47,8 @@ pub trait NextBatchProvider {
/// Returns the number of [SingleBatch]es that are currently buffered in the [BatchStream]
/// from a [SpanBatch].
///
/// [SpanBatch]: op_alloy_protocol::SpanBatch
/// [SingleBatch]: op_alloy_protocol::SingleBatch
/// [SpanBatch]: maili_protocol::SpanBatch
/// [SingleBatch]: maili_protocol::SingleBatch
fn span_buffer_size(&self) -> usize;

/// Allows the stage to flush the buffer in the [crate::stages::BatchStream]
Expand Down
Loading
Loading