Skip to content

0.14.2

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Jun 18:44
· 561 commits to master since this release
3817fde

DFX

feat: deprecate dfx bootstrap and dfx replica commands

Please use dfx start instead, which is a combination of the two commands.

If you have a good reason why we should keep these commands, please contribute to the discussion at https://github.com/dfinity/sdk/discussions/3163

feat: add optional custom build command for asset canisters

The custom build command can be set in dfx.json the same way it is set for custom type canisters. If the command is not provided, DFX will fallback to the default npm run build command.

{
  "canisters": {
    "ui": {
      "type": "assets",
      "build": ["<custom build command>"]
    }
  }
}

fix: Diagnose duplicate assets and display upgrade steps

If dfx deploy detects duplicate assets in the dist/ and frontend assets/ directories, it will now suggest upgrade steps.

fix: motoko canisters can import other canisters with service constructor

After specific canister builder output wasm and candid file, dfx will do some post processing on the candid file.

The complete IDL will be copied into .dfx folder with name constructor.did.
It will be used for type checking during canister installation.

Then it is separated into two parts: service.did and init_args.txt, corresponding to canister metadata candid:service and candid:args.

service.did will be imported during dependent canisters building. And it will also be used by the Motoko LSP to provide IDE support.

fix: dfx start now respects the network replica port configuration in dfx.json or networks.json

Frontend canister

NOTE: We've disabled response verification v2 in the asset canister while we improve test coverage.

The redirect from .raw.ic0.app now redirects to .ic0.app instead of .icp0.io

The validate_commit_proposed_batch() method no longer requires any permission to call.

The asset canister now enforces limits during upload. These limits to not apply to assets already uploaded.

Unconditional limits:

  • create_batch() now fails if dfx deploy --by-proposal got as far as calling propose_commit_batch(), and the batch has not since been committed or deleted.

Configurable limits:

  • max_batches: limits number of batches being uploaded.
  • max_chunks: limits total number of chunks across all batches being uploaded.
  • max_bytes: limits total size of content bytes across all chunks being uploaded.

Added methods:

  • configure() to set limits
  • validate_configure(): companion method for SNS
  • get_configuration(): to view limits

Suggestions for configured limits:

  • dapps controlled by SNS: max_batches=1; max_chunks and max_bytes based on asset composition.
  • dapps not controlled by SNS: unlimited (which is the default)

Note that as always, if dfx deploy does not completely upload and commit a batch, the asset canister will retain the batch until 5 minutes have passed since the last chunk was uploaded. If you have configured limits and the combination of an unsuccessful deployment and a subsequent attempt would exceed those limits, you can either wait 5 minutes before running dfx deploy again, or delete the incomplete batch with delete_batch().

fix: return the correct expr_path for index.html fallback routes

Previously, the requested path was used to construct the expr_path for the index.html fallback route. This was incorrect, as the expr_path should be the path of the index.html file itself in this case.

Frontend canister assets synchronization

fix: now retries failed create_chunk() calls

Previously, it would only retry when waiting for the request to complete.

fix: now considers fewer error types to be retryable

Previously, errors were assumed to be retryable, except for a few specific error messages and 403/unauthorized responses. This could cause deployment to appear to hang until timeout.

Now, only transport errors and timeout errors are considered retryable.

Dependencies

Frontend canister

ic-ref

Updated ic-ref to 0.0.1-a9f73dba

Cycles wallet

Updated cycles wallet to 20230530 release:

Motoko

Updated Motoko to 0.9.3

Replica

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