Repository navigation
chore(deps): bump crates across majors that need no code changes - #12181
Conversation
tower-http 0.7, socket2 0.6, tokio-metrics 0.5, lru 0.19, hashlink 0.12, netdev 0.47, nix 0.32, procfs 0.18, signal-hook 0.4 and, in Bazel only, syscalls 0.8. The APIs we use are unchanged, so only the requirements in both manifests and the locks change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bit-vec 0.10, zstd 0.14 (0.13 is flagged by RUSTSEC-2026-0391 and RUSTSEC-2026-0403), base64 0.23, pem 4, ripemd 0.2 and rlp 0.6. The APIs we use are unchanged, so only the requirements in both manifests and the locks change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fork existed only so tarpc wouldn't pull in syn 3, which the lockfile refresh allows now. Use the published tarpc 0.38.0 (tarpc-plugins 0.15.0) in both manifests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
askama 0.16.0 includes the build-determinism fix that bazel/askama.patch applied to askama_derive, so delete the patch and its crate annotation. The templates and filters we use are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tokio-tungstenite 0.30, jsonrpc 0.21, alloy-consensus, alloy-eips and alloy-rpc-types-eth 2.6 (ckETH test oracle), proptest-derive 0.9, rstest 0.28, walrus 0.28 (PocketIC server tests; ic-wasm keeps its own 0.26), object 0.41 (fuzzing), escargot 1.0, scraper 0.29, colored 3, dialoguer 0.12 and indicatif 0.18. rstest's default features are turned off, because its `crate-name` feature looks for Cargo.toml, which Bazel doesn't provide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-major upgrades affect execution determinism, persisted transaction compatibility, authentication, and vault RPCs, requiring human review of compatibility tests and artifact-reproducibility CI results beyond static inspection.
No open issues 🎉
What changed in this PR
Updates Rust dependencies across the IC workspace, covering canisters, replica infrastructure, tooling, and tests, with corresponding Cargo and Bazel dependency updates.
Changes:
- Bumps shared and component-specific crates across major or pre-1.0 breaking-version boundaries.
- Replaces the pinned Tarpc fork with the published
0.38.0release. - Refreshes both lockfiles and removes the Askama build-determinism patch and its Bazel annotation.
| File | Description |
|---|---|
rs/sns/dfx-core-vendored/Cargo.toml |
Updates Dialoguer to 0.12.0. |
rs/ethereum/cketh/minter/Cargo.toml |
Updates RLP to 0.6.1. |
rs/crypto/internal/crypto_service_provider/Cargo.toml |
Switches Tarpc from a Git fork to 0.38.0. |
rs/boundary_node/ic_boundary/Cargo.toml |
Updates Tokio Tungstenite to 0.30. |
rs/bitcoin/ckbtc/minter/Cargo.toml |
Updates RIPEMD to 0.2.0. |
rs/bitcoin/adapter/Cargo.toml |
Updates Hashlink to 0.12.2. |
Cargo.toml |
Updates shared dependencies and disables Rstest default features. |
Cargo.lock |
Records updated workspace dependency resolutions. |
Cargo.Bazel.toml.lock |
Records updated Bazel dependency resolutions. |
bazel/rust.MODULE.bazel |
Mirrors dependency updates, bumps Syscalls, and removes the Askama patch annotation. |
bazel/askama.patch |
Deletes the Askama path-canonicalization workaround. |
Review effort: Balanced
|
✅ No security or compliance issues detected. Reviewed everything up to 797230b. Security OverviewDetected Code ChangesThe diff is too large to display a summary of code changes. |
|
✅ No security or compliance issues detected. Reviewed everything up to 797230b. Security OverviewDetected Code ChangesThe diff is too large to display a summary of code changes. |
|
✅ No security or compliance issues detected. Reviewed everything up to 797230b. Security OverviewDetected Code ChangesThe diff is too large to display a summary of code changes. |
|
✅ No security or compliance issues detected. Reviewed everything up to 797230b. Security OverviewDetected Code ChangesThe diff is too large to display a summary of code changes. |
|
✅ No security or compliance issues detected. Reviewed everything up to 797230b. Security OverviewDetected Code ChangesThe diff is too large to display a summary of code changes. |
…two Bazel patches (dfinity#12184) Stacked on dfinity#12181 (on dfinity#12180, on dfinity#12178, on dfinity#12177). This PR updates cc, the library that build scripts use to compile bundled C, C++ and assembly, for example in ring, aws-lc-sys, zstd-sys, libssh2-sys and wasmtime, and in the canister sandbox's own `backtrace.c`. It also updates three crates that wrap C or C++ libraries: ssh2 (Bazel only), libcryptsetup-rs, and rocksdb (macOS only). Two Bazel patches are deleted because their fixes are upstream. Each group is a separate commit in this PR (squashed on merge). # Changes | Group | Change | |---|---| | cc | 1.2.67 → 1.11.2. The requirement goes from `~1.2` to `1.11` in the `cc` crate.spec and in `rs/canister_sandbox/Cargo.toml` (that crate's build script compiles `src/backtrace.c` with cc). dfinity#12177 set `~1.2` to keep this jump out of it. | | ssh2, libssh2-sys | In Bazel, 0.9.4 → 0.9.7 and 0.3.0 → 0.3.4, the versions `Cargo.lock` already has. The floor is raised to 0.9.7, which requires libssh2-sys 0.3.4. `bazel/libssh2-sys.patch` is deleted: it stopped libssh2-sys from writing a `libssh2.pc` that contains the absolute OUT_DIR (rust-lang/ssh2-rs#340). 0.3.4 writes the paths relative to `${pcfiledir}` (rust-lang/ssh2-rs#366), and rules_rust's build-script runner deletes `*.pc` files from OUT_DIR anyway. The annotation's openssl `build_script_data` stays, because libssh2-sys still compiles against the `@openssl` headers. | | libcryptsetup-rs | 0.15.1 → 0.16.1 (libcryptsetup-rs-sys 0.6.1 → 0.7.0), floor 0.16.1. `bazel/libcryptsetup-rs.patch` and its annotation are deleted, because both of its fixes are upstream. 0.16.0 handles a null PBKDF hash (stratis-storage/libcryptsetup-rs#477); `CryptPbkdfType::hash` is now an `Option<String>`, which nothing here reads. 0.16.1 compares `CryptLuks2TokenHandle::is_assigned`'s return value with `-ENOENT` (stratis-storage/libcryptsetup-rs#483); guest_disk doesn't call it. | | rocksdb | 0.22.0 → 0.25.0 (librocksdb-sys 0.16.0+8.10.0 → 0.19.0+11.8.1, RocksDB 8.10 → 11.8). It is the artifact pool's optional backend and is only built on macOS. librocksdb-sys 0.19 no longer always builds bindgen with its `runtime` feature, which loads libclang at run time. rocksdb 0.25 turns librocksdb-sys's default features off and enables `bindgen-runtime` through its own default features. Our default features stay off, so `bindgen-runtime` is now enabled explicitly. That matters for Cargo; in Bazel, bindgen already gets `runtime` through other crates. The librocksdb-sys annotation gains `CXXFLAGS`; see the macOS section below. | The locks lose the crates that only the old versions used: - bindgen 0.69.5, lazycell and rustc-hash 1.1.0 (librocksdb-sys 0.16); - in Bazel, bitflags 1.3.2, parking_lot 0.11.2, parking_lot_core 0.8.6, instant and redox_syscall 0.2.16 (ssh2 0.9.4). They gain rustflags 0.1.7, a librocksdb-sys build dependency. No other dependency edge or feature changes in any of the three lock files. **Why the cc floor is `1.11` rather than `1`:** - With `1`, the locked 1.2.67 would still satisfy the requirement, so a plain `./bin/bazel-pin.sh` would keep it. - Moving it would then take a precise `./bin/bazel-pin.sh cc`. In the Bazel lock that also moves tempfile from getrandom 0.4.3 to 0.3.4, and cssparser-macros from syn 3 to syn 2. - With `1.11`, the plain repin has to move cc, as cargo did for `Cargo.lock`, and nothing else moves. Both locks pin 1.11.2. The PR also notes, in the worked examples of the fix-build-determinism skill (`.claude/skills/`), that the askama patch (removed in dfinity#12181) and the libssh2-sys patch no longer exist. ## macOS: RocksDB needs C++20 **The problem:** RocksDB 10.7 and later need C++20, and librocksdb-sys 0.19 passes `-std=c++20`. But Bazel's C++ toolchains add `-std=c++17` to C++ compiles. On macOS, Bazel uses apple_support's Xcode toolchain, whose default `BAZEL_CXXOPTS` is `-std=c++17`; the hermetic LLVM toolchain on Linux adds it too. rules_rust passes the toolchain's C++ flags to build scripts as `CXXFLAGS`, and cc adds `CXXFLAGS` after the build script's own flags. Without a fix, the last `-std` would be `-std=c++17`, and RocksDB 11.8 doesn't compile that way. **The fix:** the librocksdb-sys annotation sets `CXXFLAGS` to `-std=c++20`. rules_rust appends it to the toolchain's `CXXFLAGS`, which makes it the last `-std`. The alternatives don't work: - librocksdb-sys's own `ROCKSDB_CXX_STD` only replaces its builder flag, which still comes before `CXXFLAGS`. - `--cxxopt` doesn't reach build scripts. - `BAZEL_CXXOPTS` would change every macOS C++ compile. Cargo builds need no fix, since Cargo sets no `CXXFLAGS`. **Where it's tested:** Linux CI never compiles rocksdb. CI Main's Bazel Test arm64-darwin job does, on every PR run. On this PR it built pocket-ic for arm64 and x86_64 macOS, and `//rs/...`, with the fix. # Behaviour changes (FYI) - **cc 1.11:** - **Optimized builds** (`-c opt`, which everything we publish uses): no compiler or archiver flag is added or removed on our platforms. Some flags change order, and the names of the object files inside the static archives change. - **Cache:** those archives, and the rlibs that bundle them, change, so everything downstream misses the cache once. - **Outputs:** the linked outputs don't change. The replica, canister sandbox, compiler sandbox and sandbox launcher binaries, and all 44 canisters in `//publish/canisters`, are byte-identical to the ones built from dfinity#12181. That was checked for x86_64 Linux and wasm32; for aarch64 and macOS it rests on reading cc's source. - **Non-optimized builds** (`-c dbg`, and `-c fastbuild` as used by `--config=dev`) gain `-mno-omit-leaf-frame-pointer`, which changes the C object code on aarch64. - **Fuzzing:** under `--config=fuzzing` no sanitizer flag reaches build scripts, so cc's new ASan forwarding doesn't apply. - **libssh2** (Bazel only). It is the SSH client of the system-test driver (including the colocated-test wrapper in `rs/tests/idx`), the consensus tests, the mainnet-NNS testnet tool and the bare-metal deployment tool; nothing we ship links it. libssh2-sys 0.3.4 bundles a libssh2 snapshot from 2026-11-05 (1.11.2_DEV) instead of one from 2022 (1.10.1_DEV). @dfinity/core-protocol @dfinity/node - **Negotiation:** - **GuestOS and HostOS** (OpenSSH 10.2p1; SetupOS disables sshd): the client now picks an ed25519 host key instead of ECDSA, and chacha20-poly1305 instead of aes128-ctr with hmac-sha2-256. It also negotiates strict key exchange (the Terrapin mitigation). - **Universal and Prometheus VMs** (OpenSSH 10.5p1 on NixOS): the host key was already ed25519, so only the cipher and strict key exchange change. - **Key exchange** stays curve25519-sha256 everywhere. libssh2 enables ML-KEM only with OpenSSL 3.5 or later, and Bazel links 3.4.0. - **Our code doesn't notice:** nothing here checks host keys or pins algorithms. - **Re-keying:** with chacha20-poly1305, OpenSSH re-keys every 1 GiB per direction instead of every 64 GiB. - **What re-keys now:** a session that moves more than that re-keys mid-transfer. That covers: - bare-metal deployments that upload a HostOS upgrade image and a GuestOS image in one session; - the colocated tests' runtime-deps tarball, if it's that large; - the Prometheus data download. - **Not in this PR's CI:** none of these runs here. - **Evidence it works:** the snapshot contains libssh2's fix for the deadlock that a re-key during a partially sent packet caused. Locally, with the Bazel-built libssh2-sys 0.3.4 against OpenSSH 9.6p1, 1.5 GiB and 2.5 GiB scp uploads re-keyed once and twice respectively, and completed. - **Bare-metal risk:** the bare-metal deployment tool sets no SSH session timeout, so if a re-key ever stalls there, the tool hangs instead of failing. - **Interrupted calls:** a blocking call that a signal interrupts is now retried instead of failing with a timeout error. - **Algorithms:** SHA-1, MD5, DSA and the legacy ciphers are off by default; our servers use none of them. The ed25519 and RSA keys the tests use authenticate as before (RSA signs with rsa-sha2-512 in both versions). - **libcryptsetup-rs-sys 0.7** (GuestOS disk encryption). guest_disk uses it, and so do the orchestrator and the guest_upgrade client through it. @dfinity/node @dfinity/core-protocol - **Bindings:** the sys crate now generates its bindings with bindgen's clang macro fallback. I generated the 0.6.1 and 0.7.0 bindings in the dev container and compared them: - the 147 functions and 114 types (97 aliases, 17 structs) are the same, with the same signatures; - no constant changes type or value; - 51 flag constants now carry their C names (e.g. `CRYPT_ACTIVATE_READONLY` instead of `crypt_activate_readonly`), which libcryptsetup-rs maps to the same typed flags guest_disk uses; - the fallback also adds 35 constants that nothing uses (23 `CRYPT_*` and 12 integer limits such as `INT64_MAX`); - the `extern "C"` blocks become `unsafe extern "C"`. - **Tests:** guest_disk's tests, which `//rs/tests/node:root_tests` runs, read an Argon2i keyslot's PBKDF settings. That is the null-hash case the deleted patch handled. - **rocksdb 0.25** (macOS, and only with `consensus_pool_backend = "rocksdb"`). LMDB is the default, and in this repository only a test helper selects RocksDB, with temporary directories. @dfinity/core-protocol - **Disk format:** RocksDB 11.8 reads databases written by 8.10, but writes SST format version 7, which RocksDB before 10.4 can't read. The replica empties its persistent pool whenever its version changes, so that doesn't matter. - **Block cache:** the pool configures none, so RocksDB's default is used, and that default is now a HyperClockCache instead of an LRUCache. - **Compaction filter:** it is now freed with the database instead of leaked. - **PocketIC:** the published macOS PocketIC server links RocksDB 11.8 through the artifact pool, but never selects that backend. - **Tests:** no CI job runs the RocksDB pool tests. On Linux they are compiled out, and the arm64-darwin job only runs tests tagged `test_all_platforms` or `test_all_platforms_slow`. # Verification **CI** on fe09fb9 passed: - Bazel Test All: "Executed 215 out of 1163 tests: 1163 tests pass"; - Bazel Test arm64-darwin and arm64-linux; - Build IC and Build Determinism; - Cargo Lint, Lock Generate and the MODULE.bazel.lock check. **Locally**, on this branch: - **Locks:** - In the dev container, `cargo update --workspace` reports "Locking 0 packages". - `./bin/bazel-pin.sh` reports "Nothing to repin.". - `bazel mod deps` leaves `MODULE.bazel.lock` unchanged, and buildifier passes. - Compared with dfinity#12181's locks, only the edges of the crates above change. - **Builds:** - `bazel build` succeeds for the replica, the canister sandbox binaries, the system-test driver, the consensus test utilities, the bare-metal deployment tool and `//publish/canisters`. - `bazel build --config=fuzzing --build_tag_filters=libfuzzer //rs/...` succeeds. - The four binaries and the 44 canisters are byte-identical to the ones built from dfinity#12181. - **guest_disk:** `bazel build //rs/ic_os/os_tools/guest_disk/...` succeeds in the dev container, which has the cryptsetup libraries. The libcryptsetup-rs-sys build script leaves only `bindings.rs` in OUT_DIR, so the macro fallback's temporary files don't reach Bazel's outputs. - **Not run:** nothing was run locally on macOS. This PR carries the `CI_ALL_BAZEL_TARGETS` label. CI Main's Bazel Test All therefore builds and tests the same targets as on master, including the `long_test`s and the system tests' SSH sessions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Stacked on #12180 (on #12178, on #12177). Bumps 32 crates across a semver-major version whose APIs, as we use them, are unchanged: only the requirements in
Cargo.toml(workspace or crate-local) andbazel/rust.MODULE.bazelchange, plus the locks and one deleted Bazel patch. Each group is a separate commit in this PR (squashed on merge), so a failure can be bisected to a group.Changes
bazel/askama.patchand its annotation are deleted: since 0.16.0, askama resolves template paths withstd::path::absoluteinstead ofcanonicalize()(askama-rs/askama#720), as the patch did. The patch's other hunk, which stopped canonicalizing the path of anaskama.toml, is not upstream, but no crate here has anaskama.tomlor aconfigtemplate attribute.crate-namefeature looks forCargo.toml, which Bazel doesn't provide), walrus 0.26 → 0.28 (PocketIC server tests; ic-wasm keeps its own 0.26), object 0.37 → 0.41 (fuzzing), escargot 0.5 → 1.0, scraper 0.24 → 0.29, colored 2 → 3, dialoguer 0.11 → 0.12, and indicatif 0.17 → 0.18 (the ICP Rosetta server's block-sync progress bar; ICRC Rosetta also depends on it)Where another crate still depends on the old major, both majors stay in the locks: hashlink, lru, procfs, signal-hook, bit-vec, ripemd, rlp, tokio-tungstenite, colored and walrus gain the new major next to the old one, and tower-http 0.6, nix 0.31, zstd 0.13, base64 0.22 and pem 3 stay next to their new major, which other crates had already pulled in. socket2 0.5.10, console 0.15 and a few html5ever-era crates drop out; with socket2 0.5 gone, quinn and quinn-udp use socket2 0.6.5 in both lock sets.
Not in this PR
wycheproof stays at 0.6. wycheproof 0.7 adds Ed25519 vector tc 151, whose R encodes y = 1 with the sign bit of x set; RFC 8032 (Section 5.1.3) says decoding it must fail.
packages/ic-ed25519accepts it on purpose: itsverify_signaturefollows ZIP215, which does not require canonical encodings of R and A, and the crate's own ZIP215 test vectors include this R.rs/crypto/internal/crypto_lib/basic_sig/ed25519delegates to it, so both crates' Wycheproof tests fail with 0.7. Moving to 0.7 needs those tests to skip the vector as a known ZIP215 difference, a test change that goes into its own PR.Behaviour changes (FYI)
Varyheader. Compression follows RFC 9110 for*andidentity;q=0inAccept-Encoding: ic-boundary's/metricsendpoint now answers 406 Not Acceptable when a request rules out every encoding, identity included, and serves zstd toAccept-Encoding: *.rs/p2p/quic_transport); the calls we make are unchanged.IterMutandpop(), which we don't use). lru 0.12.5 stays through ratatui 0.29.Verification
Run locally on this branch:
cargo update --workspacereports "Locking 0 packages" and./bin/bazel-pin.shreports "Nothing to repin.";bazel run //bazel:buildifier.checkpasses../ci/scripts/rust-lint.shpasses.bazel buildof the replica, the canister sandbox, ic-boundary, the bitcoin adapter, the ckBTC and ckETH minters, the PocketIC server, the dfx-core-vendored crates, the memory tracker, the replicated state and the crypto service provider (128 targets) succeeds.bazel build --config=fuzzing --build_tag_filters=libfuzzer //rs/...succeeds.This PR carries the
CI_ALL_BAZEL_TARGETSlabel, so CI Main's Bazel Test All builds and tests the same targets as on master,long_tests included. CI Main's fuzzer job only runs on PRs that touch.rs,BUILD.bazel,.bzlor fuzzing CI files, so it skips this PR; the merge queue runs it.🤖 Generated with Claude Code