Skip to content

Commit

Permalink
chore(katana): de-featurize base messaging (#2506)
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy authored Oct 8, 2024
1 parent 3e51d5d commit 18bddac
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 32 deletions.
3 changes: 1 addition & 2 deletions bin/katana/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ url.workspace = true
assert_matches.workspace = true

[features]
default = [ "jemalloc", "messaging", "slot" ]
default = [ "jemalloc", "slot" ]

jemalloc = [ ]
messaging = [ "katana-node/messaging" ]
slot = [ "dep:katana-slot-controller", "katana-primitives/slot" ]
starknet-messaging = [ "katana-node/starknet-messaging" ]
2 changes: 0 additions & 2 deletions bin/katana/src/cli/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ pub struct NodeArgs {
#[arg(help = "Fork the network at a specific block.")]
pub fork_block_number: Option<u64>,

#[cfg(feature = "messaging")]
#[arg(long)]
#[arg(value_name = "PATH")]
#[arg(value_parser = katana_core::service::messaging::MessagingConfig::parse)]
Expand Down Expand Up @@ -280,7 +279,6 @@ impl NodeArgs {
SequencerConfig {
block_time: self.block_time,
no_mining: self.no_mining,
#[cfg(feature = "messaging")]
messaging: self.messaging.clone(),
}
}
Expand Down
32 changes: 10 additions & 22 deletions crates/katana/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,36 @@ katana-provider.workspace = true
katana-tasks.workspace = true

anyhow.workspace = true
async-trait = { workspace = true, optional = true }
async-trait.workspace = true
derive_more.workspace = true
dojo-metrics.workspace = true
futures.workspace = true
lazy_static.workspace = true
metrics.workspace = true
num-traits.workspace = true
parking_lot.workspace = true
reqwest = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
reqwest.workspace = true
serde.workspace = true
serde_json.workspace = true
starknet.workspace = true
thiserror.workspace = true
tokio.workspace = true
tracing.workspace = true
url.workspace = true

alloy-primitives = { workspace = true, features = [ "serde" ] }
alloy-sol-types = { workspace = true, default-features = false, features = [ "json" ], optional = true }
alloy-sol-types = { workspace = true, default-features = false, features = [ "json" ] }

alloy-contract = { workspace = true, default-features = false, optional = true }
alloy-network = { workspace = true, default-features = false, optional = true }
alloy-provider = { workspace = true, default-features = false, optional = true, features = [ "reqwest" ] }
alloy-rpc-types-eth = { workspace = true, default-features = false, optional = true }
alloy-transport = { workspace = true, default-features = false, optional = true }
alloy-contract = { workspace = true, default-features = false }
alloy-network = { workspace = true, default-features = false }
alloy-provider = { workspace = true, default-features = false, features = [ "reqwest" ] }
alloy-rpc-types-eth = { workspace = true, default-features = false }
alloy-transport = { workspace = true, default-features = false }

[dev-dependencies]
assert_matches.workspace = true
hex.workspace = true
tempfile.workspace = true

[features]
messaging = [
"alloy-contract",
"alloy-network",
"alloy-provider",
"alloy-rpc-types-eth",
"alloy-sol-types",
"alloy-transport",
"async-trait",
"reqwest",
"serde",
"serde_json",
]
starknet-messaging = [ ]
1 change: 0 additions & 1 deletion crates/katana/core/src/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
pub struct SequencerConfig {
pub block_time: Option<u64>,
pub no_mining: bool,
#[cfg(feature = "messaging")]
pub messaging: Option<crate::service::messaging::MessagingConfig>,
}
1 change: 0 additions & 1 deletion crates/katana/core/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use self::block_producer::BlockProducer;
use self::metrics::BlockProducerMetrics;

pub mod block_producer;
#[cfg(feature = "messaging")]
pub mod messaging;
mod metrics;

Expand Down
3 changes: 1 addition & 2 deletions crates/katana/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ tower-http = { workspace = true, features = [ "full" ] }
tracing.workspace = true

[features]
messaging = [ "katana-core/messaging" ]
starknet-messaging = [ "katana-core/starknet-messaging", "messaging" ]
starknet-messaging = [ "katana-core/starknet-messaging" ]
4 changes: 2 additions & 2 deletions crates/katana/rpc/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ dojo-world.workspace = true
indexmap.workspace = true
jsonrpsee = { workspace = true, features = [ "client" ] }
katana-cairo.workspace = true
katana-node = { workspace = true, features = [ "messaging" ] }
katana-node.workspace = true
katana-rpc-api = { workspace = true, features = [ "client" ] }
katana-runner.workspace = true
rstest.workspace = true
num-traits.workspace = true
rand.workspace = true
rstest.workspace = true
serde.workspace = true
serde_json.workspace = true
tempfile.workspace = true
Expand Down

0 comments on commit 18bddac

Please sign in to comment.