Repository navigation
chore(deps): update cc, ssh2, libcryptsetup-rs and rocksdb, and drop two Bazel patches - #12184
Conversation
…ompatible versions
Refresh Cargo.lock and Cargo.Bazel.{toml,json}.lock to the newest
semver-compatible versions and fix the Cargo/Bazel drift between them:
362 crates.io packages in both locks were locked at different versions;
29 remain, all held back on purpose or used by Bazel-only consumers.
- Lift the temporary syn 3 ban (#11016): thiserror 2.0.21, drop the
enum-ordinalize-derive constraint spec.
- Constrain cc to ~1.2 in both systems (the =1.2.48 pin only served the
deleted bazel/cc_rs.patch).
- Hold back, at each lock's current version, crates whose updates change
canister- or replica-visible behaviour (they follow in owner-reviewed
PRs), including the whole TLS stack down to rustls-pki-types. Also
hold systemstat at 0.2.7 (0.2.8 makes Linux PlatformImpl !Sync, which
breaks ic-bn-lib) and, in Bazel only, libfuzzer-sys at 0.4.7 (0.4.8+
makes test_input_wrap an unsafe fn, which breaks the Bazel-only
//rs/execution_environment/fuzz:fuzzer_sandbox).
- Update the wasm32 getrandom override (hub labels for cfg-if/libc,
getrandom 0.2.17) and rebase bazel/pkg-config.patch onto 0.3.34.
- Sync requirements and features between Cargo.toml and
bazel/rust.MODULE.bazel; delete 14 unreferenced crate.specs.
- bin/bazel-pin.sh: add --full (optionally followed by crates to pin),
repin several crates one at a time, fix the help text and its link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rustls uses brotli 8 and brotli-decompressor 5 to compress certificates in node-to-node TLS, so they move with the rest of the TLS stack in a follow-up PR instead of here. For example, brotli-decompressor 5.0.3 rejects streams with non-zero final padding, which 5.0.0 accepts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndent of the canister size take_canister_snapshot_fails_when_heap_delta_rate_limited and load_canister_snapshot_fails_when_heap_delta_rate_limited set their heap-delta rate limits (80,000 and 150,000 bytes) just below the heap delta of one and two snapshots of the universal canister (86,016 bytes each). That heap delta is mostly the canister's data-segment pages. With the lockfile refresh, the universal canister is built with pretty 0.12.5 (a candid dependency), which uses unicode-width's tables instead of unicode-segmentation's. Its data segments shrink by 4 pages, to 69,632 bytes per snapshot, so neither test reached its limit anymore. The replica's behaviour is unchanged. Write 1 MiB of stable memory before taking the snapshot and set the limits relative to it, so they no longer depend on the canister's size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ping 0.5.1 and later make dgramsock::ping wait for a reply that carries the ICMP echo identifier of its request. Linux ping sockets replace that identifier with their own, so every ping times out. In SetupOS and HostOS the uplink detection then finds no usable interface, HostOS creates no br6 bridge and the GuestOS VM never starts, which failed all //rs/tests/nested HostOS tests. Keep Bazel, which builds the shipped images, at 0.5.0 until the ping upgrade gets its own PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed split The lockfile refresh rebuilds the universal and proxy canisters this test installs, which shifts their per-canister instruction counts. The split-finder now picks a different, equally balanced split with the same totals, so update the expected per-subnet values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with `bazel run //rs/nns/governance:governance-canbench_update`. Two benchmarks moved beyond the noise threshold with the refreshed dependencies: neuron_metrics_calculation (+8.67%) and draw_maturity_from_neurons_fund (-6.67%). Only instruction counts change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`time::format_description::parse` is `parse_borrowed::<1>` and is deprecated from time 0.3.48, which would fail the clippy gate. Call `parse_borrowed::<1>` directly; it already exists in the locked 0.3.47, so the formatted output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…int, serde_json, time, ...) Release the canister-runtime crates that the lockfile refresh held back, to their newest semver-compatible versions in both lock sets: candid/candid_derive 0.10.40, ic-cdk/ic-cdk-macros 0.20.3, ic0 1.2.0, num-bigint 0.4.8, rust_decimal 1.43.0, serde_json 1.0.154, serde_with 3.24.0, time 0.3.55, walrus 0.26.5 (ic-wasm's copy), the rust-bitcoin .101 family with secp256k1 0.29.100 / secp256k1-sys 0.10.1, and, in Bazel only, ic-stable-structures 0.6.9 / 0.7.2. Also bump two majors that need no code changes, ic-certified-map 0.4.1 and ic-vetkeys 0.9.0, raise the ic-cdk and ic0 floors to the versions now locked, and declare time's `formatting` feature in Bazel as Cargo already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed split The universal and proxy canisters this test installs are rebuilt with the refreshed canister-runtime crates (candid 0.10.40 and others), which shifts their per-canister instruction counts. The split-finder picks a different, equally balanced split with the same totals, so update the expected per-subnet values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with the `_update` targets of the four suites that moved beyond their noise thresholds with the refreshed canister-runtime crates: the ICP ledger, the ICRC-1 ledger (u64 and u256) and NNS governance. Mostly fewer instructions; a few heap_increase values move in the ledger suites; stable_memory_increase is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…S stack Release the replica-runtime crates that the lockfile refresh held back, to their newest semver-compatible versions in both lock sets: wasmtime/pulley 48.0.9 with cranelift 0.135.9 and regalloc2 0.15.3 (the 48 LTS line), flate2 1.1.11, and the TLS stack: aws-lc-rs 1.19.0 (aws-lc-sys 0.47.0), rustls-webpki 0.103.17, webpki-roots and webpki-root-certs 1.0.12, rustls-pki-types 1.16.0, tokio-rustls 0.26.6, hyper-rustls 0.27.10, rustls-native-certs 0.8.5 (openssl-probe 0.2.2), async-web-client 0.6.4, brotli 8.0.4 and brotli-decompressor 5.0.3. Lock-only. wirm stays at 4.0.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
flate2 1.1.10 moves its decoder to miniz_oxide 0.9, which, like zlib, rejects incomplete Huffman trees that 0.8 accepted (miniz_oxide#190). The replica decompresses a canister's stored .wasm.gz again whenever it compiles it, so a module that only the old decoder accepts would stop loading after an upgrade. Keep flate2 at the versions the lockfile refresh holds (1.1.9 in Cargo, 1.1.5 in Bazel) and leave the upgrade to its own PR. Also restore the socket2 and itertools edges of quinn, quinn-udp and alloy-rpc-types-eth in Cargo.lock, which re-resolving the TLS crates had moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd drop the libssh2-sys patch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The RocksDB 8.10→11.8 upgrade changes persistent formats and compaction-filter ownership, requiring human review of rollback compatibility and macOS reopen, purge, and iterator behavior not covered by runtime validation.
No open issues 🎉
What changed in this PR
Continues the dependency refresh after #12181, updating native-code build dependencies and libraries used by SSH tooling, GuestOS disk encryption, and the optional macOS RocksDB artifact pool.
Changes:
- Updates cc, libcryptsetup-rs, and RocksDB across Cargo and Bazel, and aligns Bazel’s SSH dependencies with Cargo.
- Enables RocksDB’s runtime bindgen feature and adds a Bazel C++20 flag for macOS builds.
- Removes two patches whose fixes are upstream and refreshes lockfiles, dropping obsolete transitive dependencies.
| File | Description |
|---|---|
rs/canister_sandbox/Cargo.toml |
Raises the cc build-dependency requirement to 1.11. |
rs/artifact_pool/Cargo.toml |
Updates RocksDB to 0.25 and enables runtime bindgen on macOS. |
Cargo.toml |
Raises libcryptsetup-rs and ssh2 workspace requirements. |
Cargo.lock |
Records Cargo upgrades and transitive dependency cleanup. |
Cargo.Bazel.toml.lock |
Records matching Bazel upgrades, including SSH libraries. |
Cargo.Bazel.json.lock |
Refreshes generated dependency metadata, features, and build settings. |
bazel/rust.MODULE.bazel |
Updates requirements, removes patch annotations, and sets RocksDB’s C++20 flag. |
bazel/libssh2-sys.patch |
Deletes the superseded pkg-config determinism workaround. |
bazel/libcryptsetup-rs.patch |
Deletes fixes now upstream for null PBKDF hashes and negative error codes. |
Review effort: Balanced
…s are gone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
✅ No security or compliance issues detected. Reviewed everything up to fe09fb9. Security OverviewDetected Code Changes
|
There was a problem hiding this comment.
🔵 Needs a closer look
The macOS RocksDB upgrade changes persistence compatibility and compaction-filter ownership, requiring human review of rollback safety and runtime behavior because no macOS validation ran and CI only builds the pool tests.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The RocksDB 8.10→11.8 upgrade changes compaction-filter ownership beneath unsafe snapshot lifetimes, and macOS CI excludes runtime tests, leaving runtime compatibility unvalidated and requiring maintainer review.
No open issues 🎉
Review effort: Balanced
There was a problem hiding this comment.
This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):
-
Update
unreleased_changelog.md(if there are behavior changes, even if they are
non-breaking). -
Are there BREAKING changes?
-
Is a data migration needed?
-
Security review?
How to Satisfy This Automatic Review
-
Go to the bottom of the pull request page.
-
Look for where it says this bot is requesting changes.
-
Click the three dots to the right.
-
Select "Dismiss review".
-
In the text entry box, respond to each of the numbered items in the previous
section, declare one of the following:
-
Done.
-
$REASON_WHY_NO_NEED. E.g. for
unreleased_changelog.md, "No
canister behavior changes.", or for item 2, "Existing APIs
behave as before.".
Brief Guide to "Externally Visible" Changes
"Externally visible behavior change" is very often due to some NEW canister API.
Changes to EXISTING APIs are more likely to be "breaking".
If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.
If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.
Reference(s)
For a more comprehensive checklist, see here.
GOVERNANCE_CHECKLIST_REMINDER_DEDUP
Stacked on #12181 (on #12180, on #12178, on #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
~1.2to1.11in thecccrate.spec and inrs/canister_sandbox/Cargo.toml(that crate's build script compilessrc/backtrace.cwith cc). #12177 set~1.2to keep this jump out of it.Cargo.lockalready has. The floor is raised to 0.9.7, which requires libssh2-sys 0.3.4.bazel/libssh2-sys.patchis deleted: it stopped libssh2-sys from writing alibssh2.pcthat 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*.pcfiles from OUT_DIR anyway. The annotation's opensslbuild_script_datastays, because libssh2-sys still compiles against the@opensslheaders.bazel/libcryptsetup-rs.patchand 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::hashis now anOption<String>, which nothing here reads. 0.16.1 comparesCryptLuks2TokenHandle::is_assigned's return value with-ENOENT(stratis-storage/libcryptsetup-rs#483); guest_disk doesn't call it.runtimefeature, which loads libclang at run time. rocksdb 0.25 turns librocksdb-sys's default features off and enablesbindgen-runtimethrough its own default features. Our default features stay off, sobindgen-runtimeis now enabled explicitly. That matters for Cargo; in Bazel, bindgen already getsruntimethrough other crates. The librocksdb-sys annotation gainsCXXFLAGS; see the macOS section below.The locks lose the crates that only the old versions used:
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.11rather than1:1, the locked 1.2.67 would still satisfy the requirement, so a plain./bin/bazel-pin.shwould keep it../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.1.11, the plain repin has to move cc, as cargo did forCargo.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 #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++17to C++ compiles. On macOS, Bazel uses apple_support's Xcode toolchain, whose defaultBAZEL_CXXOPTSis-std=c++17; the hermetic LLVM toolchain on Linux adds it too. rules_rust passes the toolchain's C++ flags to build scripts asCXXFLAGS, and cc addsCXXFLAGSafter the build script's own flags. Without a fix, the last-stdwould be-std=c++17, and RocksDB 11.8 doesn't compile that way.The fix: the librocksdb-sys annotation sets
CXXFLAGSto-std=c++20. rules_rust appends it to the toolchain'sCXXFLAGS, which makes it the last-std. The alternatives don't work:ROCKSDB_CXX_STDonly replaces its builder flag, which still comes beforeCXXFLAGS.--cxxoptdoesn't reach build scripts.BAZEL_CXXOPTSwould 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)
-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.//publish/canisters, are byte-identical to the ones built from chore(deps): bump crates across majors that need no code changes #12181. That was checked for x86_64 Linux and wasm32; for aarch64 and macOS it rests on reading cc's source.-c dbg, and-c fastbuildas used by--config=dev) gain-mno-omit-leaf-frame-pointer, which changes the C object code on aarch64.--config=fuzzingno sanitizer flag reaches build scripts, so cc's new ASan forwarding doesn't apply.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/nodeCRYPT_ACTIVATE_READONLYinstead ofcrypt_activate_readonly), which libcryptsetup-rs maps to the same typed flags guest_disk uses;CRYPT_*and 12 integer limits such asINT64_MAX);extern "C"blocks becomeunsafe extern "C".//rs/tests/node:root_testsruns, read an Argon2i keyslot's PBKDF settings. That is the null-hash case the deleted patch handled.consensus_pool_backend = "rocksdb"). LMDB is the default, and in this repository only a test helper selects RocksDB, with temporary directories. @dfinity/core-protocoltest_all_platformsortest_all_platforms_slow.Verification
CI on fe09fb9 passed:
Locally, on this branch:
cargo update --workspacereports "Locking 0 packages"../bin/bazel-pin.shreports "Nothing to repin.".bazel mod depsleavesMODULE.bazel.lockunchanged, and buildifier passes.bazel buildsucceeds 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.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 onlybindings.rsin OUT_DIR, so the macro fallback's temporary files don't reach Bazel's outputs.This PR carries the
CI_ALL_BAZEL_TARGETSlabel. CI Main's Bazel Test All therefore builds and tests the same targets as on master, including thelong_tests and the system tests' SSH sessions.🤖 Generated with Claude Code