diff --git a/.github/workflows/cargo-features.yml b/.github/workflows/cargo-features.yml index de382698a..95157a2fd 100644 --- a/.github/workflows/cargo-features.yml +++ b/.github/workflows/cargo-features.yml @@ -19,7 +19,7 @@ concurrency: jobs: cargo-features: - runs-on: ubuntu-latest + runs-on: buildjet-8vcpu-ubuntu-2204 steps: - uses: taiki-e/install-action@cargo-hack diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2007b8a98..5d4c58873 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,7 @@ concurrency: env: RUST_LOG: info,libp2p=off,node=error + RUSTFLAGS: "--cfg feature=\"fee\" --cfg feature=\"marketplace\"" CARGO_TERM_COLOR: always # Save the process compose logs PC_LOGS: /tmp/pc.log diff --git a/Cargo.toml b/Cargo.toml index d041a039c..a0ac1ca50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -224,13 +224,6 @@ rand = "0.8.5" time = "0.3" trait-set = "0.3.0" -[profile.dev] -# No optimizations -opt-level = 0 -# Skip compiling the debug information. -debug = false -# Skip linking symbols. -strip = true [profile.test] opt-level = 1 [profile.test.package.tests] diff --git a/sequencer/Cargo.toml b/sequencer/Cargo.toml index 69564f90d..d1fd78f25 100644 --- a/sequencer/Cargo.toml +++ b/sequencer/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] +default = ["fee"] testing = [ "hotshot-testing", "marketplace-builder-core", @@ -15,6 +16,9 @@ testing = [ ] benchmarking = [] embedded-db = ["hotshot-query-service/embedded-db"] +fee = [] +pos = [] +marketplace = [] [[bin]] name = "espresso-dev-node" diff --git a/sequencer/src/run.rs b/sequencer/src/run.rs index 9eb4acc02..182be004e 100644 --- a/sequencer/src/run.rs +++ b/sequencer/src/run.rs @@ -8,6 +8,7 @@ use super::{ persistence, Genesis, L1Params, NetworkParams, }; use clap::Parser; +#[allow(unused_imports)] use espresso_types::{ traits::NullEventConsumer, FeeVersion, MarketplaceVersion, SequencerVersions, SolverAuctionResultsProvider, V0_0, @@ -38,6 +39,7 @@ pub async fn main() -> anyhow::Result<()> { let upgrade = genesis.upgrade_version; match (base, upgrade) { + #[cfg(all(feature = "fee", feature = "marketplace"))] (FeeVersion::VERSION, MarketplaceVersion::VERSION) => { run( genesis, @@ -47,6 +49,7 @@ pub async fn main() -> anyhow::Result<()> { ) .await } + #[cfg(feature = "fee")] (FeeVersion::VERSION, _) => { run( genesis, @@ -56,6 +59,7 @@ pub async fn main() -> anyhow::Result<()> { ) .await } + #[cfg(feature = "marketplace")] (MarketplaceVersion::VERSION, _) => { run( genesis,