Skip to content

Conversation

@hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Oct 9, 2025

Summary of changes

Changes introduced in this pull request:

  • bump fvm@4 and fvm_shared@4 and enable nv28-dev feature (4.7.3 -> 4.7.4)
  • define NetworkVersion::V28
  • simplify NetworkVersion definations with macro
  • bump some other small deps
  • run cargo update

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • New Features
    • Added support for the upcoming Network Version 28 (dev) via the fvm4 flag.
  • Chores
    • Updated dependencies for compatibility and security: get-size2, hashbrown, tokio-tungstenite, cargo_metadata, and jsonwebtoken (upgraded to v10 with rust_crypto).
  • Refactor
    • Streamlined how network-version constants are defined for easier maintenance.
  • Notes
    • No public API signature changes detected.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Updated dependency versions and feature flags in Cargo.toml; added Clone to Claims in src/auth/mod.rs; replaced explicit NetworkVersion constants with a macro-generated V0V28 set using paste in src/shim/version.rs. No public API signatures changed.

Changes

Cohort / File(s) Summary of changes
Dependency updates and features
Cargo.toml
Bumped versions: get-size2 0.6→0.7, hashbrown 0.15→0.16, tokio-tungstenite 0.27→0.28, cargo_metadata 0.22→0.23; upgraded jsonwebtoken 9→10 with rust_crypto feature; added fvm4 feature enabling nv28-dev alongside verify-signature.
Auth claims derivation
src/auth/mod.rs
Added Clone to Claims derive: #[derive(Debug, Clone, Serialize, Deserialize)]. No field or logic changes.
Network version constants via macro
src/shim/version.rs
Introduced define_network_versions! macro (uses paste) to generate public constants V0V28 mapping to NetworkVersion_latest::Vn; replaced explicit pub const declarations with macro invocation; added use paste::paste;.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

dependencies, rust

Suggested reviewers

  • elmattic
  • akaladarshi
  • LesnyRumcajs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly indicates the primary change—upgrading the FVM dependency—using a conventional commit style prefix without extraneous details, and it aligns directly with the main purpose of the pull request as described in the summary.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hm/bump-fvm

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6490631 and cfeaf02.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • Cargo.toml (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: All lint checks
  • GitHub Check: tests-release
  • GitHub Check: tests
  • GitHub Check: Build MacOS
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: Build Ubuntu
  • GitHub Check: Build forest binaries on Linux AMD64

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

"fvm 2.11.2",
"fvm 3.13.2",
"fvm 4.7.3",
"fvm 4.7.4",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fvm@4.7.3 -> fvm@4.7.4

@hanabi1224 hanabi1224 marked this pull request as ready for review October 9, 2025 08:57
@hanabi1224 hanabi1224 requested a review from a team as a code owner October 9, 2025 08:57
@hanabi1224 hanabi1224 requested review from akaladarshi and elmattic and removed request for a team October 9, 2025 08:57
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/shim/version.rs (1)

42-57: Excellent refactor using macro to generate version constants.

The define_network_versions! macro is a clean solution that:

  • Eliminates repetitive code for V0–V28 constants
  • Uses the paste crate appropriately to generate identifiers
  • Makes future version additions trivial (just add a number to the list)
  • Adds V28 support as required by the PR objectives

The macro correctly expands to:

pub const V0: Self = Self(NetworkVersion_latest::V0);
pub const V1: Self = Self(NetworkVersion_latest::V1);
// ... etc

For future maintainability, consider adding a doc comment to the macro explaining its purpose and expansion pattern:

+/// Defines public constants V0, V1, ..., Vn for NetworkVersion.
+/// Each constant is mapped to the corresponding NetworkVersion_latest variant.
 macro_rules! define_network_versions {
     ($($version:literal),+ $(,)?) => {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4661ae8 and b84f7cf.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • Cargo.toml (6 hunks)
  • src/auth/mod.rs (1 hunks)
  • src/shim/version.rs (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: tests
  • GitHub Check: tests-release
  • GitHub Check: All lint checks
  • GitHub Check: cargo-publish-dry-run
  • GitHub Check: Build Ubuntu
  • GitHub Check: Build MacOS
🔇 Additional comments (4)
src/auth/mod.rs (1)

23-23: LGTM! Harmless addition of Clone trait.

Adding Clone to the Claims struct is safe since all fields (Vec<String> and usize) already implement Clone. While not strictly required by the visible code in this file, it may be needed for external usage or is good for future-proofing.

Cargo.toml (2)

91-91: LGTM! Addition of nv28-dev feature aligns with PR objectives.

The addition of the nv28-dev feature to fvm4 correctly supports the FVM v4 upgrade and NetworkVersion::V28 functionality mentioned in the PR description.


19-19: Dependency versions and security advisories verified

All updated crates are at their latest versions with no known vulnerabilities (the only hashbrown advisory applies to <0.15.1 and is resolved in v0.16.0).

src/shim/version.rs (1)

13-13: Verify paste crate usage aligns with learnings.

The paste crate is used for token concatenation in the macro. Note that while the retrieved learnings mention a Python WSGI framework also named "Paste", this is the Rust paste crate (for macro token pasting), which is unrelated.

Based on learnings

@hanabi1224 hanabi1224 added this pull request to the merge queue Oct 9, 2025
Merged via the queue into main with commit d1a154f Oct 9, 2025
40 checks passed
@hanabi1224 hanabi1224 deleted the hm/bump-fvm branch October 9, 2025 12:58
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.

4 participants