Skip to content

build: update rust to 1.98.1 - #4721

Merged
QuantumExplorer merged 1 commit into
v4.2-devfrom
chore/rust-1-98-1
Sep 13, 2026
Merged

QuantumExplorer merged 1 commit into
v4.2-devfrom
chore/rust-1-98-1

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

The workspace has been pinned to Rust 1.92 since December 2025 (#2905). This moves it to the current stable, 1.98.1, so local toolchains and CI run one release and the five-release-old pin can be retired. The companion change for rust-dashcore is dashpay/rust-dashcore#1018.

What was done?

  • rust-toolchain.toml channel 1.92 → 1.98.1; root Cargo.toml rust-version 1.92 → 1.98 (the same pair of edits as chore: clippy, cargo machete, rust update to 1.92 #2905 and build: update rust to 1.89 #2755). The Dockerfile and the rust setup action read the channel from rust-toolchain.toml, so nothing else pins a version. The two mentions in the book are updated.
  • Fixed the lints the 1.98 clippy raises under -D warnings. Every change is a behaviour-preserving rewrite:
    • useless_borrows_in_formatting: dropped redundant & on format! / assert! arguments (two cbindgen build scripts, drive votes, rs-sdk-ffi, drive tests).
    • chunks_exact_to_as_chunks: chunks_exact(32) → as_chunks::<32>() (platform-wallet shielded file store, platform-wallet-ffi persistence).
    • unnecessary_sort_by: sort_by(|a, b| …cmp…) → sort_by_key / Reverse (drive-abci masternode identity updates, platform-wallet, wallet-storage backup, strategy-tests, rs-scripts).
    • for_kv_map / iter_kv_map: for (_, v) in map.iter() → map.values() and friends (dpp versioned methods, drive-abci checkpoints and validator set, wasm-dpp, wasm-sdk, strategy-tests).
    • question_mark: if let Some(x) = x { … } else { return None } → x? (dpp cbor paths, the 21 property arms in drive validate_uniqueness_of_data v0/v1).
    • collapsible_match: Arm => { if cond { … } } → Arm if cond => { … } (drive-abci consensus_params_update v0/v1, token config update state_v0, strategy address tests).
    • result_large_err on closures returning dpp Results: restructured dump.rs in rs-dapi-client and parse_contract_id in rs-scripts; wasm-dpp gets the crate-level #![allow(clippy::result_large_err)] that dpp, drive, drive-abci, rs-sdk and the wallet crates already carry.
    • One each of unnecessary_unwrap (update_operator_identity v0, replay), drain_collect (unsigned withdrawal txs), explicit_counter_loop (strategy-tests key ids, drive range-countable tests), unstable_name_collisions (Merge::merge in a test), useless_format (genesis shielded test).

Some of these land in shipped vN modules (drive validate_uniqueness_of_data v0/v1, drive-abci consensus_params_update v0/v1, update_operator_identity v0, update_masternode_identities v0, unsigned_withdrawal_txs v0, validator_set v0, token config state_v0). They are mechanical rewrites with identical semantics, the same treatment the 1.92 bump gave frozen modules.

How Has This Been Tested?

  • cargo clippy --workspace --all-targets --all-features --locked -- --no-deps -D warnings (the command from tests-rs-workspace.yml) exits 0 under rustc 1.98.1.
  • cargo fmt --all --check is clean.
  • No new tests: the diff introduces no behaviour. CI runs the suites.

Breaking Changes

None at the protocol level. The declared MSRV of the published crates moves from 1.92 to 1.98 via the workspace rust-version, as with every previous toolchain bump.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

Move the pinned toolchain from 1.92 to 1.98.1 and the workspace
rust-version to 1.98, and fix the clippy lints the newer toolchain
raises under -D warnings. All lint fixes are behaviour-preserving
rewrites; wasm-dpp gains the same crate-level result_large_err
allowance the other dpp-error crates already carry.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: dfa585cf-3b5a-4ce2-b2bf-c1aa506ca0ac

📥 Commits

Reviewing files that changed from the base of the PR and between 45da8ea and 7a995bb.

📒 Files selected for processing (47)
  • Cargo.toml
  • book/src/architecture/overview.md
  • book/src/introduction.md
  • packages/rs-dapi-client/src/dump.rs
  • packages/rs-dpp/src/data_contract/document_type/methods/versioned_methods.rs
  • packages/rs-dpp/src/util/cbor_value/canonical.rs
  • packages/rs-dpp/src/util/cbor_value/value.rs
  • packages/rs-drive-abci/src/execution/engine/consensus_params_update/v0/mod.rs
  • packages/rs-drive-abci/src/execution/engine/consensus_params_update/v1/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_masternode_identities/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs
  • packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/test/shielded.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/platform/mock.rs
  • packages/rs-drive-abci/src/platform_types/platform/mod.rs
  • packages/rs-drive-abci/src/platform_types/validator_set/v0/mod.rs
  • packages/rs-drive-abci/src/platform_types/withdrawal/unsigned_withdrawal_txs/v0/mod.rs
  • packages/rs-drive-abci/src/replay/mod.rs
  • packages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs
  • packages/rs-drive/src/drive/contract/insert/insert_contract/v0/tests/range_countable_index_e2e_tests.rs
  • packages/rs-drive/src/drive/document/index_uniqueness/internal/validate_uniqueness_of_data/v0/mod.rs
  • packages/rs-drive/src/drive/document/index_uniqueness/internal/validate_uniqueness_of_data/v1/mod.rs
  • packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/v0/mod.rs
  • packages/rs-drive/src/drive/votes/mod.rs
  • packages/rs-drive/src/query/vote_poll_vote_state_query.rs
  • packages/rs-drive/src/query/vote_polls_by_document_type_query.rs
  • packages/rs-drive/src/verify/voting/verify_masternode_vote/v0/mod.rs
  • packages/rs-json-schema-compatibility-validator/tests/rules.rs
  • packages/rs-platform-wallet-ffi/build.rs
  • packages/rs-platform-wallet-ffi/src/persistence.rs
  • packages/rs-platform-wallet-storage/src/sqlite/backup.rs
  • packages/rs-platform-wallet/src/changeset/merge.rs
  • packages/rs-platform-wallet/src/manager/accessors.rs
  • packages/rs-platform-wallet/src/wallet/platform_addresses/transfer.rs
  • packages/rs-platform-wallet/src/wallet/shielded/file_store.rs
  • packages/rs-platform-wallet/src/wallet/shielded/note_selection.rs
  • packages/rs-scripts/src/bin/check_contract_properties.rs
  • packages/rs-scripts/src/bin/register_identity.rs
  • packages/rs-sdk-ffi/build.rs
  • packages/rs-sdk-ffi/src/system/queries/current_quorums_info.rs
  • packages/strategy-tests/src/addresses_with_balance.rs
  • packages/strategy-tests/src/lib.rs
  • packages/strategy-tests/src/transitions.rs
  • packages/wasm-dpp/src/document/factory.rs
  • packages/wasm-dpp/src/lib.rs
  • packages/wasm-sdk/src/queries/identity.rs
  • rust-toolchain.toml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Book Preview built successfully.

Download the preview from the workflow artifacts.
To view locally: download the artifact, unzip, and open index.html.

Updated at 2026-09-13T10:14:29.042Z

@thepastaclaw

thepastaclaw commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Queued for automated review — 7th in line, estimated start in ~3 h (commit 7a995bb)
Estimated review time once started: ~55 min (two-phase automated review; median of recent runs).

  • Request priority review — tick this box and the review moves to the front of the queue.

@QuantumExplorer QuantumExplorer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviewed

@QuantumExplorer
QuantumExplorer merged commit e0c94f4 into v4.2-dev Sep 13, 2026
20 of 21 checks passed
@QuantumExplorer
QuantumExplorer deleted the chore/rust-1-98-1 branch September 13, 2026 10:18
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.01205% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.16%. Comparing base (e9fc354) to head (7a995bb).
⚠️ Report is 2 commits behind head on v4.2-dev.

Files with missing lines Patch % Lines
...ess/internal/validate_uniqueness_of_data/v0/mod.rs 10.00% 9 Missing ⚠️
...ess/internal/validate_uniqueness_of_data/v1/mod.rs 27.27% 8 Missing ⚠️
...en_config_update_transition_action/state_v0/mod.rs 28.57% 5 Missing ⚠️
packages/rs-dpp/src/util/cbor_value/value.rs 0.00% 3 Missing ⚠️
...execution/engine/consensus_params_update/v0/mod.rs 76.92% 3 Missing ⚠️
...execution/engine/consensus_params_update/v1/mod.rs 76.92% 3 Missing ⚠️
...s/rs-drive/src/query/vote_poll_vote_state_query.rs 0.00% 2 Missing ⚠️
...node_identities/update_operator_identity/v0/mod.rs 90.00% 1 Missing ⚠️
.../rs-drive-abci/src/platform_types/platform/mock.rs 0.00% 1 Missing ⚠️
...s/rs-drive-abci/src/platform_types/platform/mod.rs 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##           v4.2-dev    #4721      +/-   ##
============================================
- Coverage     84.42%   83.16%   -1.26%     
============================================
  Files          2812     2812              
  Lines        379448   380887    +1439     
============================================
- Hits         320335   316752    -3583     
- Misses        59113    64135    +5022     
Components Coverage Δ
dpp 86.02% <50.00%> (-0.99%) ⬇️
drive 84.44% <25.92%> (-0.22%) ⬇️
drive-abci 84.34% <68.00%> (-1.88%) ⬇️
sdk ∅ <ø> (∅)
dapi-client ∅ <ø> (∅)
platform-version ∅ <ø> (∅)
platform-value 66.08% <ø> (-4.82%) ⬇️
platform-wallet ∅ <ø> (∅)
drive-proof-verifier 39.18% <ø> (-10.60%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants