Skip to content

Commit

Permalink
Update bootstrap limits (again :) ) (#4518)
Browse files Browse the repository at this point in the history
* Decrease timeouts, decrease message_size

* Update message_max_size and comment for updates
  • Loading branch information
Leo-Besancon authored Nov 7, 2023
1 parent 43c0e4b commit 155c1ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions massa-models/src/config/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions massa-node/base_config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 155c1ab

Please sign in to comment.