Skip to content

Commit 953ce05

Browse files
Merge branch 'main' into ens/refuse-fetch-mainnet-root-key
2 parents 16f5836 + 4ab1172 commit 953ce05

29 files changed

+1130
-582
lines changed

.github/workflows/conventional-commits.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ jobs:
2020
# verb: feat, fix, ...
2121
# scope: refers to the part of code being changed. E.g. " (accounts)" or " (accounts,canisters)"
2222
# !: Indicates that the PR contains a breaking change.
23-
- run: |
24-
if [[ "${{ github.event.pull_request.title }}" =~ ^(feat|fix|chore|build|ci|docs|style|refactor|perf|test)(\([-a-zA-Z0-9,]+\))?\!?\: ]]; then
23+
- env:
24+
TITLE: ${{ github.event.pull_request.title }}
25+
run: |
26+
echo "PR title: $TITLE"
27+
if [[ "$TITLE" =~ ^(feat|fix|chore|build|ci|docs|style|refactor|perf|test)(\([-a-zA-Z0-9,]+\))?\!?\: ]]; then
2528
echo pass
2629
else
2730
echo "PR title does not match conventions"
28-
echo "PR title: ${{ github.event.pull_request.title }}"
2931
exit 1
3032
fi

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ macos-latest, ubuntu-latest ]
13+
os: [ macos-12, ubuntu-latest ]
1414
dfx: [ '0.8.4', '0.9.2', '0.10.1', '0.11.1' ]
1515

1616
steps:

.github/workflows/ic-ref.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Install dfx
2929
uses: dfinity/setup-dfx@main
3030
with:
31-
dfx-version: "0.16.1"
31+
dfx-version: "latest"
3232

3333
- name: Cargo cache
3434
uses: actions/cache@v4

.github/workflows/lint.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,17 @@ jobs:
2121
target
2222
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2323

24+
- uses: taiki-e/install-action@v2
25+
with:
26+
tool: cargo-hack@0.6.21
27+
2428
- name: Run Lint
25-
run: cargo clippy --verbose --tests --benches -- -D warnings
29+
run: |
30+
cargo hack clippy --each-feature --exclude-features ic_ref_tests --no-dev-deps --verbose -- -D warnings
31+
cargo clippy --features ic_ref_tests --verbose --tests --benches -- -D warnings
2632
env:
2733
RUST_BACKTRACE: 1
34+
2835
- name: Run Lint (WASM)
2936
run: CARGO_TARGET_DIR=target/wasm cargo clippy --target wasm32-unknown-unknown -p ic-agent --features wasm-bindgen -p ic-utils --verbose -- -D warnings
3037
aggregate:

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ jobs:
1919
target: x86_64-unknown-linux-musl
2020
binary_path: target/x86_64-unknown-linux-musl/release
2121
binary_files: icx
22-
- os: macos-latest
22+
- os: macos-12
2323
name: macos
2424
target: x86_64-apple-darwin
2525
binary_path: target/x86_64-apple-darwin/release
2626
binary_files: icx
2727
steps:
2828
- uses: actions/checkout@v4
29+
- uses: taiki-e/install-action@v2
30+
with:
31+
tool: cross@0.2.5
2932

3033
- name: Setup environment variables
3134
run: |
@@ -37,24 +40,21 @@ jobs:
3740
echo "END" >> $GITHUB_ENV
3841
3942
- name: Build
40-
uses: ructions/cargo@v1
41-
with:
42-
command: build
43-
args: --target ${{ matrix.target }} ${{ env.cargo_build_ARGS }}
44-
use-cross: ${{ contains(matrix.os, 'ubuntu') }}
43+
run: |
44+
cross build --target ${{ matrix.target }} ${{ env.cargo_build_ARGS }}
4545
4646
- name: Strip binaries
4747
run: |
4848
cd ${{ matrix.binary_path }}
4949
sudo chown -R $(whoami) .
5050
strip ${{ matrix.binary_files }}
51-
if: contains(matrix.os, 'ubuntu')
51+
if: ${{ contains(matrix.os, 'ubuntu') }}
5252

5353
- name: Check linkage
5454
run: |
5555
cd ${{ matrix.binary_path }}
5656
otool -L ${{ matrix.binary_files }}
57-
if: contains(matrix.os, 'macos')
57+
if: ${{ contains(matrix.os, 'macos') }}
5858

5959
- name: Create tarball of binaries
6060
if: ${{ github.event_name == 'push' }}

.github/workflows/shellcheck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ on:
1414

1515
jobs:
1616
check_macos:
17-
# ubuntu-latest has shellcheck 0.4.6, while macos-latest has 0.7.1
18-
runs-on: macos-latest
17+
# ubuntu-latest has shellcheck 0.4.6, while macos-12 has 0.7.1
18+
runs-on: macos-12
1919
steps:
2020
- uses: actions/checkout@v4
2121
- name: Install shellcheck

CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## Unreleased
1010

11+
* Added a limit to the concurrent requests an agent will make at once. This should make server-side ratelimiting much rarer to encounter, even when sending a high volume of requests (for example, a large `ic_utils::ManagementCanister::install` call).
12+
* The agent will now automatically retry 429 Too Many Requests responses after a short delay.
13+
* BREAKING: Changed Chunk Store API to conform to the interface specification:
14+
* `ChunkHash` was changed from `[u8; 32]` to a struct.
15+
* Return types of `ManagementCanister::stored_chunks()` and `ManagementCanister::upload_chunk()`.
16+
* Argument type of `ManagementCanister::install_chunked_code()`.
17+
* `InstallChunkedCodeBuilder`.
18+
* All occurrences of `storage_canister` were changed to `store_canister`.
19+
* The field `chunk_hashes_list` was changed from `vec<vec<u8>>` to `vec<ChunkHash>`.
20+
* Changed `WalletCanister::from_canister/create`'s version check to not rely on the reject code.
21+
* Added `QueryBuilder::call_with_verification()` and `QueryBuilder::call_without_verification()` which always/never verify query signatures
22+
regardless the Agent level configuration from `AgentBuilder::with_verify_query_signatures`.
23+
* Function `Agent::fetch_api_boundary_nodes()` is split into two functions: `fetch_api_boundary_nodes_by_canister_id()` and `fetch_api_boundary_nodes_by_subnet_id()`.
24+
* `ReqwestTransport` and `HyperTransport` structures storing the trait object `route_provider: Box<dyn RouteProvider>` have been modified to allow for shared ownership via `Arc<dyn RouteProvider>`.
25+
* Added `wasm_memory_limit` to canister creation and canister setting update options.
26+
* Agent::fetch_root_key() now returns an error, and sets its root key to an empty vector, if got the same root key as the mainnet. This reduce the potentiality of MITM attack.
27+
28+
## [0.34.0] - 2024-03-18
29+
30+
* Changed `AgentError::ReplicaError` to `CertifiedReject` or `UncertifiedReject`. `CertifiedReject`s went through consensus, and `UncertifiedReject`s did not. If your code uses `ReplicaError`:
31+
* for queries: use `UncertifiedReject` in all cases (for now)
32+
* for updates: use `CertifiedReject` for errors raised after the message successfully reaches the canister, and `UncertifiedReject` otherwise
1133
* Added `Agent::fetch_api_boundary_nodes` for looking up API boundary nodes in the state tree.
1234
* Timestamps are now being checked in `Agent::verify` and `Agent::verify_for_subnet`. If you were using it with old certificates, increase the expiry timeout to continue to verify them.
1335
* Added node metrics, ECDSA, and Bitcoin functions to `MgmtMethod`. Most do not have wrappers in `ManagementCanister` because only canisters can call these functions.
1436
* Added `FetchCanisterLogs` function to `MgmtMethod` and a corresponding wrapper to `ManagementCanister`.
1537
* Updated the `ring` crate to 0.17.7. `ring` 0.16 has a bug where it requires incorrect Ed25519 PEM encoding. 0.17.7 fixes that and is backwards compatible.
16-
* Agent::fetch_root_key() now returns an error, and sets its root key to an empty vector, if got the same root key as the mainnet. This reduce the potentiality of MITM attack.
38+
* Removed serde and candid serialization traits from the `Status` type.
39+
* Added commas and newlines to the `Status` fmt::Display output. It is valid JSON now (it was close before).
1740

1841
## [0.33.0] - 2024-02-08
1942

2043
* Changed the return type of `stored_chunks` to a struct.
2144
* Added a prime256v1-based `Identity` impl to complement the ed25519 and secp256k1 `Identity` impls.
22-
* Added serde and candid serialization traits to the `Status` type.
2345
* Changed the type of `InstallMode.skip_pre_upgrade` from `bool` to `Option<bool>` to match the interface specification.
2446

2547
## [0.32.0] - 2024-01-18

0 commit comments

Comments
 (0)