Skip to content

chore(deps): bump platform pin to PR #3968 latest and Rust toolchain to 1.98 - #968

Merged
lklimek merged 7 commits into
v1.0-devfrom
deps/bump-rust
Aug 31, 2026
Merged

lklimek merged 7 commits into
v1.0-devfrom
deps/bump-rust

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: Refreshes the dashpay/platform git dependency pins to the latest revision of PR #3968, adds a short doc note on the wallet withdrawal-limit logic, and bumps the pinned Rust toolchain from 1.92 to 1.98 (fixing the new compiler's lint failures along the way).

Detailed discussion

What was done

This is an internal chore branch with no user-observable behavior change; User story / Scenario are omitted.

  • Platform pin bump: moves the four dashpay/platform git dependencies (dash-sdk, rs-sdk-trusted-context-provider, platform-wallet, platform-wallet-storage) to the current head of PR #3968 (feat/platform-wallet-storage-rehydration), across three incremental commits as the upstream PR moved. Cargo.lock refreshed accordingly.
  • Docs: a short note explaining why the daily withdrawal limit is computed from today's running total rather than a rolling window.
  • Rust toolchain 1.92 → 1.98: bumped rust-toolchain.toml (the single source of truth for local + CI builds), Cargo.toml's rust-version, the Copilot setup workflow, and prose mentions in CLAUDE.md and a design doc. The clippy.yml rationale comment was reworded to stop naming a version, so it can't go stale on the next bump. Clippy 1.98 introduced 3 new lint classes across 12 files (unnecessary_sort_by, collapsible_match, result_large_err) — all fixed in place, no behavior changes; each site was manually verified for control-flow equivalence.

Testing

  • cargo fmt --all -- --check, cargo build --all-features, cargo clippy --all-features --all-targets -- -D warnings, cargo test --doc --all-features --workspace, and cargo nextest run --lib --all-features all pass under Rust 1.98.
  • CI (tests.yml + clippy.yml) will run the full non-ignored-test gate on this PR, since rust-toolchain.toml is a tracked trigger path for both workflows.

Breaking changes

None.

Checklist

  • cargo fmt --all
  • cargo clippy --all-features --all-targets -- -D warnings
  • Toolchain/dependency references swept for staleness

Attribution

🤖 Co-authored by Claudius the Magnificent AI Agent

Summary by CodeRabbit

  • New Features

    • Updated the minimum supported Rust version to 1.98.
  • Documentation

    • Updated development guidance and design documentation to reflect Rust 1.98.
  • Refactor

    • Simplified internal sorting, validation, and UI control-flow implementations without changing behavior.
    • Improved code-quality checks and clarified lint handling.
  • Chores

    • Updated development workflows to use the Rust 1.98 toolchain.
    • No user-facing functionality or runtime behavior changed.

lklimek and others added 6 commits August 25, 2026 13:52
Moves all four dashpay/platform git dependencies -- dash-sdk,
rs-sdk-trusted-context-provider, platform-wallet, platform-wallet-storage --
from 4784de03 to 4f0fd091, the current head of PR #3968
(feat/platform-wallet-storage-rehydration). Cargo.lock refreshed for just
these four crates via `cargo update -p`; 238 other locked dependencies are
untouched (grovedb and key-wallet revs move only because they are
transitively pinned by platform's own Cargo.lock).

Two behavior-preserving compile fixes were required:

- `daily_withdrawal_limit()` now takes `reference_total_credits:
  Option<Credits>` instead of `Credits`, to let its v2 scheme distinguish
  "not yet known" from a genuine zero. The one call site already had the
  value in hand, so it now passes `Some(total_credits_on_platform)` --
  identical behavior, no user-facing change.

- `PlatformWalletError` gained `MasternodeWithdrawalUnconfirmed` (a
  masternode credit withdrawal broadcast but not confirmed -- may already
  have executed, caller must not blindly retry). Both exhaustive matches in
  `wallet_backend/mod.rs` are deliberately wildcard-free, so this bump forces
  a review here: bucketed alongside its existing siblings
  `TransactionBroadcastUnconfirmed` / `ShieldedSpendUnconfirmed`, which carry
  the same "accepted but unconfirmed, do not resubmit" semantics and already
  route to the generic WalletBackend / Other classification.

No CHANGELOG entry -- neither fix changes observable behavior.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Moves all four dashpay/platform git dependencies -- dash-sdk,
rs-sdk-trusted-context-provider, platform-wallet, platform-wallet-storage --
from 4f0fd091 to 396977be, the current head of PR #3968
(feat/platform-wallet-storage-rehydration). Cargo.lock refreshed for just
these four crates via `cargo update -p`; upstream split out two new crates
(dash-async, dash-platform-macros) that come along transitively, and 238
other locked dependencies are untouched.

No source changes needed -- `cargo clippy --all-features --all-targets -- -D
warnings` is clean against this head, and no observable behavior changes.
No CHANGELOG entry.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Moves all four dashpay/platform git dependencies -- dash-sdk,
rs-sdk-trusted-context-provider, platform-wallet, platform-wallet-storage --
from 396977be to a844aecf, the current head of PR #3968
(feat/platform-wallet-storage-rehydration). Cargo.lock refreshed for just
these four crates via `cargo update -p`; grovedb and key-wallet/
key-wallet-manager move transitively with their own upstream rev bumps,
and 238 other locked dependencies are untouched.

Source fixes required by this hop:

- src/utils/parsers.rs: DriveDocumentQuery -> DocumentQuery is now a
  fallible TryFrom (was an infallible Into) -- a drive query carrying
  unresolved time-range provenance cannot be losslessly converted.
- src/model/dashpay.rs, src/model/dpns.rs, src/backend_task/dashpay/*.rs,
  src/backend_task/identity/register_dpns_name.rs,
  src/ui/contracts_documents/document_action_screen.rs,
  src/backend_task/dashpay/profile.rs: DocumentV0 gained a
  `contract_version: Option<u32>` field (selects per-property byte layout
  for documents serialized under format 3+); all locally-built documents
  set it to None, matching upstream's own bootstrap/test fixtures.
- src/backend_task/{contract,document,platform_info}.rs,
  src/backend_task/identity/{discover_identities,load_identity,
  load_identity_by_dpns_name,load_identity_from_wallet,
  refresh_loaded_identities_dpns_names,register_dpns_name}.rs,
  src/ui/tokens/view_token_claims_screen.rs: DocumentQuery gained a
  `time_range_clauses: Vec<TimeRangeClause>` field for IN_TIME_RANGE
  selections; every struct-literal query in this repo sets it to empty
  (no IN_TIME_RANGE usage exists here yet).
- src/wallet_backend/mod.rs: new PlatformWalletError::AssetLockInsufficientFunds
  variant added to both exhaustive matches (map_shielded_op_error,
  identity_op_error_kind), bucketed alongside CoreInsufficientFunds as a
  generic funding-shortfall WalletBackend error.

`cargo clippy --all-features --all-targets -- -D warnings` is clean against
this head. No user-observable behavior change; no CHANGELOG entry.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…rm-pin-3968-4f0fd09

# Conflicts:
#	src/wallet_backend/mod.rs
thepastaclaw flagged (PR #960) that daily_withdrawal_limit's v2 algorithm
wants the total credits Platform held a day ago and the network's actual
active protocol version, while this call passes today's current total and
PlatformVersion::latest(). Accepted as an intentional gap rather than
fixed: the value is display-only (an informational text panel, nothing
reads it back to gate or execute a withdrawal), the mismatch only bites
during the narrow window around a protocol version upgrade, and the
pinned SDK exposes no query for the day-old historical total to compute
the exact figure anyway. Documents the rationale in code so it doesn't
get re-flagged as an unexplained bug.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Bump the `rust-toolchain.toml` pin (the single source of truth for both
local and CI builds) from 1.92 to 1.98, and update every place that
duplicates the number as prose or config: `Cargo.toml`'s `rust-version`,
the Copilot setup workflow, CLAUDE.md, and the JIT-secret-access design
note.

The clippy workflow's rationale comment no longer names a version, so it
cannot go stale on the next bump.

Clippy 1.98 introduces three lints that `-D warnings` turns into build
failures (19 errors). Fixed in place:

- `unnecessary_sort_by` (7) — `sort_by` comparators replaced with
  `sort_by_key`. Both are stable sorts, so tie ordering is unchanged.
- `collapsible_match` (6) — inner `if`s folded into match guards. Every
  site falls through to a no-op `_ => {}` arm, so a failed guard behaves
  exactly as the skipped `if` body did.
- `result_large_err` (6) — annotated `#[expect]` with a reason. Each
  `Err` type is owned upstream (`dpp::ProtocolError`,
  `platform_wallet::PlatformWalletError`, `axum::Response`); boxing them
  would change signatures, and `bearer_auth`'s is fixed by axum's
  middleware contract.

No behaviour changes. Cargo.lock is unaffected.

Co-Authored-By: Claude Opus 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 30795aff-57ca-4269-917b-ca026033e04f

📥 Commits

Reviewing files that changed from the base of the PR and between af4d5dd and 80df34f.

📒 Files selected for processing (18)
  • .github/workflows/clippy.yml
  • .github/workflows/copilot-setup-steps.yml
  • CLAUDE.md
  • Cargo.toml
  • docs/ai-design/2026-06-02-jit-secret-access/design.md
  • rust-toolchain.toml
  • src/backend_task/identity/mod.rs
  • src/context/contested_names_db.rs
  • src/mcp/auth.rs
  • src/mcp/tools/identity.rs
  • src/model/fee_estimation.rs
  • src/model/qualified_identity/mod.rs
  • src/ui/identities/add_new_identity_screen/mod.rs
  • src/ui/identities/keys/add_key_screen.rs
  • src/ui/wallets/create_asset_lock_screen.rs
  • src/ui/wallets/send_screen.rs
  • src/wallet_backend/dashpay.rs
  • src/wallet_backend/mod.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The project minimum Rust version and pinned toolchain were raised from 1.92 to 1.98. Workflow and documentation references were updated. Clippy expectations, guarded match expressions, and equivalent sort_by_key implementations were added without changing runtime behavior.

Changes

Rust compatibility and code cleanup

Layer / File(s) Summary
Rust 1.98 toolchain configuration
.github/workflows/*, CLAUDE.md, Cargo.toml, docs/ai-design/..., rust-toolchain.toml
Toolchain, MSRV, workflow, and documentation references now use Rust 1.98.
Clippy expectations and match cleanup
src/backend_task/identity/mod.rs, src/mcp/auth.rs, src/model/qualified_identity/mod.rs, src/ui/identities/..., src/ui/wallets/create_asset_lock_screen.rs, src/wallet_backend/mod.rs
Targeted result_large_err expectations and equivalent guarded match expressions preserve existing behavior.
Equivalent sort implementation cleanup
src/context/contested_names_db.rs, src/mcp/tools/identity.rs, src/model/fee_estimation.rs, src/ui/wallets/send_screen.rs, src/wallet_backend/dashpay.rs
Ascending and descending comparator closures were replaced with equivalent sort_by_key implementations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 80df3

The PR updates the Rust build baseline and applies compiler-driven, behavior-preserving cleanups and documentation changes; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 12 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two primary changes: updating the platform dependency pin and upgrading the Rust toolchain to 1.98.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 57.89% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 12 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deps/bump-rust

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.

@lklimek
lklimek marked this pull request as ready for review August 31, 2026 09:32
@thepastaclaw

thepastaclaw commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

🕓 Ready for review — 11 ahead in queue (commit 80df34f)
Queue position: 12/12 · 3 reviews active
ETA: start ~11:29 UTC · complete ~12:04 UTC (median 34m across 30 recent reviews; 3 slots)
Queued 54s ago · Last checked: 2026-08-31 09:40 UTC

@lklimek
lklimek enabled auto-merge (squash) August 31, 2026 09:37
@lklimek
lklimek merged commit c695d20 into v1.0-dev Aug 31, 2026
5 checks passed
@lklimek
lklimek deleted the deps/bump-rust branch August 31, 2026 09:47
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.

3 participants