diff --git a/massa-models/src/config/constants.rs b/massa-models/src/config/constants.rs index a85def35bb9..7bca220f017 100644 --- a/massa-models/src/config/constants.rs +++ b/massa-models/src/config/constants.rs @@ -191,9 +191,10 @@ pub const MAX_RNG_SEED_LENGTH: u32 = PERIODS_PER_CYCLE.saturating_mul(THREAD_COU // /// Max message size for bootstrap +/// Note: Update sizes are not limited, the 190Mb constant is to take them into account. pub const MAX_BOOTSTRAP_MESSAGE_SIZE: u32 = MAX_BOOTSTRAP_FINAL_STATE_PARTS_SIZE .saturating_add(MAX_BOOTSTRAP_VERSIONING_ELEMENTS_SIZE) - + 900_000_000; + .saturating_add(190_000_000_u32); /// The number of bytes needed to encode [`MAX_BOOTSTRAP_MESSAGE_SIZE`] pub const MAX_BOOTSTRAP_MESSAGE_SIZE_BYTES: usize = u32_be_bytes_min_length(MAX_BOOTSTRAP_MESSAGE_SIZE); @@ -210,9 +211,9 @@ pub const MAX_BOOTSTRAP_POS_CYCLES: u32 = 5; /// Max async pool changes pub const MAX_BOOTSTRAP_ASYNC_POOL_CHANGES: u64 = 100_000; /// Max bytes in final states parts -pub const MAX_BOOTSTRAP_FINAL_STATE_PARTS_SIZE: u32 = 1_000_000_000; +pub const MAX_BOOTSTRAP_FINAL_STATE_PARTS_SIZE: u32 = 100_000_000; /// Max bytes in final states parts -pub const MAX_BOOTSTRAP_VERSIONING_ELEMENTS_SIZE: u32 = 100_000_000; +pub const MAX_BOOTSTRAP_VERSIONING_ELEMENTS_SIZE: u32 = 10_000_000; /// Max size of the IP list pub const IP_LIST_MAX_SIZE: usize = 10000; /// Size of the random bytes array used for the bootstrap, safe to import diff --git a/massa-node/base_config/config.toml b/massa-node/base_config/config.toml index 6b1b2184586..039d8db23a2 100644 --- a/massa-node/base_config/config.toml +++ b/massa-node/base_config/config.toml @@ -375,9 +375,9 @@ # if ping is too high bootstrap will be interrupted after max_ping milliseconds max_ping = 10000 # timeout for incoming message readout - read_timeout = 180000 + read_timeout = 30000 # timeout for message sending - write_timeout = 180000 + write_timeout = 30000 # timeout for incoming error message readout read_error_timeout = 200 # timeout for message error sending