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
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# UNRELEASED

### feat: WASM memory soft-limit

Adds support for the `wasm_memory_limit` canister setting, which limits the canister's heap during most calls but does not affect queries. As with other canister settings, it can be set in `dfx canister create` or `dfx canister update-settings` via the `--wasm-memory-limit` flag, as well as in `dfx.json` under `canisters[].initialization_values.wasm_memory_limit`.

### feat: extensions can define a canister type

Please see [extension-defined-canister-types](docs/concepts/extension-defined-canister-types.md) for details.
Expand All @@ -21,12 +25,26 @@ This field accepts a relative path, from the directory containing the `dfx.json`

`dfx new` could fail with "Failed to scaffold frontend code" if node was installed but npm was not installed.

## Dependencies

### Cycles wallet

Updated cycles wallet to a gzipped version of `20240410` release:
- Module hash: `7745d3114e3e5fbafe8a7150a0a8c15a5b8dc9257f294d5ced67d41be76065bc`, in gzipped form: `664df1045e093084f4ebafedd3a793cc3b3be0a7ef1b245d8d3defe20b33057c`
- https://github.com/dfinity/cycles-wallet/commit/b013764dd827560d8538ee2b7be9ecf66bed6be7

### Replica

Updated replica to elected commit 63acf4f88b20ec0c6384f4e18f0f6f69fc5d9b9f.
This incorporates the following executed proposals:

- [129428](https://dashboard.internetcomputer.org/proposal/129428)
- [129427](https://dashboard.internetcomputer.org/proposal/129427)
- [129423](https://dashboard.internetcomputer.org/proposal/129423)
- [129408](https://dashboard.internetcomputer.org/proposal/129408)
- [129379](https://dashboard.internetcomputer.org/proposal/129379)
- [129378](https://dashboard.internetcomputer.org/proposal/129378)

# 0.20.0

### fix: set `CANISTER_CANDID_PATH_<canister name>` properly for remote canisters
Expand Down
46 changes: 40 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ license = "Apache-2.0"
[workspace.dependencies]
candid = "0.10.4"
candid_parser = "0.1.4"
ic-agent = { git = "https://github.com/dfinity/agent-rs.git", rev = "7840c34933fc509f443c3045c1c634201ad87e07" }
ic-agent = { git = "https://github.com/dfinity/agent-rs.git", rev = "dac18df939dd7e63295083a2a9b2d024cb9b0c71" }
ic-asset = { path = "src/canisters/frontend/ic-asset" }
ic-cdk = "0.13.1"
ic-identity-hsm = { git = "https://github.com/dfinity/agent-rs.git", rev = "7840c34933fc509f443c3045c1c634201ad87e07" }
ic-utils = { git = "https://github.com/dfinity/agent-rs.git", rev = "7840c34933fc509f443c3045c1c634201ad87e07" }
ic-identity-hsm = { git = "https://github.com/dfinity/agent-rs.git", rev = "dac18df939dd7e63295083a2a9b2d024cb9b0c71" }
ic-utils = { git = "https://github.com/dfinity/agent-rs.git", rev = "dac18df939dd7e63295083a2a9b2d024cb9b0c71" }

aes-gcm = "0.10.3"
anyhow = "1.0.56"
Expand Down
54 changes: 28 additions & 26 deletions docs/cli-reference/dfx-canister.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,28 +203,28 @@ Notably, the following Candid types map to strings rather than numbers: nat, nat

These are the mappings:

| Candid type | JSON type |
|-------------|-----------|
| `null` | `null` |
| `bool` | `boolean` |
| `nat` | `string` |
| `nat8` | `number` |
| `nat16` | `number` |
| `nat32` | `number` |
| `nat64` | `string` |
| `int` | `string` |
| `int8` | `number` |
| `int16` | `number` |
| `int32` | `number` |
| `int64` | `string` |
| `float32` | float or "NaN" |
| `float64` | float or "NaN" |
| `text` | `string` |
| Candid type | JSON type |
|-------------|----------------------------|
| `null` | `null` |
| `bool` | `boolean` |
| `nat` | `string` |
| `nat8` | `number` |
| `nat16` | `number` |
| `nat32` | `number` |
| `nat64` | `string` |
| `int` | `string` |
| `int8` | `number` |
| `int16` | `number` |
| `int32` | `number` |
| `int64` | `string` |
| `float32` | float or "NaN" |
| `float64` | float or "NaN" |
| `text` | `string` |
| `opt` | array with 0 or 1 elements |
| `vec` | array |
| `record` | object |
| `variant` | object |
| `blob` | array of numbers |
| `vec` | array |
| `record` | object |
| `variant` | object |
| `blob` | array of numbers |

## dfx canister create

Expand All @@ -250,10 +250,11 @@ You can use the following options with the `dfx canister create` command.
|-------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-c`, `--compute-allocation <allocation>` | Specifies the canister's compute allocation. This should be a percent in the range [0..100]. |
| `--controller <principal>` | Specifies the identity name or the principal of the new controller. |
| `--created-at-time <timestamp>` | Transaction timestamp, in nanoseconds, for use in controlling transaction deduplication, default is system time. https://internetcomputer.org/docs/current/developer-docs/integrations/icrc-1/#transaction-deduplication- |
| `--created-at-time <timestamp>` | Transaction timestamp, in nanoseconds, for use in controlling transaction deduplication, default is system time. https://internetcomputer.org/docs/current/developer-docs/integrations/icrc-1/#transaction-deduplication- |
| `--from-subaccount <subaccount>` | Subaccount of the selected identity to spend cycles from. |
| `--memory-allocation <memory>` | Specifies how much memory the canister is allowed to use in total. This should be a value in the range [0..12 GiB]. A setting of 0 means the canister will have access to memory on a “best-effort” basis: It will only be charged for the memory it uses, but at any point in time may stop running if it tries to allocate more memory when there isn’t space available on the subnet. |
| `--reserved-cycles-limit <limit>` | Specifies the upper limit for the canister's reserved cycles. |
| `--wasm-memory-limit <limit>` | Specifies a soft upper limit for the canister's heap memory. |
| `--no-wallet` | Performs the call with the user Identity as the Sender of messages. Bypasses the Wallet canister. Enabled by default. |
| `--with-cycles <number-of-cycles>` | Specifies the initial cycle balance to deposit into the newly created canister. The specified amount needs to take the canister create fee into account. This amount is deducted from the wallet's cycle balance. |
| `--specified-id <PRINCIPAL>` | Attempts to create the canister with this Canister ID |
Expand Down Expand Up @@ -385,10 +386,10 @@ You can use the following arguments with the `dfx canister deposit-cycles` comma

You can use the following options with the `dfx canister deposit-cycles` command.

| Option | Description |
|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--created-at-time <timestamp>` | Transaction timestamp, in nanoseconds, for use in controlling transaction deduplication, default is system time. https://internetcomputer.org/docs/current/developer-docs/integrations/icrc-1/#transaction-deduplication- |
| `--from-subaccount <subaccount>` | Subaccount of the selected identity to spend cycles from. |
| Option | Description |
|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--created-at-time <timestamp>` | Transaction timestamp, in nanoseconds, for use in controlling transaction deduplication, default is system time. https://internetcomputer.org/docs/current/developer-docs/integrations/icrc-1/#transaction-deduplication- |
| `--from-subaccount <subaccount>` | Subaccount of the selected identity to spend cycles from. |


### Examples
Expand Down Expand Up @@ -990,6 +991,7 @@ You can specify the following options for the `dfx canister update-settings` com
| `--set-controller <principal>` | Specifies the identity name or the principal of the new controller. Can be specified more than once, indicating the canister will have multiple controllers. If any controllers are set with this parameter, any other controllers will be removed. |
| `--memory-allocation <allocation>` | Specifies how much memory the canister is allowed to use in total. This should be a value in the range [0..12 GiB]. A setting of 0 means the canister will have access to memory on a “best-effort” basis: It will only be charged for the memory it uses, but at any point in time may stop running if it tries to allocate more memory when there isn’t space available on the subnet. |
| `--reserved-cycles-limit <limit>` | Specifies the upper limit of the canister's reserved cycles. |
| `--wasm-memory-limit <limit>` | Specifies a soft upper limit for the canister's heap memory. |
| `--remove-controller <principal>` | Removes a principal from the list of controllers of the canister. |
| `--freezing-threshold <seconds>` | Set the [freezing threshold](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-create_canister) in seconds for a canister. This should be a value in the range [0..2^64^-1]. Very long thresholds require the `--confirm-very-long-freezing-threshold` option. |
| `-y`, `--yes` | Skips yes/no checks by answering 'yes'. Such checks can result in loss of control, so this is not recommended outside of CI. |
Expand Down
Loading