Skip to content

Commit

Permalink
chore: Update Maili Deps (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell authored Jan 16, 2025
1 parent 7dbae6d commit eddcdd9
Show file tree
Hide file tree
Showing 52 changed files with 221 additions and 178 deletions.
199 changes: 115 additions & 84 deletions Cargo.lock

Large diffs are not rendered by default.

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

# Maili
maili-protocol = { version = "0.1.2", default-features = false }
maili-registry = { version = "0.1.2", default-features = false }
maili-genesis = { version = "0.1.5", default-features = false }
maili-protocol = { version = "0.1.5", default-features = false }
maili-registry = { version = "0.1.5", default-features = false }
maili-consensus = { version = "0.1.5", default-features = false }

# Alloy
alloy-rlp = { version = "0.3.10", default-features = false }
Expand All @@ -97,9 +99,8 @@ alloy-rpc-types-beacon = { version = "0.9.2", default-features = false }
alloy-sol-types = { version = "0.8.18", default-features = false }

# OP Alloy
op-alloy-genesis = { 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 }
op-alloy-consensus = { version = "0.9.4", default-features = false }
op-alloy-rpc-types-engine = { version = "0.9.4", default-features = false }

# General
lru = "0.12.5"
Expand Down
2 changes: 1 addition & 1 deletion bin/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ kona-std-fpvm-proc.workspace = true

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

# Alloy
alloy-rlp.workspace = true
Expand All @@ -32,7 +33,6 @@ alloy-rpc-types-engine.workspace = true

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

# Revm
Expand Down
2 changes: 1 addition & 1 deletion bin/host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ alloy-primitives = { workspace = true, features = ["serde"] }
alloy-rpc-types-beacon.workspace = true

# Op Alloy
op-alloy-genesis = { workspace = true, features = ["std", "serde"] }
maili-genesis = { 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/single/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use clap::{
builder::styling::{AnsiColor, Color, Style},
Parser,
};
use op_alloy_genesis::RollupConfig;
use maili_genesis::RollupConfig;
use reqwest::Client;
use serde::Serialize;
use std::{path::PathBuf, sync::Arc};
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 @@ -94,7 +94,7 @@ the [`PipelineBuilder`][builder] to instantiate a [`DerivationPipeline`][dp].
// Imports
use std::sync::Arc;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;
use maili_genesis::RollupConfig;
use hilo_providers_alloy::*;
// Use a default rollup config.
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 @@ -23,7 +23,7 @@ required trait implementations are the providers stubbed with `todo!()`.

```rust
use std::sync::Arc;
use op_alloy_genesis::RollupConfig;
use maili_genesis::RollupConfig;
use kona_derive::pipeline::PipelineBuilder;
use kona_derive::attributes::StatefulAttributesBuilder;

Expand Down
5 changes: 3 additions & 2 deletions crates/derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ workspace = true

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

# Alloy
Expand All @@ -23,7 +24,6 @@ alloy-consensus = { workspace = true, features = ["k256"] }
alloy-primitives = { workspace = true, features = ["rlp", "k256", "map"] }

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

Expand All @@ -41,6 +41,7 @@ spin.workspace = true
proptest.workspace = true
serde_json.workspace = true
maili-registry.workspace = true
maili-consensus.workspace = true
tokio = { workspace = true, features = ["full"] }
tracing-subscriber = { workspace = true, features = ["fmt"] }
tracing = { workspace = true, features = ["std"] }
Expand All @@ -50,10 +51,10 @@ alloy-primitives = { workspace = true, features = ["rlp", "k256", "map", "arbitr
default = []
serde = [
"maili-protocol/serde",
"maili-genesis/serde",
"alloy-primitives/serde",
"alloy-consensus/serde",
"op-alloy-consensus/serde",
"op-alloy-genesis/serde",
"op-alloy-rpc-types-engine/serde",
]
test-utils = [
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The intended way of working with `kona-derive` is to use the [`DerivationPipelin

```rust,ignore
use std::sync::Arc;
use op_alloy_genesis::RollupConfig;
use maili_genesis::RollupConfig;
use kona_derive::sources::EthereumDataSource;
use kona_derive::pipeline::PipelineBuilder;
use kona_derive::attributes::StatefulAttributesBuilder;
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_genesis::RollupConfig;
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_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_genesis::SystemConfig;
use maili_protocol::{BlockInfo, DepositError};
use op_alloy_genesis::SystemConfig;

fn generate_valid_log() -> Log {
let deposit_contract = address!("1111111111111111111111111111111111111111");
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/errors/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum BuilderError {
BlockMismatchEpochReset(BlockNumHash, BlockNumHash, B256),
/// [SystemConfig] update failed.
///
/// [SystemConfig]: op_alloy_genesis::SystemConfig
/// [SystemConfig]: maili_genesis::SystemConfig
#[error("System config update failed")]
SystemConfigUpdate,
/// Broken time invariant between L2 and L1.
Expand Down
4 changes: 2 additions & 2 deletions 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_genesis::SystemConfigUpdateError;
use maili_protocol::{DepositError, SpanBatchError};
use op_alloy_genesis::SystemConfigUpdateError;
use thiserror::Error;

/// [crate::ensure] is a short-hand for bubbling up errors in the case of a condition not being met.
Expand Down Expand Up @@ -83,7 +83,7 @@ pub enum PipelineError {
InvalidBatchValidity,
/// [SystemConfig] update error.
///
/// [SystemConfig]: op_alloy_genesis::SystemConfig
/// [SystemConfig]: maili_genesis::SystemConfig
#[error("Error updating system config: {0}")]
SystemConfigUpdate(SystemConfigUpdateError),
/// Attributes builder error variant, with [BuilderError].
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_genesis::RollupConfig;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;

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_genesis::{RollupConfig, SystemConfig};
use maili_protocol::{BlockInfo, L2BlockInfo};
use op_alloy_genesis::{RollupConfig, SystemConfig};
use op_alloy_rpc_types_engine::OpAttributesWithParent;

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

fn default_test_payload_attributes() -> OpAttributesWithParent {
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_genesis::RollupConfig;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;

/// 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_genesis::{RollupConfig, SystemConfig};
use maili_protocol::BlockInfo;
use op_alloy_genesis::{RollupConfig, SystemConfig};

fn default_test_blob_source() -> BlobSource<TestChainProvider, TestBlobProvider> {
let chain_provider = TestChainProvider::default();
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_genesis::RollupConfig;
use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_genesis::RollupConfig;
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_genesis::RollupConfig;
use maili_protocol::{BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_genesis::RollupConfig;

/// 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_genesis::RollupConfig;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;

#[test]
fn test_batch_provider_validator_active() {
Expand Down
7 changes: 4 additions & 3 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 maili_genesis::RollupConfig;
use maili_protocol::{
Batch, BatchValidity, BatchWithInclusionBlock, BlockInfo, L2BlockInfo, SingleBatch,
};
use op_alloy_genesis::RollupConfig;

/// [BatchQueue] is responsible for o rdering unordered batches
/// and generating empty batches when the sequence window has passed.
Expand Down Expand Up @@ -468,9 +468,10 @@ 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_consensus::TxDeposit;
use maili_genesis::{ChainGenesis, MAX_RLP_BYTES_PER_CHANNEL_FJORD};
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_consensus::{OpBlock, OpTxEnvelope, OpTxType};
use tracing::Level;
use tracing_subscriber::layer::SubscriberExt;

Expand Down
2 changes: 1 addition & 1 deletion 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 maili_genesis::RollupConfig;
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
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_genesis::RollupConfig;
use maili_protocol::{Batch, BatchValidity, BlockInfo, L2BlockInfo, SingleBatch};
use op_alloy_genesis::RollupConfig;

/// 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_genesis::RollupConfig;
use maili_protocol::{Batch, BlockInfo, L2BlockInfo, SingleBatch, SpanBatch};
use op_alloy_genesis::RollupConfig;
use tracing::Level;
use tracing_subscriber::layer::SubscriberExt;

Expand Down
8 changes: 4 additions & 4 deletions crates/derive/src/stages/channel/channel_assembler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use alloc::{boxed::Box, sync::Arc};
use alloy_primitives::{hex, Bytes};
use async_trait::async_trait;
use core::fmt::Debug;
use maili_protocol::{BlockInfo, Channel};
use op_alloy_genesis::{
use maili_genesis::{
RollupConfig, MAX_RLP_BYTES_PER_CHANNEL_BEDROCK, MAX_RLP_BYTES_PER_CHANNEL_FJORD,
};
use maili_protocol::{BlockInfo, Channel};

/// The [ChannelAssembler] stage is responsible for assembling the [Frame]s from the [FrameQueue]
/// stage into a raw compressed [Channel].
Expand Down Expand Up @@ -191,10 +191,10 @@ mod test {
test_utils::{CollectingLayer, TestNextFrameProvider, TraceStorage},
};
use alloc::{sync::Arc, vec};
use maili_protocol::BlockInfo;
use op_alloy_genesis::{
use maili_genesis::{
RollupConfig, MAX_RLP_BYTES_PER_CHANNEL_BEDROCK, MAX_RLP_BYTES_PER_CHANNEL_FJORD,
};
use maili_protocol::BlockInfo;
use tracing::Level;
use tracing_subscriber::layer::SubscriberExt;

Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/stages/channel/channel_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use alloc::{boxed::Box, collections::VecDeque, sync::Arc};
use alloy_primitives::{hex, map::HashMap, Bytes};
use async_trait::async_trait;
use core::fmt::Debug;
use maili_genesis::RollupConfig;
use maili_protocol::{BlockInfo, Channel, ChannelId, Frame};
use op_alloy_genesis::RollupConfig;

/// The maximum size of a channel bank.
pub(crate) const MAX_CHANNEL_BANK_SIZE: usize = 100_000_000;
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/stages/channel/channel_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use alloc::{boxed::Box, sync::Arc};
use alloy_primitives::Bytes;
use async_trait::async_trait;
use core::fmt::Debug;
use maili_genesis::RollupConfig;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;

/// The [ChannelProvider] stage is a mux between the [ChannelBank] and [ChannelAssembler] stages.
///
Expand Down Expand Up @@ -163,8 +163,8 @@ mod test {
types::ResetSignal,
};
use alloc::{sync::Arc, vec};
use maili_genesis::RollupConfig;
use maili_protocol::BlockInfo;
use op_alloy_genesis::RollupConfig;

#[test]
fn test_channel_provider_assembler_active() {
Expand Down
4 changes: 2 additions & 2 deletions crates/derive/src/stages/channel/channel_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use alloc::{boxed::Box, sync::Arc};
use alloy_primitives::Bytes;
use async_trait::async_trait;
use core::fmt::Debug;
use maili_protocol::{Batch, BatchReader, BlockInfo};
use op_alloy_genesis::{
use maili_genesis::{
RollupConfig, MAX_RLP_BYTES_PER_CHANNEL_BEDROCK, MAX_RLP_BYTES_PER_CHANNEL_FJORD,
};
use maili_protocol::{Batch, BatchReader, BlockInfo};
use tracing::{debug, warn};

/// The [ChannelReader] provider trait.
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/stages/frame_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use alloc::{boxed::Box, collections::VecDeque, sync::Arc};
use alloy_primitives::Bytes;
use async_trait::async_trait;
use core::fmt::Debug;
use maili_genesis::RollupConfig;
use maili_protocol::{BlockInfo, Frame};
use op_alloy_genesis::RollupConfig;

/// Provides data frames for the [FrameQueue] stage.
#[async_trait]
Expand Down
2 changes: 1 addition & 1 deletion crates/derive/src/stages/l1_retrieval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub trait L1RetrievalProvider {
/// [L1Traversal]: crate::stages::L1Traversal
async fn next_l1_block(&mut self) -> PipelineResult<Option<BlockInfo>>;

/// Returns the batcher [Address] from the [op_alloy_genesis::SystemConfig].
/// Returns the batcher [Address] from the [maili_genesis::SystemConfig].
fn batcher_addr(&self) -> Address;
}

Expand Down
Loading

0 comments on commit eddcdd9

Please sign in to comment.