Limitsalpha
Every numeric limit in moxzi's compiler, runtimes and on-chain builder.
Compiler#
| Limit | Value |
|---|
| Nesting depth of expressions and types | 128. Deeper nesting is a parse error |
Steps per build (--max-steps) | 5,000,000 by default |
| Nesting in code compiled in a browser tab | About 60 chained operators |
Native kernels#
See the Kernel ABI for the rules behind these.
| Limit | Value |
|---|
| Static data of the program, the runtime and every kernel in a canister, together | 512 KB |
| One scratch allocation by a kernel | 64 MiB |
| One kernel uploaded for an on-chain build | 1,900,000 bytes |
Every runtime#
These apply in moxzid, moxzi-web, actor platforms and games, so a program behaves the same in each.
| Limit | Value |
|---|
| Depth of a chain of self-calls | 512 |
| Queued messages between one sender and one receiver | 500 |
Debug.print lines kept per actor | 4096 |
| Wasm stack | 4 MiB |
| Best-effort call deadline | 300 seconds at most |
| Outcall response size, when the request doesn't set one | 2 MiB |
| Wasm module chunk size, and chunks per store | 1 MiB, 100 |
| Snapshots per canister | 10 |
Default wasm_memory_limit | 4 GiB |
These apply to runtimes built on moxzi-host. The compiler and game runtime retain the shared per-destination queue rule above without imposing this platform-level aggregate.
| Limit | Value |
|---|
| Successful outbound calls queued by one actor message, across all destinations | 1,024 by default; embedders may select another positive finite value |
Cycles charged off-chain#
The off-chain runtimes charge cycles at the Internet Computer's rates, so code that attaches cycles works the same way on mainnet.
| Item | Cycles |
|---|
| Message | 590,000 |
| Instructions | 4 per 10 |
| Creating a canister | 500,000,000,000 |
| HTTPS outcall | 400,000,000 plus 100,000 per byte |
| Threshold signature | 26,000,000,000 |
moxzid#
| Limit | Default |
|---|
Instructions per message (--instruction-limit) | 40,000,000,000 |
Starting cycles per actor (--cycles) | 100,000,000,000,000 |
| Request body, public actor and website routes | 8 MiB |
| Request body, authenticated control/service routes | 192 MiB |
Outcall time limit (--outcall-timeout-secs) | 30 seconds |
Outcall response body (--outcall-max-response-bytes) | 16 MiB host ceiling; 2 MiB actor default |
| Outcall request URL / body / transform context | 8 KiB / 2 MiB / 64 KiB |
| Outcall request or response headers | 128 fields and 64 KiB aggregate |
Recent messages kept per actor (--history) | 50 |
| Platform-image heap bytes | 1 GiB |
| Platform-image stable-memory bytes | 512 MiB |
| Platform-image decoded bytes | 1.5 GiB |
| Platform-image stored chunk bytes | 128 MiB |
| Platform-image metadata / patch bytes | 64 MiB each |
| Legacy whole-dedup decoded JSON | 16 MiB |
| Legacy outcomes / peers / outstanding call-context records | 32 / 64 / 65,536 |
There's no limit on the size of the state directory.
The image limits can be changed with the MOXZI_IMAGE_MAX_* variables documented in the host ABI. Images over a limit are retained by the platform and activation returns 413 resourceLimit; the actor stays inactive until the image is migrated or the operator raises the specific limit.
moxzi-web#
| Limit | Value |
|---|
Instructions per message, with meter: true | 40,000,000,000 by default |
Cost of meter: true | Modules about 20% larger; calls about 50% slower |
| HTTPS outcall response | 4 MiB channel ceiling; 2 MiB actor default |
| Actors per runtime | About 100, depending on their memory |
| Platform-image heap / stable-memory / decoded bytes | 256 MiB / 64 MiB / 320 MiB |
| Platform-image stored chunks / metadata / patches | 64 MiB / 16 MiB / 16 MiB |
| Legacy whole-dedup decoded JSON | 16 MiB |
| Legacy outcomes / peers / outstanding call-context records | 32 / 64 / 65,536 |
Cloudflare may override the complete browser image policy with MOXZI_IMAGE_LIMITS JSON. The legacy whole-dedup decode limit is fixed so malformed compressed metadata is rejected before JSON parsing. Oversized legacy records require offline migration to current dedup slots.
On-chain builder#
| Limit | Value |
|---|
| Uploaded files per caller | 64 MiB |
| Uploaded files, all callers | 1 GiB |
| Registered package storage | 256 MiB |
| Cached builds | 200 MiB |
| Stored build results | 100 MiB, oldest removed first |
| Escrow | 750,000 cycles per uploaded byte, at least 500,000,000,000 |
| Charge | 3× the cycles used, at most the escrow |
Internet Computer#
These are the IC's own limits, which on-chain builds and deployed canisters are subject to.
| Limit | Value |
|---|
| Instructions per update message | 40 billion |
| Instructions per query | 5 billion |
Instructions per install_code | 300 billion |
| Wasm memory (64-bit) | 6 GiB |
| Stable memory | 500 GiB |
| Ingress message size | 2 MiB |
| Inter-canister message size, same subnet | 10 MiB |
moxzi.game#
| Limit | Value |
|---|
Instructions per call into a game (--message-fuel) | 20,000,000 by default |
| Save file | 128 MiB |
| HUD labels | 64, 4096 bytes each, 16384 bytes in total |
| Sound cues per tick | 32 |
| Sound file | 16-bit PCM WAV, 10 seconds, 4 MiB |
| UI file | 256 KiB |