Skip to content

chore(deps): update Rust dependencies - #5948

Open
Claudius-Maginificent wants to merge 10 commits into
v5.1-devfrom
chore/rust-deps-update-v5.2
Open

Claudius-Maginificent wants to merge 10 commits into
v5.1-devfrom
chore/rust-deps-update-v5.2

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: Refresh the Rust dependencies on v5.2-dev — fixing the five security advisories that make the nightly Rust audit fail — while keeping every network-visible behaviour identical.

User story

As a node operator, I want the Platform node built from current, advisory-free dependencies, to run it without known vulnerabilities and without any change in how the network agrees on state.

Scenario

Base flow

Every night CI audits the locked Rust dependencies against the RustSec advisory database.

Actual behavior

The "Security: Rust Crates" workflow fails every night with five advisories (libz-sys, pulldown-cmark ×2, quinn-udp, zstd-sys), and "Security Status" fails after it. Many direct dependencies are several releases behind.

Expected behavior

The audit reports no vulnerabilities, and direct dependencies whose upgrade needs only mechanical code changes are current.

Detailed discussion

What was done

  • Lockfile refresh (cargo update, semver-compatible only). Fixes RUSTSEC-2026-0418, -0414, -0433, -0538 and -0410. Git-pinned dependencies (GroveDB, rust-dashcore, tenderdash-abci) and =-pinned crates are unchanged.
  • ICU kept at 2.2.0. cargo update would move icu_* to 2.4.0 (Unicode 18 data). url → idna → idna_adapter uses that data for UTS-46 host processing, so Url::from_str would accept ~13k more code points. That changes the verdict of format: "uri" in both document validators (native and jsonschema before PV15) and of $schema/$vocabulary at contract registration, with no protocol-version gate. A new rs-dpp test (should_refuse_a_format_uri_value_whose_host_holds_a_code_point_unassigned_in_unicode_17) pins the current verdict at the latest protocol version and at PV14. It fails on ICU 2.4 and passes on 2.2, so a future dependency update that changes this consensus result fails CI.
  • Exact pins only where a consensus change is proven. The ICU4X crates and their data (icu_normalizer, icu_properties and their _data crates) are pinned with = in rs-dpp. They are optional under validation-schema and ignored by cargo-machete, and the pin's comment points to the guard test. Other consensus-reaching crates (sha2, base64, fraction, json-patch, url, derive_more, bech32) were checked by running each against every newer published release with standalone probes, which found no consensus-visible difference. They therefore keep their normal version requirements. ed25519-dalek keeps its existing =2.2.0.
  • Semver-incompatible bumps with at most mechanical changes: thiserror 2 (remaining crates), itertools 0.15, strum 0.28, chrono-tz 0.10, num_enum 0.7 (withdrawals-contract), virtue 0.0.19, enum-map 3, parking_lot 0.13, moka 0.12.16 (drop the removed futures-util feature), criterion 0.8 (std::hint::black_box), mockall 0.15, metrics-exporter-prometheus 0.18, console-subscriber 0.5, file-rotate 0.8 (OpenOptions with mode 0o600, plus a test for the owner-only log file mode), tokio-tungstenite 0.30 (Message::Text(..into())), tower-http 0.7, serial_test 4, lru 0.19, wasm-streams 0.7, bip39 3 (wasm-sdk), android_logger 0.15, toml 1 (check-features).
  • Left as they are, because the upgrade is not mechanical or could change consensus:
    • Could change consensus: RustCrypto family (sha2/hmac/aes/cbc/chacha20poly1305/argon2), ed25519-dalek 3, bech32 0.12, base64 0.23, fraction 0.17, json-patch 5, derive_more 2.
    • Not mechanical: sqlparser 0.64, jni 0.22, reqwest 0.13 (TLS backend change).
    • Must move with other pinned crates:
      • rusqlite 0.43 needs a refinery release that supports it.
      • nonempty 0.12 and zip32 0.3 must match orchard, a git dependency.
      • gloo-timers 0.4 and the wasm-bindgen family stay on =0.2.108, which matches wasm-bindgen-cli in CI and the Dockerfile.
      • The = pins in wallet-storage stay as they are.
    • Changes generated FFI headers: cbindgen 0.29.

Base: the branch starts at 0fc32ab8fa, the merge-base of v5.1-dev and v5.2-dev, and has v5.1-dev merged in. So it carries v5.1-dev's git dependency updates (Tenderdash 2.0.0-dev.2, GroveDB 89dc7351, rust-dashcore f6bb90cb, dashcore-crypto replacing bls-signatures). Merge resolution: crates.io versions come from this branch, git dependencies and workspace versions from v5.1-dev, and ICU stays at 2.2.0.

Consensus review: the bumped crates used by consensus code (strum, itertools, num_enum, virtue, enum-map, thiserror) and the lockfile-only updates of serde_json, regex/regex-automata, num-bigint, uuid, iso8601 and unicode-normalization were compared at source level against their previous versions. A differential run of 1.6M regex match results between the old and new versions was byte-identical.

Testing

  • cargo clippy --workspace --all-targets -- -D warnings: clean.
  • wasm32 clippy (wasm-sdk, wasm-dpp, wasm-dpp2, wasm-drive-verify, rs-sdk-trusted-context-provider): clean.
  • Tests for every crate where code changed: rs-dapi (445), drive-abci logging, dpp/drive/withdrawals-contract validation and fee tests, dpp validate_document.
  • cargo fmt --check: clean. cargo audit: 0 vulnerabilities; the 2 remaining warnings predate this PR (atomic-polyfill, and scc via zeromq).
  • Not run locally:
    • The Android-only android_logger code was not compiled; the four calls it uses were checked to still exist in 0.15.1.
    • cargo test --target wasm32 was not run, because the wasm-bindgen test runner is not installed on this host.

Breaking changes

None. No consensus or public API change.

Checklist

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions
  • I have added or updated relevant unit/integration/functional/e2e tests

Prior work

Attribution

🤖 Generated with Claude Code

https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC

PR Hygiene · fe06f11

  • Bots — thepastaclaw requested changes — dismiss the review or push a fix, 1 thread unresolved — resolve it
  • Self-review — not asked of a bot author
  • Build failed
  • Approvals
    • files with no dedicated owner (Cargo.lock, packages/check-features/Cargo.toml, packages/rs-context-provider/Cargo.toml and 7 more) — QuantumExplorer or shumkov
    • rust-dapi (packages/rs-dapi/Cargo.toml, packages/rs-dapi/src/clients/tenderdash_websocket.rs) — approved by lklimek
    • dpp (packages/rs-dpp/Cargo.toml, packages/rs-dpp/src/data_contract/methods/validate_document/v2/tests.rs) — QuantumExplorer or shumkov
    • rs-drive-abci (packages/rs-drive-abci/Cargo.toml, packages/rs-drive-abci/src/logging/destination.rs) — QuantumExplorer or shumkov
    • rs-drive (packages/rs-drive/Cargo.toml, packages/rs-drive/benches/document_average_worst_case.rs, packages/rs-drive/benches/document_count_worst_case.rs and 1 more) — QuantumExplorer or shumkov
    • rs-platform-wallet-ffi (packages/rs-platform-wallet-ffi/Cargo.toml) — HashEngineering or ZocoLini or llbartekll or romchornyi
    • wallet-storage (packages/rs-platform-wallet-storage/Cargo.toml) — approved by lklimek
    • rs-platform-wallet (packages/rs-platform-wallet/Cargo.toml) — HashEngineering or ZocoLini or llbartekll or romchornyi
    • rust-sdk (packages/rs-sdk/Cargo.toml) — approved by lklimek
    • js-wasm-sdk (packages/wasm-sdk/Cargo.toml) — shumkov
    • system-contracts (packages/withdrawals-contract/Cargo.toml) — QuantumExplorer or shumkov

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

Rust package manifests update dependency versions and features across the workspace. Related code changes update URI validation tests, DAPI WebSocket subscription messages, rotated log-file permissions, and benchmark imports.

Changes: Workspace dependency and compatibility updates

Layer / File(s) Summary
URI validation dependencies and tests
packages/rs-dpp/Cargo.toml, packages/rs-dpp/src/data_contract/methods/validate_document/v2/tests.rs
The validation-schema feature enables four pinned ICU dependencies. Tests check URIs with U+0558 and ASCII hosts at protocol versions 14 and 15.
DAPI WebSocket subscription messages
packages/rs-dapi/Cargo.toml, packages/rs-dapi/src/clients/tenderdash_websocket.rs
The manifest updates tower-http, tokio-tungstenite, and serial_test. Transaction and new-block subscription messages convert serialized JSON into the WebSocket text-message input type.
Rotated log-file permissions
packages/rs-drive-abci/Cargo.toml, packages/rs-drive-abci/src/logging/destination.rs
Rotated log creation uses read, create, and append options with owner-only permissions. A test checks that the resulting permission bits equal 0o600.
Other package dependency updates
packages/check-features/Cargo.toml, packages/rs-context-provider/Cargo.toml, packages/rs-dapi-client/Cargo.toml, packages/rs-drive/Cargo.toml, packages/rs-drive/benches/*_worst_case.rs, packages/rs-platform-encryption/Cargo.toml, packages/rs-platform-serialization-derive/Cargo.toml, packages/rs-platform-wallet-ffi/Cargo.toml, packages/rs-platform-wallet-storage/Cargo.toml, packages/rs-platform-wallet/Cargo.toml, packages/rs-sdk-trusted-context-provider/Cargo.toml, packages/rs-sdk/Cargo.toml, packages/rs-unified-sdk-jni/Cargo.toml, packages/wasm-dpp/Cargo.toml, packages/wasm-dpp2/Cargo.toml, packages/wasm-sdk/Cargo.toml, packages/withdrawals-contract/Cargo.toml
These manifests update dependency versions or features. The three Drive benchmarks import black_box from std::hint after the Criterion upgrade.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: quantumexplorer, shumkov

Merge Risk: Low · up to 2c151

This dependency refresh resolves the reported security advisories and shows no concrete breakage in this repository. One minor risk remains: external Rust code that uses the wallet FFI crate's parking_lot lock guards could fail to compile after the parking_lot 0.13 bump.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title 'chore(deps): update Rust dependencies' matches the changeset, which bumps many Cargo dependencies across the workspace. It is generic, but it names the real primary change. It does not desc…
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.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title 'chore(deps): update Rust dependencies' matches the changeset, which bumps many Cargo dependencies across the workspace. It is generic, but it names the real primary change. It does not describe the notable source edits, such as the ICU4X pins, the new URI test, or the FileRotate permission change, and it does not mention the security advisories the PR reports resolving. The title is broad but accurate, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@lklimek
lklimek marked this pull request as ready for review November 16, 2026 16:12
lklimek and others added 7 commits November 16, 2026 16:16
Refresh Cargo.lock with `cargo update`. Git-pinned dependencies (GroveDB,
rust-dashcore, tenderdash-abci) and `=`-pinned crates are unchanged.

Resolves the cargo-audit advisories failing the nightly
"Security: Rust Crates" workflow:
- RUSTSEC-2026-0418 (libz-sys)
- RUSTSEC-2026-0414, RUSTSEC-2026-0433 (pulldown-cmark)
- RUSTSEC-2026-0538 (quinn-udp)
- RUSTSEC-2026-0410 (zstd-sys)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
dash-context-provider, drive-abci, platform-encryption, platform-wallet,
platform-wallet-storage and wasm-dpp2 still required thiserror 1 while
the rest of the workspace is on 2. No source changes needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
- itertools 0.13 -> 0.15 (dpp, drive, drive-abci, wasm-dpp); the removed
  or reshaped APIs (Position, all_equal_value, cons_tuples) are unused
- strum 0.26 -> 0.28 (dpp); only EnumString with #[strum(default)]
  changed, which the workspace does not use
- chrono-tz 0.8 -> 0.10 (dpp, token-reward-explanations only)
- num_enum 0.5 -> 0.7 (withdrawals-contract), same as dpp
- virtue 0.0.17 -> 0.0.19 (platform-serialization-derive); additive
  impl-generics support only
- enum-map 2 -> 3, parking_lot 0.12 -> 0.13, criterion 0.5 -> 0.8 (drive);
  criterion::black_box is deprecated, use std::hint::black_box
- moka 0.12.13 -> 0.12.16 (drive); drop the removed `futures-util`
  feature, which drive never used directly
- parking_lot 0.12 -> 0.13 (platform-wallet-ffi)
- mockall 0.13 -> 0.15, metrics-exporter-prometheus 0.16 -> 0.18,
  console-subscriber 0.4 -> 0.5, file-rotate 0.7 -> 0.8 (drive-abci);
  file-rotate takes OpenOptions instead of a unix mode, so pass the same
  read/create/append flags with mode 0o600, guarded by a new test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
- tokio-tungstenite 0.21 -> 0.30 (rs-dapi); Message::Text carries
  Utf8Bytes, so convert the outgoing subscription strings
- tower-http 0.6 -> 0.7 (rs-dapi)
- serial_test 3 -> 4 (rs-dapi, platform-wallet-storage dev-deps)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
- lru 0.16 -> 0.19 (dash-sdk, rs-dapi-client,
  rs-sdk-trusted-context-provider)
- wasm-streams 0.5 -> 0.7 (rs-sdk-trusted-context-provider); still
  within the pinned wasm-bindgen 0.2.108
- bip39 2 -> 3 (wasm-sdk); key-wallet keeps its own bip39 and no bip39
  type crosses that boundary
- android_logger 0.14 -> 0.15 (rs-unified-sdk-jni, Android only)
- toml 0.8 -> 1 (check-features)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
The semver-compatible lockfile refresh moved icu_* 2.2.0 -> 2.4.0, i.e.
Unicode 17 -> 18 data. url's IDNA host mapping (idna_adapter) reads it,
so `Url::from_str` started accepting hosts with code points unassigned
in Unicode 17 (e.g. U+0558). That check backs the `uri` format of both
document validators and `$schema`/`$vocabulary` on contract
registration, ungated by protocol version, so nodes on the old and new
lockfile would disagree.

Restore icu_collections, icu_locale_core, icu_normalizer(_data),
icu_properties(_data) and icu_provider to 2.2.0 (no other crate moves)
and add a test pinning the verdict at protocol versions 14 and latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
A newer release of these crates can change consensus results, so they
are pinned with `=` and may only move behind a protocol version:
sha2, bech32, base64, fraction, derive_more, url, ed25519-dalek and
json-patch, plus the ICU4X crates and data (Unicode 17) behind `url`
host parsing, which decide `format: "uri"` validity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
@thepastaclaw

thepastaclaw commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

⛔ Final review complete — 2 blocking finding(s) (commit fe06f11) · triage: normal

@lklimek
lklimek force-pushed the chore/rust-deps-update-v5.2 branch from 472ad48 to 89d32c9 Compare November 16, 2026 16:17
lklimek and others added 2 commits November 16, 2026 16:21
…us pins

A pinned crate may move once tests show identical results, including a
chain replay, since replayed blocks must produce the original outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
Differential probes against every newer published release found no
consensus-visible difference for sha2, bech32, base64, fraction,
derive_more, url, json-patch and ed25519-dalek, so their `=` pins added
earlier on this branch are dropped (ed25519-dalek keeps its pre-existing
pin, without the added comment). The ICU4X pins stay: ICU 2.4
(Unicode 18) changes `format: "uri"` validity, as the rs-dpp guard test
shows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
lklimek
lklimek previously approved these changes Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 16, 2026
@lklimek
lklimek changed the base branch from v5.2-dev to v5.1-dev November 16, 2026 16:42
@lklimek
lklimek dismissed their stale review November 16, 2026 16:42

The base branch was changed.

@coderabbitai coderabbitai 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.

Additional comments: 1

packages/rs-platform-wallet-ffi/Cargo.toml-28-28: 1

28-28: Minor · Data Integrity & Integration · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Preserve the public guard types.

A Rust caller that expects a parking_lot 0.12 guard from HandleStorage::get or get_mut will no longer compile. These methods are public, and the crate builds an rlib. (raw.githubusercontent.com) The 0.13 upgrade changes the guard types, including their lock_api dependency. (github.com) Keep 0.12 here to preserve the stated public API.

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 28c5c14 and 2c151a3.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 25

  • packages/check-features/Cargo.toml
  • packages/rs-context-provider/Cargo.toml
  • packages/rs-dapi-client/Cargo.toml
  • packages/rs-dapi/Cargo.toml
  • packages/rs-dapi/src/clients/tenderdash_websocket.rs
  • packages/rs-dpp/Cargo.toml
  • packages/rs-dpp/src/data_contract/methods/validate_document/v2/tests.rs
  • packages/rs-drive-abci/Cargo.toml
  • packages/rs-drive-abci/src/logging/destination.rs
  • packages/rs-drive/Cargo.toml
  • packages/rs-drive/benches/document_average_worst_case.rs
  • packages/rs-drive/benches/document_count_worst_case.rs
  • packages/rs-drive/benches/document_sum_worst_case.rs
  • packages/rs-platform-encryption/Cargo.toml
  • packages/rs-platform-serialization-derive/Cargo.toml
  • packages/rs-platform-wallet-ffi/Cargo.toml
  • packages/rs-platform-wallet-storage/Cargo.toml
  • packages/rs-platform-wallet/Cargo.toml
  • packages/rs-sdk-trusted-context-provider/Cargo.toml
  • packages/rs-sdk/Cargo.toml
  • packages/rs-unified-sdk-jni/Cargo.toml
  • packages/wasm-dpp/Cargo.toml
  • packages/wasm-dpp2/Cargo.toml
  • packages/wasm-sdk/Cargo.toml
  • packages/withdrawals-contract/Cargo.toml

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

…pdate-v5.2

Conflicts in Cargo.lock and packages/rs-drive-abci/Cargo.toml resolved
by keeping this branch's crates.io versions and v5.1-dev's git
dependencies (Tenderdash 2.0.0-dev.2, GroveDB 89dc7351, rust-dashcore
f6bb90cb, dashcore-crypto replacing bls-signatures). ICU stays at 2.2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYijwZNbw3EjHtdMAHC
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

The refresh introduces two blocking compatibility risks in production cryptographic and wallet derivation paths. The lockfile updates shielded proof dependencies without compatibility evidence, and the WASM SDK now resolves Unicode normalization data that can derive different BIP39 seeds for existing passphrases. Three additional in-scope test/constraint gaps should be addressed; Rust workspace tests remain pending, while wasm32 and image checks shown in the snapshot have passed.

🔴 2 blocking | 🟡 3 suggestion(s)

2 finding(s) not shown inline (the lines are not part of this PR's diff)

🔴 Blocking: Shielded consensus dependencies change without a compatibility guard
Cargo.lock:3535-3548

This refresh changes halo2_proofs from 0.3.2 to 0.3.5 and also moves the production Orchard dependency graph from bitvec 1.0.1 to 1.1.1, blake2b_simd 1.0.4 to 1.0.5, and pasta_curves 0.5.1 to 0.5.2. The pinned GroveDB grovedb-commitment-tree package depends on Orchard, while rs-drive-abci uses that tree for shielded state-transition validation and rs-dpp uses it in shielded transaction construction. These libraries participate in proof verification, field arithmetic, commitment roots, and serialized shielded values. Halo2 0.3.1 already documents a proof-verification acceptance change, so a semver-compatible lockfile update cannot be treated as tooling-only. No protocol boundary or differential proof/root/serialization evidence accompanies this change, despite the PR claiming network-visible behavior remains identical. Retain the prior exact versions or add deterministic old/new compatibility vectors and explicitly account for any intended proof-acceptance change before merging.

source: gpt-6.1-sol (phase2-reviewer: architecture-layering)

🟡 Suggestion: Compile the Android logger call site for the dependency upgrade
packages/rs-unified-sdk-jni/src/lib.rs:49-54

The upgraded android_logger dependency is used only inside cfg(target_os = "android"), so the Linux workspace checks and the reported Kotlin build do not compile this call site. Manually confirming that init_once, Config, with_max_level, and with_tag exist does not verify the target-specific type signatures or configuration behavior. Add an Android-target cargo check to the relevant CI coverage, or provide an existing Android Rust build job that is guaranteed to compile this crate.

source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a broad Rust dependency refresh with consensus-sensitive dependency pinning and mechanical source changes, but the diff does not directly alter consensus logic, funds movement, cryptography, or another critical surface under the stated criteria.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (not used above high effort; tier asks max)
  • Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `Cargo.lock`:
- [BLOCKING] Cargo.lock:3535-3548: Shielded consensus dependencies change without a compatibility guard
  This refresh changes `halo2_proofs` from 0.3.2 to 0.3.5 and also moves the production Orchard dependency graph from `bitvec` 1.0.1 to 1.1.1, `blake2b_simd` 1.0.4 to 1.0.5, and `pasta_curves` 0.5.1 to 0.5.2. The pinned GroveDB `grovedb-commitment-tree` package depends on Orchard, while `rs-drive-abci` uses that tree for shielded state-transition validation and `rs-dpp` uses it in shielded transaction construction. These libraries participate in proof verification, field arithmetic, commitment roots, and serialized shielded values. Halo2 0.3.1 already documents a proof-verification acceptance change, so a semver-compatible lockfile update cannot be treated as tooling-only. No protocol boundary or differential proof/root/serialization evidence accompanies this change, despite the PR claiming network-visible behavior remains identical. Retain the prior exact versions or add deterministic old/new compatibility vectors and explicitly account for any intended proof-acceptance change before merging.

In `packages/wasm-sdk/Cargo.toml`:
- [BLOCKING] packages/wasm-sdk/Cargo.toml:108: Preserve BIP39 passphrase normalization for existing wallets
  Changing the WASM SDK to `bip39` 3.0 resolves `unicode-normalization` from 0.1.25 (Unicode 17 data) to 0.1.26 (Unicode 18 data). The newer table adds mappings such as U+0558 to U+0567, while the older table leaves U+0558 unchanged. `mnemonicToSeed` passes the caller's arbitrary passphrase directly to `Mnemonic::to_seed` at `packages/wasm-sdk/src/wallet/key_derivation.rs:377-390`, where BIP39 applies NFKD before PBKDF2. Therefore an existing wallet using an affected passphrase derives different seed bytes after this update and can appear to restore as a different wallet. The same normalization package is also selected for the pinned key-wallet dependency. Keep the normalization data at the deployed version for wallet derivation, or introduce an explicit compatibility generation with regression vectors covering mnemonic-plus-passphrase pairs containing newly assigned Unicode code points.

In `packages/rs-dpp/Cargo.toml`:
- [SUGGESTION] packages/rs-dpp/Cargo.toml:72-76: The ICU pin does not freeze the complete behavior dependency graph
  The four exact ICU pins constrain the normalizer and property data packages, but their manifests still allow supporting packages such as `icu_provider`, `icu_locale_core`, `zerovec`, `litemap`, and related crates to move within their compatible ranges. The current lockfile resolves those packages to 2.2.0, but a later lockfile refresh can change them without changing any of the four exact pins. Since these packages implement data-provider and normalization support behavior used by the URL/IDNA path, the manifest does not fully establish the stated consensus freeze. Pin the complete relevant ICU closure, or document why each remaining floating package cannot affect the URI verdict and extend the guard if needed.

In `packages/rs-dpp/src/data_contract/methods/validate_document/v2/tests.rs`:
- [SUGGESTION] packages/rs-dpp/src/data_contract/methods/validate_document/v2/tests.rs:610-623: Add a regression test for schema metadata URI validation
  The added guard exercises only a document property with `format: "uri"`. Contract schema registration separately validates `$schema` and each `$vocabulary` key with `Url::parse` in `packages/rs-dpp/src/data_contract/document_type/schema/validation_schema/v0/mod.rs:539-546`. The PR description identifies those metadata URLs as another consensus-sensitive surface, but a future URL/ICU change could alter their registration verdict without affecting the new document-value test. Add registration tests using the same Unicode edge case for `$schema` and `$vocabulary`.

In `packages/rs-unified-sdk-jni/src/lib.rs`:
- [SUGGESTION] packages/rs-unified-sdk-jni/src/lib.rs:49-54: Compile the Android logger call site for the dependency upgrade
  The upgraded `android_logger` dependency is used only inside `cfg(target_os = "android")`, so the Linux workspace checks and the reported Kotlin build do not compile this call site. Manually confirming that `init_once`, `Config`, `with_max_level`, and `with_tag` exist does not verify the target-specific type signatures or configuration behavior. Add an Android-target `cargo check` to the relevant CI coverage, or provide an existing Android Rust build job that is guaranteed to compile this crate.
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Compressed rotated logs may not retain owner-only permissions — The new OpenOptions test verifies only the active log file. The file-rotate compression path can create .gz archives with default permissions, so compressed rotated logs may be readable by other local users even though the active file is 0o600. This behavior predates the reviewed range and is not introduced by the dependency refresh.
    • Follow-up: Track this in a separate logging-security issue or follow-up PR that enforces 0o600 on compressed archives and tests a rotation that produces a .gz file.

base64 = "0.22"
getrandom = { version = "0.2", features = ["js"] }
bip39 = { version = "2.0", features = ["rand", "all-languages"] }
bip39 = { version = "3.0", features = ["rand", "all-languages"] }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔴 Blocking: Preserve BIP39 passphrase normalization for existing wallets

Changing the WASM SDK to bip39 3.0 resolves unicode-normalization from 0.1.25 (Unicode 17 data) to 0.1.26 (Unicode 18 data). The newer table adds mappings such as U+0558 to U+0567, while the older table leaves U+0558 unchanged. mnemonicToSeed passes the caller's arbitrary passphrase directly to Mnemonic::to_seed at packages/wasm-sdk/src/wallet/key_derivation.rs:377-390, where BIP39 applies NFKD before PBKDF2. Therefore an existing wallet using an affected passphrase derives different seed bytes after this update and can appear to restore as a different wallet. The same normalization package is also selected for the pinned key-wallet dependency. Keep the normalization data at the deployed version for wallet derivation, or introduce an explicit compatibility generation with regression vectors covering mnemonic-plus-passphrase pairs containing newly assigned Unicode code points.

source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, platform-versioning, rust-quality, security-auditor)

Comment on lines +72 to +76
# Consensus-critical exact pin: ICU 2.4 (Unicode 18) changes `format: "uri"` validity via `url` host parsing; see test should_refuse_a_format_uri_value_whose_host_holds_a_code_point_unassigned_in_unicode_17.
icu_normalizer = { version = "=2.2.0", default-features = false, optional = true }
icu_normalizer_data = { version = "=2.2.0", default-features = false, optional = true }
icu_properties = { version = "=2.2.0", default-features = false, optional = true }
icu_properties_data = { version = "=2.2.0", default-features = false, optional = true }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 Suggestion: The ICU pin does not freeze the complete behavior dependency graph

The four exact ICU pins constrain the normalizer and property data packages, but their manifests still allow supporting packages such as icu_provider, icu_locale_core, zerovec, litemap, and related crates to move within their compatible ranges. The current lockfile resolves those packages to 2.2.0, but a later lockfile refresh can change them without changing any of the four exact pins. Since these packages implement data-provider and normalization support behavior used by the URL/IDNA path, the manifest does not fully establish the stated consensus freeze. Pin the complete relevant ICU closure, or document why each remaining floating package cannot affect the URI verdict and extend the guard if needed.

source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality)

Comment on lines +610 to +623
/// Pins consensus to the Unicode 17 ICU data behind `url`'s IDNA host mapping: U+0558 is
/// unassigned there, so a host holding it is not a URI. A failure means a dependency update
/// changed consensus.
#[test]
fn should_refuse_a_format_uri_value_whose_host_holds_a_code_point_unassigned_in_unicode_17() {
let latest = PlatformVersion::latest();
let protocol_version_14 = PlatformVersion::get(14).expect("expected protocol version 14");
let value = "https://a\u{0558}b.com/";
assert!(!format_uri_errors(value, latest).is_empty());
assert!(!format_uri_errors(value, protocol_version_14).is_empty());
// An ASCII host is a URI at both protocol versions.
assert!(format_uri_errors("https://ab.com/", latest).is_empty());
assert!(format_uri_errors("https://ab.com/", protocol_version_14).is_empty());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 Suggestion: Add a regression test for schema metadata URI validation

The added guard exercises only a document property with format: "uri". Contract schema registration separately validates $schema and each $vocabulary key with Url::parse in packages/rs-dpp/src/data_contract/document_type/schema/validation_schema/v0/mod.rs:539-546. The PR description identifies those metadata URLs as another consensus-sensitive surface, but a future URL/ICU change could alter their registration verdict without affecting the new document-value test. Add registration tests using the same Unicode edge case for $schema and $vocabulary.

source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality)

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 16, 2026

This branch has not been deployed

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

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants