From adf4d3ae98363ec334159125da8e6c9fc8789e01 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 08:21:17 +0000 Subject: [PATCH 01/17] 1.88 --- WORKSPACE.bazel | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 97344a2dc617..176a0dc736f3 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -144,7 +144,7 @@ rust_register_toolchains( "fastbuild": "none", "opt": "none", }}, - versions = ["1.86.0"], + versions = ["1.88.0"], ) load("//bazel:external_crates.bzl", "external_crates_repository") diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 57a2a3be179d..d39ed25d4d3b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.86.0" +channel = "1.88.0" targets = ["wasm32-unknown-unknown"] profile = "default" components = ["rls"] From a20b7b7e0d927c819e43115ceb2e881d0339dc88 Mon Sep 17 00:00:00 2001 From: IDX GitHub Automation <> Date: Thu, 24 Jul 2025 08:31:23 +0000 Subject: [PATCH 02/17] Updating container image to sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f Image tag: 81b0a98486c17991e211deda54c717bfff6427ff14924bf746d5f8fd6cfb9179 --- .devcontainer/devcontainer.json | 2 +- .github/workflows-source/ci-main.yml | 2 +- .github/workflows-source/ci-pr-only.yml | 2 +- .github/workflows-source/release-testing.yml | 2 +- .github/workflows-source/schedule-daily.yml | 2 +- .github/workflows/ci-main.yml | 16 ++++++++-------- .github/workflows/ci-pr-only.yml | 12 ++++++------ .github/workflows/pocket-ic-tests-windows.yml | 2 +- .../workflows/rate-limits-backend-release.yml | 2 +- .github/workflows/release-testing.yml | 8 ++++---- .github/workflows/rosetta-release.yml | 2 +- .../workflows/salt-sharing-canister-release.yml | 2 +- .github/workflows/schedule-daily.yml | 12 ++++++------ .github/workflows/schedule-rust-bench.yml | 2 +- .github/workflows/schedule-weekly.yml | 2 +- .github/workflows/update-mainnet-revisions.yaml | 2 +- ci/container/TAG | 2 +- 17 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 291d7e555a9b..37eb4f4e1990 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34", + "image": "ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f", "remoteUser": "ubuntu", "privileged": true, "runArgs": [ diff --git a/.github/workflows-source/ci-main.yml b/.github/workflows-source/ci-main.yml index 25187d5e5060..e0d52ac486e8 100644 --- a/.github/workflows-source/ci-main.yml +++ b/.github/workflows-source/ci-main.yml @@ -34,7 +34,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f dind-large-setup: &dind-large-setup runs-on: labels: dind-large diff --git a/.github/workflows-source/ci-pr-only.yml b/.github/workflows-source/ci-pr-only.yml index d9c2be7fbe52..941f29ba058c 100644 --- a/.github/workflows-source/ci-pr-only.yml +++ b/.github/workflows-source/ci-pr-only.yml @@ -17,7 +17,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f container: &container container: <<: *image diff --git a/.github/workflows-source/release-testing.yml b/.github/workflows-source/release-testing.yml index cf1acc3b90df..197ea9066e43 100644 --- a/.github/workflows-source/release-testing.yml +++ b/.github/workflows-source/release-testing.yml @@ -25,7 +25,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f dind-large-setup: &dind-large-setup runs-on: labels: dind-large diff --git a/.github/workflows-source/schedule-daily.yml b/.github/workflows-source/schedule-daily.yml index 110afe9192d8..9d51443452b0 100644 --- a/.github/workflows-source/schedule-daily.yml +++ b/.github/workflows-source/schedule-daily.yml @@ -14,7 +14,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f backup-pod-access: &backup-pod-access run: | diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 44427e2b656c..bbc7da05854b 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -107,7 +107,7 @@ jobs: name: Bazel Test All needs: [config] container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 120 @@ -298,7 +298,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -342,7 +342,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -364,7 +364,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME timeout-minutes: 30 @@ -396,7 +396,7 @@ jobs: needs: [config] name: Build IC container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -478,7 +478,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -497,7 +497,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME timeout-minutes: 30 @@ -534,7 +534,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME timeout-minutes: 30 diff --git a/.github/workflows/ci-pr-only.yml b/.github/workflows/ci-pr-only.yml index e6bece870e84..b0c92a2abfef 100644 --- a/.github/workflows/ci-pr-only.yml +++ b/.github/workflows/ci-pr-only.yml @@ -20,7 +20,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -38,7 +38,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -68,7 +68,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -110,7 +110,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME timeout-minutes: 5 @@ -146,7 +146,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -207,7 +207,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME if: contains(github.event.pull_request.labels.*.name, 'CI_COVERAGE') diff --git a/.github/workflows/pocket-ic-tests-windows.yml b/.github/workflows/pocket-ic-tests-windows.yml index d8413161ebef..3411f523ef38 100644 --- a/.github/workflows/pocket-ic-tests-windows.yml +++ b/.github/workflows/pocket-ic-tests-windows.yml @@ -17,7 +17,7 @@ jobs: bazel-build-pocket-ic: name: Bazel Build PocketIC container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 diff --git a/.github/workflows/rate-limits-backend-release.yml b/.github/workflows/rate-limits-backend-release.yml index 76caf748dd23..963acd4a9cb5 100644 --- a/.github/workflows/rate-limits-backend-release.yml +++ b/.github/workflows/rate-limits-backend-release.yml @@ -32,7 +32,7 @@ jobs: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info diff --git a/.github/workflows/release-testing.yml b/.github/workflows/release-testing.yml index 4d86771715b8..c7874472e829 100644 --- a/.github/workflows/release-testing.yml +++ b/.github/workflows/release-testing.yml @@ -31,7 +31,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 180 # 3 hours @@ -56,7 +56,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 60 @@ -97,7 +97,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 180 # 3 hours @@ -124,7 +124,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 180 # 3 hours diff --git a/.github/workflows/rosetta-release.yml b/.github/workflows/rosetta-release.yml index 167de7d1cdb9..6bce9fb61c7a 100644 --- a/.github/workflows/rosetta-release.yml +++ b/.github/workflows/rosetta-release.yml @@ -22,7 +22,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f environment: DockerHub steps: - name: Checkout diff --git a/.github/workflows/salt-sharing-canister-release.yml b/.github/workflows/salt-sharing-canister-release.yml index dc9d006269cb..b6455d55671d 100644 --- a/.github/workflows/salt-sharing-canister-release.yml +++ b/.github/workflows/salt-sharing-canister-release.yml @@ -32,7 +32,7 @@ jobs: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info diff --git a/.github/workflows/schedule-daily.yml b/.github/workflows/schedule-daily.yml index cbc69d65772b..eac5d0b9a7e0 100644 --- a/.github/workflows/schedule-daily.yml +++ b/.github/workflows/schedule-daily.yml @@ -15,7 +15,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 120 @@ -59,7 +59,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 720 # 12 hours @@ -97,7 +97,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 30 @@ -135,7 +135,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 480 @@ -181,7 +181,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 60 @@ -232,7 +232,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 120 diff --git a/.github/workflows/schedule-rust-bench.yml b/.github/workflows/schedule-rust-bench.yml index 82982822d8de..489f3e021400 100644 --- a/.github/workflows/schedule-rust-bench.yml +++ b/.github/workflows/schedule-rust-bench.yml @@ -25,7 +25,7 @@ jobs: # see linux-x86-64 runner group labels: rust-benchmarks container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f # running on bare metal machine using ubuntu user options: --user ubuntu timeout-minutes: 720 # 12 hours diff --git a/.github/workflows/schedule-weekly.yml b/.github/workflows/schedule-weekly.yml index 700a686355a3..d938d95cd1c7 100644 --- a/.github/workflows/schedule-weekly.yml +++ b/.github/workflows/schedule-weekly.yml @@ -10,7 +10,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME timeout-minutes: 60 # 1 hour diff --git a/.github/workflows/update-mainnet-revisions.yaml b/.github/workflows/update-mainnet-revisions.yaml index 4dded305d2ed..2cbf9ea3a3da 100644 --- a/.github/workflows/update-mainnet-revisions.yaml +++ b/.github/workflows/update-mainnet-revisions.yaml @@ -46,7 +46,7 @@ jobs: labels: dind-small environment: CREATE_PR container: - image: ghcr.io/dfinity/ic-build@sha256:d8f7308e97e095a9c9b0cdb1b6f260f459424e3792ebd49bb7c6ff6098941a34 + image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f options: >- -e NODE_NAME --privileged --cgroupns host -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info env: diff --git a/ci/container/TAG b/ci/container/TAG index b6a767986ea0..9408dc5a15dd 100644 --- a/ci/container/TAG +++ b/ci/container/TAG @@ -1 +1 @@ -e599a487fa9e718d3c49de7be0a2fa2c87812d8487507dd0a3ea8422932e96b4 +81b0a98486c17991e211deda54c717bfff6427ff14924bf746d5f8fd6cfb9179 From ccebc716649d1844f0ee9fd4aeb6e2ceb39ff4b6 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 08:33:42 +0000 Subject: [PATCH 03/17] rm rls --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index d39ed25d4d3b..c0d59e110975 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,4 +2,4 @@ channel = "1.88.0" targets = ["wasm32-unknown-unknown"] profile = "default" -components = ["rls"] +components = [] From 0b2570e74b517cd38ece1df474a10a77f934b36b Mon Sep 17 00:00:00 2001 From: IDX GitHub Automation <> Date: Thu, 24 Jul 2025 08:51:15 +0000 Subject: [PATCH 04/17] Updating container image to sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c Image tag: 16e06bf3c56bdcc50674a64be074337acee526d41ac785780ae4a9835a6a637b --- .devcontainer/devcontainer.json | 2 +- .github/workflows-source/ci-main.yml | 2 +- .github/workflows-source/ci-pr-only.yml | 2 +- .github/workflows-source/release-testing.yml | 2 +- .github/workflows-source/schedule-daily.yml | 2 +- .github/workflows/ci-main.yml | 16 ++++++++-------- .github/workflows/ci-pr-only.yml | 12 ++++++------ .github/workflows/pocket-ic-tests-windows.yml | 2 +- .../workflows/rate-limits-backend-release.yml | 2 +- .github/workflows/release-testing.yml | 8 ++++---- .github/workflows/rosetta-release.yml | 2 +- .../workflows/salt-sharing-canister-release.yml | 2 +- .github/workflows/schedule-daily.yml | 12 ++++++------ .github/workflows/schedule-rust-bench.yml | 2 +- .github/workflows/schedule-weekly.yml | 2 +- .github/workflows/update-mainnet-revisions.yaml | 2 +- ci/container/TAG | 2 +- 17 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 37eb4f4e1990..7628154f5726 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f", + "image": "ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c", "remoteUser": "ubuntu", "privileged": true, "runArgs": [ diff --git a/.github/workflows-source/ci-main.yml b/.github/workflows-source/ci-main.yml index e0d52ac486e8..6fea32e770d1 100644 --- a/.github/workflows-source/ci-main.yml +++ b/.github/workflows-source/ci-main.yml @@ -34,7 +34,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c dind-large-setup: &dind-large-setup runs-on: labels: dind-large diff --git a/.github/workflows-source/ci-pr-only.yml b/.github/workflows-source/ci-pr-only.yml index 941f29ba058c..2b643e9fc96c 100644 --- a/.github/workflows-source/ci-pr-only.yml +++ b/.github/workflows-source/ci-pr-only.yml @@ -17,7 +17,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c container: &container container: <<: *image diff --git a/.github/workflows-source/release-testing.yml b/.github/workflows-source/release-testing.yml index 197ea9066e43..c282893f1ef7 100644 --- a/.github/workflows-source/release-testing.yml +++ b/.github/workflows-source/release-testing.yml @@ -25,7 +25,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c dind-large-setup: &dind-large-setup runs-on: labels: dind-large diff --git a/.github/workflows-source/schedule-daily.yml b/.github/workflows-source/schedule-daily.yml index 9d51443452b0..229de00ae515 100644 --- a/.github/workflows-source/schedule-daily.yml +++ b/.github/workflows-source/schedule-daily.yml @@ -14,7 +14,7 @@ env: anchors: image: &image - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c backup-pod-access: &backup-pod-access run: | diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index bbc7da05854b..06dc1ca2b6f9 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -107,7 +107,7 @@ jobs: name: Bazel Test All needs: [config] container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 120 @@ -298,7 +298,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -342,7 +342,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -364,7 +364,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME timeout-minutes: 30 @@ -396,7 +396,7 @@ jobs: needs: [config] name: Build IC container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -478,7 +478,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 @@ -497,7 +497,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME timeout-minutes: 30 @@ -534,7 +534,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME timeout-minutes: 30 diff --git a/.github/workflows/ci-pr-only.yml b/.github/workflows/ci-pr-only.yml index b0c92a2abfef..712b66242f41 100644 --- a/.github/workflows/ci-pr-only.yml +++ b/.github/workflows/ci-pr-only.yml @@ -20,7 +20,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -38,7 +38,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -68,7 +68,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -110,7 +110,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME timeout-minutes: 5 @@ -146,7 +146,7 @@ jobs: runs-on: labels: dind-small container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME if: ${{ github.event_name != 'merge_group' }} @@ -207,7 +207,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME if: contains(github.event.pull_request.labels.*.name, 'CI_COVERAGE') diff --git a/.github/workflows/pocket-ic-tests-windows.yml b/.github/workflows/pocket-ic-tests-windows.yml index 3411f523ef38..db2ad9647a8e 100644 --- a/.github/workflows/pocket-ic-tests-windows.yml +++ b/.github/workflows/pocket-ic-tests-windows.yml @@ -17,7 +17,7 @@ jobs: bazel-build-pocket-ic: name: Bazel Build PocketIC container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 90 diff --git a/.github/workflows/rate-limits-backend-release.yml b/.github/workflows/rate-limits-backend-release.yml index 963acd4a9cb5..c538a828566a 100644 --- a/.github/workflows/rate-limits-backend-release.yml +++ b/.github/workflows/rate-limits-backend-release.yml @@ -32,7 +32,7 @@ jobs: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info diff --git a/.github/workflows/release-testing.yml b/.github/workflows/release-testing.yml index c7874472e829..781c9c267756 100644 --- a/.github/workflows/release-testing.yml +++ b/.github/workflows/release-testing.yml @@ -31,7 +31,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 180 # 3 hours @@ -56,7 +56,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 60 @@ -97,7 +97,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 180 # 3 hours @@ -124,7 +124,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 180 # 3 hours diff --git a/.github/workflows/rosetta-release.yml b/.github/workflows/rosetta-release.yml index 6bce9fb61c7a..23f926c5057a 100644 --- a/.github/workflows/rosetta-release.yml +++ b/.github/workflows/rosetta-release.yml @@ -22,7 +22,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c environment: DockerHub steps: - name: Checkout diff --git a/.github/workflows/salt-sharing-canister-release.yml b/.github/workflows/salt-sharing-canister-release.yml index b6455d55671d..a63b34e41e02 100644 --- a/.github/workflows/salt-sharing-canister-release.yml +++ b/.github/workflows/salt-sharing-canister-release.yml @@ -32,7 +32,7 @@ jobs: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info diff --git a/.github/workflows/schedule-daily.yml b/.github/workflows/schedule-daily.yml index eac5d0b9a7e0..fa1365239bbb 100644 --- a/.github/workflows/schedule-daily.yml +++ b/.github/workflows/schedule-daily.yml @@ -15,7 +15,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 120 @@ -59,7 +59,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 720 # 12 hours @@ -97,7 +97,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 30 @@ -135,7 +135,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 480 @@ -181,7 +181,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 60 @@ -232,7 +232,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host timeout-minutes: 120 diff --git a/.github/workflows/schedule-rust-bench.yml b/.github/workflows/schedule-rust-bench.yml index 489f3e021400..940116c70f4e 100644 --- a/.github/workflows/schedule-rust-bench.yml +++ b/.github/workflows/schedule-rust-bench.yml @@ -25,7 +25,7 @@ jobs: # see linux-x86-64 runner group labels: rust-benchmarks container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c # running on bare metal machine using ubuntu user options: --user ubuntu timeout-minutes: 720 # 12 hours diff --git a/.github/workflows/schedule-weekly.yml b/.github/workflows/schedule-weekly.yml index d938d95cd1c7..e1802fe0bc0c 100644 --- a/.github/workflows/schedule-weekly.yml +++ b/.github/workflows/schedule-weekly.yml @@ -10,7 +10,7 @@ jobs: runs-on: labels: dind-large container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME timeout-minutes: 60 # 1 hour diff --git a/.github/workflows/update-mainnet-revisions.yaml b/.github/workflows/update-mainnet-revisions.yaml index 2cbf9ea3a3da..a1f8b2c1a4e1 100644 --- a/.github/workflows/update-mainnet-revisions.yaml +++ b/.github/workflows/update-mainnet-revisions.yaml @@ -46,7 +46,7 @@ jobs: labels: dind-small environment: CREATE_PR container: - image: ghcr.io/dfinity/ic-build@sha256:4e413cc86bac97c7077a9c7857b7ba1ab2e2c8104697f863585ad0ce70aab41f + image: ghcr.io/dfinity/ic-build@sha256:a5edec0ae2b045ef86bc957f9a3155a360edc2a273a700eabd0670dc489d809c options: >- -e NODE_NAME --privileged --cgroupns host -v /var/sysimage:/var/sysimage -v /var/tmp:/var/tmp -v /ceph-s3-info:/ceph-s3-info env: diff --git a/ci/container/TAG b/ci/container/TAG index 9408dc5a15dd..07dfdf7c3f57 100644 --- a/ci/container/TAG +++ b/ci/container/TAG @@ -1 +1 @@ -81b0a98486c17991e211deda54c717bfff6427ff14924bf746d5f8fd6cfb9179 +16e06bf3c56bdcc50674a64be074337acee526d41ac785780ae4a9835a6a637b From 91a68ed23f5bd5956632497c141c2bac2fdeb7e5 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 09:54:05 +0000 Subject: [PATCH 05/17] clippy --- rs/artifact_pool/src/backup.rs | 2 +- rs/canister_sandbox/src/rpc.rs | 2 +- rs/consensus/dkg/src/lib.rs | 1 + rs/consensus/dkg/src/payload_validator.rs | 2 ++ rs/consensus/idkg/src/complaints.rs | 18 ++++++++-------- .../idkg/src/payload_builder/signatures.rs | 4 ++-- rs/consensus/idkg/src/payload_verifier.rs | 9 ++++---- rs/consensus/idkg/src/pre_signer.rs | 18 ++++++++-------- rs/consensus/idkg/src/signer.rs | 21 ++++++++++--------- rs/consensus/src/consensus.rs | 4 ++-- rs/consensus/src/consensus/validator.rs | 8 +++---- rs/consensus/utils/src/membership.rs | 5 +---- .../canister_threshold_sig/idkg/dealing.rs | 2 ++ .../canister_threshold_sig/idkg/transcript.rs | 2 ++ rs/embedders/src/wasmtime_embedder.rs | 1 + .../src/execution/install_code.rs | 1 + .../src/execution/response.rs | 2 ++ .../src/query_handler/query_context.rs | 1 + rs/http_utils/src/file_downloader.rs | 9 +++++--- .../consensus/src/payload_builder/utils.rs | 4 ++-- rs/interfaces/src/consensus_pool.rs | 10 ++++----- .../src/crypto/sign/canister_threshold_sig.rs | 3 +++ .../common/validation/src/lib.rs | 2 +- rs/orchestrator/src/process_manager.rs | 8 +++---- rs/query_stats/src/payload_builder.rs | 2 +- rs/registry/local_store/src/lib.rs | 3 +-- rs/replica/src/main.rs | 2 +- rs/state_manager/src/tip.rs | 1 + rs/types/types/src/consensus/dkg.rs | 4 ++-- rs/types/types/src/consensus/idkg/common.rs | 1 + 30 files changed, 85 insertions(+), 67 deletions(-) diff --git a/rs/artifact_pool/src/backup.rs b/rs/artifact_pool/src/backup.rs index 7b36e5f48806..fec920070bf2 100644 --- a/rs/artifact_pool/src/backup.rs +++ b/rs/artifact_pool/src/backup.rs @@ -597,7 +597,7 @@ impl BackupArtifact { RandomBeacon(artifact) => pb::RandomBeacon::from(artifact).encode(&mut buf), CatchUpPackage((_, artifact)) => artifact.encode(&mut buf), } - .map_err(|err| io::Error::new(io::ErrorKind::Other, err.to_string()))?; + .map_err(|err| io::Error::other(err.to_string()))?; Ok(buf) } diff --git a/rs/canister_sandbox/src/rpc.rs b/rs/canister_sandbox/src/rpc.rs index 4dc06be5d51e..772ebab0aa6d 100644 --- a/rs/canister_sandbox/src/rpc.rs +++ b/rs/canister_sandbox/src/rpc.rs @@ -19,7 +19,7 @@ pub type RPCResult = Result; impl From for std::io::Error { fn from(err: Error) -> Self { - std::io::Error::new(std::io::ErrorKind::Other, format!("IPC error: {:?}", err)) + std::io::Error::other(format!("IPC error: {:?}", err)) } } diff --git a/rs/consensus/dkg/src/lib.rs b/rs/consensus/dkg/src/lib.rs index 4b96e7a098d8..d4b19ca4afad 100644 --- a/rs/consensus/dkg/src/lib.rs +++ b/rs/consensus/dkg/src/lib.rs @@ -261,6 +261,7 @@ impl DkgImpl { } /// Validate the signature and dealing of the given message against its config +#[allow(clippy::result_large_err)] pub(crate) fn crypto_validate_dealing( crypto: &dyn ConsensusCrypto, config: &NiDkgConfig, diff --git a/rs/consensus/dkg/src/payload_validator.rs b/rs/consensus/dkg/src/payload_validator.rs index edc018c71ad3..46c13397819f 100644 --- a/rs/consensus/dkg/src/payload_validator.rs +++ b/rs/consensus/dkg/src/payload_validator.rs @@ -22,6 +22,7 @@ use std::collections::HashSet; /// Validates the DKG payload. The parent block is expected to be a valid block. #[allow(clippy::too_many_arguments)] +#[allow(clippy::result_large_err)] pub fn validate_payload( subnet_id: SubnetId, registry_client: &dyn RegistryClient, @@ -130,6 +131,7 @@ pub fn validate_payload( } // Validates the payload containing dealings. +#[allow(clippy::result_large_err)] fn validate_dealings_payload( crypto: &dyn ConsensusCrypto, pool_reader: &PoolReader<'_>, diff --git a/rs/consensus/idkg/src/complaints.rs b/rs/consensus/idkg/src/complaints.rs index 64454d4074ba..6e9130e5ab97 100644 --- a/rs/consensus/idkg/src/complaints.rs +++ b/rs/consensus/idkg/src/complaints.rs @@ -783,15 +783,15 @@ impl IDkgComplaintHandler for IDkgComplaintHandlerImpl { let metrics = self.metrics.clone(); let mut changes = - update_purge_height(&self.prev_finalized_height, block_reader.tip_height()) - .then(|| { - timed_call( - "purge_artifacts", - || self.purge_artifacts(idkg_pool, &block_reader), - &metrics.on_state_change_duration, - ) - }) - .unwrap_or_default(); + if update_purge_height(&self.prev_finalized_height, block_reader.tip_height()) { + timed_call( + "purge_artifacts", + || self.purge_artifacts(idkg_pool, &block_reader), + &metrics.on_state_change_duration, + ) + } else { + IDkgChangeSet::default() + }; let validate_complaints = || { timed_call( diff --git a/rs/consensus/idkg/src/payload_builder/signatures.rs b/rs/consensus/idkg/src/payload_builder/signatures.rs index e1e72c3332be..d03032628fc4 100644 --- a/rs/consensus/idkg/src/payload_builder/signatures.rs +++ b/rs/consensus/idkg/src/payload_builder/signatures.rs @@ -39,8 +39,8 @@ pub(crate) fn update_signature_agreements( idkg_payload_metrics: Option<&IDkgPayloadMetrics>, ) { let all_random_ids = all_requests - .iter() - .map(|(_, ctxt)| ctxt.pseudo_random_id) + .values() + .map(|ctxt| ctxt.pseudo_random_id) .collect::>(); // We first clean up the existing signature_agreements by keeping those diff --git a/rs/consensus/idkg/src/payload_verifier.rs b/rs/consensus/idkg/src/payload_verifier.rs index 67ec679fbcc2..a3ad85083d96 100644 --- a/rs/consensus/idkg/src/payload_verifier.rs +++ b/rs/consensus/idkg/src/payload_verifier.rs @@ -20,6 +20,7 @@ //! algorithm) can be verified this way, but it is a simple and effective //! approach, similar to what we have been doing in verifying other kinds //! payloads. +#![allow(clippy::result_large_err)] use crate::{ metrics::timed_call, @@ -109,8 +110,8 @@ pub enum InvalidIDkgPayloadReason { TranscriptParamsError(idkg::TranscriptParamsError), ThresholdEcdsaVerifyCombinedSignatureError(ThresholdEcdsaVerifyCombinedSignatureError), ThresholdSchnorrVerifyCombinedSignatureError(ThresholdSchnorrVerifyCombinedSigError), - IDkgVerifyTranscriptError(IDkgVerifyTranscriptError), - IDkgVerifyInitialDealingsError(IDkgVerifyInitialDealingsError), + IDkgVerifyTranscriptError(Box), + IDkgVerifyInitialDealingsError(Box), // local errors ConsensusRegistryVersionNotFound(Height), ChainKeyConfigNotFound, @@ -186,7 +187,7 @@ impl From for IDkgPayloadValidationFailure { impl From for InvalidIDkgPayloadReason { fn from(err: IDkgVerifyTranscriptError) -> Self { - InvalidIDkgPayloadReason::IDkgVerifyTranscriptError(err) + InvalidIDkgPayloadReason::IDkgVerifyTranscriptError(Box::new(err)) } } @@ -198,7 +199,7 @@ impl From for IDkgPayloadValidationFailure { impl From for InvalidIDkgPayloadReason { fn from(err: IDkgVerifyInitialDealingsError) -> Self { - InvalidIDkgPayloadReason::IDkgVerifyInitialDealingsError(err) + InvalidIDkgPayloadReason::IDkgVerifyInitialDealingsError(Box::new(err)) } } diff --git a/rs/consensus/idkg/src/pre_signer.rs b/rs/consensus/idkg/src/pre_signer.rs index 128ce65f66c9..9f25b06c8c7d 100644 --- a/rs/consensus/idkg/src/pre_signer.rs +++ b/rs/consensus/idkg/src/pre_signer.rs @@ -935,15 +935,15 @@ impl IDkgPreSigner for IDkgPreSignerImpl { .update_active_pre_signatures(&block_reader); let mut changes = - update_purge_height(&self.prev_finalized_height, block_reader.tip_height()) - .then(|| { - timed_call( - "purge_artifacts", - || self.purge_artifacts(idkg_pool, &block_reader), - &metrics.on_state_change_duration, - ) - }) - .unwrap_or_default(); + if update_purge_height(&self.prev_finalized_height, block_reader.tip_height()) { + timed_call( + "purge_artifacts", + || self.purge_artifacts(idkg_pool, &block_reader), + &metrics.on_state_change_duration, + ) + } else { + IDkgChangeSet::default() + }; let send_dealings = || { timed_call( diff --git a/rs/consensus/idkg/src/signer.rs b/rs/consensus/idkg/src/signer.rs index 61312525d829..7881990dca1f 100644 --- a/rs/consensus/idkg/src/signer.rs +++ b/rs/consensus/idkg/src/signer.rs @@ -225,7 +225,7 @@ impl ThresholdSignerImpl { .map(|(id, c)| { let inputs = build_signature_inputs(*id, c, block_reader).map_err(|err| if err.is_fatal() { warn!(every_n_seconds => 15, self.log, - "validate_signature_shares(): failed to build signatures inputs: {:?}", + "validate_signature_shares(): failed to build signatures inputs: {:?}", err ); self.metrics.sign_errors_inc("signature_inputs_malformed"); @@ -657,15 +657,16 @@ impl ThresholdSigner for ThresholdSignerImpl { .stats() .update_active_signature_requests(active_requests); - let mut changes = update_purge_height(&self.prev_certified_height, snapshot.get_height()) - .then(|| { - timed_call( - "purge_artifacts", - || self.purge_artifacts(idkg_pool, snapshot.as_ref()), - &metrics.on_state_change_duration, - ) - }) - .unwrap_or_default(); + let mut changes = if update_purge_height(&self.prev_certified_height, snapshot.get_height()) + { + timed_call( + "purge_artifacts", + || self.purge_artifacts(idkg_pool, snapshot.as_ref()), + &metrics.on_state_change_duration, + ) + } else { + IDkgChangeSet::default() + }; let send_signature_shares = || { timed_call( diff --git a/rs/consensus/src/consensus.rs b/rs/consensus/src/consensus.rs index 1a280af7b3b6..5325df1d962e 100644 --- a/rs/consensus/src/consensus.rs +++ b/rs/consensus/src/consensus.rs @@ -368,8 +368,8 @@ impl ConsensusImpl { // Check that this replica is listed as a receiver for every transcript type transcripts - .iter() - .map(|(_, transcript)| { + .values() + .map(|transcript| { transcript .committee .get() diff --git a/rs/consensus/src/consensus/validator.rs b/rs/consensus/src/consensus/validator.rs index 37f357f09f64..68642539aca8 100644 --- a/rs/consensus/src/consensus/validator.rs +++ b/rs/consensus/src/consensus/validator.rs @@ -1,6 +1,6 @@ //! This module encapsulates functions required for validating consensus //! artifacts. - +#![allow(clippy::result_large_err)] use crate::consensus::{ check_protocol_version, metrics::ValidatorMetrics, @@ -1759,7 +1759,7 @@ impl Validator { fn dedup_change_actions(&self, name: &str, actions: Mutations) -> Mutations { let mut change_set = Mutations::new(); for action in actions { - change_set.dedup_push(action).unwrap_or_else(|action| { + if let Some(duplicate_action) = change_set.dedup_push(action) { self.metrics .duplicate_artifact .with_label_values(&[name]) @@ -1768,9 +1768,9 @@ impl Validator { self.log, "Duplicated {} detected in changeset {:?}", name, - action + duplicate_action ) - }) + } } change_set } diff --git a/rs/consensus/utils/src/membership.rs b/rs/consensus/utils/src/membership.rs index 0f19b8d1a5c3..ac6583fc792a 100644 --- a/rs/consensus/utils/src/membership.rs +++ b/rs/consensus/utils/src/membership.rs @@ -198,10 +198,7 @@ impl Membership { height: Height, node_id: NodeId, ) -> Result { - Ok(self - .get_canister_http_committee(height)? - .iter() - .any(|id| *id == node_id)) + Ok(self.get_canister_http_committee(height)?.contains(&node_id)) } /// Return true if the given node ID is in the low threshold committee at diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs index aa8b8db2fbea..919bbb650cca 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/dealing.rs @@ -160,6 +160,7 @@ impl From for IDkgVerifyDealingPrivateError { } } +#[allow(clippy::result_large_err)] pub fn verify_dealing_public( csp_client: &C, registry: &dyn RegistryClient, @@ -226,6 +227,7 @@ pub fn verify_dealing_public( }) } +#[allow(clippy::result_large_err)] pub fn verify_initial_dealings( csp_client: &C, registry: &dyn RegistryClient, diff --git a/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs b/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs index d5adb14c25dc..492fb6082420 100644 --- a/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs +++ b/rs/crypto/src/sign/canister_threshold_sig/idkg/transcript.rs @@ -97,6 +97,7 @@ pub fn create_transcript( }) } +#[allow(clippy::result_large_err)] pub fn verify_transcript( csp_client: &C, vault: &dyn CspVault, @@ -588,6 +589,7 @@ fn signature_batch_err_to_verify_transcript_err( } } +#[allow(clippy::result_large_err)] fn verify_signature_batch( csp_client: &C, vault: &dyn CspVault, diff --git a/rs/embedders/src/wasmtime_embedder.rs b/rs/embedders/src/wasmtime_embedder.rs index 7318e0b7d05d..6400531d7d91 100644 --- a/rs/embedders/src/wasmtime_embedder.rs +++ b/rs/embedders/src/wasmtime_embedder.rs @@ -394,6 +394,7 @@ impl WasmtimeEmbedder { } #[allow(clippy::too_many_arguments)] + #[allow(clippy::result_large_err)] pub fn new_instance( &self, canister_id: CanisterId, diff --git a/rs/execution_environment/src/execution/install_code.rs b/rs/execution_environment/src/execution/install_code.rs index d6b9977c3d64..b67a59449b5f 100644 --- a/rs/execution_environment/src/execution/install_code.rs +++ b/rs/execution_environment/src/execution/install_code.rs @@ -226,6 +226,7 @@ impl InstallCodeHelper { /// Replays the previous `install_code` steps on the given clean canister. /// Returns an error if any step fails. Otherwise, it returns an instance of /// the helper that can be used to continue the `install_code` execution. + #[allow(clippy::result_large_err)] pub fn resume( clean_canister: &CanisterState, paused: PausedInstallCodeHelper, diff --git a/rs/execution_environment/src/execution/response.rs b/rs/execution_environment/src/execution/response.rs index a7540a6f81e5..14bd1a9956b8 100644 --- a/rs/execution_environment/src/execution/response.rs +++ b/rs/execution_environment/src/execution/response.rs @@ -297,6 +297,7 @@ impl ResponseHelper { /// /// It returns an error if the cycles balance of the clean canister differs /// from the cycles balances at the start of the DTS execution. + #[allow(clippy::result_large_err)] fn resume( paused: PausedResponseHelper, clean_canister: &CanisterState, @@ -351,6 +352,7 @@ impl ResponseHelper { /// Processes the output and the state changes of Wasm execution of the /// response callback. + #[allow(clippy::result_large_err)] fn handle_wasm_execution_of_response_callback( mut self, mut output: WasmExecutionOutput, diff --git a/rs/execution_environment/src/query_handler/query_context.rs b/rs/execution_environment/src/query_handler/query_context.rs index cae47abb6496..67d5029f6d47 100644 --- a/rs/execution_environment/src/query_handler/query_context.rs +++ b/rs/execution_environment/src/query_handler/query_context.rs @@ -59,6 +59,7 @@ pub(super) enum QueryResponse { /// The result of execution of a query or a response callback. /// The execution either produces a response or returns a possibly empty set of /// outgoing calls with the new canister state and the call origin. +#[allow(clippy::large_enum_variant)] pub(super) enum ExecutionResult { Response(QueryResponse), Calls(CanisterState, CallOrigin, VecDeque>), diff --git a/rs/http_utils/src/file_downloader.rs b/rs/http_utils/src/file_downloader.rs index 0cd40d138696..7bcf3ef00183 100644 --- a/rs/http_utils/src/file_downloader.rs +++ b/rs/http_utils/src/file_downloader.rs @@ -240,7 +240,10 @@ impl FileDownloader { ); Ok(None) } else { - Err(FileDownloadError::NonSuccessResponse(Method::GET, response)) + Err(FileDownloadError::NonSuccessResponse( + Method::GET, + Box::new(response), + )) } } @@ -356,7 +359,7 @@ pub fn extract_tar_into_dir(tar_path: &Path, target_dir: &Path) -> FileDownloadR } else { Err(FileDownloadError::untar_error( tar_path, - io::Error::new(io::ErrorKind::Other, "Unrecognized file type"), + io::Error::other("Unrecognized file type"), )) } } @@ -373,7 +376,7 @@ pub enum FileDownloadError { ReqwestError(reqwest::Error), /// A non-success HTTP response was received from the given URI - NonSuccessResponse(http::Method, Response), + NonSuccessResponse(http::Method, Box), /// A file's computed hash did not match the expected hash FileHashMismatchError { diff --git a/rs/https_outcalls/consensus/src/payload_builder/utils.rs b/rs/https_outcalls/consensus/src/payload_builder/utils.rs index 0678d970d0fd..5a1064791b11 100644 --- a/rs/https_outcalls/consensus/src/payload_builder/utils.rs +++ b/rs/https_outcalls/consensus/src/payload_builder/utils.rs @@ -107,8 +107,8 @@ pub(crate) fn grouped_shares_meet_divergence_criteria( faults_tolerated: usize, ) -> bool { let mut share_for_content_signers: Vec> = grouped_shares - .iter() - .map(|(_, shares)| shares.iter().map(|share| share.signature.signer).collect()) + .values() + .map(|shares| shares.iter().map(|share| share.signature.signer).collect()) .collect(); share_for_content_signers.sort_by_key(|b| core::cmp::Reverse(b.len())); if let Some(largest_signers) = share_for_content_signers.first() { diff --git a/rs/interfaces/src/consensus_pool.rs b/rs/interfaces/src/consensus_pool.rs index 627a0a1a6f39..2996c16a72ea 100644 --- a/rs/interfaces/src/consensus_pool.rs +++ b/rs/interfaces/src/consensus_pool.rs @@ -84,9 +84,9 @@ pub trait ChangeSetOperation: Sized { /// Conditional composition when self is empty. Similar to Option::or_else. fn or_else Self>(self, f: F) -> Self; /// Append a change action only when it is not a duplicate of what already - /// exists in the Mutations. Return the rejected action as error when it + /// exists in the Mutations. Return the rejected action when it /// is considered as duplicate. - fn dedup_push(&mut self, action: ChangeAction) -> Result<(), ChangeAction>; + fn dedup_push(&mut self, action: ChangeAction) -> Option; } impl ChangeSetOperation for Mutations { @@ -98,12 +98,12 @@ impl ChangeSetOperation for Mutations { } } - fn dedup_push(&mut self, action: ChangeAction) -> Result<(), ChangeAction> { + fn dedup_push(&mut self, action: ChangeAction) -> Option { if !self.iter().any(|x| x.content_eq(&action)) { self.push(action); - Ok(()) + None } else { - Err(action) + Some(action) } } } diff --git a/rs/interfaces/src/crypto/sign/canister_threshold_sig.rs b/rs/interfaces/src/crypto/sign/canister_threshold_sig.rs index c72a3f3c0003..c1c55df66408 100644 --- a/rs/interfaces/src/crypto/sign/canister_threshold_sig.rs +++ b/rs/interfaces/src/crypto/sign/canister_threshold_sig.rs @@ -212,6 +212,7 @@ pub trait IDkgProtocol { /// is different from the one included in the dealing. /// * [`IDkgVerifyDealingPublicError::InvalidDealing`] if the internal dealing is invalid. /// * [`IDkgVerifyDealingPublicError::InvalidSignature`] if the signature on the dealing is invalid. + #[allow(clippy::result_large_err)] fn verify_dealing_public( &self, params: &IDkgTranscriptParams, @@ -264,6 +265,7 @@ pub trait IDkgProtocol { /// `params` are equal to the params of `initial_dealings`. /// * [`IDkgVerifyInitialDealingsError::PublicVerificationFailure`] if public /// dealing verification fails for some dealing in `initial_dealings`. + #[allow(clippy::result_large_err)] fn verify_initial_dealings( &self, params: &IDkgTranscriptParams, @@ -318,6 +320,7 @@ pub trait IDkgProtocol { /// internal dealings in the verified dealings in `transcript`. /// * [`IDkgVerifyTranscriptError::InvalidTranscript`] if the re-creation of an internal /// transcript does not match the internal transcript in `transcript`. + #[allow(clippy::result_large_err)] fn verify_transcript( &self, params: &IDkgTranscriptParams, diff --git a/rs/nervous_system/common/validation/src/lib.rs b/rs/nervous_system/common/validation/src/lib.rs index 789868393e6e..a195d0241720 100644 --- a/rs/nervous_system/common/validation/src/lib.rs +++ b/rs/nervous_system/common/validation/src/lib.rs @@ -56,7 +56,7 @@ pub fn validate_proposal_url( }; match allowed_domains { - Some(allowed) => match allowed.iter().any(|allowed| domain == *allowed) { + Some(allowed) => match allowed.contains(&domain) { true => Ok(()), false => Err(format!( "{field_name} was not in the list of allowed domains: {:?}", diff --git a/rs/orchestrator/src/process_manager.rs b/rs/orchestrator/src/process_manager.rs index a3638fac542d..dc642d0cc52a 100644 --- a/rs/orchestrator/src/process_manager.rs +++ b/rs/orchestrator/src/process_manager.rs @@ -111,10 +111,10 @@ impl ProcessManager

{ gpid = Pid::from_raw(t_gpid); } return signal::kill(gpid, Signal::SIGTERM).map_err(|err| { - std::io::Error::new( - std::io::ErrorKind::Other, - format!("Failed to kill {} process with gpid {gpid}: {err}", P::NAME), - ) + std::io::Error::other(format!( + "Failed to kill {} process with gpid {gpid}: {err}", + P::NAME + )) }); } info!(self.log, "no {} process running", P::NAME); diff --git a/rs/query_stats/src/payload_builder.rs b/rs/query_stats/src/payload_builder.rs index a4e741234d5f..ff6c310379d4 100644 --- a/rs/query_stats/src/payload_builder.rs +++ b/rs/query_stats/src/payload_builder.rs @@ -363,7 +363,7 @@ impl QueryStatsPayloadBuilderImpl { // Check the certified state for stats that we have already sent if let Some(state_stats) = get_stats_for_node_id_and_epoch(state_stats, &node_id, &epoch) - .map(|record| record.iter().map(|(canister_id, _)| canister_id)) + .map(|record| record.keys()) { previous_ids.extend(state_stats); } diff --git a/rs/registry/local_store/src/lib.rs b/rs/registry/local_store/src/lib.rs index 2f7e69984e6f..49c761349377 100644 --- a/rs/registry/local_store/src/lib.rs +++ b/rs/registry/local_store/src/lib.rs @@ -133,8 +133,7 @@ impl LocalStoreImpl { fn read_changelog_entry>(p: P) -> io::Result { let bytes = std::fs::read(p)?; - PbChangelogEntry::decode(bytes.as_slice()) - .map_err(|e| io::Error::new(std::io::ErrorKind::Other, e)) + PbChangelogEntry::decode(bytes.as_slice()).map_err(io::Error::other) } // precondition: version > 0 diff --git a/rs/replica/src/main.rs b/rs/replica/src/main.rs index 791bda4c7482..ee182328af1f 100644 --- a/rs/replica/src/main.rs +++ b/rs/replica/src/main.rs @@ -74,7 +74,7 @@ fn main() -> io::Result<()> { eprintln!("Failed to setup a new process group for replica."); // This is a generic exit error. At this point sandboxing is // not turned on so we can do a simple exit with cleanup. - return Err(io::Error::new(io::ErrorKind::Other, err)); + return Err(io::Error::other(err)); } #[cfg(feature = "profiler")] diff --git a/rs/state_manager/src/tip.rs b/rs/state_manager/src/tip.rs index dbcf4f5a98bd..8018b3d48881 100644 --- a/rs/state_manager/src/tip.rs +++ b/rs/state_manager/src/tip.rs @@ -73,6 +73,7 @@ pub(crate) struct PageMapToFlush { } /// Request for the Tip directory handling thread. +#[allow(clippy::large_enum_variant)] pub(crate) enum TipRequest { /// Create checkpoint from the current tip for the given height. /// Sends the created checkpoint and the ReplicatedState switched to the diff --git a/rs/types/types/src/consensus/dkg.rs b/rs/types/types/src/consensus/dkg.rs index dc9806495e1a..9c090423f5f9 100644 --- a/rs/types/types/src/consensus/dkg.rs +++ b/rs/types/types/src/consensus/dkg.rs @@ -276,8 +276,8 @@ impl DkgSummary { /// Returns the oldest registry version that is still relevant to DKG. pub(crate) fn get_oldest_registry_version_in_use(&self) -> RegistryVersion { self.current_transcripts() - .iter() - .map(|(_id, transcript)| transcript.registry_version) + .values() + .map(|transcript| transcript.registry_version) .min() .expect("No current transcripts available") } diff --git a/rs/types/types/src/consensus/idkg/common.rs b/rs/types/types/src/consensus/idkg/common.rs index 8096c6844bf9..cf217e92d7fc 100644 --- a/rs/types/types/src/consensus/idkg/common.rs +++ b/rs/types/types/src/consensus/idkg/common.rs @@ -965,6 +965,7 @@ impl IDkgTranscriptParamsRef { } #[derive(Clone, Eq, PartialEq, Hash, Debug, Deserialize, Serialize)] +#[allow(clippy::large_enum_variant)] #[cfg_attr(test, derive(ExhaustiveSet))] pub enum PreSignatureInCreation { Ecdsa(QuadrupleInCreation), From 8918b95332eb399c6f5fab75f87636ba7852e51d Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 11:06:19 +0000 Subject: [PATCH 06/17] more clippy --- ci/scripts/rust-lint.sh | 3 ++- rs/bitcoin/adapter/test_utils/src/bitcoind.rs | 4 ++-- .../rate_limits/canister/getter.rs | 4 ++-- rs/canister_client/src/http_client.rs | 3 +-- rs/consensus/dkg/src/payload_validator.rs | 1 + rs/consensus/tests/framework/malicious.rs | 11 ++++------- rs/consensus/tests/framework/types.rs | 2 ++ .../ni_dkg/tests/test_create_dealing.rs | 2 +- .../vault/local_csp_vault/basic_sig/tests.rs | 2 +- .../src/vault/local_csp_vault/idkg/tests.rs | 5 ++--- .../vault/local_csp_vault/multi_sig/tests.rs | 2 +- .../src/vault/local_csp_vault/ni_dkg/tests.rs | 2 +- .../src/vault/local_csp_vault/tls/tests.rs | 2 +- .../src/vault/remote_csp_vault/tests.rs | 4 ++-- .../src/vault/test_utils/ni_dkg.rs | 2 +- .../ledger-suite-orchestrator/src/state/mod.rs | 1 + rs/https_outcalls/adapter/src/rpc_server.rs | 9 +++++---- rs/https_outcalls/client/src/client.rs | 5 +---- rs/ic_os/grub/src/lib.rs | 5 +---- rs/ic_os/vsock/vsock_lib/src/host/hsm.rs | 10 ++++------ rs/ledger_suite/icp/ledger/src/main.rs | 5 +---- rs/ledger_suite/icrc1/ledger/src/main.rs | 8 ++++---- ...ons_fund_participation_constraints_tests.rs | 2 +- rs/nns/governance/tests/proposals.rs | 2 +- rs/pocket_ic_server/src/pocket_ic.rs | 5 +---- rs/pocket_ic_server/src/state_api/state.rs | 1 + rs/prep/src/bin/principal_id.rs | 3 +-- .../canister/tests/add_nodes_to_subnet.rs | 2 +- rs/registry/canister/tests/recover_subnet.rs | 2 +- rs/rosetta-api/icp/src/ledger_client.rs | 1 + rs/rosetta-api/icp/src/rosetta_server.rs | 7 +------ .../canister_test/src/canister.rs | 1 + rs/rust_canisters/dfn_core/src/stable.rs | 5 +---- rs/rust_canisters/stable_reader/src/lib.rs | 18 ++++++++---------- rs/sns/governance/tests/fixtures/mod.rs | 2 +- rs/state_machine_tests/src/lib.rs | 4 ++-- rs/state_manager/src/tree_diff.rs | 6 ++---- rs/sys/src/fs.rs | 5 +---- rs/test_utilities/embedders/src/lib.rs | 1 + rs/test_utilities/src/xnet_payload_builder.rs | 6 ++---- rs/tests/driver/src/driver/logger.rs | 2 +- rs/tests/driver/src/driver/test_env.rs | 3 +-- .../tla_instrumentation/src/checker.rs | 1 + .../tla_instrumentation/src/tla_value.rs | 2 +- .../tests/certified_slice_pool.rs | 2 +- 45 files changed, 74 insertions(+), 101 deletions(-) diff --git a/ci/scripts/rust-lint.sh b/ci/scripts/rust-lint.sh index 2c9da73fd2b4..41c2f2561aac 100755 --- a/ci/scripts/rust-lint.sh +++ b/ci/scripts/rust-lint.sh @@ -7,7 +7,8 @@ cargo clippy --locked --all-features --workspace --all-targets --keep-going -- \ -D warnings \ -D clippy::all \ -D clippy::mem_forget \ - -C debug-assertions=off + -C debug-assertions=off \ + -A clippy::uninlined_format_args if cargo tree --workspace --depth 1 -e features | grep -q 'serde feature "rc"'; then echo 'The serde "rc" feature seems to be enabled. Instead, the module "serde_arc" in "ic-utils" should be used.' diff --git a/rs/bitcoin/adapter/test_utils/src/bitcoind.rs b/rs/bitcoin/adapter/test_utils/src/bitcoind.rs index b3ef7a9b94cc..ac3fb501ae89 100644 --- a/rs/bitcoin/adapter/test_utils/src/bitcoind.rs +++ b/rs/bitcoin/adapter/test_utils/src/bitcoind.rs @@ -1,6 +1,6 @@ use std::{ collections::{HashMap, VecDeque}, - io::{self, ErrorKind, Read}, + io::{self, Read}, net::SocketAddr, sync::Arc, }; @@ -72,7 +72,7 @@ async fn handle_version( magic: Magic, ) -> io::Result<()> { if v.version < MINIMUM_PROTOCOL_VERSION { - let err = io::Error::new(ErrorKind::Other, "Protocol version too low"); + let err = io::Error::other("Protocol version too low"); return Err(err); } let mut version = v.clone(); diff --git a/rs/boundary_node/rate_limits/canister/getter.rs b/rs/boundary_node/rate_limits/canister/getter.rs index 038d24d66565..2282e0b4fe26 100644 --- a/rs/boundary_node/rate_limits/canister/getter.rs +++ b/rs/boundary_node/rate_limits/canister/getter.rs @@ -516,8 +516,8 @@ mod tests { removed_in_version: Some(5), }; // rules are not ordered in the response, so just search - assert!(response.iter().any(|e| *e == rule_1)); - assert!(response.iter().any(|e| *e == rule_2)); + assert!(response.contains(&rule_1)); + assert!(response.contains(&rule_2)); } #[test] diff --git a/rs/canister_client/src/http_client.rs b/rs/canister_client/src/http_client.rs index 46cee5b4c3e3..2cb9d12630d3 100644 --- a/rs/canister_client/src/http_client.rs +++ b/rs/canister_client/src/http_client.rs @@ -108,8 +108,7 @@ impl Service for DnsResolverWithOverrides { } } } - EitherFut::Right(futures_util::future::ready(Err(io::Error::new( - io::ErrorKind::Other, + EitherFut::Right(futures_util::future::ready(Err(io::Error::other( "unable to resolve dns query", )))) } diff --git a/rs/consensus/dkg/src/payload_validator.rs b/rs/consensus/dkg/src/payload_validator.rs index 46c13397819f..7b4bc85a99c4 100644 --- a/rs/consensus/dkg/src/payload_validator.rs +++ b/rs/consensus/dkg/src/payload_validator.rs @@ -440,6 +440,7 @@ mod tests { /// Configures all the dependencies and calls [`validate_payload`] with /// `dealings_to_validate` as an argument. + #[allow(clippy::result_large_err)] fn validate_payload_test_case( dealings_to_validate: Vec, parent_dealings: Vec, diff --git a/rs/consensus/tests/framework/malicious.rs b/rs/consensus/tests/framework/malicious.rs index 5b51754c0d48..4d25f12bf45e 100644 --- a/rs/consensus/tests/framework/malicious.rs +++ b/rs/consensus/tests/framework/malicious.rs @@ -39,13 +39,10 @@ impl PoolMutationsProducer for InvalidNotaryShareSignature }) .and_then(|share| NotarizationShare::try_from(share).ok()) { - std::mem::swap( - action, - &mut AddToValidated(ValidatedConsensusArtifact { - msg: share.into_message(), - timestamp, - }), - ); + *action = AddToValidated(ValidatedConsensusArtifact { + msg: share.into_message(), + timestamp, + }); } } } diff --git a/rs/consensus/tests/framework/types.rs b/rs/consensus/tests/framework/types.rs index 96c3c5fd6ff9..3a41040c7b41 100644 --- a/rs/consensus/tests/framework/types.rs +++ b/rs/consensus/tests/framework/types.rs @@ -68,6 +68,7 @@ pub const PRIORITY_FN_REFRESH_INTERVAL: Duration = Duration::from_secs(3); /// delivered to peers, or to a timer expired event that should trigger /// consensus on_state_change. #[derive(Clone, Debug)] +#[allow(clippy::large_enum_variant)] pub enum Input { Message(Message), TimerExpired(Time), @@ -108,6 +109,7 @@ impl Eq for Input {} pub type Output = Message; #[derive(Clone, Debug)] +#[allow(clippy::large_enum_variant)] pub enum InputMessage { Consensus(ConsensusMessage), Dkg(Box), diff --git a/rs/crypto/internal/crypto_service_provider/src/threshold/ni_dkg/tests/test_create_dealing.rs b/rs/crypto/internal/crypto_service_provider/src/threshold/ni_dkg/tests/test_create_dealing.rs index e9a4f1725adc..221e44648097 100644 --- a/rs/crypto/internal/crypto_service_provider/src/threshold/ni_dkg/tests/test_create_dealing.rs +++ b/rs/crypto/internal/crypto_service_provider/src/threshold/ni_dkg/tests/test_create_dealing.rs @@ -199,7 +199,7 @@ impl StateWithConfig { let incorrect_indices: Vec = (0..map.len() as NodeIndex * 2) .filter(|index| *index != missing_index) .choose_multiple(rng, map.len()); - let values = map.iter().map(|(_, value)| (*value).clone()); + let values = map.values().map(|value| (*value).clone()); incorrect_indices.into_iter().zip(values).collect() } } diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/basic_sig/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/basic_sig/tests.rs index 93153ebaf85c..f5fe19e600ea 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/basic_sig/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/basic_sig/tests.rs @@ -103,7 +103,7 @@ fn should_fail_with_internal_error_if_node_signing_key_generated_more_than_once( #[test] fn should_fail_with_transient_internal_error_if_node_signing_public_key_persistence_fails() { let mut pks_returning_io_error = MockPublicKeyStore::new(); - let io_error = io::Error::new(io::ErrorKind::Other, "oh no!"); + let io_error = io::Error::other("oh no!"); pks_returning_io_error .expect_set_once_node_signing_pubkey() .return_once(|_key| Err(PublicKeySetOnceError::Io(io_error))); diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs index 9b3c91c40412..64839e05f96b 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/idkg/tests.rs @@ -177,7 +177,7 @@ mod idkg_gen_dealing_encryption_key_pair { #[test] fn should_fail_with_transient_internal_error_if_storing_idkg_public_key_fails() { - let io_error = std::io::Error::new(std::io::ErrorKind::Other, "oh no!"); + let io_error = std::io::Error::other("oh no!"); let mut pks_returning_io_error = MockPublicKeyStore::new(); pks_returning_io_error .expect_add_idkg_dealing_encryption_pubkey() @@ -556,8 +556,7 @@ mod idkg_retain_active_keys { let oldest_public_key_proto = valid_idkg_dealing_encryption_public_key(); let oldest_public_key = mega_public_key_from_proto(&oldest_public_key_proto) .expect("should convert to MEGaPublicKey"); - let err = - PublicKeyRetainError::Io(std::io::Error::new(std::io::ErrorKind::Other, "oh no!")); + let err = PublicKeyRetainError::Io(std::io::Error::other("oh no!")); pks.expect_would_retain_idkg_public_keys_modify_pubkey_store() .times(1) .in_sequence(&mut seq) diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/multi_sig/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/multi_sig/tests.rs index 58fe0a72dae0..f70d14eef883 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/multi_sig/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/multi_sig/tests.rs @@ -143,7 +143,7 @@ fn should_fail_with_internal_error_if_committee_signing_key_generated_more_than_ #[test] fn should_fail_with_transient_internal_error_if_committee_signing_key_persistence_fails() { let mut pks_returning_io_error = MockPublicKeyStore::new(); - let io_error = std::io::Error::new(std::io::ErrorKind::Other, "oh no!"); + let io_error = std::io::Error::other("oh no!"); pks_returning_io_error .expect_set_once_committee_signing_pubkey() .return_once(|_key| Err(PublicKeySetOnceError::Io(io_error))); diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/ni_dkg/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/ni_dkg/tests.rs index f922c8d65093..d22b2d3ad7d5 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/ni_dkg/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/ni_dkg/tests.rs @@ -157,7 +157,7 @@ fn should_fail_with_internal_error_if_dkg_dealing_encryption_key_generated_more_ #[test] fn should_fail_with_transient_internal_error_if_dkg_dealing_encryption_key_persistence_fails() { let mut pks_returning_io_error = MockPublicKeyStore::new(); - let io_error = io::Error::new(io::ErrorKind::Other, "oh no!"); + let io_error = io::Error::other("oh no!"); pks_returning_io_error .expect_set_once_ni_dkg_dealing_encryption_pubkey() .return_once(|_key| Err(PublicKeySetOnceError::Io(io_error))); diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tls/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tls/tests.rs index 1e6e366bd4b4..bb4f671e79e8 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tls/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/local_csp_vault/tls/tests.rs @@ -313,7 +313,7 @@ mod keygen { #[test] fn should_fail_with_transient_internal_error_if_tls_keygen_persistence_fails() { let mut pks_returning_io_error = MockPublicKeyStore::new(); - let io_error = std::io::Error::new(std::io::ErrorKind::Other, "oh no!"); + let io_error = std::io::Error::other("oh no!"); pks_returning_io_error .expect_set_once_tls_certificate() .return_once(|_key| Err(PublicKeySetOnceError::Io(io_error))); diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tests.rs b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tests.rs index 023a46a80288..3905710d1f31 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tests.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/remote_csp_vault/tests.rs @@ -235,7 +235,7 @@ mod ni_dkg { fn should_fail_with_transient_internal_error_if_dealing_encryption_key_persistence_fails() { let local_vault = { let mut pks_returning_io_error = MockPublicKeyStore::new(); - let io_error = io::Error::new(io::ErrorKind::Other, "oh no!"); + let io_error = io::Error::other("oh no!"); pks_returning_io_error .expect_set_once_ni_dkg_dealing_encryption_pubkey() .return_once(|_key| Err(PublicKeySetOnceError::Io(io_error))); @@ -297,7 +297,7 @@ mod idkg { #[test] fn should_fail_with_transient_internal_error_if_storing_idkg_public_key_fails() { let local_vault = { - let io_error = std::io::Error::new(std::io::ErrorKind::Other, "oh no!"); + let io_error = std::io::Error::other("oh no!"); let mut pks_returning_io_error = MockPublicKeyStore::new(); pks_returning_io_error .expect_add_idkg_dealing_encryption_pubkey() diff --git a/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/ni_dkg.rs b/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/ni_dkg.rs index 0392ec7e0fea..bad24cedc466 100644 --- a/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/ni_dkg.rs +++ b/rs/crypto/internal/crypto_service_provider/src/vault/test_utils/ni_dkg.rs @@ -431,7 +431,7 @@ impl StateWithConfig { let incorrect_indices: Vec = (0..map.len() as NodeIndex * 2) .filter(|index| *index != missing_index) .choose_multiple(rng, map.len()); - let values = map.iter().map(|(_, value)| (*value).clone()); + let values = map.values().map(|value| (*value).clone()); incorrect_indices.into_iter().zip(values).collect() } } diff --git a/rs/ethereum/ledger-suite-orchestrator/src/state/mod.rs b/rs/ethereum/ledger-suite-orchestrator/src/state/mod.rs index b9bcc2d23d66..4633d297fddf 100644 --- a/rs/ethereum/ledger-suite-orchestrator/src/state/mod.rs +++ b/rs/ethereum/ledger-suite-orchestrator/src/state/mod.rs @@ -470,6 +470,7 @@ pub struct LedgerSuiteVersion { /// Configuration state of the ledger orchestrator. #[derive(Clone, PartialEq, Debug, Default)] +#[allow(clippy::large_enum_variant)] enum ConfigState { #[default] Uninitialized, diff --git a/rs/https_outcalls/adapter/src/rpc_server.rs b/rs/https_outcalls/adapter/src/rpc_server.rs index 44ed1ff4c2b2..3b736b9ab199 100644 --- a/rs/https_outcalls/adapter/src/rpc_server.rs +++ b/rs/https_outcalls/adapter/src/rpc_server.rs @@ -450,7 +450,7 @@ impl HttpsOutcallsService for CanisterHttp { } } None => { - // Eventually only this branch should be active. + // Eventually only this branch should be active. dark_launch_result } } @@ -474,10 +474,10 @@ impl HttpsOutcallsService for CanisterHttp { } Ok(resp) => Ok(resp), } - } else { // Application subnet. + } else { // Application subnet. // TODO: as technically socks proxies are now tried all the time, instead of using - // the "socks_proxy_allowed" flag, we should instead send the relevant URLs in the - // "socks_proxy_addrs" param. Particularly, the caller should send the API BNs in + // the "socks_proxy_allowed" flag, we should instead send the relevant URLs in the + // "socks_proxy_addrs" param. Particularly, the caller should send the API BNs in // the case of system subnets, and the socks5.ic0.app URL in the case of app subnets. let mut http_req = hyper::Request::new(Full::new(Bytes::from(req.body))); *http_req.headers_mut() = headers; @@ -600,6 +600,7 @@ impl HttpsOutcallsService for CanisterHttp { } } +#[allow(clippy::result_large_err)] fn validate_headers(raw_headers: Vec) -> Result { // Check we are within limit for number of headers. if raw_headers.len() > HEADERS_LIMIT { diff --git a/rs/https_outcalls/client/src/client.rs b/rs/https_outcalls/client/src/client.rs index 05004c0d41a4..3da7b82ec83b 100644 --- a/rs/https_outcalls/client/src/client.rs +++ b/rs/https_outcalls/client/src/client.rs @@ -471,10 +471,7 @@ mod tests { if let Some(client) = client { Ok(hyper_util::rt::TokioIo::new(client)) } else { - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "Client already taken", - )) + Err(std::io::Error::other("Client already taken")) } } })) diff --git a/rs/ic_os/grub/src/lib.rs b/rs/ic_os/grub/src/lib.rs index 6d58c2061e06..5f7aa67e4c24 100644 --- a/rs/ic_os/grub/src/lib.rs +++ b/rs/ic_os/grub/src/lib.rs @@ -120,10 +120,7 @@ impl GrubEnv { } if buffer.len() > GRUB_ENV_SIZE { - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "Buffer too large", - )) + Err(std::io::Error::other("Buffer too large")) } else { buffer.resize(GRUB_ENV_SIZE, b'#'); Ok(buffer) diff --git a/rs/ic_os/vsock/vsock_lib/src/host/hsm.rs b/rs/ic_os/vsock/vsock_lib/src/host/hsm.rs index 628971802ec2..202393c7a475 100644 --- a/rs/ic_os/vsock/vsock_lib/src/host/hsm.rs +++ b/rs/ic_os/vsock/vsock_lib/src/host/hsm.rs @@ -1,7 +1,7 @@ use crate::host::command_utilities::handle_command_output; use crate::protocol::Response; use rusb::{Context, Device, UsbContext}; -use std::io::{Error, ErrorKind, Write}; +use std::io::{Error, Write}; use tempfile::NamedTempFile; // nitrokey: @@ -60,11 +60,9 @@ fn create_hsm_xml_file() -> Result { } fn get_hsm_info() -> Result { - let context = Context::new().map_err(|e| Error::new(ErrorKind::Other, e))?; + let context = Context::new().map_err(Error::other)?; - let usb_devices = context - .devices() - .map_err(|e| Error::new(ErrorKind::Other, e))?; + let usb_devices = context.devices().map_err(Error::other)?; fn is_hsm_device(device: &Device) -> bool { match device.device_descriptor() { @@ -95,7 +93,7 @@ fn get_hsm_info() -> Result { hsm_bus_num: hsm_device.bus_number(), hsm_address: hsm_device.address(), }) - .ok_or_else(|| Error::new(ErrorKind::Other, "No HSM device found")) + .ok_or_else(|| Error::other("No HSM device found")) } // HSM_VENDOR and HSM_PRODUCT must be converted to hexadecimal for the attach/detach hsm virsh commands diff --git a/rs/ledger_suite/icp/ledger/src/main.rs b/rs/ledger_suite/icp/ledger/src/main.rs index 0befe092b749..bbffd00baa1f 100644 --- a/rs/ledger_suite/icp/ledger/src/main.rs +++ b/rs/ledger_suite/icp/ledger/src/main.rs @@ -1345,10 +1345,7 @@ fn get_nodes_() { fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> std::io::Result<()> { let ledger = LEDGER.try_read().map_err(|err| { - std::io::Error::new( - std::io::ErrorKind::Other, - format!("Failed to get a LEDGER for read: {}", err), - ) + std::io::Error::other(format!("Failed to get a LEDGER for read: {}", err)) })?; let archive_guard = ledger.blockchain.archive.read().unwrap(); let num_archives = archive_guard diff --git a/rs/ledger_suite/icrc1/ledger/src/main.rs b/rs/ledger_suite/icrc1/ledger/src/main.rs index 13e050ee5141..187e5f2a8204 100644 --- a/rs/ledger_suite/icrc1/ledger/src/main.rs +++ b/rs/ledger_suite/icrc1/ledger/src/main.rs @@ -825,10 +825,10 @@ fn encode_metrics(w: &mut ic_metrics_encoder::MetricsEncoder>) -> std::i "Total number of archives.", )?; } - Err(err) => Err(std::io::Error::new( - std::io::ErrorKind::Other, - format!("Failed to read number of archives: {}", err), - ))?, + Err(err) => Err(std::io::Error::other(format!( + "Failed to read number of archives: {}", + err + )))?, } if is_ready() { w.encode_gauge( diff --git a/rs/nns/governance/src/neurons_fund/neurons_fund_participation_constraints_tests.rs b/rs/nns/governance/src/neurons_fund/neurons_fund_participation_constraints_tests.rs index 4a42d612774a..892760cabc84 100644 --- a/rs/nns/governance/src/neurons_fund/neurons_fund_participation_constraints_tests.rs +++ b/rs/nns/governance/src/neurons_fund/neurons_fund_participation_constraints_tests.rs @@ -60,7 +60,7 @@ impl MatchingFunction for LogisticFunction { let x_icp = f64::try_from(rescale_to_icp(x_icp_e8s)?) .map_err(|err| format!("cannot convert {} to f64: {}", x_icp_e8s, err))?; let res_icp = self.supremum_icp - / (1.0 + (-1.0 * self.steepness_inv_icp * (x_icp - self.midpoint_icp)).exp()); + / (1.0 + (-self.steepness_inv_icp * (x_icp - self.midpoint_icp)).exp()); Decimal::try_from(res_icp).map_err(|err| err.to_string()) } } diff --git a/rs/nns/governance/tests/proposals.rs b/rs/nns/governance/tests/proposals.rs index 6e5244f22dc7..b00cddebae5e 100644 --- a/rs/nns/governance/tests/proposals.rs +++ b/rs/nns/governance/tests/proposals.rs @@ -176,7 +176,7 @@ fn test_sum_weighted_voting_power() { // Step 1: Prepare the world. // Step 2: Call code under test. - let result = sum_weighted_voting_power(PROPOSALS.iter().map(|(_id, proposal)| proposal)); + let result = sum_weighted_voting_power(PROPOSALS.values()); // Step 3: Inspect result(s). #[rustfmt::skip] diff --git a/rs/pocket_ic_server/src/pocket_ic.rs b/rs/pocket_ic_server/src/pocket_ic.rs index 48401b1dfb7b..9c94b238264a 100644 --- a/rs/pocket_ic_server/src/pocket_ic.rs +++ b/rs/pocket_ic_server/src/pocket_ic.rs @@ -2049,10 +2049,7 @@ async fn setup_adapter_mock( if let Some(client) = client { Ok(hyper_util::rt::TokioIo::new(client)) } else { - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "Client already taken", - )) + Err(std::io::Error::other("Client already taken")) } } })) diff --git a/rs/pocket_ic_server/src/state_api/state.rs b/rs/pocket_ic_server/src/state_api/state.rs index 7f00d453bc6d..572bfd90ea12 100644 --- a/rs/pocket_ic_server/src/state_api/state.rs +++ b/rs/pocket_ic_server/src/state_api/state.rs @@ -364,6 +364,7 @@ pub type Computations = HashMap; /// vector is replaced by a Busy variant which contains information about the /// computation that is currently running. Afterwards, the instance is put back as /// Available. +#[allow(clippy::large_enum_variant)] pub enum InstanceState { Busy { state_label: StateLabel, diff --git a/rs/prep/src/bin/principal_id.rs b/rs/prep/src/bin/principal_id.rs index 800d58d26d31..df6384dfb216 100644 --- a/rs/prep/src/bin/principal_id.rs +++ b/rs/prep/src/bin/principal_id.rs @@ -101,8 +101,7 @@ fn run_self_signed(fname: Option, pod: Option) -> io::Result< match pod { Some(tgt) => parser = tgt, None => { - return Err(io::Error::new( - io::ErrorKind::Other, + return Err(io::Error::other( "Must specify '--type' option when reading from stdin", )) } diff --git a/rs/registry/canister/tests/add_nodes_to_subnet.rs b/rs/registry/canister/tests/add_nodes_to_subnet.rs index 51900f92bae2..da1e90db09bd 100644 --- a/rs/registry/canister/tests/add_nodes_to_subnet.rs +++ b/rs/registry/canister/tests/add_nodes_to_subnet.rs @@ -243,7 +243,7 @@ fn test_add_nodes_to_subnet_succeeds() { ); for node_id in unassigned_node_ids { let node_id = node_id.get().to_vec(); - assert!(subnet_record.membership.iter().any(|x| *x == node_id)); + assert!(subnet_record.membership.contains(&node_id)); } Ok(()) diff --git a/rs/registry/canister/tests/recover_subnet.rs b/rs/registry/canister/tests/recover_subnet.rs index c9829136526a..f4b54faf2080 100644 --- a/rs/registry/canister/tests/recover_subnet.rs +++ b/rs/registry/canister/tests/recover_subnet.rs @@ -191,7 +191,7 @@ fn test_recover_subnet_with_replacement_nodes() { assert_eq!(subnet_record.membership.len(), num_unassigned_nodes); for node_id in unassigned_node_ids { let node_id = node_id.get().to_vec(); - assert!(subnet_record.membership.iter().any(|x| *x == node_id)); + assert!(subnet_record.membership.contains(&node_id)); } let updated_cup_contents: CatchUpPackageContents = diff --git a/rs/rosetta-api/icp/src/ledger_client.rs b/rs/rosetta-api/icp/src/ledger_client.rs index fd91a612c9a6..a67661b964c4 100644 --- a/rs/rosetta-api/icp/src/ledger_client.rs +++ b/rs/rosetta-api/icp/src/ledger_client.rs @@ -116,6 +116,7 @@ pub struct LedgerClient { } #[derive(serde::Serialize, serde::Deserialize)] +#[allow(clippy::large_enum_variant)] pub enum OperationOutput { BlockIndex(BlockIndex), NeuronId(u64), diff --git a/rs/rosetta-api/icp/src/rosetta_server.rs b/rs/rosetta-api/icp/src/rosetta_server.rs index 700cd303a552..22566505659c 100644 --- a/rs/rosetta-api/icp/src/rosetta_server.rs +++ b/rs/rosetta-api/icp/src/rosetta_server.rs @@ -367,12 +367,7 @@ impl RosettaApiServer { *server_lock = match replace(&mut *server_lock, ServerState::Failed) { ServerState::Started => ServerState::Started, ServerState::OfflineStarted => ServerState::OfflineStarted, - ServerState::Failed => { - return Err(io::Error::new( - io::ErrorKind::Other, - "run previously failed!", - )) - } + ServerState::Failed => return Err(io::Error::other("run previously failed!")), ServerState::Unstarted(server) if offline => { info!("Running in offline mode"); server.await?; diff --git a/rs/rust_canisters/canister_test/src/canister.rs b/rs/rust_canisters/canister_test/src/canister.rs index 443660af9ba0..906df552a0e5 100644 --- a/rs/rust_canisters/canister_test/src/canister.rs +++ b/rs/rust_canisters/canister_test/src/canister.rs @@ -290,6 +290,7 @@ where } } +#[allow(clippy::large_enum_variant)] pub enum Runtime { Remote(RemoteTestRuntime), Local(LocalTestRuntime), diff --git a/rs/rust_canisters/dfn_core/src/stable.rs b/rs/rust_canisters/dfn_core/src/stable.rs index d4cfd4df04b6..410a6b8ea343 100644 --- a/rs/rust_canisters/dfn_core/src/stable.rs +++ b/rs/rust_canisters/dfn_core/src/stable.rs @@ -151,10 +151,7 @@ impl StableWriter { pub fn grow(&mut self, added_pages: u32) -> Result<(), io::Error> { let old_page_count = unsafe { ic0::stable_grow(added_pages) }; if old_page_count < 0 { - return Err(io::Error::new( - io::ErrorKind::Other, - "Failed to grow stable memory", - )); + return Err(io::Error::other("Failed to grow stable memory")); } self.capacity = old_page_count as u32 + added_pages; Ok(()) diff --git a/rs/rust_canisters/stable_reader/src/lib.rs b/rs/rust_canisters/stable_reader/src/lib.rs index 58239b2e4c8f..dc64489ea23b 100644 --- a/rs/rust_canisters/stable_reader/src/lib.rs +++ b/rs/rust_canisters/stable_reader/src/lib.rs @@ -24,21 +24,19 @@ pub fn read(input: &mut impl Read, output: impl Write) -> std::io::Result { buffered_writer.flush()?; match prefix.cmp(&piped_bytes) { Ordering::Equal => Ok(prefix), - Ordering::Less=> Err(std::io::Error::new( - std::io::ErrorKind::Other, - format!( - "This program piped through {} bytes, more than the expected {}. That's a bug. ", - piped_bytes, prefix - ), - )), - Ordering::Greater=>Err(std::io::Error::new( + Ordering::Less => Err(std::io::Error::other(format!( + "This program piped through {} bytes, more than the expected {}. That's a bug. ", + piped_bytes, prefix + ))), + Ordering::Greater => Err(std::io::Error::new( std::io::ErrorKind::UnexpectedEof, format!( - "The length prefix instructed a payload of length {}, but we could only read {} bytes. \ + "The length prefix instructed a payload of length {}, \ + but we could only read {} bytes. \ This could mean that input did not actual come from a stable memory file for \ a canister using that stable memory library.", prefix, piped_bytes ), - )) + )), } } diff --git a/rs/sns/governance/tests/fixtures/mod.rs b/rs/sns/governance/tests/fixtures/mod.rs index 92ad4a058d97..98acb532bbe9 100755 --- a/rs/sns/governance/tests/fixtures/mod.rs +++ b/rs/sns/governance/tests/fixtures/mod.rs @@ -129,7 +129,7 @@ impl ICRC1Ledger for LedgerFixture { async fn total_supply(&self) -> Result { let accounts = &mut self.ledger_fixture_state.try_lock().unwrap().accounts; - Ok(Tokens::from_e8s(accounts.iter().map(|(_, y)| y).sum())) + Ok(Tokens::from_e8s(accounts.values().sum())) } async fn account_balance(&self, account: Account) -> Result { diff --git a/rs/state_machine_tests/src/lib.rs b/rs/state_machine_tests/src/lib.rs index 102f9717e4bf..8b4eab1ec20e 100644 --- a/rs/state_machine_tests/src/lib.rs +++ b/rs/state_machine_tests/src/lib.rs @@ -456,8 +456,8 @@ fn add_subnet_local_registry_records( .with_dkg_interval_length(u64::MAX / 2) // use the genesis CUP throughout the test .with_chain_key_config(ChainKeyConfig { key_configs: chain_keys_enabled_status - .iter() - .map(|(key_id, _)| KeyConfig { + .keys() + .map(|key_id| KeyConfig { key_id: key_id.clone(), pre_signatures_to_create_in_advance: if key_id.requires_pre_signatures() { 1 diff --git a/rs/state_manager/src/tree_diff.rs b/rs/state_manager/src/tree_diff.rs index 112af29237df..15a69fc76c22 100644 --- a/rs/state_manager/src/tree_diff.rs +++ b/rs/state_manager/src/tree_diff.rs @@ -308,9 +308,7 @@ mod tests { fn num_leaves(t: &RoseHashTree) -> usize { match t { RoseHashTree::Leaf(_) => 1, - RoseHashTree::Fork { children, .. } => { - children.iter().map(|(_, t)| num_leaves(t)).sum() - } + RoseHashTree::Fork { children, .. } => children.values().map(num_leaves).sum(), } } @@ -318,7 +316,7 @@ mod tests { match t { RoseHashTree::Leaf(_) => 0, RoseHashTree::Fork { children, .. } => { - children.len() + children.iter().map(|(_, t)| num_edges(t)).sum::() + children.len() + children.values().map(num_edges).sum::() } } } diff --git a/rs/sys/src/fs.rs b/rs/sys/src/fs.rs index 9e5c537cf207..7fa0e26974de 100644 --- a/rs/sys/src/fs.rs +++ b/rs/sys/src/fs.rs @@ -791,10 +791,7 @@ mod tests { use std::io::Write; buf.write_all(b"new shiny contents")?; - Err(std::io::Error::new( - std::io::ErrorKind::Other, - "something went wrong", - )) + Err(std::io::Error::other("something went wrong")) }); assert!(!tmp.exists()); diff --git a/rs/test_utilities/embedders/src/lib.rs b/rs/test_utilities/embedders/src/lib.rs index 878432ce4760..26f1e9d77cf0 100644 --- a/rs/test_utilities/embedders/src/lib.rs +++ b/rs/test_utilities/embedders/src/lib.rs @@ -124,6 +124,7 @@ impl WasmtimeInstanceBuilder { } } + #[allow(clippy::result_large_err)] pub fn try_build(self) -> Result { let log = no_op_logger(); diff --git a/rs/test_utilities/src/xnet_payload_builder.rs b/rs/test_utilities/src/xnet_payload_builder.rs index 8718ff065422..499c4a4657e6 100644 --- a/rs/test_utilities/src/xnet_payload_builder.rs +++ b/rs/test_utilities/src/xnet_payload_builder.rs @@ -36,10 +36,8 @@ impl XNetPayloadBuilder for FakeXNetPayloadBuilder { let mut size_bytes = 0.into(); for (index, stream_slices) in streams.iter().enumerate() { let stream_size: usize = stream_slices - .iter() - .map(|(_, stream_slice)| { - stream_slice.payload.len() + stream_slice.merkle_proof.len() - }) + .values() + .map(|stream_slice| stream_slice.payload.len() + stream_slice.merkle_proof.len()) .sum(); if NumBytes::from(stream_size as u64) < byte_limit { diff --git a/rs/tests/driver/src/driver/logger.rs b/rs/tests/driver/src/driver/logger.rs index 6d55163cb972..fda925058f57 100644 --- a/rs/tests/driver/src/driver/logger.rs +++ b/rs/tests/driver/src/driver/logger.rs @@ -113,7 +113,7 @@ impl Drain for SysTestLogFormatter { } fn convert_time_fmt_error(cause: time::error::Format) -> io::Error { - io::Error::new(io::ErrorKind::Other, cause) + io::Error::other(cause) } const TIMESTAMP_FORMAT: &[time::format_description::FormatItem] = time::macros::format_description!( diff --git a/rs/tests/driver/src/driver/test_env.rs b/rs/tests/driver/src/driver/test_env.rs index 2b58a5312c11..38671ae356f9 100644 --- a/rs/tests/driver/src/driver/test_env.rs +++ b/rs/tests/driver/src/driver/test_env.rs @@ -83,8 +83,7 @@ impl TestEnv { fs::create_dir_all(parent_dir)?; } write_atomically(&path, |buf| { - serde_json::to_writer(buf, t) - .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string())) + serde_json::to_writer(buf, t).map_err(|e| std::io::Error::other(e.to_string())) }) .with_context(|| format!("{:?}: Could not write json object.", path)) } diff --git a/rs/tla_instrumentation/tla_instrumentation/src/checker.rs b/rs/tla_instrumentation/tla_instrumentation/src/checker.rs index 31b5cac7ca7c..7a16a48f29f9 100644 --- a/rs/tla_instrumentation/tla_instrumentation/src/checker.rs +++ b/rs/tla_instrumentation/tla_instrumentation/src/checker.rs @@ -196,6 +196,7 @@ pub struct PredicateDescription { pub predicate_parameters: Vec, } +#[allow(clippy::result_large_err)] pub fn check_tla_code_link( apalache: &Path, predicate: PredicateDescription, diff --git a/rs/tla_instrumentation/tla_instrumentation/src/tla_value.rs b/rs/tla_instrumentation/tla_instrumentation/src/tla_value.rs index 187e220d9ba9..836f03115f1a 100644 --- a/rs/tla_instrumentation/tla_instrumentation/src/tla_value.rs +++ b/rs/tla_instrumentation/tla_instrumentation/src/tla_value.rs @@ -33,7 +33,7 @@ impl TlaValue { pub fn size(&self) -> u64 { match self { TlaValue::Set(set) => set.iter().map(|x| x.size()).sum(), - TlaValue::Record(map) => map.iter().map(|(_k, v)| 1 + v.size()).sum(), + TlaValue::Record(map) => map.values().map(|v| 1 + v.size()).sum(), TlaValue::Function(map) => map.iter().map(|(k, v)| k.size() + v.size()).sum(), TlaValue::Seq(vec) => vec.iter().map(|x| x.size()).sum(), TlaValue::Literal(_s) => 1_u64, diff --git a/rs/xnet/payload_builder/tests/certified_slice_pool.rs b/rs/xnet/payload_builder/tests/certified_slice_pool.rs index 5df376d268cd..3d46f5dc4fbb 100644 --- a/rs/xnet/payload_builder/tests/certified_slice_pool.rs +++ b/rs/xnet/payload_builder/tests/certified_slice_pool.rs @@ -368,7 +368,7 @@ fn invalid_slice( .map(|(k, v)| (k.clone(), v.clone())) .collect(); messages_vec.insert(0, (from.decrement().to_label(), LabeledTree::Leaf(vec![]))); - std::mem::swap(messages_tree, &mut FlatMap::from_key_values(messages_vec)); + *messages_tree = FlatMap::from_key_values(messages_vec); }); if from > stream_begin { From df8b40e606ca98cf836abe33d5011092fa4c625a Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 11:13:05 +0000 Subject: [PATCH 07/17] . --- .github/workflows/pocket-ic-tests-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pocket-ic-tests-windows.yml b/.github/workflows/pocket-ic-tests-windows.yml index db2ad9647a8e..59b2dec75f7f 100644 --- a/.github/workflows/pocket-ic-tests-windows.yml +++ b/.github/workflows/pocket-ic-tests-windows.yml @@ -61,7 +61,7 @@ jobs: fetch-depth: ${{ github.event_name == 'pull_request' && 256 || 0 }} - name: Linting run: | - cargo clippy -p pocket-ic --locked --all-features --all-targets -- -D warnings -D clippy::all -D clippy::mem_forget -C debug-assertions=off + cargo clippy -p pocket-ic --locked --all-features --all-targets -- -D warnings -D clippy::all -D clippy::mem_forget -C debug-assertions=off -A clippy::uninlined_format_args pocket-ic-tests-on-windows: name: PocketIC Tests on Windows From 0557ca7d97e4263018995c4c01093e5abbe1d329 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 11:29:35 +0000 Subject: [PATCH 08/17] more clippy --- rs/ic_os/os_tools/guest_vm_runner/src/mount.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rs/ic_os/os_tools/guest_vm_runner/src/mount.rs b/rs/ic_os/os_tools/guest_vm_runner/src/mount.rs index d01d3d0c2cbf..bb60f55a4cb5 100644 --- a/rs/ic_os/os_tools/guest_vm_runner/src/mount.rs +++ b/rs/ic_os/os_tools/guest_vm_runner/src/mount.rs @@ -140,8 +140,7 @@ impl PartitionProvider for GptPartitionProvider { let partition = self .gpt .partitions() - .iter() - .map(|(_, partition)| partition) + .values() .find(|partition| partition.part_guid == partition_uuid) .with_context(|| format!("Could not find partition {partition_uuid}"))?; From 6267318fbff5f27212117dfa72becab1496c5606 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 24 Jul 2025 13:36:16 +0000 Subject: [PATCH 09/17] test? --- rs/nns/integration_tests/BUILD.bazel | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rs/nns/integration_tests/BUILD.bazel b/rs/nns/integration_tests/BUILD.bazel index 2747d8bb8433..a98c47b01c39 100644 --- a/rs/nns/integration_tests/BUILD.bazel +++ b/rs/nns/integration_tests/BUILD.bazel @@ -17,7 +17,6 @@ BASE_DEPENDENCIES = [ "//rs/nns/common", "//rs/nns/governance/api", "//rs/nns/governance/init", - "//rs/nns/gtc", "//rs/nns/handlers/lifeline/impl:lifeline", "//rs/nns/sns-wasm", "//rs/node_rewards/canister/api", @@ -98,7 +97,9 @@ DEPENDENCIES_WITH_TEST_FEATURES = BASE_DEPENDENCIES + [ "//rs/nns/handlers/root/impl:root--test_feature", "//rs/sns/init:init--test_feature", ] + select({ - "@rules_rust//rust/platform:wasm32-unknown-unknown": [], + "@rules_rust//rust/platform:wasm32-unknown-unknown": [ + "//rs/nns/gtc:gtc", + ], "//conditions:default": [ "//rs/nns/test_utils:test_utils--test_feature", "//rs/nns/gtc:gtc--test_feature", @@ -207,7 +208,7 @@ rust_canister( aliases = ALIASES, proc_macro_deps = MACRO_DEPENDENCIES, service_file = ":test_canisters/empty.did", - deps = DEPENDENCIES, + deps = DEPENDENCIES + ["//rs/nns/gtc"], ) rust_canister( From c7e8078db5c96e6f9ee6ee83531a51c016a26277 Mon Sep 17 00:00:00 2001 From: IDX GitHub Automation Date: Fri, 25 Jul 2025 08:17:29 +0000 Subject: [PATCH 10/17] Automatically updated Cargo*.lock --- Cargo.Bazel.Fuzzing.json.lock | 2 +- Cargo.Bazel.json.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.Bazel.Fuzzing.json.lock b/Cargo.Bazel.Fuzzing.json.lock index 9cb69c2d6dca..80c4d8913f2e 100644 --- a/Cargo.Bazel.Fuzzing.json.lock +++ b/Cargo.Bazel.Fuzzing.json.lock @@ -1,5 +1,5 @@ { - "checksum": "86ba1ef9d4eef16d56ae94c35870632df48e15aa13150e1b152875a76e0ed6df", + "checksum": "3ca566bc256ae4071a748e6f20bc33acd658b895cca0dec380e54be42ed01f9c", "crates": { "abnf 0.12.0": { "name": "abnf", diff --git a/Cargo.Bazel.json.lock b/Cargo.Bazel.json.lock index 20210b3b0ad2..f7caf8d83420 100644 --- a/Cargo.Bazel.json.lock +++ b/Cargo.Bazel.json.lock @@ -1,5 +1,5 @@ { - "checksum": "a6d354e58e59ae7c789b8c9b8379192e38751ab16a0f2fcd1ba6530c7de07627", + "checksum": "4f71eb9f1a2593946ac90957e3d081573cfc8356c8354b337ce7decc635ccb8d", "crates": { "abnf 0.12.0": { "name": "abnf", From cc16f4e9a9f6ce534ba960570d50bbbeee69f7ac Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Fri, 25 Jul 2025 12:54:16 +0000 Subject: [PATCH 11/17] * Ignore `clippy::uninlined_format_args` * Fix `//rs/execution_environment:execution_environment_misc_integration_tests/backtraces_test` tests * Fix `//publish/canisters:sns-governance-canister.wasm.gz_size_check` test * Update benchmark reults --- bazel/conf/.bazelrc.build | 2 +- rs/execution_environment/tests/backtraces.rs | 4 +- .../ledger/canbench_results/canbench_u256.yml | 26 ++++---- .../ledger/canbench_results/canbench_u64.yml | 32 +++++----- .../governance/canbench/canbench_results.yml | 59 ++++++++++--------- rs/sns/sns.bzl | 6 +- 6 files changed, 67 insertions(+), 62 deletions(-) diff --git a/bazel/conf/.bazelrc.build b/bazel/conf/.bazelrc.build index 2694262de2d7..77960a951ddf 100644 --- a/bazel/conf/.bazelrc.build +++ b/bazel/conf/.bazelrc.build @@ -10,7 +10,7 @@ build:lint --config=clippy # rust-clippy build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect build:clippy --output_groups=+clippy_checks -build --@rules_rust//:clippy.toml=//:clippy.toml --@rules_rust//:clippy_flags=-D,warnings,-D,clippy::all,-D,clippy::mem_forget,-C,debug-assertions=off +build --@rules_rust//:clippy.toml=//:clippy.toml --@rules_rust//:clippy_flags=-D,warnings,-D,clippy::all,-D,clippy::mem_forget,-C,debug-assertions=off,-A,clippy::uninlined_format_args # rustfmt build:fmt --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect build:fmt --output_groups=+rustfmt_checks diff --git a/rs/execution_environment/tests/backtraces.rs b/rs/execution_environment/tests/backtraces.rs index 492b44c5798c..d06e071ba7f5 100644 --- a/rs/execution_environment/tests/backtraces.rs +++ b/rs/execution_environment/tests/backtraces.rs @@ -31,11 +31,13 @@ ic_cdk::printer::set_panic_hook::{{closure}} std::panicking::rust_panic_with_hook std::panicking::begin_panic_handler::{{closure}} std::sys::backtrace::__rust_end_short_backtrace -rust_begin_unwind +__rustc::rust_begin_unwind core::panicking::panic_fmt _wasm_backtrace_canister::ic0_trap::inner_2 _wasm_backtrace_canister::ic0_trap::inner _wasm_backtrace_canister::ic0_trap::outer +_wasm_backtrace_canister::__canister_method_ic0_trap::{{closure}} +canister_update ic0_trap "#; fn env_with_backtrace_canister_and_visibility( diff --git a/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u256.yml b/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u256.yml index cace26b5988d..926065cbd2b6 100644 --- a/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u256.yml +++ b/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u256.yml @@ -2,70 +2,70 @@ benches: bench_icrc1_transfers: total: calls: 1 - instructions: 53957592938 + instructions: 53696930805 heap_increase: 262 stable_memory_increase: 256 scopes: icrc103_get_allowances: calls: 1 - instructions: 6461504 + instructions: 6415386 heap_increase: 0 stable_memory_increase: 0 icrc1_transfer: calls: 1 - instructions: 12893898527 + instructions: 12813549811 heap_increase: 31 stable_memory_increase: 0 icrc2_approve: calls: 1 - instructions: 19152557060 + instructions: 19060806463 heap_increase: 28 stable_memory_increase: 128 icrc2_transfer_from: calls: 1 - instructions: 21201605303 + instructions: 21098400024 heap_increase: 3 stable_memory_increase: 0 icrc3_get_blocks: calls: 1 - instructions: 9165418 + instructions: 9011059 heap_increase: 0 stable_memory_increase: 0 post_upgrade: calls: 1 - instructions: 352112436 + instructions: 365332787 heap_increase: 71 stable_memory_increase: 0 pre_upgrade: calls: 1 - instructions: 148162008 + instructions: 150781386 heap_increase: 129 stable_memory_increase: 128 upgrade: calls: 1 - instructions: 500277250 + instructions: 516117023 heap_increase: 200 stable_memory_increase: 128 bench_upgrade_baseline: total: calls: 1 - instructions: 8684853 + instructions: 8705731 heap_increase: 129 stable_memory_increase: 128 scopes: post_upgrade: calls: 1 - instructions: 8605945 + instructions: 8626107 heap_increase: 0 stable_memory_increase: 0 pre_upgrade: calls: 1 - instructions: 76034 + instructions: 76782 heap_increase: 129 stable_memory_increase: 128 upgrade: calls: 1 - instructions: 8683934 + instructions: 8704827 heap_increase: 129 stable_memory_increase: 128 version: 0.1.15 diff --git a/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml b/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml index fb1b31f892fb..fe6af39bc708 100644 --- a/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml +++ b/rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml @@ -2,70 +2,70 @@ benches: bench_icrc1_transfers: total: calls: 1 - instructions: 52171062385 + instructions: 51961462387 heap_increase: 264 stable_memory_increase: 256 scopes: icrc103_get_allowances: calls: 1 - instructions: 5829030 + instructions: 5724182 heap_increase: 0 stable_memory_increase: 0 icrc1_transfer: calls: 1 - instructions: 12300532105 - heap_increase: 34 + instructions: 12238590547 + heap_increase: 31 stable_memory_increase: 0 icrc2_approve: calls: 1 - instructions: 18485004502 - heap_increase: 25 + instructions: 18443431563 + heap_increase: 29 stable_memory_increase: 128 icrc2_transfer_from: calls: 1 - instructions: 20677961391 - heap_increase: 4 + instructions: 20567074561 + heap_increase: 3 stable_memory_increase: 0 icrc3_get_blocks: calls: 1 - instructions: 8531422 + instructions: 8437098 heap_increase: 0 stable_memory_increase: 0 post_upgrade: calls: 1 - instructions: 356188654 + instructions: 360312510 heap_increase: 72 stable_memory_increase: 0 pre_upgrade: calls: 1 - instructions: 149066669 + instructions: 150692311 heap_increase: 129 stable_memory_increase: 128 upgrade: calls: 1 - instructions: 505258055 + instructions: 511007659 heap_increase: 201 stable_memory_increase: 128 bench_upgrade_baseline: total: calls: 1 - instructions: 8688159 + instructions: 8705411 heap_increase: 129 stable_memory_increase: 128 scopes: post_upgrade: calls: 1 - instructions: 8608230 + instructions: 8624856 heap_increase: 0 stable_memory_increase: 0 pre_upgrade: calls: 1 - instructions: 77055 + instructions: 77713 heap_increase: 129 stable_memory_increase: 128 upgrade: calls: 1 - instructions: 8687240 + instructions: 8704507 heap_increase: 129 stable_memory_increase: 128 version: 0.1.15 diff --git a/rs/nns/governance/canbench/canbench_results.yml b/rs/nns/governance/canbench/canbench_results.yml index c60236af3f65..ceba4fec8f87 100644 --- a/rs/nns/governance/canbench/canbench_results.yml +++ b/rs/nns/governance/canbench/canbench_results.yml @@ -2,198 +2,199 @@ benches: add_neuron_active_maximum_stable: total: calls: 1 - instructions: 61314505 + instructions: 64864804 heap_increase: 0 stable_memory_increase: 0 scopes: {} add_neuron_active_typical_stable: total: calls: 1 - instructions: 4394702 + instructions: 4558061 heap_increase: 0 stable_memory_increase: 0 scopes: {} add_neuron_inactive_maximum: total: calls: 1 - instructions: 61314618 + instructions: 64864934 heap_increase: 0 stable_memory_increase: 0 scopes: {} add_neuron_inactive_typical: total: calls: 1 - instructions: 4394815 + instructions: 4558191 heap_increase: 0 stable_memory_increase: 0 scopes: {} cascading_vote_stable_everything: total: calls: 1 - instructions: 108033346 + instructions: 105629133 heap_increase: 0 stable_memory_increase: 128 scopes: {} centralized_following_all_stable: total: calls: 1 - instructions: 41876993 + instructions: 41716567 heap_increase: 0 stable_memory_increase: 128 scopes: {} compute_ballots_for_new_proposal_with_stable_neurons: total: - instructions: 1780000 + calls: 1 + instructions: 1796867 heap_increase: 0 stable_memory_increase: 256 scopes: {} distribute_rewards_with_stable_neurons: total: calls: 1 - instructions: 2813921 + instructions: 2780559 heap_increase: 0 stable_memory_increase: 256 scopes: {} draw_maturity_from_neurons_fund_stable: total: calls: 1 - instructions: 7547321 + instructions: 7476971 heap_increase: 0 stable_memory_increase: 0 scopes: {} list_active_neurons_fund_neurons_stable: total: calls: 1 - instructions: 2252766 + instructions: 2173617 heap_increase: 0 stable_memory_increase: 0 scopes: {} list_neurons_by_subaccount_stable: total: calls: 1 - instructions: 65853191 + instructions: 62121572 heap_increase: 5 stable_memory_increase: 0 scopes: {} list_neurons_stable: total: calls: 1 - instructions: 66811976 + instructions: 63040420 heap_increase: 9 stable_memory_increase: 0 scopes: {} list_proposals: total: calls: 1 - instructions: 78145 + instructions: 78250 heap_increase: 0 stable_memory_increase: 0 scopes: {} list_ready_to_spawn_neuron_ids_stable: total: calls: 1 - instructions: 37693856 + instructions: 35915801 heap_increase: 0 stable_memory_increase: 0 scopes: {} neuron_data_validation_stable: total: calls: 1 - instructions: 207728828 + instructions: 205505866 heap_increase: 0 stable_memory_increase: 0 scopes: {} neuron_metrics_calculation_stable: total: calls: 1 - instructions: 2727791 + instructions: 2640309 heap_increase: 0 stable_memory_increase: 0 scopes: {} range_neurons_performance: total: calls: 1 - instructions: 55016409 + instructions: 51559016 heap_increase: 0 stable_memory_increase: 0 scopes: {} single_vote_all_stable: total: calls: 1 - instructions: 278977 + instructions: 277193 heap_increase: 0 stable_memory_increase: 128 scopes: {} unstake_maturity_of_dissolved_neurons_stable: total: calls: 1 - instructions: 64951686 + instructions: 62896555 heap_increase: 0 stable_memory_increase: 0 scopes: list_neuron_ids: calls: 1 - instructions: 39071820 + instructions: 37240443 heap_increase: 0 stable_memory_increase: 0 unstake_maturity: calls: 1 - instructions: 25877683 + instructions: 25653919 heap_increase: 0 stable_memory_increase: 0 update_recent_ballots_stable_memory: total: calls: 1 - instructions: 143444 + instructions: 143389 heap_increase: 0 stable_memory_increase: 0 scopes: {} voting_power_snapshots_is_latest_snapshot_a_spike_false: total: calls: 1 - instructions: 31190 + instructions: 30332 heap_increase: 0 stable_memory_increase: 0 scopes: {} voting_power_snapshots_is_latest_snapshot_a_spike_true: total: calls: 1 - instructions: 31201 + instructions: 30343 heap_increase: 0 stable_memory_increase: 0 scopes: {} voting_power_snapshots_latest_snapshot_timestamp_seconds: total: calls: 1 - instructions: 7551 + instructions: 7626 heap_increase: 0 stable_memory_increase: 0 scopes: {} with_neuron_mut_all_sections_maximum_stable: total: calls: 1 - instructions: 4436380 + instructions: 4247543 heap_increase: 0 stable_memory_increase: 0 scopes: {} with_neuron_mut_all_sections_typical_stable: total: calls: 1 - instructions: 851438 + instructions: 847980 heap_increase: 0 stable_memory_increase: 0 scopes: {} with_neuron_mut_main_section_maximum_stable: total: calls: 1 - instructions: 2431630 + instructions: 2344650 heap_increase: 0 stable_memory_increase: 0 scopes: {} with_neuron_mut_main_section_typical_stable: total: calls: 1 - instructions: 408945 + instructions: 395381 heap_increase: 0 stable_memory_increase: 0 scopes: {} diff --git a/rs/sns/sns.bzl b/rs/sns/sns.bzl index d6d2bd79dbb6..2c9908e0e2b9 100644 --- a/rs/sns/sns.bzl +++ b/rs/sns/sns.bzl @@ -14,8 +14,10 @@ but other things could be added here later. # amount of growth happens. CANISTER_NAME_TO_MAX_COMPRESSED_WASM_SIZE_E5_BYTES = { - "sns-governance-canister.wasm.gz": 15, - "sns-governance-canister_test.wasm.gz": 15, + # last checked size: 1512131 + "sns-governance-canister.wasm.gz": 16, + # last checked size: 1526830 + "sns-governance-canister_test.wasm.gz": 16, "sns-root-canister.wasm.gz": 5, "sns-swap-canister.wasm.gz": 7, } From b348cc80fc315e40da5bc1a7e34549dc09b6976c Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Mon, 28 Jul 2025 11:14:49 +0000 Subject: [PATCH 12/17] fix deps --- rs/nns/integration_tests/BUILD.bazel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rs/nns/integration_tests/BUILD.bazel b/rs/nns/integration_tests/BUILD.bazel index a98c47b01c39..bf014165ccce 100644 --- a/rs/nns/integration_tests/BUILD.bazel +++ b/rs/nns/integration_tests/BUILD.bazel @@ -83,6 +83,7 @@ BASE_DEPENDENCIES = [ DEPENDENCIES = BASE_DEPENDENCIES + [ # Keep sorted. "//rs/nns/governance", + "//rs/nns/gtc", "//rs/nns/handlers/root/impl:root", ] + select({ "@rules_rust//rust/platform:wasm32-unknown-unknown": [], @@ -208,7 +209,7 @@ rust_canister( aliases = ALIASES, proc_macro_deps = MACRO_DEPENDENCIES, service_file = ":test_canisters/empty.did", - deps = DEPENDENCIES + ["//rs/nns/gtc"], + deps = DEPENDENCIES, ) rust_canister( From 63f6d6dc9ee8eb166918c1ae69d55afdfdc6280f Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 31 Jul 2025 14:29:52 +0000 Subject: [PATCH 13/17] clippy --- rs/ic_os/device/src/io.rs | 3 +-- rs/protobuf/src/macros.rs | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rs/ic_os/device/src/io.rs b/rs/ic_os/device/src/io.rs index 881192949361..eb50c886423d 100644 --- a/rs/ic_os/device/src/io.rs +++ b/rs/ic_os/device/src/io.rs @@ -41,8 +41,7 @@ mod tests { #[test] fn test_retry_if_busy_failure() { - let result: Result<(), _> = - retry_if_busy(|| Err(io::Error::new(io::ErrorKind::Other, "fail"))); + let result: Result<(), _> = retry_if_busy(|| Err(io::Error::other("fail"))); assert!(result.is_err()); } } diff --git a/rs/protobuf/src/macros.rs b/rs/protobuf/src/macros.rs index ab09d94d8d0d..3c4cc21c92fd 100644 --- a/rs/protobuf/src/macros.rs +++ b/rs/protobuf/src/macros.rs @@ -33,9 +33,8 @@ macro_rules! serialize_fallback_for { match &$log_entry.$field { Some(ctx) => { let json = serde_json::to_string(&ctx).map_err(|e| { - slog::Error::Io(std::io::Error::new( - std::io::ErrorKind::Other, - std::format!("Serialization error: {}", e), + slog::Error::Io(std::io::Error::other( + std::format!("Serialization error: {e}"), )) })?; let key = std::stringify!($field); From 2ca8e27050b510be5fd618c0d7bf8d6b6d102fd7 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 31 Jul 2025 16:01:00 +0000 Subject: [PATCH 14/17] clippy --- rs/protobuf/src/macros.rs | 6 +++--- rs/sns/governance/canbench/canbench_results.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rs/protobuf/src/macros.rs b/rs/protobuf/src/macros.rs index 3c4cc21c92fd..8c6e5fc8e87e 100644 --- a/rs/protobuf/src/macros.rs +++ b/rs/protobuf/src/macros.rs @@ -33,9 +33,9 @@ macro_rules! serialize_fallback_for { match &$log_entry.$field { Some(ctx) => { let json = serde_json::to_string(&ctx).map_err(|e| { - slog::Error::Io(std::io::Error::other( - std::format!("Serialization error: {e}"), - )) + slog::Error::Io(std::io::Error::other(std::format!( + "Serialization error: {e}" + ))) })?; let key = std::stringify!($field); $serializer.emit_str(key, json.as_str())?; diff --git a/rs/sns/governance/canbench/canbench_results.yml b/rs/sns/governance/canbench/canbench_results.yml index 02508154c4b6..5f9c97afb0dc 100644 --- a/rs/sns/governance/canbench/canbench_results.yml +++ b/rs/sns/governance/canbench/canbench_results.yml @@ -2,7 +2,7 @@ benches: bench_example: total: calls: 1 - instructions: 5640 + instructions: 4740 heap_increase: 0 stable_memory_increase: 0 scopes: {} From 8d0f03b7ce281662225bceec2bb4e605897ce594 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Thu, 31 Jul 2025 17:46:30 +0000 Subject: [PATCH 15/17] rev --- rs/consensus/idkg/src/payload_verifier.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rs/consensus/idkg/src/payload_verifier.rs b/rs/consensus/idkg/src/payload_verifier.rs index a3ad85083d96..5e9e79cf4145 100644 --- a/rs/consensus/idkg/src/payload_verifier.rs +++ b/rs/consensus/idkg/src/payload_verifier.rs @@ -110,8 +110,8 @@ pub enum InvalidIDkgPayloadReason { TranscriptParamsError(idkg::TranscriptParamsError), ThresholdEcdsaVerifyCombinedSignatureError(ThresholdEcdsaVerifyCombinedSignatureError), ThresholdSchnorrVerifyCombinedSignatureError(ThresholdSchnorrVerifyCombinedSigError), - IDkgVerifyTranscriptError(Box), - IDkgVerifyInitialDealingsError(Box), + IDkgVerifyTranscriptError(IDkgVerifyTranscriptError), + IDkgVerifyInitialDealingsError(IDkgVerifyInitialDealingsError), // local errors ConsensusRegistryVersionNotFound(Height), ChainKeyConfigNotFound, @@ -187,7 +187,7 @@ impl From for IDkgPayloadValidationFailure { impl From for InvalidIDkgPayloadReason { fn from(err: IDkgVerifyTranscriptError) -> Self { - InvalidIDkgPayloadReason::IDkgVerifyTranscriptError(Box::new(err)) + InvalidIDkgPayloadReason::IDkgVerifyTranscriptError(err) } } @@ -199,7 +199,7 @@ impl From for IDkgPayloadValidationFailure { impl From for InvalidIDkgPayloadReason { fn from(err: IDkgVerifyInitialDealingsError) -> Self { - InvalidIDkgPayloadReason::IDkgVerifyInitialDealingsError(Box::new(err)) + InvalidIDkgPayloadReason::IDkgVerifyInitialDealingsError(err) } } From d6071b627fa19325e1ab300c54e3d6383799247b Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Fri, 1 Aug 2025 07:27:26 +0000 Subject: [PATCH 16/17] rev --- rs/sns/governance/canbench/canbench_results.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs/sns/governance/canbench/canbench_results.yml b/rs/sns/governance/canbench/canbench_results.yml index 5f9c97afb0dc..02508154c4b6 100644 --- a/rs/sns/governance/canbench/canbench_results.yml +++ b/rs/sns/governance/canbench/canbench_results.yml @@ -2,7 +2,7 @@ benches: bench_example: total: calls: 1 - instructions: 4740 + instructions: 5640 heap_increase: 0 stable_memory_increase: 0 scopes: {} From c05cd2d891812a4d4874d0667f6b62b9fc5460a6 Mon Sep 17 00:00:00 2001 From: Kamil Popielarz Date: Mon, 4 Aug 2025 16:48:42 +0000 Subject: [PATCH 17/17] update canbench --- rs/sns/governance/canbench/canbench_results.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rs/sns/governance/canbench/canbench_results.yml b/rs/sns/governance/canbench/canbench_results.yml index 5f9c97afb0dc..02508154c4b6 100644 --- a/rs/sns/governance/canbench/canbench_results.yml +++ b/rs/sns/governance/canbench/canbench_results.yml @@ -2,7 +2,7 @@ benches: bench_example: total: calls: 1 - instructions: 4740 + instructions: 5640 heap_increase: 0 stable_memory_increase: 0 scopes: {}