Skip to content

fix: introduce maximum wasm_memory_threshold - #10574

Merged
mraszyk merged 1 commit into
masterfrom
mraszyk/max-wasm-memory-threshold
Jun 26, 2026
Merged

mraszyk merged 1 commit into
masterfrom
mraszyk/max-wasm-memory-threshold

Conversation

@mraszyk

@mraszyk mraszyk commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

This PR introduces a maximum allowed value for wasm_memory_threshold, analogously to wasm_memory_limit which also restricts (with a different semantics) wasm memory usage and thus using the same maximum allowed value makes sense.

@github-actions github-actions Bot added the fix label Jun 26, 2026
@mraszyk
mraszyk marked this pull request as ready for review June 26, 2026 11:03
@mraszyk
mraszyk requested a review from a team as a code owner June 26, 2026 11:03
@zeropath-ai

zeropath-ai Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to f71ad40.

Security Overview
Detected Code Changes
Change Type Relevant files
Enhancement ► packages/ic-management-canister-types/src/lib.rs
    Update wasm_memory_threshold description to reflect 248 limit
► rs/execution_environment/src/canister_settings.rs
    Define MAX_WASM_MEMORY_THRESHOLD constant
    Enforce MAX_WASM_MEMORY_THRESHOLD in TryFrom implementation
    Update error message for WasmMemoryThresholdOutOfRange
► rs/execution_environment/tests/hypervisor.rs
    Add test for wasm_memory_threshold exceeding 256TB
► rs/test_utilities/execution_environment/src/lib.rs
    Add canister_update_wasm_memory_threshold helper method

@mraszyk
mraszyk added this pull request to the merge queue Jun 26, 2026
Merged via the queue into master with commit 8501c0b Jun 26, 2026
64 of 68 checks passed
@mraszyk
mraszyk deleted the mraszyk/max-wasm-memory-threshold branch June 26, 2026 11:28
mraszyk added a commit to dfinity/developer-docs that referenced this pull request Jul 6, 2026
This PR updates the maximum allowed value for wasm_memory_threshold to
match that of wasm_memory_limit which also restricts (with a different
semantics) wasm memory usage and thus using the same maximum allowed
value makes sense. Both values are now specified to be up to `2^{48}`
bytes (256 TiB), reflecting the replica
[PR](dfinity/ic#10574) for
`wasm_memory_threshold` and the actual maximum allowed value for
`wasm_memory_limit` already in place (`2^{48}` bytes rather than
`2^{48}-1` bytes).
pull Bot pushed a commit to mikeyhodl/ic that referenced this pull request Aug 12, 2026
…ity#11119)

The `status_visibility` canister setting (introduced in dfinity#10667) was only
available in the internal `ic-management-canister-types-private` crate.
Add it to the public crate as well: the `StatusVisibility` type, the
fields on `CanisterSettings` and `DefiniteCanisterSettings`, and the
corresponding entries in `tests/ic.did`.

Also complete the unreleased changelog, which was missing the
`minimum_incoming_canister_call_cycles` field (dfinity#10398) and the tightened
`wasm_memory_threshold` bound (dfinity#10574).

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants