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

chore: Remove check wasm_memory_threshold > wasm_memory_limit when updating canister settings #3862

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
10 changes: 0 additions & 10 deletions rs/execution_environment/src/canister_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,16 +484,6 @@ pub(crate) fn validate_canister_settings(
}
}

if let Some(wasm_memory_limit) = settings.wasm_memory_limit() {
if let Some(wasm_memory_threshold) = settings.wasm_memory_threshold() {
if wasm_memory_threshold > wasm_memory_limit {
return Err(CanisterManagerError::InvalidSettings {
message: format!("Invalid settings: 'wasm_memory_threshold' cannot be larger than 'wasm_memory_limit'. 'wasm_memory_threshold': {}, 'wasm_memory_limit': {}", wasm_memory_threshold, wasm_memory_limit),
});
}
}
}

let new_memory_allocation = settings
.memory_allocation
.unwrap_or(canister_memory_allocation);
Expand Down
1 change: 0 additions & 1 deletion rs/nns/integration_tests/src/update_canister_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ fn test_update_canister_settings_proposal(
let target_memory_allocation = 1u64 << 33;
let target_compute_allocation = 10u64;
let target_freezing_threshold = 100_000u64;
// `target_wasm_memory_limit` needs to be larger than `target_wasm_memory_threshold`.
let target_wasm_memory_limit = 1u64 << 36;
let target_wasm_memory_threshold = 1u64 << 34;
let target_log_visibility = Some(LogVisibility::Public);
Expand Down