Skip to content

Commit

Permalink
Merge branch 'master' into release-0.24.0-promote
Browse files Browse the repository at this point in the history
  • Loading branch information
sesi200 authored Oct 2, 2024
2 parents 0577093 + 4adbf8f commit ed1211c
Show file tree
Hide file tree
Showing 43 changed files with 681 additions and 451 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,61 @@

# UNRELEASED

# 0.24.1

### 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](https://github.com/dfinity/motoko/releases/tag/0.13.0)

### Replica

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

- [133144](https://dashboard.internetcomputer.org/proposal/133144)
- [133143](https://dashboard.internetcomputer.org/proposal/133143)
- [133142](https://dashboard.internetcomputer.org/proposal/133142)
- [133063](https://dashboard.internetcomputer.org/proposal/133063)
- [133062](https://dashboard.internetcomputer.org/proposal/133062)
- [133061](https://dashboard.internetcomputer.org/proposal/133061)
- [132548](https://dashboard.internetcomputer.org/proposal/132548)
- [132547](https://dashboard.internetcomputer.org/proposal/132547)
- [132507](https://dashboard.internetcomputer.org/proposal/132507)
- [132482](https://dashboard.internetcomputer.org/proposal/132482)
- [132481](https://dashboard.internetcomputer.org/proposal/132481)
- [132500](https://dashboard.internetcomputer.org/proposal/132500)
- [132416](https://dashboard.internetcomputer.org/proposal/132416)
- [132413](https://dashboard.internetcomputer.org/proposal/132413)
- [132414](https://dashboard.internetcomputer.org/proposal/132414)
- [132412](https://dashboard.internetcomputer.org/proposal/132412)
- [132376](https://dashboard.internetcomputer.org/proposal/132376)
- [132375](https://dashboard.internetcomputer.org/proposal/132375)
- [132223](https://dashboard.internetcomputer.org/proposal/132223)
- [132222](https://dashboard.internetcomputer.org/proposal/132222)
- [132149](https://dashboard.internetcomputer.org/proposal/132149)
- [132148](https://dashboard.internetcomputer.org/proposal/132148)
- [131787](https://dashboard.internetcomputer.org/proposal/131787)
- [131757](https://dashboard.internetcomputer.org/proposal/131757)
- [131697](https://dashboard.internetcomputer.org/proposal/131697)

### Candid UI

Module hash 15da2adc4426b8037c9e716b81cb6a8cf1a835ac37589be2cef8cb3f4a04adaa

# 0.24.0

### fix: bumps sveltekit starter dependency versions to prevent typescript config error
Expand Down
41 changes: 23 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ license = "Apache-2.0"
[workspace.dependencies]
candid = "0.10.4"
candid_parser = "0.1.4"
ic-agent = { git = "https://github.com/dfinity/agent-rs.git", rev = "6e11a350112f9b907c4d590d8217f340e153d898" }
ic-asset = { path = "src/canisters/frontend/ic-asset" }
dfx-core = { path = "src/dfx-core", version = "0.1.0" }
ic-agent = "0.38"
ic-asset = { path = "src/canisters/frontend/ic-asset", version = "0.21.0" }
ic-cdk = "0.13.1"
ic-identity-hsm = { git = "https://github.com/dfinity/agent-rs.git", rev = "6e11a350112f9b907c4d590d8217f340e153d898" }
ic-utils = { git = "https://github.com/dfinity/agent-rs.git", rev = "6e11a350112f9b907c4d590d8217f340e153d898" }
ic-identity-hsm = "0.38"
ic-utils = "0.38"

aes-gcm = "0.10.3"
anyhow = "1.0.56"
Expand Down
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The `IC SDK` installation script installs several components in default location
| Component | Description | Default location |
|--------------|----------------------------------------------------------------------------------------------------|-----------------------------------------------|
| dfx | Command-line interface (CLI) | `/usr/local/bin/dfx` |
| dfxvm | Command-line interface, version manager | `/usr/local/bin/dfxvm` |
| moc | Motoko runtime compiler | `~/.cache/dfinity/versions/<VERSION>/moc` |
| replica | Internet Computer local network binary | `~/.cache/dfinity/versions/<VERSION>/replica` |
| uninstall.sh | Script to remove the SDK and all of its components | `~/.cache/dfinity/uninstall.sh` |
Expand All @@ -28,14 +29,34 @@ There are a few components above worth expanding on:

1. **dfx** - `dfx` is the command-line interface for the `IC SDK`. This is why many commands for the IC SDK start with the command "`dfx ..`" such as `dfx new` or `dfx stop`.

2. **Canister Development Kit (CDK)** - A CDK is an adapter used by the IC SDK so a programming language has the features needed to create and manage canisters.
The IC SDK comes with a few CDKs already installed for you so you can use them in the language of yoru choice. That is why there is a [Rust CDK](https://github.com/dfinity/cdk-rs), [Python CDK](https://demergent-labs.github.io/kybra/),
2. **dfxvm** - `dfxvm` is the version manager for `dfx`, i.e. a CLI for selecting and managing installed `dfx` versions.

3. **Canister Development Kit (CDK)** - A CDK is an adapter used by the IC SDK so a programming language has the features needed to create and manage canisters.
The IC SDK comes with a few CDKs already installed for you so you can use them in the language of your choice. That is why there is a [Rust CDK](https://github.com/dfinity/cdk-rs), [Python CDK](https://demergent-labs.github.io/kybra/),
[TypeScript CDK](https://demergent-labs.github.io/azle/), etc... Since CDKs are components used the SDK, some developer choose to use the CDK directly (without the `IC SDK`),
but typically are used as part of the whole `IC SDK`.


## Getting Started

### Prerequisites

#### Install Rust

To develop Rust projects, you will need to install Rust in your environment with the command:

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

#### Install `wasm32-unknown-unknown` target

ICP smart contracts are compiled into WebAssembly modules. To support this compilation, install the `wasm32-unknown-unknown` target:

```
rustup target add wasm32-unknown-unknown
```

### Installing

You can install the `IC SDK` a few different ways.
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests-dfx/assetscanister.bash
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ check_permission_failure() {

# fails with because %e6 is not valid utf-8 percent encoding
assert_command_fail curl --fail -vv http://localhost:"$PORT"/%e6?canisterId="$ID"
assert_contains "400 Bad Request"
assert_contains "500 Internal Server Error"
}

@test "http_request percent-decodes urls" {
Expand Down Expand Up @@ -788,7 +788,7 @@ check_permission_failure() {

assert_command_fail curl --fail -vv http://localhost:"$PORT"/%e6?canisterId="$ID"
# fails because %e6 is not valid utf-8 percent encoding
assert_contains "400 Bad Request"
assert_contains "500 Internal Server Error"

assert_command curl --fail -vv http://localhost:"$PORT"/%25?canisterId="$ID"
assert_match "200 OK" "$stderr"
Expand Down
12 changes: 6 additions & 6 deletions e2e/tests-dfx/basic-project.bash
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ teardown() {
@test "build + install + call + request-status -- greet_mo" {
dfx_new hello
install_asset greet
dfx_start
dfx canister create --all
dfx build
dfx_start --artificial-delay 10000
dfx canister create hello_backend
dfx build hello_backend
# INSTALL_REQUEST_ID=$(dfx canister install hello_backend --async)
# dfx canister request-status $INSTALL_REQUEST_ID
dfx canister install hello_backend
Expand Down Expand Up @@ -57,9 +57,9 @@ teardown() {
@test "build + install + call + request-status -- counter_mo" {
dfx_new hello
install_asset counter
dfx_start
dfx canister create --all
dfx build
dfx_start --artificial-delay 10000
dfx canister create hello_backend
dfx build hello_backend
dfx canister install hello_backend

assert_command dfx canister call hello_backend read
Expand Down
13 changes: 13 additions & 0 deletions e2e/tests-dfx/canister_extra.bash
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,17 @@ teardown() {

assert_command_fail dfx canister snapshot create hello_backend
assert_contains 'Canister hello_backend is running and snapshots should not be taken of running canisters'
}

@test "can query a website" {
dfx_start

dfx_new
install_asset canister_http

dfx deploy

assert_command dfx canister call e2e_project_backend get_url '("www.githubstatus.com:443","https://www.githubstatus.com:443")'
assert_contains "Git Operations"
assert_contains "API Requests"
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,3 @@ set_shared_local_network_canister_http_empty() {
assert_command dfx start --background --verbose
assert_match "log level: Critical"
}

@test "can query a website" {
dfx_start

dfx_new
install_asset canister_http

dfx deploy

assert_command dfx canister call e2e_project_backend get_url '("www.githubstatus.com:443","https://www.githubstatus.com:443")'
assert_contains "Git Operations"
assert_contains "API Requests"
}
2 changes: 1 addition & 1 deletion e2e/tests-dfx/create.bash
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ teardown() {
assert_contains 'Memory allocation: 0'
assert_contains 'Compute allocation: 0'
assert_contains 'Reserved cycles limit: 5_000_000_000_000'
assert_contains 'Wasm memory limit: 0'
assert_contains 'Wasm memory limit: 3_221_225_472'
assert_contains 'Freezing threshold: 2_592_000'
assert_contains 'Log visibility: controllers'
}
2 changes: 1 addition & 1 deletion e2e/tests-dfx/cycles-ledger.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ teardown() {
start_and_install_nns() {
dfx_start_for_nns_install

dfx extension install nns --version 0.3.1
dfx extension install nns --version 0.4.3
dfx nns install --ledger-accounts "$(dfx ledger account-id --identity cycle-giver)"
}

Expand Down
6 changes: 3 additions & 3 deletions e2e/tests-dfx/request_status.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ teardown() {

@test "request-status output raw" {
install_asset greet
dfx_start
dfx canister create --all
dfx build
dfx_start --artificial-delay 10000
dfx canister create hello_backend
dfx build hello_backend

dfx canister install hello_backend

Expand Down
2 changes: 0 additions & 2 deletions e2e/tests-dfx/shared_local_network.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ teardown() {
}

@test "project data is cleared after dfx start --clean from outside the project" {
[[ "$USE_POCKETIC" ]] && skip "dfx_start does not support parameters with pocketic"
mkdir somewhere
(
cd somewhere
Expand Down Expand Up @@ -94,7 +93,6 @@ teardown() {


@test "wallet config file is reset after start --clean" {
[[ "$USE_POCKETIC" ]] && skip "dfx_start does not support parameters with pocketic"
dfx_start

(
Expand Down
Loading

0 comments on commit ed1211c

Please sign in to comment.