Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bootstrap limits (again :) ) #4518

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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