0.21.0
feat: dfx killall
Introduced dfx killall
, a command for killing DFX-started processes.
feat!: remove support for bitcoin query API
dfx call --query aaaaa-aa bitcoin_get_balance_query/bitcoin_get_utxos_query
will result in an error.
fix: simplified log message when using the default shared network configuration
Now displays Using the default configuration for the local shared network.
instead of Using the default definition for the 'local' shared network because ~/.config/dfx/networks.json does not define it.
chore!: Improved error message about canister ranges when directly connecting to a node on a non-root subnet
feat: dfx start
for the shared local network stores replica state files in unique directories by options
The state files for different replica versions are often incompatible,
so dfx start
requires the --clean
argument in order to reset data when
using different replica versions or different replica options.
For the local shared network, dfx now stores replica state files in different
directories, split up by replica version and options.
As an example, you'll be able to do things like this going forward:
dfx +0.21.0 start
(cd project1 && dfx deploy && dfx canister call ...)
dfx stop
dfx +0.22.0 start
# notice --clean is not required.
# even if --clean were passed, the canisters for project1 would be unaffected.
(cd project2 && dfx deploy)
# project1 won't be affected unless you call dfx in its directory
dfx stop
dfx +0.21.0 start
# the canisters are still deployed
(cd project1 && dfx canister call ...)
Prior to this change, the second dfx start
would have had to include --clean
,
which would have reset the state of the shared local network, affecting all projects.
This also means dfx start
for the shared local network won't ever require you to pass --clean
.
dfx start
will delete old replica state directories. At present, it retains the 10 most recently used.
This doesn't apply to project-specific networks, and it doesn't apply with --pocketic
.
It doesn't apply to project-specific networks because the project's canister ids would
reset anyway on first access. If you run dfx start
in a project directory where dfx.json
defines the local network, you'll still be prompted to run with --clean
if using a
different replica version or different replica options.
It doesn't apply to --pocketic
because PocketIC does not yet persist any data.
feat: allow specifying encodings in .ic-assets.json
When uploading assets to an asset canister, dfx
by default uploads .txt
, .html
and .js
files in identity
encoding but also in gzip
encoding to the frontend canister if encoding saves bytes.
It is now possible to specify in .ic-assets.json
which encodings are used besides identity
.
Note that encodings are only used if the encoding saves bytes compared to identity
or if identity
is not a specified encoding.
Example: To turn off gzip
for .js
files and to turn on gzip
for .jpg
files, use this in .ic-assets.json
:
{
"match": "**/*.js",
"encodings": ["identity"]
},
{
"match": "**/*.jpg",
"encodings": ["identity", "gzip"]
}
feat: dfx canister url
Add dfx canister url
subcommand to display the url of a given canister. Basic usage as below:
dfx canister url <canister>
The <canister>
argument specifies the name or id of the canister for which you want to display the url.
feat: log_visibility
canister setting
Adds support for the log_visibility
canister setting, which configures which users are allowed to read a canister's logs.
Valid options are controllers
and public
. The setting can be used with the --log-visibility
flag in dfx canister create
and dfx canister update-settings
, or in dfx.json
under canisters[].initialization_values.log_visibility
.
Asset canister synchronization
feat: support brotli
encoding
Asset synchronization now not only supports identity
and gzip
, but also brotli
encoding.
The default encodings are still
identity
andgzip
for MIME types.txt
,.html
and.js
identity
for anything else
Dependencies
Frontend canister
fix!: URL decoding follows the whatwg standard
Previously, the frontend canister used custom logic to decode URLs.
The logic was replaced with a dependency that follows https://url.spec.whatwg.org/#percent-decode, which is what JavaScript's new Request("https://example.com/% $").url
also uses.
This also drops support for decoding %%
to %
. %
does no longer need to be encoded.
URLs that contain invalid encodings now return 400 Bad Request
instead of 500 Internal Server Error
- Module hash: 2cc4ec4381dee231379270a08403c984986c9fc0c2eaadb64488b704a3104cc0
- #3767
Replica
Updated replica to elected commit 246d0ce0784d9990c06904809722ce5c2c816269.
This incorporates the following executed proposals: