diff --git a/testing-framework/configs/src/nodes/blend.rs b/testing-framework/configs/src/nodes/blend.rs index 44f4775..501ef51 100644 --- a/testing-framework/configs/src/nodes/blend.rs +++ b/testing-framework/configs/src/nodes/blend.rs @@ -31,7 +31,7 @@ const ROUNDS_PER_SESSION_TRANSITION: u64 = 30; const EPOCH_TRANSITION_SLOTS: u64 = 2_600; const SAFETY_BUFFER_INTERVALS: u64 = 100; const MESSAGE_FREQUENCY_PER_ROUND: f64 = 1.0; -const MAX_RELEASE_DELAY_ROUNDS: u64 = 3; +const MAX_RELEASE_DELAY_ROUNDS: u64 = 1; const DATA_REPLICATION_FACTOR: u64 = 0; pub const ACTIVITY_THRESHOLD_SENSITIVITY: u64 = 1; diff --git a/testing-framework/configs/src/nodes/common.rs b/testing-framework/configs/src/nodes/common.rs index b153d46..5ce8efb 100644 --- a/testing-framework/configs/src/nodes/common.rs +++ b/testing-framework/configs/src/nodes/common.rs @@ -2,6 +2,7 @@ use std::{ collections::{HashMap, HashSet}, num::NonZeroUsize, path::PathBuf, + sync::OnceLock, time::Duration, }; @@ -41,6 +42,12 @@ const IBD_DOWNLOAD_DELAY_SECS: u64 = 10; const MAX_ORPHAN_CACHE_SIZE: NonZeroUsize = unsafe { NonZeroUsize::new_unchecked(5) }; const API_MAX_CONCURRENT_REQUESTS: usize = 1000; +static CHAIN_START_TIME: OnceLock = OnceLock::new(); + +fn get_or_init_chain_start_time() -> OffsetDateTime { + *CHAIN_START_TIME.get_or_init(OffsetDateTime::now_utc) +} + pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings { let mantle_service_params = &config .consensus_config @@ -81,7 +88,7 @@ pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeplo pub(crate) fn time_deployment(config: &GeneralConfig) -> TimeDeploymentSettings { TimeDeploymentSettings { slot_duration: config.time_config.slot_duration, - chain_start_time: OffsetDateTime::now_utc(), + chain_start_time: get_or_init_chain_start_time(), } } diff --git a/testing-framework/configs/src/topology/configs/deployment.rs b/testing-framework/configs/src/topology/configs/deployment.rs index 1c7df23..45c6414 100644 --- a/testing-framework/configs/src/topology/configs/deployment.rs +++ b/testing-framework/configs/src/topology/configs/deployment.rs @@ -36,7 +36,7 @@ pub fn default_e2e_deployment_settings() -> DeploymentSettings { DeploymentSettings::Custom(CustomDeployment { blend: BlendDeploymentSettings { common: BlendCommonSettings { - minimum_network_size: unsafe { NonZeroU64::new_unchecked(30) }, + minimum_network_size: unsafe { NonZeroU64::new_unchecked(1) }, num_blend_layers: unsafe { NonZeroU64::new_unchecked(3) }, timing: TimingSettings { round_duration: DEFAULT_ROUND_DURATION, @@ -58,7 +58,7 @@ pub fn default_e2e_deployment_settings() -> DeploymentSettings { message_frequency_per_round, }, delayer: MessageDelayerSettings { - maximum_release_delay_in_rounds: unsafe { NonZeroU64::new_unchecked(3) }, + maximum_release_delay_in_rounds: unsafe { NonZeroU64::new_unchecked(1) }, }, }, },