Skip to content

Latest commit

 

History

History
554 lines (351 loc) · 20.6 KB

CHANGELOG.adoc

File metadata and controls

554 lines (351 loc) · 20.6 KB

0.8.2

DFX

feat: dfx canister delete can now return cycles to a wallet or dank

By default dfx canister delete will return cycles to the default cycles wallet. Cycles can be returned to a designated canister with --withdraw-cycles-to-canister and cycles can be returned to dank at the current identity principal with --withdraw-cycles-to-dank and to a designated principal with --withdraw-cycles-to-dank-principal.

feat: dfx canister create now accepts multiple instances of --controller argument

It is now possible to create canisters with more than one controller by passing multiple instances of the --controller parameter to `dfx canister create.

You will need to upgrade your wallet with dfx wallet upgrade, or dfx wallet --network ic upgrade

feat: dfx canister update-settings now accepts multiple instance of --controller argument

It is now possible to configure a canister to have more than one controller by passing multiple instances of the --controller parameter to `dfx canister update-settings.

feat: dfx canister info and dfx canister status now display all controllers

feat!: dfx canister create --controller <controller> named parameter

Breaking change: The controller parameter for dfx canister create is now passed as a named parameter, rather than optionally following the canister name.

Old: dfx canister create [canister name] [controller] New: dfx canister create --controller <controller> [canister name]

fix: dfx now respects $DFX_CONFIG_ROOT when looking for legacy credentials

Previously this would always look in $HOME/.dfinity/identity/creds.pem.

fix: changed dfx canister (create|update-settings) --memory-allocation limit to 12 GiB

Updated the maximum value for the --memory-allocation value to be 12 GiB (12,884,901,888 bytes)

Cycles Wallet

Added support for multiple controllers

You will need to upgrade your wallet with dfx wallet upgrade, or dfx wallet --network ic upgrade

Replica

The included replica now supports public spec 0.18.0

  • Canisters can now have more than one controller

  • Adds support for 64-bit stable memory

  • The replica now goes through an initialization sequence, reported in its status as replica_health_status. Until this reports as healthy, queries or updates will fail.

    • dfx start --background waits to exit until replica_health_status is healthy.

    • If you run dfx start without --background, you can call dfx ping --wait-healthy to wait until the replica is healthy.

Motoko

Updated Motoko from 0.6.7 to 0.6.10

  • add Debug.trap : Text → None (motoko-base #288)

  • Introduce primitives for IntFloat conversions (#2733)

  • Fix crashing bug for formatting huge floats (#2737)

0.8.1

DFX

feat: dfx generate types command

dfx generate

This new command will generate type declarations for canisters in dfx.json.

You can control what will be generated and how with corresponding configuration in dfx.json.

Under dfx.json → "canisters" → "<canister_name>", developers can add a "declarations" config. Options are:

  • "output" → directory to place declarations for that canister | default is "src/declarations/<canister_name>"

  • "bindings" → [] list of options, ("js", "ts", "did", "mo") | default is "js", "ts", "did"

  • "env_override" → a string that will replace process.env.{canister_name_uppercase}_CANISTER_ID in the "src/dfx/assets/language_bindings/canister.js" template.

js declarations output

  • index.js (generated from "src/dfx/assets/language_bindings/canister.js" template)

  • <canister_name>.did.js - candid js binding output

ts declarations output

  • <canister_name>.did.d.ts - candid ts binding output

did declarations output

  • <canister_name>.did - candid did binding output

mo declarations output

  • <canister_name>.mo - candid mo binding output

feat: dfx now supports the anonymous identity

Use it with either of these forms:

dfx identity use anonymous
dfx --identity anonymous ...

feat: import default identities

Default identities are the pem files generated by dfx identity new …​ which contain Ed25519 private keys. They are located at ~/.config/dfx/identity/xxx/identity.pem. Now, you can copy such pem file to another computer and import it there.

dfx identity new alice
cp ~/.config/dfx/identity/xxx/identity.pem alice.pem
# copy the pem file to another computer, then
dfx identity import alice alice.pem

Before, people can manually copy the pem files to the target directory to "import". Such workaround still works. We suggest to use the import subcommand since it also validate the private key.

feat: Can now provide a nonstandard wallet module with DFX_WALLET_WASM environment variable

Define DFX_WALLET_WASM in the environment to use a different wasm module when creating or upgrading the wallet.

Asset Canister

fix: trust full asset SHA-256 hashes provided by the caller

When the caller provides SHA-256 hashes (which dfx does), the asset canister will no longer recompute these hashes when committing the changes. These recomputations were causing canisters to run out of cycles, or to attempt to exceed the maximum cycle limit per update.

0.8.0

The 0.8.0 release includes updates and fixes that are primarily internal to improve existing features and functions rather than user-visible.

DFX

fix: dfx identity set-wallet no longer requires --force when used with --network ic

This was intended to skip verification of the wallet canister on the IC network, but ended up only writing to the wallets.json file if --force was passed.

chore: updating dependencies

  • Support for the latest version of the {IC} specification and replica.

  • Updating to latest versions of Motoko, Candid, and agent-rs

feat: Type Inference Update

0.7.7

Breaking changes to frontend code generation, documented in 0.8.0

DFX

feat: deploy and canister install will now only upgrade a canister if the wasm actually changed

dfx deploy and dfx canister install now compare the hash of the already-installed module with the hash of the built canister’s wasm output. If they are the same, they leave the canister in place rather than upgrade it. They will still synchronize assets to an asset canister regardless of the result of this comparison.

0.7.6

icx-proxy

The streaming callback mechanism now requires the following record structure for the token: type StreamingCallbackToken = record { key: text; content_encoding: text; index: nat; sha256: opt blob; };

Previously, the token could be a record with any set of fields.

0.7.2

DFX

fix: set default cycle balance to 3T

Change the default cycle balance of a canister from 10T cycles to 3T cycles.

Cycles Wallet

fix: It is no longer possible to remove the last controller.

Fixed an issue where the controller can remove itself from the list of controllers even if it’s the only one, leaving the wallet uncontrolled. Added defensive checks to the wallet’s remove_controller and deauthorize methods.

0.7.1

DFX

feat: sign request_status for update call

When using dfx canister sign to generate a update message, a corresponding request_status message is also signed and append to the json as signed_request_status. Then after sending the update message, the user can check the request_status using dfx canister send message.json --status.

fix: wallet will not proxy dfx canister call by default

Previously, dfx canister call would proxy queries and update calls via the wallet canister by default. (There was the --no-wallet flag to bypass the proxy and perform the calls as the selected identity.) However, this behavior had drawbacks, namely each dfx canister call was an inter-canister call by default and calls would take a while to resolve. This fix makes it so that dfx canister call no longer proxies via the wallet by default. To proxy calls via the wallet, you can do dfx canister --wallet=<wallet-id> call.

feat: add --no-artificial-delay to dfx replica and start

This change adds the --no-artificial-delay flag to dfx start and dfx replica. The replica shipped with dfx has always had an artificial consensus delay (introduced to simulate a delay users might see in a networked environment.) With this new flag, that delay can be lessened. However, you might see increased CPU utilization by the replica process.

feat: add deposit cycles and uninstall code

This change introduces the deposit_cycles and uninstall_code management canister methods as dedicated dfx canister subcommands.

fix: allow consistent use of canisters ids in canister command

This change updates the dfx commands so that they will accept either a canister name (sourced from your local project) or a valid canister id.

0.7.0

DFX

feat: add output type to request-status

This change allows you to specify the format the return result for dfx canister request-status.

fix: deleting a canister on a network removes entries for other networks

This change fixes a bug where deleting a canister on a network removed all other entries for the canister in the canister_ids.json file.

feat: point built-in ic network provider at mainnet

--network ic now points to the mainnet IC (as Sodium has been deprecated.)

feat: add candid UI canister

The dedicated candid UI canister is installed on a local network when doing a dfx canister install or dfx deploy.

fix: Address already in use (os error 48) when issuing dfx start

This fixes an error which occurred when starting a replica right after stopping it.

feat: ledger subcommands

dfx now supports a dedicated dfx ledger subcommand. This allows you to interact with the ledger canister installed on the Internet Computer. Example commands include dfx ledger account-id which prints the Account Identifier associated with your selected identity, dfx ledger transfer which allows you to transfer ICP from your ledger account to another, and dfx ledger create-canister which allows you to create a canister from ICP.

feat: update to 0.17.0 of the Interface Spec

This is a breaking change to support 0.17.0 of the Interface Spec. Compute & memory allocation values are set when creating a canister. An optional controller can also be specified when creating a canister. Furthermore, dfx canister set-controller is removed, in favor of dfx canister update-settings which allows the controller to update the controller, the compute allocation, and the memory allocation of the canister. The freezing threshold value isn’t exposed via dfx cli yet, but it may still be modified by calling the management canister via dfx canister call aaaaa-aa update-settings

feat: add wallet subcommands

dfx now supports a dedicated dfx wallet subcommand. This allows you to interact with the cycles wallet associated with your selected identity. For example, dfx wallet balance to get the cycle balance, dfx wallet list-addresses to display the associated controllers & custodians, and dfx wallet send <destination> <amount> to send cycles to another wallet.

Cycles Wallet

feat: Use Internet Identity Service.

0.7.0-beta.5

Cycles Wallet

feat: Updated to Public Interface 0.17.0

feat: The wallet_create_canister method now takes a single record argument, which includes canister settings.

fix: Return correct content type and encoding for non-gz files.

fix: Updated frontend for changes to canister creation interface.

0.7.0-beta.3

DFX

fix: assets with an unrecognized file extension will use content-type "application/octet-stream"

0.7.0-beta.2

DFX

feat: synchronize assets rather than uploading even assets that did not change

DFX will now also delete assets from the container that do not exist in the project. This means if you stored assets in the container, and they are not in the project, dfx deploy or dfx install will delete them.

Asset Canister

Breaking change: change to store() method signature

  • now takes arguments as a single record parameter

  • must now specify content type and content encoding, and may specify the sha256

0.7.0-beta.1

DFX

fix: now deletes from the asset canister assets that no longer exist in the project

feat: get certified canister info from read state #1514

Added dfx canister info command to get certified canister information. Currently this information is limited to the controller of the canister and the SHA256 hash of its WASM module. If there is no WASM module installed, the hash will be None.

Asset Canister

Breaking change: change to list() method signature

  • now takes a parameter, which is an empty record

  • now returns an array of records

Breaking change: removed the keys() method

  • use list() instead

0.7.0-beta.0

DFX

feat: webserver can now serve large assets

0.6.26

DFX

feat: add --no-wallet flag and --wallet option to allow Users to bypass Wallet or specify a Wallet to use for calls (#1476)

Added --no-wallet flag to dfx canister and dfx deploy. This allows users to call canister management functionality with their Identity as the Sender (bypassing their Wallet canister.) Added --wallet option to dfx canister and dfx deploy. This allows users to specify a wallet canister id to use as the Sender for calls. --wallet and --no-wallet conflict with each other. Omitting both will invoke the selected Identity’s wallet canister to perform calls.

feat: add canister subcommands sign and send

Users can use dfx canister sign …​ to generated a signed canister call in a json file. Then dfx canister send [message.json] to the network.

Users can sign the message on an air-gapped computer which is secure to host private keys.

Note

  • sign and send currently don’t proxy through wallet canister. Users should use the subcommands with dfx canister --no-wallet sign …​.

  • The sign option --expire-after will set the ingress_expiry to a future timestamp which is current plus the duration. Then users can send the message during a 5 minutes time window ending in that ingress_expiry timestamp. Sending the message earlier or later than the time window will both result in a replica error.

feat: implement the HTTP Request proposal in dfx' bootstrap webserver.

And add support for http requests in the base storage canister (with a default to /index.html).

This does not support other encodings than identity for now (and doesn’t even return any headers). This support will be added to the upgraded asset storage canister built in #1482.

Added a test that uses curl localhost to test that the asset storage AND the webserver properly support the http requests.

This commit also upgrades tokio and reqwest in order to work correctly. There are also some performance issues noted (this is slower than the icx-http-server for some reason), but those are not considered criticals and could be improved later on.

Renamed the project_name in our own generated assets to canister_name, for things that are generated during canister build (and not project generation).

feat: add support for ECDSA on secp256k1

You can now a generate private key via OpenSSL or a simlar tool, import it into dfx, and use it to sign an ingress message.

openssl ecparam -name secp256k1 -genkey -out identity.pem
dfx identity import <name> identity.pem
dfx identity use <name>
dfx canister call ...

Asset Canister

feat: The asset canister can now store assets that exceed the message ingress limit (2 MB)

  • Please note that neither the JS agent nor the HTTP server have been updated yet to server such large assets.

  • The existing interface is left in place for backwards-compatibility, but deprecated:

    • retrieve(): use get() and get_chunk() instead

    • store(): use create_batch(), create_chunk(), and commit_batch() instead

    • list(): use keys() instead

0.6.25

DFX

  • feat: dfx now provides CANISTER_ID_<canister_name> environment variables for all canisters to "npm build" when building the frontend.

Agents

Rust Agent

  • feat: AgentError due to request::Error will now include the reqwest error message in addition to "Could not reach the server"

  • feat: Add secp256k1 support (dfx support to follow)

0.6.24

DFX

  • feat: add option to specify initial cycles for newly created canisters (#1433)

Added option to dfx canister create and dfx deploy commands: --with-cycles <with-cycles>. This allows the user to specify the initial cycle balance of a canister created by their wallet. This option is a no-op for the Sodium network.

dfx canister create --with-cycles 8000000000 some_canister
dfx deploy --with-cycles 8000000000

Help string:

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
  • feat: install dfx by version or tag (#1426)

This feature adds a new dfx command toolchain which have intuitive subcommands. The toolchain specifiers can be a complete version number, major minor version, or a tag name.

dfx toolchain install 0.6.24 # complete version
dfx toolchain install 0.6    # major minor
dfx toolchain install latest # tag name
dfx toolchain default latest
dfx toolchain list
dfx toolchain uninstall latest
  • fix: onboarding related fixups (#1420)

Now that the Mercury Alpha application subnetwork is up and we are getting ready to onboard devs, the dfx error message for wallet creation has changed: For example,

dfx canister --network=alpha create hello
Creating canister "hello"...
Creating the canister using the wallet canister...
Creating a wallet canister on the alpha network.
Unable to create a wallet canister on alpha:
The Replica returned an error: code 3, message: "Sender not authorized to use method."
Wallet canisters on alpha may only be created by an administrator.
Please submit your Principal ("dfx identity get-principal") in the intake form to have one created for you.
  • feat: add deploy wallet subcommand to identity (#1414)

This feature adds the deploy-wallet subcommand to the dfx identity. The User provides the ID of the canister onto which the wallet WASM is deployed.

dfx identity deploy-wallet --help
dfx-identity-deploy-wallet
Installs the wallet WASM to the provided canister id

USAGE:
    dfx identity deploy-wallet <canister-id>

ARGS:
    <canister-id>    The ID of the canister where the wallet WASM will be deployed

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

0.6.22

DFX

  • feat: dfx call random value when argument is not provided (#1376)

  • fix: canister call can take canister ids for local canisters even if … (#1368)

  • fix: address panic in dfx replica command (#1338)

  • fix: dfx new webpack.config.js does not encourage running 'js' through ts-… (#1341)

Sample apps

  • There have been updates, improvements, and new sample apps added to theexamples repository.

    All of Motoko sample apps in the examples repository have been updated to work with the latest release of the SDK.

    There are new sample apps to illustrate using arrays (Quicksort) and building create/read/update/delete (CRUD) operations for a web application Superheroes.

  • The LinkedUp sample application has been updated to work with the latest release of Motoko and the SDK.

Motoko

Agents

Canister Development Kit (CDK)