Skip to content

Commit f142b0e

Browse files
authored
chore(deps): Replace dep alloy-rs/op-alloy-protocol->op-rs/maili-protocol (#890)
1 parent 02f5ba3 commit f142b0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+258
-244
lines changed

Cargo.lock

+149-147
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+7-5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ kona-std-fpvm = { path = "crates/proof-sdk/std-fpvm", version = "0.1.2", default
7272
kona-preimage = { path = "crates/proof-sdk/preimage", version = "0.2.1", default-features = false }
7373
kona-std-fpvm-proc = { path = "crates/proof-sdk/std-fpvm-proc", version = "0.1.2", default-features = false }
7474

75+
# Maili
76+
maili-protocol = { version = "0.1.0", default-features = false }
77+
7578
# Alloy
7679
alloy-rlp = { version = "0.3.10", default-features = false }
7780
alloy-trie = { version = "0.7.8", default-features = false }
@@ -89,11 +92,10 @@ alloy-rpc-types-engine = { version = "0.9.2", default-features = false }
8992
alloy-rpc-types-beacon = { version = "0.9.2", default-features = false }
9093

9194
# OP Alloy
92-
op-alloy-genesis = { version = "0.9.1", default-features = false }
93-
op-alloy-registry = { version = "0.9.1", default-features = false }
94-
op-alloy-protocol = { version = "0.9.1", default-features = false }
95-
op-alloy-consensus = { version = "0.9.1", default-features = false }
96-
op-alloy-rpc-types-engine = { version = "0.9.1", default-features = false }
95+
op-alloy-genesis = { version = "0.9.2", default-features = false }
96+
op-alloy-registry = { version = "0.9.2", default-features = false }
97+
op-alloy-consensus = { version = "0.9.2", default-features = false }
98+
op-alloy-rpc-types-engine = { version = "0.9.2", default-features = false }
9799

98100
# General
99101
lru = "0.12.5"

bin/client/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ kona-proof.workspace = true
1919
kona-std-fpvm.workspace = true
2020
kona-std-fpvm-proc.workspace = true
2121

22+
# Maili
23+
maili-protocol.workspace = true
24+
2225
# Alloy
2326
alloy-rlp.workspace = true
2427
alloy-eips.workspace = true
@@ -27,7 +30,6 @@ alloy-primitives.workspace = true
2730
alloy-rpc-types-engine.workspace = true
2831

2932
# Op Alloy
30-
op-alloy-protocol.workspace = true
3133
op-alloy-consensus.workspace = true
3234
op-alloy-genesis = { workspace = true, features = ["serde"] }
3335
op-alloy-rpc-types-engine = { workspace = true, features = ["serde"] }

bin/host/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ kona-preimage = { workspace = true, features = ["std"] }
2020
kona-proof = { workspace = true, features = ["std"] }
2121
kona-client.workspace = true
2222

23+
# Maili
24+
maili-protocol = { workspace = true, features = ["std", "serde"] }
25+
2326
# Alloy
2427
alloy-rlp.workspace = true
2528
alloy-eips = { workspace = true, features = ["kzg"] }
@@ -34,7 +37,6 @@ alloy-rpc-types-beacon.workspace = true
3437

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

4042
# Revm

bin/host/src/blobs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use alloy_eips::eip4844::{BlobTransactionSidecarItem, IndexedBlobHash};
44
use alloy_rpc_types_beacon::sidecar::{BeaconBlobBundle, BlobData};
55
use kona_derive::errors::BlobProviderError;
6-
use op_alloy_protocol::BlockInfo;
6+
use maili_protocol::BlockInfo;
77
use reqwest::Client;
88

99
/// The config spec engine api method.

bin/host/src/fetcher/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use alloy_rpc_types::{
1818
use anyhow::{anyhow, Result};
1919
use kona_preimage::{PreimageKey, PreimageKeyType};
2020
use kona_proof::{Hint, HintType};
21-
use op_alloy_protocol::BlockInfo;
21+
use maili_protocol::BlockInfo;
2222
use op_alloy_rpc_types_engine::OpPayloadAttributes;
2323
use std::sync::Arc;
2424
use tokio::sync::RwLock;

book/src/sdk/pipeline/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ the [`PipelineBuilder`][builder] to instantiate a [`DerivationPipeline`][dp].
9393
```rust,ignore
9494
// Imports
9595
use std::sync::Arc;
96-
use op_alloy_protocol::BlockInfo;
96+
use maili_protocol::BlockInfo;
9797
use op_alloy_genesis::RollupConfig;
9898
use hilo_providers_alloy::*;
9999

book/src/sdk/pipeline/providers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ let pipeline = PipelineBuilder::new()
6767
```rust
6868
use async_trait::async_trait;
6969
use alloy_primitives::Bytes;
70-
use op_alloy_protocol::BlockInfo;
70+
use maili_protocol::BlockInfo;
7171
use kona_derive::traits::DataAvailabilityProvider;
7272
use kona_derive::errors::PipelineResult;
7373

crates/derive/Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ homepage.workspace = true
1212
workspace = true
1313

1414
[dependencies]
15+
# Maili
16+
maili-protocol.workspace = true
17+
1518
# Alloy
1619
alloy-eips.workspace = true
1720
alloy-rpc-types-engine.workspace = true
@@ -21,7 +24,6 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map"] }
2124

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

@@ -47,10 +49,10 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitr
4749
[features]
4850
default = []
4951
serde = [
52+
"maili-protocol/serde",
5053
"alloy-primitives/serde",
5154
"alloy-consensus/serde",
5255
"op-alloy-consensus/serde",
53-
"op-alloy-protocol/serde",
5456
"op-alloy-genesis/serde",
5557
"op-alloy-rpc-types-engine/serde",
5658
]

crates/derive/src/attributes/stateful.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ use alloy_primitives::{address, Address, Bytes, B256};
1313
use alloy_rlp::Encodable;
1414
use alloy_rpc_types_engine::PayloadAttributes;
1515
use async_trait::async_trait;
16+
use maili_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH};
1617
use op_alloy_consensus::{Hardfork, Hardforks};
1718
use op_alloy_genesis::RollupConfig;
18-
use op_alloy_protocol::{decode_deposit, L1BlockInfoTx, L2BlockInfo, DEPOSIT_EVENT_ABI_HASH};
1919
use op_alloy_rpc_types_engine::OpPayloadAttributes;
2020

2121
/// The sequencer fee vault address.
@@ -236,8 +236,8 @@ mod tests {
236236
use alloc::vec;
237237
use alloy_consensus::Header;
238238
use alloy_primitives::{Log, LogData, B256, U256, U64};
239+
use maili_protocol::{BlockInfo, DepositError};
239240
use op_alloy_genesis::SystemConfig;
240-
use op_alloy_protocol::{BlockInfo, DepositError};
241241

242242
fn generate_valid_log() -> Log {
243243
let deposit_contract = address!("1111111111111111111111111111111111111111");

crates/derive/src/errors/pipeline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
use crate::errors::BuilderError;
44
use alloc::string::String;
55
use alloy_primitives::B256;
6+
use maili_protocol::{DepositError, SpanBatchError};
67
use op_alloy_genesis::SystemConfigUpdateError;
7-
use op_alloy_protocol::{DepositError, SpanBatchError};
88
use thiserror::Error;
99

1010
/// [crate::ensure] is a short-hand for bubbling up errors in the case of a condition not being met.

crates/derive/src/errors/stages.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Error types for derivation pipeline stages.
22
3-
use op_alloy_protocol::MAX_SPAN_BATCH_ELEMENTS;
3+
use maili_protocol::MAX_SPAN_BATCH_ELEMENTS;
44
use thiserror::Error;
55

66
/// A frame decompression error.

crates/derive/src/pipeline/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{
1010
};
1111
use alloc::sync::Arc;
1212
use core::fmt::Debug;
13+
use maili_protocol::BlockInfo;
1314
use op_alloy_genesis::RollupConfig;
14-
use op_alloy_protocol::BlockInfo;
1515

1616
type L1TraversalStage<P> = L1Traversal<P>;
1717
type L1RetrievalStage<DAP, P> = L1Retrieval<DAP, L1TraversalStage<P>>;

crates/derive/src/pipeline/core.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{
1010
use alloc::{boxed::Box, collections::VecDeque, sync::Arc};
1111
use async_trait::async_trait;
1212
use core::fmt::Debug;
13+
use maili_protocol::{BlockInfo, L2BlockInfo};
1314
use op_alloy_genesis::{RollupConfig, SystemConfig};
14-
use op_alloy_protocol::{BlockInfo, L2BlockInfo};
1515
use op_alloy_rpc_types_engine::OpAttributesWithParent;
1616

1717
/// The derivation pipeline is responsible for deriving L2 inputs from L1 data.
@@ -191,8 +191,8 @@ mod tests {
191191
use crate::{pipeline::DerivationPipeline, test_utils::*};
192192
use alloc::{string::ToString, sync::Arc};
193193
use alloy_rpc_types_engine::PayloadAttributes;
194+
use maili_protocol::L2BlockInfo;
194195
use op_alloy_genesis::{RollupConfig, SystemConfig};
195-
use op_alloy_protocol::L2BlockInfo;
196196
use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes};
197197

198198
fn default_test_payload_attributes() -> OpAttributesWithParent {

crates/derive/src/sources/blobs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use alloy_consensus::{Transaction, TxEip4844Variant, TxEnvelope, TxType};
1111
use alloy_eips::eip4844::IndexedBlobHash;
1212
use alloy_primitives::{Address, Bytes};
1313
use async_trait::async_trait;
14-
use op_alloy_protocol::BlockInfo;
14+
use maili_protocol::BlockInfo;
1515

1616
/// A data iterator that reads from a blob.
1717
#[derive(Debug, Clone)]

crates/derive/src/sources/calldata.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use alloc::{boxed::Box, collections::VecDeque};
99
use alloy_consensus::{Transaction, TxEnvelope};
1010
use alloy_primitives::{Address, Bytes};
1111
use async_trait::async_trait;
12-
use op_alloy_protocol::BlockInfo;
12+
use maili_protocol::BlockInfo;
1313

1414
/// A data iterator that reads from calldata.
1515
#[derive(Debug, Clone)]

crates/derive/src/sources/ethereum.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use crate::{
99
use alloc::{boxed::Box, fmt::Debug};
1010
use alloy_primitives::Bytes;
1111
use async_trait::async_trait;
12+
use maili_protocol::BlockInfo;
1213
use op_alloy_genesis::RollupConfig;
13-
use op_alloy_protocol::BlockInfo;
1414

1515
/// A factory for creating an Ethereum data source provider.
1616
#[derive(Debug, Clone)]
@@ -87,8 +87,8 @@ mod tests {
8787
use alloy_consensus::TxEnvelope;
8888
use alloy_eips::eip2718::Decodable2718;
8989
use alloy_primitives::{address, Address};
90+
use maili_protocol::BlockInfo;
9091
use op_alloy_genesis::{RollupConfig, SystemConfig};
91-
use op_alloy_protocol::BlockInfo;
9292

9393
fn default_test_blob_source() -> BlobSource<TestChainProvider, TestBlobProvider> {
9494
let chain_provider = TestChainProvider::default();

crates/derive/src/sources/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! to iterate over data for a given (L2) [BlockInfo].
66
//!
77
//! [DataAvailabilityProvider]: crate::traits::DataAvailabilityProvider
8-
//! [BlockInfo]: op_alloy_protocol::BlockInfo
8+
//! [BlockInfo]: maili_protocol::BlockInfo
99
1010
mod blob_data;
1111
pub use blob_data::BlobData;

crates/derive/src/sources/variant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ where
4242
mod tests {
4343
use super::*;
4444
use crate::test_utils::TestChainProvider;
45-
use op_alloy_protocol::BlockInfo;
45+
use maili_protocol::BlockInfo;
4646

4747
use crate::{
4848
sources::{BlobData, EthereumDataSourceVariant},

crates/derive/src/stages/attributes_queue.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use crate::{
1111
use alloc::{boxed::Box, sync::Arc};
1212
use async_trait::async_trait;
1313
use core::fmt::Debug;
14+
use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
1415
use op_alloy_genesis::RollupConfig;
15-
use op_alloy_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
1616
use op_alloy_rpc_types_engine::{OpAttributesWithParent, OpPayloadAttributes};
1717

1818
/// [AttributesQueue] accepts batches from the [BatchQueue] stage

crates/derive/src/stages/batch/batch_provider.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{
1010
use alloc::{boxed::Box, sync::Arc};
1111
use async_trait::async_trait;
1212
use core::fmt::Debug;
13+
use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
1314
use op_alloy_genesis::RollupConfig;
14-
use op_alloy_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
1515

1616
/// The [BatchProvider] stage is a mux between the [BatchQueue] and [BatchValidator] stages.
1717
///
@@ -182,8 +182,8 @@ mod test {
182182
types::ResetSignal,
183183
};
184184
use alloc::{sync::Arc, vec};
185+
use maili_protocol::BlockInfo;
185186
use op_alloy_genesis::RollupConfig;
186-
use op_alloy_protocol::BlockInfo;
187187

188188
#[test]
189189
fn test_batch_provider_validator_active() {

crates/derive/src/stages/batch/batch_queue.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use crate::{
99
use alloc::{boxed::Box, sync::Arc, vec::Vec};
1010
use async_trait::async_trait;
1111
use core::fmt::Debug;
12-
use op_alloy_genesis::RollupConfig;
13-
use op_alloy_protocol::{
12+
use maili_protocol::{
1413
Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch,
1514
};
15+
use op_alloy_genesis::RollupConfig;
1616

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

crates/derive/src/stages/batch/batch_stream.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use crate::{
99
use alloc::{boxed::Box, collections::VecDeque, sync::Arc};
1010
use async_trait::async_trait;
1111
use core::fmt::Debug;
12-
use op_alloy_genesis::RollupConfig;
13-
use op_alloy_protocol::{
12+
use maili_protocol::{
1413
Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch,
1514
};
15+
use op_alloy_genesis::RollupConfig;
1616

1717
/// Provides [Batch]es for the [BatchStream] stage.
1818
#[async_trait]
@@ -226,7 +226,7 @@ mod test {
226226
};
227227
use alloc::vec;
228228
use alloy_eips::NumHash;
229-
use op_alloy_protocol::{SingleBatch, SpanBatchElement};
229+
use maili_protocol::{SingleBatch, SpanBatchElement};
230230
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
231231

232232
#[tokio::test]

crates/derive/src/stages/batch/batch_validator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use crate::{
1111
use alloc::{boxed::Box, sync::Arc, vec::Vec};
1212
use async_trait::async_trait;
1313
use core::fmt::Debug;
14+
use maili_protocol::{Batch, BatchValidity, BlockInfo, L2BlockInfo, SingleBatch};
1415
use op_alloy_genesis::RollupConfig;
15-
use op_alloy_protocol::{Batch, BatchValidity, BlockInfo, L2BlockInfo, SingleBatch};
1616

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

crates/derive/src/stages/batch/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
//! for streaming [SingleBatch]es from [SpanBatch]es, while the [BatchProvider] stage is responsible
66
//! for ordering and validating the [Batch]es for the [AttributesQueue] stage.
77
//!
8-
//! [Batch]: op_alloy_protocol::Batch
9-
//! [SingleBatch]: op_alloy_protocol::SingleBatch
10-
//! [SpanBatch]: op_alloy_protocol::SpanBatch
8+
//! [Batch]: maili_protocol::Batch
9+
//! [SingleBatch]: maili_protocol::SingleBatch
10+
//! [SpanBatch]: maili_protocol::SpanBatch
1111
//! [ChannelReader]: crate::stages::channel::ChannelReader
1212
//! [AttributesQueue]: crate::stages::attributes_queue::AttributesQueue
1313
1414
use crate::types::PipelineResult;
1515
use alloc::boxed::Box;
1616
use async_trait::async_trait;
17-
use op_alloy_protocol::{Batch, BlockInfo, L2BlockInfo};
17+
use maili_protocol::{Batch, BlockInfo, L2BlockInfo};
1818

1919
mod batch_stream;
2020
pub use batch_stream::{BatchStream, BatchStreamProvider};
@@ -47,8 +47,8 @@ pub trait NextBatchProvider {
4747
/// Returns the number of [SingleBatch]es that are currently buffered in the [BatchStream]
4848
/// from a [SpanBatch].
4949
///
50-
/// [SpanBatch]: op_alloy_protocol::SpanBatch
51-
/// [SingleBatch]: op_alloy_protocol::SingleBatch
50+
/// [SpanBatch]: maili_protocol::SpanBatch
51+
/// [SingleBatch]: maili_protocol::SingleBatch
5252
fn span_buffer_size(&self) -> usize;
5353

5454
/// Allows the stage to flush the buffer in the [crate::stages::BatchStream]

0 commit comments

Comments
 (0)