Releases: dfinity/sdk
0.15.2
fix: dfx canister delete <canister id>
removes the related entry from the canister id store
Previously, deleting a canister in the project by id rather than by name
would leave the canister id in the canister id store. This would cause
dfx deploy
to fail.
fix: dfx extension install can no longer create a corrupt cache directory
Running dfx cache delete && dfx extension install nns
would previously
create a cache directory containing only an extensions
subdirectory.
dfx only looks for the existence of a cache version subdirectory to
determine whether it has been installed. The end result was that later
commands would fail when the cache did not contain expected files.
fix: output_env_file is now considered relative to project root
The .env file location, whether specified as output_env_file
in dfx.json
or --output-env-file <file>
on the commandline, is now considered relative
to the project root, rather than relative to the current working directory.
feat: Read dfx canister install argument from a file
Enables passing large arguments that cannot be passed directly in the command line using the --argument-file
flag. For example dfx canister install --argument-file ./my/argument/file.txt my_canister_name
.
feat: change list_permitted
and list_authorized
to an update call.
This requires the list_authorized
and list_permitted
methods to be called as an update and disables the ability to
call it as a query call. This resolves a potential security risk.
fix: dfx ledger transfer
now logs to stderr messages about duplicates rather than printing them to stdout
The message "transaction is a duplicate of another transaction in block ...", previously printed to stdout, is now logged to stderr. This means that the output of dfx ledger transfer
to stdout will contain only "Transfer sent at block height ".
feat: accept more ways to specify cycle and e8s amounts
Underscores (_
) can now be used to make large numbers more readable. For example: dfx canister deposit-cycles 1_234_567 mycanister
Certain suffixes that replace a number of zeros are now supported. The (case-insensitive) suffixes are:
k
for000
, e.g.500k
m
for000_000
, e.g.5m
b
for000_000_000
, e.g.50B
t
for000_000_000_000
, e.g.0.3T
For cycles an additional c
or C
is also acceptable. For example: dfx canister deposit-cycles 3TC mycanister
feat: added dfx cycles
command
This won't work on mainnet yet, but can work locally after installing the cycles ledger.
Added the following subcommands:
dfx cycles balance
dfx cycles transfer <to> <amount>
(transfer cycles from one account to another account)dfx cycles top-up <to> <amount>
(send cycles from an account to a canister)
Dependencies
Motoko
Updated Motoko to 0.10.2
Frontend canister
Defining a custom etag
header no longer breaks certification.
Fixed a certification issue where under certain conditions the fallback file (/index.html
) was served with an incomplete certificate tree, not proving sufficiently that the fallback file may be used as a replacement.
Add the option to (re)set all permissions using upgrade arguments. This is especially useful for SNSes that cannot make calls as the canister's controller.
- Module hash: 657938477f1dee46db70b5a9f0bd167ec5ffcd2f930a1d96593c17dcddef61b3
- #3443
- #3451
- #3429
- #3428
- #3421
Replica
Updated replica to elected commit 69e1408347723dbaa7a6cd2faa9b65c42abbe861.
This incorporates the following executed proposals:
Bitcoin canister
Updated Bitcoin canister to release/2023-10-13
0.15.2-beta.3
fix: dfx canister delete <canister id>
removes the related entry from the canister id store
Previously, deleting a canister in the project by id rather than by name
would leave the canister id in the canister id store. This would cause
dfx deploy
to fail.
fix: dfx extension install can no longer create a corrupt cache directory
Running dfx cache delete && dfx extension install nns
would previously
create a cache directory containing only an extensions
subdirectory.
dfx only looks for the existence of a cache version subdirectory to
determine whether it has been installed. The end result was that later
commands would fail when the cache did not contain expected files.
fix: output_env_file is now considered relative to project root
The .env file location, whether specified as output_env_file
in dfx.json
or --output-env-file <file>
on the commandline, is now considered relative
to the project root, rather than relative to the current working directory.
feat: Read dfx canister install argument from a file
Enables passing large arguments that cannot be passed directly in the command line using the --argument-file
flag. For example dfx canister install --argument-file ./my/argument/file.txt my_canister_name
.
feat: change list_permitted
and list_authorized
to an update call.
This requires the list_authorized
and list_permitted
methods to be called as an update and disables the ability to
call it as a query call. This resolves a potential security risk.
fix: dfx ledger transfer
now logs to stderr messages about duplicates rather than printing them to stdout
The message "transaction is a duplicate of another transaction in block ...", previously printed to stdout, is now logged to stderr. This means that the output of dfx ledger transfer
to stdout will contain only "Transfer sent at block height ".
feat: accept more ways to specify cycle and e8s amounts
Underscores (_
) can now be used to make large numbers more readable. For example: dfx canister deposit-cycles 1_234_567 mycanister
Certain suffixes that replace a number of zeros are now supported. The (case-insensitive) suffixes are:
k
for000
, e.g.500k
m
for000_000
, e.g.5m
b
for000_000_000
, e.g.50B
t
for000_000_000_000
, e.g.0.3T
For cycles an additional c
or C
is also acceptable. For example: dfx canister deposit-cycles 3TC mycanister
feat: added dfx cycles
command
This won't work on mainnet yet, but can work locally after installing the cycles ledger.
Added the following subcommands:
dfx cycles balance
dfx cycles transfer <to> <amount>
(transfer cycles from one account to another account)dfx cycles top-up <to> <amount>
(send cycles from an account to a canister)
Dependencies
Motoko
Updated Motoko to 0.10.2
Frontend canister
Defining a custom etag
header no longer breaks certification.
Fixed a certification issue where under certain conditions the fallback file (/index.html
) was served with an incomplete certificate tree, not proving sufficiently that the fallback file may be used as a replacement.
Add the option to (re)set all permissions using upgrade arguments. This is especially useful for SNSes that cannot make calls as the canister's controller.
- Module hash: 657938477f1dee46db70b5a9f0bd167ec5ffcd2f930a1d96593c17dcddef61b3
- #3443
- #3451
- #3429
- #3428
- #3421
Replica
Updated replica to elected commit 69e1408347723dbaa7a6cd2faa9b65c42abbe861.
This incorporates the following executed proposals:
Bitcoin canister
Updated Bitcoin canister to release/2023-10-13
0.15.2-replicatest.0
test
0.15.2-beta.2
fix: dfx canister delete <canister id>
removes the related entry from the canister id store
Previously, deleting a canister in the project by id rather than by name
would leave the canister id in the canister id store. This would cause
dfx deploy
to fail.
fix: dfx extension install can no longer create a corrupt cache directory
Running dfx cache delete && dfx extension install nns
would previously
create a cache directory containing only an extensions
subdirectory.
dfx only looks for the existence of a cache version subdirectory to
determine whether it has been installed. The end result was that later
commands would fail when the cache did not contain expected files.
fix: output_env_file is now considered relative to project root
The .env file location, whether specified as output_env_file
in dfx.json
or --output-env-file <file>
on the commandline, is now considered relative
to the project root, rather than relative to the current working directory.
feat: Read dfx canister install argument from a file
Enables passing large arguments that cannot be passed directly in the command line using the --argument-file
flag. For example dfx canister install --argument-file ./my/argument/file.txt my_canister_name
.
feat: change list_permitted
and list_authorized
to an update call.
This requires the list_authorized
and list_permitted
methods to be called as an update and disables the ability to
call it as a query call. This resolves a potential security risk.
fix: dfx ledger transfer
now logs to stderr messages about duplicates rather than printing them to stdout
The message "transaction is a duplicate of another transaction in block ...", previously printed to stdout, is now logged to stderr. This means that the output of dfx ledger transfer
to stdout will contain only "Transfer sent at block height ".
feat: added dfx cycles
command
This won't work on mainnet yet, but can work locally after installing the cycles ledger.
Added the following subcommands:
dfx cycles balance
dfx cycles transfer <to> <amount>
(transfer cycles from one account to another account)dfx cycles top-up <to> <amount>
(send cycles from an account to a canister)
Dependencies
Motoko
Updated Motoko to 0.10.2
Frontend canister
Defining a custom etag
header no longer breaks certification.
Fixed a certification issue where under certain conditions the fallback file (/index.html
) was served with an incomplete certificate tree, not proving sufficiently that the fallback file may be used as a replacement.
Replica
Updated replica to elected commit 80a6745673a28ee53d257b3fe19dcd6b7efa93d1.
This incorporates the following executed proposals:
Bitcoin canister
Updated Bitcoin canister to release/2023-10-13
0.15.2-largewasms.1
Update CHANGELOG.md
0.15.2-largewasms.0
fix: deleting project canister by id will clean up canister id store.…
0.15.2-beta.1
feat: change list_permitted
and list_authorized
to an update call.
This requires the list_authorized
and list_permitted
methods to be called as an update and disables the ability to
call it as a query call. This resolves a potential security risk.
fix: dfx ledger transfer
now logs to stderr messages about duplicates rather than printing them to stdout
The message "transaction is a duplicate of another transaction in block ...", previously printed to stdout, is now logged to stderr. This means that the output of dfx ledger transfer
to stdout will contain only "Transfer sent at block height ".
feat: added dfx cycles
command
This won't work on mainnet yet, but can work locally after installing the cycles ledger.
Added the following subcommands:
dfx cycles balance
dfx cycles transfer <to> <amount>
(transfer cycles from one account to another account)dfx cycles top-up <to> <amount>
(send cycles from an account to a canister)
Dependencies
Motoko
Updated Motoko to 0.10.1
Frontend canister
Defining a custom etag
header no longer breaks certification.
Fixed a certification issue where under certain conditions the fallback file (/index.html
) was served with an incomplete certificate tree, not proving sufficiently that the fallback file may be used as a replacement.
Replica
Updated replica to elected commit 80a6745673a28ee53d257b3fe19dcd6b7efa93d1.
This incorporates the following executed proposals:
0.15.2-beta.0: chore: update replica version to 1e3f5401 (#3426)
feat: change list_permitted
and list_authorized
to an update call.
This requires the list_authorized
and list_permitted
methods to be called as an update and disables the ability to
call it as a query call. This resolves a potential security risk.
fix: dfx ledger transfer
now logs to stderr messages about duplicates rather than printing them to stdout
The message "transaction is a duplicate of another transaction in block ...", previously printed to stdout, is now logged to stderr. This means that the output of dfx ledger transfer
to stdout will contain only "Transfer sent at block height ".
feat: added dfx cycles
command
This won't work on mainnet yet, but can work locally after installing the cycles ledger.
Added the following subcommands:
dfx cycles balance
dfx cycles transfer <to> <amount>
(transfer cycles from one account to another account)dfx cycles top-up <to> <amount>
(send cycles from an account to a canister)
Dependencies
Motoko
Updated Motoko to 0.10.1
Frontend canister
- Module hash: 517d5117bb43236e1673627aacec3955a68072dcd95f0b0218e6155f75a4bb54
- #3421
Replica
Updated replica to elected commit 1e3f540180f15de4aae10a40257907dc47af8480.
This incorporates the following executed proposals:
0.15.1
dfx
feat: Added support for reserved_cycles and reserved_cycles_limit
dfx canister status
will now display the reserved cycles balance and reserved cycles limit for a canister.
Added command-line options:
dfx canister create --reserved-cycles-limit <limit>
dfx canister update-settings --reserved-cycles-limit <limit>
In addition, dfx deploy
will set reserved_cycles_limit
when creating canisters if specified in canisters.<canister>.initialization_values.reserved_cycles_limit
in dfx.json.
feat: emit management canister idl when imported by Motoko canister
import management "ic:aaaaa-aa;
This will automatically produce the idl in the .dfx
folder.
fix: Include remote canisters in canisters_to_generate
Generate frontend declarations for remote canisters too because frontend JS code may want to call them.
feat: dfx extension install --version
Install a specific version of an extension, bypassing version checks.
feat: Updated handling of missing values in state tree certificates
The Unknown
lookup of a path in a certificate results in an AgentError
(the IC returns Absent
for non-existing paths).
fix: dfx deploy urls printed for asset canisters
chore: --emulator parameter is deprecated and will be discontinued soon
Added warning that the --emulator
is deprecated and will be discontinued soon.
fix: node engines in starter
Updates node engines to reflect the same engines supported in agent-js.
"node": "^12 || ^14 || ^16 || >=17",
"npm": "^7.17 || >=8"
feat: deploy to playground
Introduced a new network type called playground
. Canisters on such networks are not created through standard means, but are instead borrowed from a canister pool.
The canisters time out after a while and new canisters need to be borrowed for further deployments.
To define custom playground networks, use a network definition that includes the playground
key:
"<network name>": {
"playground": {
"playground_canister": "<canister pool id>",
"timeout_seconds": <amount of seconds after which a canister is returned to the pool>
}
}
Introduced a new network that is available by default called playground
. Additionally, --playground
is an alias for --network playground
.
By default, this network targets the Motoko Playground backend to borrow canisters. The borrowed canisters will be available for 20 minutes, and the timer restarts on new deployments.
When the timer runs out the canister(s) will be uninstalled and are returned to the pool.
Any commands that allow choosing a target network (e.g. dfx canister call
) require --playground
or --network playground
in order to target the borrowed canister(s).
Use dfx deploy --playground
to deploy simple projects to a canister borrowed from the Motoko Playground.
feat: --ic
is shorthand for --network ic
For example, dfx deploy --ic
rather than dfx deploy --network ic
.
fix: Motoko base library files in cache are no longer executable
feat: dfx start
for shared network warns if ignoring 'defaults' in dfx.json
Background: In order to determine whether to start a project-specific network or the shared network, dfx start
looks for the local
network in dfx.json.
- If found,
dfx start
starts the project-specific local network, applying anydefaults
from dfx.json. - If there is no dfx.json, or if dfx.json does not define a
local
network,dfx start
starts the shared network. Because the shared network is not specific to any project,dfx start
ignores any other settings from dfx.json, includingdefaults
.
If dfx start
is starting the shared network from within a dfx project, and that dfx.json contains settings in the defaults
key for bitcoin
, replica
, or canister_http
, then dfx start
will warn that it is ignoring those settings. It will also describe how to define equivalent settings in networks.json.
fix: dfx canister call --wallet no longer passes the parameter twice
The parameter was erroneously passed twice. Now it is passed only once.
fix: Removed deprecation warning about project-specific networks
Removed this warning: "Project-specific networks are deprecated and will be removed after February 2023." While we may remove project-specific networks in the future, it is not imminent. One key requirement is the ability to run more than one subnet type at one time.
Dependencies
icx-proxy
Updated to a version of the icx-proxy that is released with the replica and other related binaries.
Changes in behavior:
- "%%" is no longer accepted when url-decoding filenames for the asset canister. Though curl supports this, it's not part of the standard. Please replace with %25.
- The icx-proxy now performs response verification. This has exposed some bugs in the asset canister. However, since this new icx-proxy matches what the boundary nodes use, this will better match the behavior seen on the mainnet.
- Bugs that this has exposed in the asset canister:
- after disabling aliasing for an asset, the asset canister will return an incorrect certification in the 404 response.
- after setting a custom "etag" header in .ic-assets.json, the asset canister will return an incorrect certification in the 200 response.
- assets with certain characters in the filename (example: "æ") will no longer be served correctly. The definition of "certain characters" is not yet known.
Candid UI
- Module hash: 934756863c010898a24345ce4842d173b3ea7639a8eb394a0d027a9423c70b5c
- Add
merge_init_args
method in Candid UI. - Draw flamegraph for canister upgrade.
Frontend canister
For certification v1, if none of the requested encoding are certified but another encoding is certified, then the frontend canister once again returns the certificatie even though the response hash won't match.
This allows the verifying side to try to transform the response such that it matches the response hash.
For example, if only the encoding gzip
is requested but the identity
encoding is certified, the gzip
encoding is returned with the certificate for the identity
encoding.
The verifying side can then unzip the response and will have a valid certificate for the identity
response.
Replica
Updated replica to elected commit 91bf38ff3cb927cb94027d9da513cd15f91a5b04.
This incorporates the following executed proposals:
0.15.1-beta.1: feat: add support for reserved_cycles and reserved_cycles_limit (#3404)
feat: Added support for reserved_cycles and reserved_cycles_limit
dfx canister status
will now display the reserved cycles balance and reserved cycles limit for a canister.
Added command-line options:
dfx canister create --reserved-cycles-limit <limit>
dfx canister update-settings --reserved-cycles-limit <limit>
In addition, dfx deploy
will set reserved_cycles_limit
when creating canisters if specified in canisters.<canister>.initialization_values.reserved_cycles_limit
in dfx.json.
feat: emit management canister idl when imported by Motoko canister
import management "ic:aaaaa-aa;
This will automatically produce the idl in the .dfx
folder.
fix: Include remote canisters in canisters_to_generate
Generate frontend declarations for remote canisters too because frontend JS code may want to call them.
feat: dfx extension install --version
Install a specific version of an extension, bypassing version checks.
feat: Updated handling of missing values in state tree certificates
The Unknown
lookup of a path in a certificate results in an AgentError
(the IC returns Absent
for non-existing paths).
fix: dfx deploy urls printed for asset canisters
chore: --emulator parameter is deprecated and will be discontinued soon
Added warning that the --emulator
is deprecated and will be discontinued soon.
fix: node engines in starter
Updates node engines to reflect the same engines supported in agent-js.
"node": "^12 || ^14 || ^16 || >=17",
"npm": "^7.17 || >=8"
feat: deploy to playground
Introduced a new network type called playground
. Canisters on such networks are not created through standard means, but are instead borrowed from a canister pool.
The canisters time out after a while and new canisters need to be borrowed for further deployments.
To define custom playground networks, use a network definition that includes the playground
key:
"<network name>": {
"playground": {
"playground_canister": "<canister pool id>",
"timeout_seconds": <amount of seconds after which a canister is returned to the pool>
}
}
Introduced a new network that is available by default called playground
. Additionally, --playground
is an alias for --network playground
.
By default, this network targets the Motoko Playground backend to borrow canisters. The borrowed canisters will be available for 20 minutes, and the timer restarts on new deployments.
When the timer runs out the canister(s) will be uninstalled and are returned to the pool.
Any commands that allow choosing a target network (e.g. dfx canister call
) require --playground
or --network playground
in order to target the borrowed canister(s).
Use dfx deploy --playground
to deploy simple projects to a canister borrowed from the Motoko Playground.
feat: --ic
is shorthand for --network ic
For example, dfx deploy --ic
rather than dfx deploy --network ic
.
fix: Motoko base library files in cache are no longer executable
feat: dfx start
for shared network warns if ignoring 'defaults' in dfx.json
Background: In order to determine whether to start a project-specific network or the shared network, dfx start
looks for the local
network in dfx.json.
- If found,
dfx start
starts the project-specific local network, applying anydefaults
from dfx.json. - If there is no dfx.json, or if dfx.json does not define a
local
network,dfx start
starts the shared network. Because the shared network is not specific to any project,dfx start
ignores any other settings from dfx.json, includingdefaults
.
If dfx start
is starting the shared network from within a dfx project, and that dfx.json contains settings in the defaults
key for bitcoin
, replica
, or canister_http
, then dfx start
will warn that it is ignoring those settings. It will also describe how to define equivalent settings in networks.json.
fix: dfx canister call --wallet no longer passes the parameter twice
The parameter was erroneously passed twice. Now it is passed only once.
fix: Removed deprecation warning about project-specific networks
Removed this warning: "Project-specific networks are deprecated and will be removed after February 2023." While we may remove project-specific networks in the future, it is not imminent. One key requirement is the ability to run more than one subnet type at one time.
Dependencies
icx-proxy
Updated to a version of the icx-proxy that is released with the replica and other related binaries.
Changes in behavior:
- "%%" is no longer accepted when url-decoding filenames for the asset canister. Though curl supports this, it's not part of the standard. Please replace with %25.
- The icx-proxy now performs response verification. This has exposed some bugs in the asset canister. However, since this new icx-proxy matches what the boundary nodes use, this will better match the behavior seen on the mainnet.
- Bugs that this has exposed in the asset canister:
- after disabling aliasing for an asset, the asset canister will return an incorrect certification in the 404 response.
- after setting a custom "etag" header in .ic-assets.json, the asset canister will return an incorrect certification in the 200 response.
- assets with certain characters in the filename (example: "æ") will no longer be served correctly. The definition of "certain characters" is not yet known.
Candid UI
- Module hash: 934756863c010898a24345ce4842d173b3ea7639a8eb394a0d027a9423c70b5c
- Add
merge_init_args
method in Candid UI. - Draw flamegraph for canister upgrade.
Frontend canister
For certification v1, if none of the requested encoding are certified but another encoding is certified, then the frontend canister once again returns the certificatie even though the response hash won't match.
This allows the verifying side to try to transform the response such that it matches the response hash.
For example, if only the encoding gzip
is requested but the identity
encoding is certified, the gzip
encoding is returned with the certificate for the identity
encoding.
The verifying side can then unzip the response and will have a valid certificate for the identity
response.
Updated replica to elected commit 91bf38ff3cb927cb94027d9da513cd15f91a5b04.
This incorporates the following executed proposals: