Skip to content

chore: rustc: 1.98.1 -> 1.99.0 - #11735

Merged
basvandijk merged 7 commits into
masterfrom
bas/rust-1.99.0
Oct 2, 2026
Merged

basvandijk merged 7 commits into
masterfrom
bas/rust-1.99.0

Conversation

@basvandijk

@basvandijk basvandijk commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrade the rust toolchain from 1.98.1 to 1.99.0. See:
https://blog.rust-lang.org/2026/10/01/Rust-1.99.0/.

The cargo clippy fixes this needs are in the PR below this one in the stack (#11734). This PR is
therefore the version bump in rust-toolchain.toml and bazel/rust.MODULE.bazel, plus the test
data that the new codegen (LLVM 22 → 23) shifts.

//rs/bitcoin/ckbtc/minter:ckbtc_minter_canbench_test was regenerated with
bazel run //rs/bitcoin/ckbtc/minter:ckbtc_minter_canbench_update. All 7 benchmark totals stay
within the noise threshold (+0.10% to +0.49%), but 7 small ::greedy scopes moved beyond it:

status name calls ins ins Δ% HI HI Δ% SMI SMI Δ%
+ build_unsigned_transaction_6_10_btc::greedy 1 13.41K +10.91% 0 0.00% 0 0.00%
+ build_unsigned_transaction_4_10m_sats::greedy 1 4.45K +10.54% 0 0.00% 0 0.00%
+ build_unsigned_transaction_5_1_btc::greedy 1 4.45K +10.54% 0 0.00% 0 0.00%
+ build_estimate_retrieve_btc_fee_1_50k_sats::greedy 1 4.74K +9.67% 0 0.00% 0 0.00%
+ build_unsigned_transaction_1_50k_sats::greedy 1 4.74K +9.67% 0 0.00% 0 0.00%
+ build_unsigned_transaction_2_100k_sats::greedy 1 4.79K +9.54% 0 0.00% 0 0.00%
+ build_unsigned_transaction_3_1m_sats::greedy 1 3.28K +8.82% 0 0.00% 0 0.00%

//rs/nns/governance:governance-canbench_test was regenerated with
bazel run //rs/nns/governance:governance-canbench_update. One of its 28 benchmarks moved beyond
the 5% noise threshold:

status name calls ins ins Δ% HI HI Δ% SMI SMI Δ%
- neuron_metrics_calculation 3.36M -8.53% 0 0.00% 0 0.00%

//rs/registry/canister:registry-canbench_test was regenerated with
bazel run //rs/registry/canister:registry-canbench_update. One of its 14 benchmarks moved beyond
the noise threshold:

status name calls ins ins Δ% HI HI Δ% SMI SMI Δ%
- measure_routing_table_invariant_checks_shards_and_unsharded 227.82M -2.87% 140 0.00% 0 0.00%

//rs/ledger_suite/icrc1/ledger:canbench_u64_test and :canbench_u256_test were
regenerated with bazel run //rs/ledger_suite/icrc1/ledger:canbench_u64_update and
:canbench_u256_update. Both moved the same way. u64:

status name calls ins ins Δ% HI HI Δ% SMI SMI Δ%
+ bench_icrc1_transfers::icrc103_get_allowances 1 5.35M +17.25% 0 0.00% 0 0.00%
+ bench_icrc1_transfers::icrc2_approve 1 17.78B +3.15% 28 0.00% 128 0.00%
+ bench_icrc1_transfers::icrc2_transfer_from 1 19.81B +2.93% 3 0.00% 0 0.00%
+ bench_icrc1_transfers 50.12B +2.26% 264 0.00% 256 0.00%
- bench_icrc1_transfers::upgrade 1 497.85M -5.66% 202 0.00% 128 0.00%
- bench_icrc1_transfers::post_upgrade 1 347.07M -8.19% 73 0.00% 0 0.00%

u256:

status name calls ins ins Δ% HI HI Δ% SMI SMI Δ%
+ bench_icrc1_transfers::icrc103_get_allowances 1 6.24M +14.34% 0 0.00% 0 0.00%
+ bench_icrc1_transfers::icrc2_approve 1 18.35B +3.23% 28 0.00% 128 0.00%
+ bench_icrc1_transfers::icrc2_transfer_from 1 20.27B +3.02% 3 0.00% 0 0.00%
+ bench_icrc1_transfers 51.70B +2.36% 262 0.00% 256 0.00%
- bench_icrc1_transfers::upgrade 1 492.28M -6.75% 200 0.00% 128 0.00%
- bench_icrc1_transfers::post_upgrade 1 341.50M -9.70% 71 0.00% 0 0.00%

//rs/recovery/subnet_splitting:integration_test has no _update target. Its expected values
are hardcoded in the test, so all ten were re-pinned by hand from one 1.99.0 reference run, in that
run's source/destination orientation.

As with 1.98.1 (#11534), what changed is the partition, not the workload:

  • Every total is identical: canisters 20, ingress messages 39, remote 10, local 28, http outcalls 10,
    heartbeats 694. Total instructions moved by 0.013% and total state size by 0.26%.
  • The split-finder solves a symmetric MILP over load samples derived from measured execution, and
    that is enough to flip a near-tied optimum to a different partition.
  • Both partitions balance instructions ~50/50, which the test also checks.
metric 1.98.1 1.99.0
states_sizes_bytes 3693264 / 5539880 5016967 / 4240197
canisters_installed 8 / 12 11 / 9
ingress_messages_executed 15 / 24 21 / 18
remote_subnet_messages_executed_lower_bound 4 / 6 5 / 5
local_subnet_messages_executed_upper_bound 11 / 17 15 / 13
http_outcalls_executed 4 / 6 6 / 4
heartbeats_and_global_timers_executed 368 / 326 341 / 353

The test is deterministic: 5/5 uncached runs on 1.99.0 give byte-identical estimates. As noted in
#11534, it pins the exact solution of a degenerate optimisation, so it will keep flipping on
unrelated changes too. Asserting on the totals and on the ~50/50 instruction balance would make it
robust.

The other three canbench suites (ckETH minter, ICP ledger, SNS governance) stay within their noise
thresholds. CI passes on all targets (CI_ALL_BAZEL_TARGETS), including the Windows PocketIC jobs
and Build Determinism.

No repin is needed. The Cargo.Bazel.*.lock digests hash the cargo/rustc of rules_rust's own
host tools (pinned at 1.98.0 by rules_rust 0.74.0), not the version selected by rust.toolchain,
and no third-party crate changed. rules_rust 0.74.0 ships no checksums for 1.99.0 (nor for the
current 1.98.1), so the toolchain is downloaded unverified, exactly as 1.98.1 is today.

Also checked, since tests won't necessarily catch these:

  • RangeInclusive (rust#155114): an exhausted
    range now reports different start()/end(). No code in the repo observes a range after
    iterating it.
  • Wasm: the wasm32-unknown-unknown target features are identical on both toolchains.
    Canister-like modules built with the canister flags use no new Wasm proposal, and they pass
    validation configured like the IC's.
  • LLVM bitcode: rustc 1.99.0 emits LLVM 23 bitcode, which the hermetic LLVM 22 lld cannot read.
    This is harmless today: canisters (-C linker-plugin-lto) link with rustc's bundled rust-lld, and
    native links carry no bitcode. Until the hermetic toolchain reaches LLVM 23, though, don't route
    wasm links through it or add -C linker-plugin-lto to native targets.

🤖 Generated with Claude Code

@basvandijk
basvandijk added this pull request to stack #11736 October 1, 2026 16:21
@basvandijk basvandijk changed the title bas/rust 1.99.0 chore: rustc: 1.98.1 -> 1.99.0 Oct 1, 2026
@basvandijk basvandijk added the CI_ALL_BAZEL_TARGETS Runs all bazel targets label Oct 1, 2026
@github-actions github-actions Bot added the chore label Oct 1, 2026
@basvandijk
basvandijk requested a balanced review from Copilot October 1, 2026 16:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The canbench baseline updates promised by the PR description are absent from the current diff.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Upgrades the repository’s Rust toolchain from 1.98.1 to 1.99.0.

Changes:

  • Updates the rustup toolchain pin.
  • Synchronizes the Bazel Rust toolchain version.
File Description
rust-toolchain.toml Pins Rust 1.99.0.
bazel/​rust.MODULE.bazel Pins Bazel’s Rust toolchain to 1.99.0.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread rust-toolchain.toml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

A repository-wide compiler and LLVM upgrade requires final validation through the full CI suite.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

@basvandijk
basvandijk marked this pull request as ready for review October 1, 2026 17:18
@basvandijk
basvandijk requested review from a team as code owners October 1, 2026 17:18

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):

  1. Update unreleased_changelog.md (if there are behavior changes, even if they are
    non-breaking).

  2. Are there BREAKING changes?

  3. Is a data migration needed?

  4. Security review?

How to Satisfy This Automatic Review

  1. Go to the bottom of the pull request page.

  2. Look for where it says this bot is requesting changes.

  3. Click the three dots to the right.

  4. Select "Dismiss review".

  5. 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

@zeropath-ai

zeropath-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to 2c50207.

Security Overview
Detected Code Changes
Change Type Relevant files
Configuration changes ► bazel/rust.MODULE.bazel
    Update Rust toolchain edition and version from 1.98.1 to 1.99.0
► rust-toolchain.toml
    Update channel from 1.98.1 to 1.99.0
Bug Fix ► rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u256.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/nns/governance/canbench/canbench_results.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/registry/canister/canbench/canbench_results.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/recovery/subnet_splitting/tests/integration_tests.rs
    Update numeric expectations in e2e metrics assertions

@zeropath-ai

zeropath-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ No security or compliance issues detected. Reviewed everything up to 2c50207.

Security Overview
Detected Code Changes
Change Type Relevant files
Configuration changes ► bazel/rust.MODULE.bazel
    Update Rust toolchain edition and version from 1.98.1 to 1.99.0
► rust-toolchain.toml
    Update channel from 1.98.1 to 1.99.0
Bug Fix ► rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u256.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/ledger_suite/icrc1/ledger/canbench_results/canbench_u64.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/nns/governance/canbench/canbench_results.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/registry/canister/canbench/canbench_results.yml
    Adjust benchmark instruction counts (various subfields)
Bug Fix ► rs/recovery/subnet_splitting/tests/integration_tests.rs
    Update numeric expectations in e2e metrics assertions

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The repository-wide compiler and LLVM transition requires the full CI validation described in the PR.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@mbjorkqvist mbjorkqvist left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @basvandijk!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for including the tables in the PR description. Much easier to understand than the noisy canbench_results.yml diffs.

Base automatically changed from bas/clippy-fixes-for-rust-1.99.0 to master October 2, 2026 17:49
basvandijk and others added 7 commits October 2, 2026 19:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with `bazel run //rs/bitcoin/ckbtc/minter:ckbtc_minter_canbench_update`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with `bazel run //rs/nns/governance:governance-canbench_update`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The totals are unchanged; the split-finder picks a different but equally
balanced partition. All ten values come from one 1.99.0 reference run, in
its source/destination orientation. Five uncached runs give byte-identical
estimates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with `bazel run //rs/registry/canister:registry-canbench_update`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with `bazel run //rs/ledger_suite/icrc1/ledger:canbench_u256_update`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Regenerated with `bazel run //rs/ledger_suite/icrc1/ledger:canbench_u64_update`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@basvandijk
basvandijk added this pull request to the merge queue Oct 2, 2026
Merged via the queue into master with commit 905560f Oct 2, 2026
38 checks passed
@basvandijk
basvandijk deleted the bas/rust-1.99.0 branch October 2, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants