diff --git a/bin/fuel-core/Cargo.toml b/bin/fuel-core/Cargo.toml index a2624d582a7..3ffda465384 100644 --- a/bin/fuel-core/Cargo.toml +++ b/bin/fuel-core/Cargo.toml @@ -82,4 +82,3 @@ production = [ "parquet", "aws-kms", ] -fault-proving = ["fuel-core-compression/fault-proving"] diff --git a/crates/compression/Cargo.toml b/crates/compression/Cargo.toml index c47b24e941e..16ad2dc0d78 100644 --- a/crates/compression/Cargo.toml +++ b/crates/compression/Cargo.toml @@ -43,4 +43,3 @@ test-helpers = [ "fuel-core-types/random", "fuel-core-types/std", ] -fault-proving = [] diff --git a/crates/compression/src/compress.rs b/crates/compression/src/compress.rs index 0330121daa4..96bce94895a 100644 --- a/crates/compression/src/compress.rs +++ b/crates/compression/src/compress.rs @@ -69,7 +69,7 @@ where let transactions = target.compress_with(&mut ctx).await?; let registrations: RegistrationsPerTable = ctx.finalize()?; - Ok(VersionedCompressedBlock::new( + Ok(VersionedCompressedBlock::new_v1( block.header(), registrations, transactions, diff --git a/crates/compression/src/lib.rs b/crates/compression/src/lib.rs index 681a466e121..c7159ce7f0d 100644 --- a/crates/compression/src/lib.rs +++ b/crates/compression/src/lib.rs @@ -15,9 +15,10 @@ pub use config::Config; use enum_dispatch::enum_dispatch; pub use registry::RegistryKeyspace; -use crate::compressed_block_payload::v0::CompressedBlockPayloadV0; -#[cfg(feature = "fault-proving")] -use crate::compressed_block_payload::v1::CompressedBlockPayloadV1; +use crate::compressed_block_payload::{ + v0::CompressedBlockPayloadV0, + v1::CompressedBlockPayloadV1, +}; use fuel_core_types::{ blockchain::{ header::{ @@ -51,23 +52,27 @@ pub trait VersionedBlockPayload { #[enum_dispatch(VersionedBlockPayload)] pub enum VersionedCompressedBlock { V0(CompressedBlockPayloadV0), - #[cfg(feature = "fault-proving")] V1(CompressedBlockPayloadV1), } impl VersionedCompressedBlock { - fn new( + fn new_v0( header: &BlockHeader, registrations: RegistrationsPerTable, transactions: Vec, ) -> Self { - #[cfg(not(feature = "fault-proving"))] - return Self::V0(CompressedBlockPayloadV0::new( + Self::V0(CompressedBlockPayloadV0::new( header, registrations, transactions, - )); - #[cfg(feature = "fault-proving")] + )) + } + + fn new_v1( + header: &BlockHeader, + registrations: RegistrationsPerTable, + transactions: Vec, + ) -> Self { Self::V1(CompressedBlockPayloadV1::new( header, registrations, @@ -240,7 +245,6 @@ mod tests { }); } - #[cfg(feature = "fault-proving")] #[test] fn postcard_roundtrip_v1() { use compressed_block_payload::v1::{ diff --git a/crates/fuel-core/Cargo.toml b/crates/fuel-core/Cargo.toml index 31f087d72ac..34a36fd6c20 100644 --- a/crates/fuel-core/Cargo.toml +++ b/crates/fuel-core/Cargo.toml @@ -117,4 +117,3 @@ test-helpers = [ # features to enable in production, but increase build times rocksdb-production = ["rocksdb", "rocksdb/jemalloc"] wasm-executor = ["fuel-core-upgradable-executor/wasm-executor"] -fault-proving = ["fuel-core-compression/fault-proving"]