Skip to content
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: 7 additions & 3 deletions docs/concepts/build-deploy-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ When deploying a canister for the first time:
When the canister already exists:

1. The existing canister is located by ID
2. New WASM code is **upgraded** (preserving stable memory)
3. Settings are updated if changed
2. The canister is **stopped** (waits for in-flight messages to finish)
3. New WASM code is **upgraded** (preserving stable memory)
4. The canister is **started** again
5. Settings are updated if changed

Stopping the canister before upgrading ensures no messages are being processed during the code swap, preventing potential data inconsistencies.

## Sync Phase

Expand Down Expand Up @@ -158,7 +162,7 @@ The `icp deploy` command is a composite command that executes multiple steps in
**Subsequent deployments:**
- Skip the canister creation
- Settings and Canister Environment Variables are applied if they've changed.
- WASM code is upgraded, preserving canister state
- Canisters are stopped, WASM code is upgraded (preserving canister state), then canisters are restarted

Unlike `icp canister create` (which prints "already exists" and exits), `icp deploy` silently skips creation for existing canisters and continues with the remaining steps.

Expand Down
19 changes: 19 additions & 0 deletions docs/reference/canister-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,24 @@ settings:
wasm_memory_threshold: 512mib
```

### log_memory_limit

Maximum memory for storing canister logs. Oldest logs are purged when usage exceeds this limit.

| Property | Value |
|----------|-------|
| Type | Integer or string with suffix |
| Unit | Bytes (accepts suffixes) |
| Max | 2 MiB |
| Default | 4096 bytes |

```yaml
settings:
log_memory_limit: 2mib
```

Memory values accept suffixes: `kb` (1,000), `kib` (1,024), `mb` (1,000,000), `mib` (1,048,576). Raw byte counts are also accepted.

### log_visibility

Controls who can read canister logs.
Expand Down Expand Up @@ -176,6 +194,7 @@ canisters:
wasm_memory_limit: 1gib
wasm_memory_threshold: 512mib
log_visibility: controllers
log_memory_limit: 2mib
environment_variables:
ENV: "production"
API_BASE_URL: "https://api.example.com"
Expand Down
10 changes: 9 additions & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ You should see: `("Hello, World!")`

The argument format `'("World")'` is [Candid](https://docs.internetcomputer.org/building-apps/interact-with-canisters/candid/candid-concepts) — the interface description language for the Internet Computer.

### Interactive Arguments
### Interactive Mode

Don't want to type Candid manually? Omit the argument and icp-cli will prompt you interactively:

Expand All @@ -160,6 +160,14 @@ icp canister call backend greet

You'll see a prompt asking for the `name` parameter — just type `World` and press Enter. This works for any method with any argument types, making it easy to explore canister APIs without memorizing Candid syntax.

You can also omit the method name to get an interactive method picker:

```bash
icp canister call backend
```

This lists all available methods on the canister and lets you select one, which is handy when you're exploring an unfamiliar canister.

## Stop the Network

When you're done:
Expand Down
Loading