Skip to content

Releases: dfinity/sdk

0.25.0-beta.0

29 Jan 23:09
85e9b9f
Compare
Choose a tag to compare
0.25.0-beta.0 Pre-release
Pre-release

0.25.0-beta.0

fix: correctly detects hyphenated Rust bin crates

fix: removes unnecessary tsc step in sveltekit build script

feat!: dfx info pocketic-config-port

Due to the incompatibility between the APIs on the replica port and the PocketIC port, dfx info replica-port
no longer works with PocketIC, and the PocketIC port is provided by a new command, dfx info pocketic-config-port.

feat: streamlined dfx new output

test: adds playwright tests for dfx new project frontends

The first of a suite of baseline tests to automate testing starter projects. Makes sure that sveltekit, react, vue, and vanilla frontends are compatible with other dfx or asset canister changes.

fix: template frontends now have unsupported browser warnings

DFX's default security headers cause Safari to break when viewing local canisters. Warning messages
have been added to the frontend project templates when the page is broken that indicate to try switching
browsers.

feat: impersonating sender of requests to a local PocketIC instance

dfx canister call, dfx canister status, and dfx canister update-settings take
an additional CLI argument --impersonate to specify a principal
on behalf of which requests to a local PocketIC instance are sent.

feat: dfx canister [create|update-settings] --wasm-memory-threshold

This adds support for the WASM memory threshold, used in conjunction with --wasm-memory-limit.
When the remaining memory until the limit falls below the threshold, the canister's
on_low_wasm_memory handler is run.

fix: dfx deploy --by-proposal no longer sends chunk data in ProposeCommitBatch

Recently we made dfx deploy include some chunk data in CommitBatch, in order to streamline
deploys for smaller projects. dfx deploy splits up larger change lists and submits them in
smaller batches, in order to remain within message and compute limits.

This change also applied to dfx deploy --by-proposal, which submits all changes in a single
message. This made it more likely that dfx deploy --by-proposal will fail due to exceeding
message limits.

This fix makes it so dfx deploy --by-proposal never includes this chunk data in
ProposeCommitBatch, which will allow for more changes before hitting message limits.

feat: dfx start --pocketic supports --force and shared networks.

dfx start --pocketic is now compatible with --force and shared networks.

feat: error when using insecure identity on mainnet

This used to be a warning. A hard error can abort the command so that no insecure state will be on the mainnet.

Users can suppress this error by setting export DFX_WARNING=-mainnet_plaintext_identity.

The warning won't display when executing commands like dfx deploy --playground.

feat: support --replica in dfx start

Added a flag --replica to dfx start. This flag currently has no effect.
Once PocketIC becomes the default for dfx start this flag will start the replica instead.
You can use the --replica flag already to write scripts that anticipate that change.

feat: extensions can define project templates

An extension can define one or more project templates for dfx new to use.
These can be new templates or replace the built-in project templates.

fix: all commands with --all parameter skip remote canisters

This affects the following commands:

  • dfx canister delete
  • dfx canister deposit-cycles
  • dfx canister start
  • dfx canister status
  • dfx canister stop
  • dfx canister uninstall-code
  • dfx canister update-settings
  • dfx ledger fabricate-cycles

fix: dfx can deploy canisters to playground networks that have Motoko EOP enabled

Canisters with Motoko's Enhanced Orthogonal Persistence feature require wasm_memory_persistence = Keep when they get installed.
Previously, when dfx attempted to install canisters with EOP enabled to a playground it didn't set wasm_memory_persistence properly.

fix: custom canisters with a read-only wasm no longer fail to build with a permissions error

chore: improve dfx deploy messages.

If users run dfx deploy without enough cycles, show additional messages to indicate what to do next.

Error explanation:
Insufficient cycles balance to create the canister.
How to resolve the error:
Please top up your cycles balance by converting ICP to cycles like below:
'dfx cycles convert --amount=0.123'.

If users run dfx deploy --playground but the backend is not updated with the latest frontend canister wasm
the error message will explain this properly and recommends asking for help on the forum since this can't be resolved by users.

chore: improve dfx cycles convert messages.

If users run dfx cycles convert without enough ICP tokens, show additional messages to indicate what to do next.

Error explanation:
Insufficient ICP balance to finish the transfer transaction.
How to resolve the error:
Please top up your ICP balance.

Your account address for receiving ICP from centralized exchanges: 8494c01329531c06254ff45dad87db806ae6ed935ad6a504cdbc00a935db7b49
(run `dfx ledger account-id` to display)

Your principal for ICP wallets and decentralized exchanges: ueuar-wxbnk-bdcsr-dnrh3-rsyq6-ffned-h64ox-vxywi-gzawf-ot4pv-sqe
(run `dfx identity get-principal` to display)

feat: Add pre-install tasks

Add pre-install tasks, which can be defined by the new pre-install key for canister objects in dfx.json with a command or list of commands.

chore: Warn when the 'canister_ids.json' file is first generated for persistent networks.

Warn when the 'canister_ids.json' file is first generated for persistent networks.

dfx deploy --network ic
...
test_backend canister created on network ic with canister id: j36qm-pqaaa-aaaan-qzqya-cai
WARN: The "/home/sdk/repos/test/canister_ids.json" file has been generated. Please make sure you store it correctly, e.g., submitting it to a GitHub repository.
Building canisters...
...

chore: Provides units for all fields of canister status.

Provides units for all fields of canister status.

$ dfx canister status pxmfj-jaaaa-aaaan-qmmbq-cai --ic
Canister status call result for pxmfj-jaaaa-aaaan-qmmbq-cai.
Status: Running
Controllers: uom2z-lqsqq-qbn4p-nts4l-2xjfl-oeivu-oso42-4t4jh-54ikd-ewnvi-tqe yjac5-2yaaa-aaaan-qaqka-cai
Memory allocation: 0 Bytes
Compute allocation: 0 %
Freezing threshold: 2_592_000 Seconds
Idle cycles burned per day: 20_548_135 Cycles
Memory Size: 2_010_735 Bytes
Balance: 2_985_407_678_380 Cycles
Reserved: 0 Cycles
Reserved cycles limit: 5_000_000_000_000 Cycles
Wasm memory limit: 3_221_225_472 Bytes
Wasm memory threshold: 0 Bytes
Module hash: 0x4f13cceb571483ac99a9f89afc05718c0a4ab72e9fac7d49054c0a3e05c4899b
Number of queries: 0
Instructions spent in queries: 0
Total query request payload size: 0 Bytes
Total query response payload size: 0 Bytes
Log visibility: controllers

feat!: Print error traces only in verbose (-v) mode or if no proper error message is available

chore: Add Schnorr types and methods to management canister IDL

Dependencies

Frontend canister

fix: 'unreachable' error when trying to upgrade an asset canister with over 1GB data

The asset canister now estimates the size of the data to be serialized to stable memory,
and reserves that much space for the ValueSerializer's buffer.

  • Module hash: bba3181888f3c59b4a5f608aedef05be6fa37276fb7dc394cbadf9cf6e10359b
  • #4036

Motoko

Updated Motoko to 0.13.6

Replica

Updated replica to elected commit 4ba583480e05a518aa2bcf36f5a0e48475e8edc2.
This incorporates the following executed proposals:

0.24.3

02 Dec 01:19
3869ae4
Compare
Choose a tag to compare

0.24.3

feat: Bitcoin support in PocketIC

dfx start --pocketic is now compatible with --bitcoin-node and --enable-bitcoin.

feat: facade pull ICP, ckBTC, ckETH ledger canisters

The ledger canisters can be pulled even though they are not really "pullable".
The metadata like wasm_url and init_guide are hardcoded inside dfx deps pull logic.

  • ICP ledger: ryjl3-tyaaa-aaaaa-aaaba-cai
  • ckBTC ledger: mxzaz-hqaaa-aaaar-qaada-cai
  • ckETH ledger: ss2fx-dyaaa-aaaar-qacoq-cai

chore: update agent version in frontend templates, and include resolve.dedupe in Vite config

chore: improve error message when trying to use the local replica when it is not running

Frontend canister

Allow setting permissions lists in init arguments just like in upgrade arguments.

  • Module hash: 2c24b5e1584890a7965011d5d1d827aca68c489c9a6308475730420fa53372e8
  • #3965

Candid UI

  • Module hash: f45db224b40fac516c877e3108dc809d4b22fa42d05ee8dfa5002536a3a3daed
  • Bump agent-js to fix error code

chore!: improve the messages for the subcommands of dfx cycles.

If users run subcommands of dfx cycles without the --ic flag, show below messages to indicate what to do next.

Error explanation:
Cycles ledger with canister ID 'um5iw-rqaaa-aaaaq-qaaba-cai' is not installed.
How to resolve the error:
Run the command with '--ic' flag if you want to manage the cycles on the mainnet.

chore: improve dfx start messages.

For dfx start, show below messages to users to indicate what to do next.

Success! The dfx server is running.
You must open a new terminal to continue developing. If you'd prefer to stop, quit with 'Ctrl-C'.

Dependencies

Motoko

Updated Motoko to 0.13.4

Replica

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

0.24.3-beta.0

15 Nov 20:02
46418e5
Compare
Choose a tag to compare
0.24.3-beta.0 Pre-release
Pre-release

feat: Bitcoin support in PocketIC

dfx start --pocketic is now compatible with --bitcoin-node and --enable-bitcoin.

feat: facade pull ICP, ckBTC, ckETH ledger canisters

The ledger canisters can be pulled even though they are not really "pullable".
The metadata like wasm_url and init_guide are hardcoded inside dfx deps pull logic.

  • ICP ledger: ryjl3-tyaaa-aaaaa-aaaba-cai
  • ckBTC ledger: mxzaz-hqaaa-aaaar-qaada-cai
  • ckETH ledger: ss2fx-dyaaa-aaaar-qacoq-cai

chore: update agent version in frontend templates, and include resolve.dedupe in Vite config

chore: improve error message when trying to use the local replica when it is not running

Frontend canister

Allow setting permissions lists in init arguments just like in upgrade arguments.

  • Module hash: 2c24b5e1584890a7965011d5d1d827aca68c489c9a6308475730420fa53372e8
  • #3965

Candid UI

  • Module hash: f45db224b40fac516c877e3108dc809d4b22fa42d05ee8dfa5002536a3a3daed
  • Bump agent-js to fix error code

chore!: improve the messages for the subcommands of dfx cycles.

If users run subcommands of dfx cycles without the --ic flag, show below messages to indicate what to do next.

Error explanation:
Cycles ledger with canister ID 'um5iw-rqaaa-aaaaq-qaaba-cai' is not installed.
How to resolve the error:
Run the command with '--ic' flag if you want to manage the cycles on the mainnet.

chore: improve dfx start messages.

For dfx start, show below messages to users to indicate what to do next.

Success! The dfx server is running.
You must open a new terminal to continue developing. If you'd prefer to stop, quit with 'Ctrl-C'.

Dependencies

Motoko

Updated Motoko to 0.13.3

Replica

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

0.24.2

14 Nov 20:28
b86e965
Compare
Choose a tag to compare

0.24.2

feat: all commands will use the DFX_NETWORK from the environment

If DFX_NETWORK is set in the environment, all commands will use that network by default.
The --network parameter will take precedence if provided.

fix: dfx generate now honors the --network parameter

This fixes an issue where dfx deploy --playground would fail if the project
had not been previously built for the local network.

feat: Support canister log allowed viewer list

Added support for the canister log allowed viewer list, enabling specified users to access a canister's logs without needing to be set as the canister's controller.
Valid settings are:

  • --add-log-viewer, --remove-log-viewer and --set-log-viewer flags with dfx canister update-settings
  • --log-viewer flag with dfx canister create
  • canisters[].initialization_values.log_visibility.allowed_viewers in dfx.json

feat: batch upload assets

The frontend canister sync now tries to batch multiple small content chunks into a single call using the create_chunks method added earlier.
And for small amounts of uploaded data the asset sync can now skip chunk creation entirely.
This should lead to significantly faster upload times for frontends with many small files.

Dependencies

Motoko

Updated Motoko to 0.13.2

Frontend canister

SetAssetContentArguments has a new field last_chunk: opt blob which can be used in addition to chunk_ids so that small assets can be uploaded as part of commit_batch,
skipping the need to await a separate create_chunk call.

Bumped api_version to 2 for the previous addition of create_chunks since the improved file sync relies on it.

  • Module hash: 296d1ad1a7f8b15f90ff8b728658646b649cabd159f360f1b427297f4c76763e
  • #3954
  • #3947

0.24.2-beta.0

23 Oct 14:17
3969afb
Compare
Choose a tag to compare
0.24.2-beta.0 Pre-release
Pre-release

What's Changed

feat: Support canister log allowed viewer list

Added support for the canister log allowed viewer list, enabling specified users to access a canister's logs without needing to be set as the canister's controller.
Valid settings are:

  • --add-log-viewer, --remove-log-viewer and --set-log-viewer flags with dfx canister update-settings
  • --log-viewer flag with dfx canister create
  • canisters[].initialization_values.log_visibility.allowed_viewers in dfx.json

feat: batch upload assets

The frontend canister sync now tries to batch multiple small content chunks into a single call using the create_chunks method added earlier.
And for small amounts of uploaded data the asset sync can now skip chunk creation entirely.
This should lead to significantly faster upload times for frontends with many small files.

Dependencies

Motoko

Updated Motoko to 0.13.2

Frontend canister

SetAssetContentArguments has a new field last_chunk: opt blob which can be used in addition to chunk_ids so that small assets can be uploaded as part of commit_batch,
skipping the need to await a separate create_chunk call.

Bumped api_version to 2 for the previous addition of create_chunks since the improved file sync relies on it.

  • Module hash: 296d1ad1a7f8b15f90ff8b728658646b649cabd159f360f1b427297f4c76763e
  • #3954
  • #3947

Commits

Read more

0.24.1

22 Oct 20:01
806f064
Compare
Choose a tag to compare

feat: More PocketIC flags supported

dfx start --pocketic is now compatible with --artificial-delay and the subnet_type configuration option, and enables --enable-canister-http by default.

Dependencies

Frontend canister

feat: Better error messages when proposing a batch

Add the batch id in the error messages of propose_commit_batch.

Module hash: 2c9e30df9be951a6884c702a97bbb8c0b438f33d4208fa612b1de6fb1752db76

Motoko

Updated Motoko to 0.13.1

Replica

Updated replica to elected commit 0a6d829cddc1534c29e0d2c3c3ebd1024bff8d1a.

This includes the following notable features for local dev replicas:

This incorporates the following elected proposals:

Candid UI

Module hash 15da2adc4426b8037c9e716b81cb6a8cf1a835ac37589be2cef8cb3f4a04adaa

0.24.1-beta.1

10 Oct 19:04
9ce1222
Compare
Choose a tag to compare
0.24.1-beta.1 Pre-release
Pre-release

Dependencies

Motoko

Updated Motoko to 0.13.1

Replica

Updated replica to elected commit 0a6d829cddc1534c29e0d2c3c3ebd1024bff8d1a.

This incorporates the following elected proposals:

0.24.1-beta.0

01 Oct 16:10
5ce503b
Compare
Choose a tag to compare
0.24.1-beta.0 Pre-release
Pre-release

feat: More PocketIC flags supported

dfx start --pocketic is now compatible with --artificial-delay and the subnet_type configuration option, and enables --enable-canister-http by default.

Dependencies

Frontend canister

feat: Better error messages when proposing a batch

Add the batch id in the error messages of propose_commit_batch.

Module hash: 2c9e30df9be951a6884c702a97bbb8c0b438f33d4208fa612b1de6fb1752db76

Motoko

Updated Motoko to 0.13.0

Replica

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

Candid UI

Module hash 15da2adc4426b8037c9e716b81cb6a8cf1a835ac37589be2cef8cb3f4a04adaa

0.24.0

01 Oct 11:41
43ba7b1
Compare
Choose a tag to compare

fix: bumps sveltekit starter dependency versions to prevent typescript config error

feat: expose canister upgrade options in CLI

dfx canister install and dfx deploy takes options --skip-pre-upgrade and --wasm-memory-persistence.

dfx deploy --mode now takes the same possible values as dfx canister install --mode: "install", "reinstall", "upgrade" and "auto".

In "auto" mode, the upgrade options are hints which only take effects when the actual install mode is "upgrade".

To maintain backward compatibility, a minor difference between the two commands remains.
If the --mode is not set, dfx deploy defaults to "auto", while dfx canister install defaults to "install".

feat: Also report Motoko stable compatibility warnings

Report upgrade compatibility warnings for Motoko, such as deleted stable variables, in addition to compatibility errors.

feat: Support for Motoko's enhanced orthogonal persistence.

Support Motoko's enhanced orthogonal persistence by automatically setting the canister upgrade option wasm_memory_persistence based on the Wasm metadata.

feat: PocketIC state

dfx start --pocketic no longer requires --clean, and can persist replica state between runs.

fix: Scripts always run with current directory set to the project root

Build scripts and other scripts now always run with the working directory
set to the project root (directory containing dfx.json).

This applies to the following:

  • build scripts
  • extension run
  • tech stack value computation
  • packtool (vessel, mops etc)

feat: dfx extension list supports listing available extensions

dfx extension list now support --available flag to list available extensions from the
extension catalog.
The extension catalog can be overridden with the --catalog-url parameter.

Dependencies

Frontend canister

Added create_chunks. It has the same behavior as create_chunk, except that it takes a vec blob and returns a vec BatchId instead of non-vec variants.

Module hash: 3a533f511b3960b4186e76cf9abfbd8222a2c507456a66ec55671204ee70cae3

Motoko

Updated Motoko to 0.12.1

0.24.0-beta.0

12 Sep 10:10
0425117
Compare
Choose a tag to compare
0.24.0-beta.0 Pre-release
Pre-release

fix: bumps sveltekit starter dependency versions to prevent typescript config error

feat: expose canister upgrade options in CLI

dfx canister install and dfx deploy takes options --skip-pre-upgrade and --wasm-memory-persistence.

dfx deploy --mode now takes the same possible values as dfx canister install --mode: "install", "reinstall", "upgrade" and "auto".

In "auto" mode, the upgrade options are hints which only take effects when the actual install mode is "upgrade".

To maintain backward compatibility, a minor difference between the two commands remains.
If the --mode is not set, dfx deploy defaults to "auto", while dfx canister install defaults to "install".

feat: Also report Motoko stable compatibility warnings

Report upgrade compatibility warnings for Motoko, such as deleted stable variables, in addition to compatibility errors.

feat: Support for Motoko's enhanced orthogonal persistence.

Support Motoko's enhanced orthogonal persistence by automatically setting the canister upgrade option wasm_memory_persistence based on the Wasm metadata.

feat: PocketIC state

dfx start --pocketic no longer requires --clean, and can persist replica state between runs.

fix: Scripts always run with current directory set to the project root

Build scripts and other scripts now always run with the working directory
set to the project root (directory containing dfx.json).

This applies to the following:

  • build scripts
  • extension run
  • tech stack value computation
  • packtool (vessel, mops etc)

feat: dfx extension list supports listing available extensions

dfx extension list now support --available flag to list available extensions from the
extension catalog.
The extension catalog can be overridden with the --catalog-url parameter.

Dependencies

Frontend canister

Added create_chunks. It has the same behavior as create_chunk, except that it takes a vec blob and returns a vec BatchId instead of non-vec variants.

Module hash: 3a533f511b3960b4186e76cf9abfbd8222a2c507456a66ec55671204ee70cae3

Motoko

Updated Motoko to 0.12.1