diff --git a/massa-models/src/config/constants.rs b/massa-models/src/config/constants.rs index 74c0bbabff1..57bf696d0d2 100644 --- a/massa-models/src/config/constants.rs +++ b/massa-models/src/config/constants.rs @@ -71,7 +71,7 @@ lazy_static::lazy_static! { /// node version pub static ref VERSION: Version = { if cfg!(feature = "sandbox") { - "SAND.22.1" + "SAND.23.0" } else { "TEST.23.0" } @@ -225,8 +225,12 @@ pub const MAX_BOOTSTRAP_ERROR_LENGTH: u64 = 10000; pub const PROTOCOL_CONTROLLER_CHANNEL_SIZE: usize = 1024; /// Protocol event channel size pub const PROTOCOL_EVENT_CHANNEL_SIZE: usize = 1024; -/// Pool controller channel size -pub const POOL_CONTROLLER_CHANNEL_SIZE: usize = 1024; +/// Pool controller operations channel size +pub const POOL_CONTROLLER_OPERATIONS_CHANNEL_SIZE: usize = 1024; +/// Pool controller endorsements channel size +pub const POOL_CONTROLLER_ENDORSEMENTS_CHANNEL_SIZE: usize = 1024; +/// Pool controller denunciations channel size +pub const POOL_CONTROLLER_DENUNCIATIONS_CHANNEL_SIZE: usize = 1024; // *********************** // Constants used for execution module (injected from ConsensusConfig) diff --git a/massa-node/src/main.rs b/massa-node/src/main.rs index 660dde5b7fa..ff2852f6324 100644 --- a/massa-node/src/main.rs +++ b/massa-node/src/main.rs @@ -64,12 +64,14 @@ use massa_models::config::constants::{ MAX_SIZE_CHANNEL_NETWORK_TO_ENDORSEMENT_HANDLER, MAX_SIZE_CHANNEL_NETWORK_TO_OPERATION_HANDLER, MAX_SIZE_CHANNEL_NETWORK_TO_PEER_HANDLER, MIP_STORE_STATS_BLOCK_CONSIDERED, MIP_STORE_STATS_COUNTERS_MAX, OPERATION_VALIDITY_PERIODS, PERIODS_PER_CYCLE, - POOL_CONTROLLER_CHANNEL_SIZE, POS_MISS_RATE_DEACTIVATION_THRESHOLD, POS_SAVED_CYCLES, - PROTOCOL_CONTROLLER_CHANNEL_SIZE, PROTOCOL_EVENT_CHANNEL_SIZE, - ROLL_COUNT_TO_SLASH_ON_DENUNCIATION, ROLL_PRICE, SELECTOR_DRAW_CACHE_SIZE, T0, THREAD_COUNT, - VERSION, + POS_MISS_RATE_DEACTIVATION_THRESHOLD, POS_SAVED_CYCLES, PROTOCOL_CONTROLLER_CHANNEL_SIZE, + PROTOCOL_EVENT_CHANNEL_SIZE, ROLL_COUNT_TO_SLASH_ON_DENUNCIATION, ROLL_PRICE, + SELECTOR_DRAW_CACHE_SIZE, T0, THREAD_COUNT, VERSION, +}; +use massa_models::config::{ + MAX_MESSAGE_SIZE, POOL_CONTROLLER_DENUNCIATIONS_CHANNEL_SIZE, + POOL_CONTROLLER_ENDORSEMENTS_CHANNEL_SIZE, POOL_CONTROLLER_OPERATIONS_CHANNEL_SIZE, }; -use massa_models::config::MAX_MESSAGE_SIZE; use massa_pool_exports::{PoolChannels, PoolConfig, PoolManager}; use massa_pool_worker::start_pool_controller; use massa_pos_exports::{PoSConfig, SelectorConfig, SelectorManager}; @@ -498,7 +500,9 @@ async fn launch( max_operations_per_block: MAX_OPERATIONS_PER_BLOCK, max_operation_pool_size_per_thread: SETTINGS.pool.max_pool_size_per_thread, max_endorsements_pool_size_per_thread: SETTINGS.pool.max_pool_size_per_thread, - channels_size: POOL_CONTROLLER_CHANNEL_SIZE, + operations_channel_size: POOL_CONTROLLER_OPERATIONS_CHANNEL_SIZE, + endorsements_channel_size: POOL_CONTROLLER_ENDORSEMENTS_CHANNEL_SIZE, + denunciations_channel_size: POOL_CONTROLLER_DENUNCIATIONS_CHANNEL_SIZE, broadcast_enabled: SETTINGS.api.enable_broadcast, broadcast_endorsements_channel_capacity: SETTINGS .pool diff --git a/massa-pool-exports/src/config.rs b/massa-pool-exports/src/config.rs index 2fb6298cc5e..2a72cba04f9 100644 --- a/massa-pool-exports/src/config.rs +++ b/massa-pool-exports/src/config.rs @@ -25,8 +25,12 @@ pub struct PoolConfig { pub max_endorsements_pool_size_per_thread: usize, /// max number of endorsements per block pub max_block_endorsement_count: u32, - /// operations and endorsements communication channels size - pub channels_size: usize, + /// operations channel capacity + pub operations_channel_size: usize, + /// endorsements channel capacity + pub endorsements_channel_size: usize, + /// denunciations channel capacity + pub denunciations_channel_size: usize, /// whether operations broadcast is enabled pub broadcast_enabled: bool, /// endorsements channel capacity diff --git a/massa-pool-exports/src/test_exports/config.rs b/massa-pool-exports/src/test_exports/config.rs index 75079879e7f..b2dd058cce2 100644 --- a/massa-pool-exports/src/test_exports/config.rs +++ b/massa-pool-exports/src/test_exports/config.rs @@ -20,7 +20,9 @@ impl Default for PoolConfig { max_endorsements_pool_size_per_thread: 1000, max_operations_per_block: MAX_OPERATIONS_PER_BLOCK, max_block_endorsement_count: ENDORSEMENT_COUNT, - channels_size: 1024, + operations_channel_size: 1024, + endorsements_channel_size: 1024, + denunciations_channel_size: 1024, broadcast_enabled: false, broadcast_endorsements_channel_capacity: 2000, broadcast_operations_channel_capacity: 5000, diff --git a/massa-pool-worker/src/worker.rs b/massa-pool-worker/src/worker.rs index d24f2b78529..c9290c313ee 100644 --- a/massa-pool-worker/src/worker.rs +++ b/massa-pool-worker/src/worker.rs @@ -182,11 +182,12 @@ pub fn start_pool_controller( // denunciation_factory_tx: Sender, // denunciation_factory_rx: Receiver, ) -> (Box, Box) { - let (operations_input_sender, operations_input_receiver) = sync_channel(config.channels_size); + let (operations_input_sender, operations_input_receiver) = + sync_channel(config.operations_channel_size); let (endorsements_input_sender, endorsements_input_receiver) = - sync_channel(config.channels_size); + sync_channel(config.endorsements_channel_size); let (denunciations_input_sender, denunciations_input_receiver) = - sync_channel(config.channels_size); + sync_channel(config.denunciations_channel_size); let operation_pool = Arc::new(RwLock::new(OperationPool::init( config, storage,