Skip to content

Conversation

@hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Oct 28, 2025

Summary of changes

paste is unmaintained

https://rustsec.org/advisories/RUSTSEC-2024-0436.html

We cannot remove it from deny.toml yet because it still appears in Cargo.lock

Changes introduced in this pull request:

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

  • Chores
    • Updated project build dependencies for code generation utilities used throughout the codebase to streamline the development toolchain
    • All existing functionality remains fully intact with no user-facing changes or modifications
    • Dependency updates ensure compatibility with current development tools and testing infrastructure while maintaining system stability

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

This PR migrates the project from the paste crate to the pastey crate for macro expansion utilities. Cargo.toml dependencies are updated, and all import statements are changed from use paste::paste to use pastey::paste across the codebase. No functional logic or public API changes are introduced.

Changes

Cohort / File(s) Summary
Cargo.toml
Cargo.toml
Added pastey = "0.1" as a direct dependency and optional dependency; removed/restructured paste dependency references.
Actor Parameters
src/lotus_json/actors/params/account_params.rs, src/lotus_json/actors/params/cron_params.rs, src/lotus_json/actors/params/eam_params.rs, src/lotus_json/actors/params/evm_params.rs, src/lotus_json/actors/params/init_params.rs, src/lotus_json/actors/params/market_params.rs, src/lotus_json/actors/params/miner_params.rs, src/lotus_json/actors/params/multisig_params.rs, src/lotus_json/actors/params/paych_params.rs, src/lotus_json/actors/params/power_params.rs, src/lotus_json/actors/params/reward_params.rs, src/lotus_json/actors/params/verified_reg_params.rs
Replaced macro import from use paste::paste to use pastey::paste across all 12 parameter files.
Actor States
src/lotus_json/actors/states/evm_state.rs, src/lotus_json/actors/states/vesting_funds.rs
Updated macro import path from paste to pastey in both state files.
Lotus JSON Utilities
src/lotus_json/bytecode_hash.rs, src/lotus_json/filter_estimate.rs, src/lotus_json/transient_data.rs
Replaced paste::paste imports with pastey::paste in utility modules.
Test Snapshots
src/lotus_json/mod.rs
Updated macro invocation from paste! to pastey::paste! in test snapshot generation branches.
RPC Registry
src/rpc/registry/actors/verified_reg.rs
Changed macro import from paste to pastey.
Shim Actors
src/shim/actors/state_load.rs, src/shim/actors/version.rs, src/shim/version.rs
Replaced paste::paste import with pastey::paste across actor and version management files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Notes:

  • This is a highly homogeneous change—the same import replacement pattern applied consistently across ~20+ files with no logic modifications.
  • Verification can focus on: (1) confirming Cargo.toml dependency migration is complete, (2) spot-checking a few files to ensure imports are consistently updated, and (3) verifying no usage sites were missed.
  • The widespread file count is offset by the repetitive, low-complexity nature of each individual change.

Possibly related PRs

Suggested labels

RPC

Suggested reviewers

  • akaladarshi
  • elmattic

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: replace deprecated paste crate with pastey" directly and accurately describes the main objective of the pull request. The changeset systematically replaces all imports from the unmaintained paste crate with the pastey crate across 20+ files and updates the Cargo.toml dependencies accordingly. The title is concise, specific, and immediately conveys to reviewers that this is a maintenance task addressing a deprecated dependency. It avoids vague terms and provides clear context about what is being changed and why.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hm/pastey

📜 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 b8abe8d and 9bce59f.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (23)
  • Cargo.toml (2 hunks)
  • src/lotus_json/actors/params/account_params.rs (1 hunks)
  • src/lotus_json/actors/params/cron_params.rs (1 hunks)
  • src/lotus_json/actors/params/eam_params.rs (1 hunks)
  • src/lotus_json/actors/params/evm_params.rs (1 hunks)
  • src/lotus_json/actors/params/init_params.rs (1 hunks)
  • src/lotus_json/actors/params/market_params.rs (1 hunks)
  • src/lotus_json/actors/params/miner_params.rs (1 hunks)
  • src/lotus_json/actors/params/multisig_params.rs (1 hunks)
  • src/lotus_json/actors/params/paych_params.rs (1 hunks)
  • src/lotus_json/actors/params/power_params.rs (1 hunks)
  • src/lotus_json/actors/params/reward_params.rs (1 hunks)
  • src/lotus_json/actors/params/verified_reg_params.rs (1 hunks)
  • src/lotus_json/actors/states/evm_state.rs (1 hunks)
  • src/lotus_json/actors/states/vesting_funds.rs (1 hunks)
  • src/lotus_json/bytecode_hash.rs (1 hunks)
  • src/lotus_json/filter_estimate.rs (1 hunks)
  • src/lotus_json/mod.rs (2 hunks)
  • src/lotus_json/transient_data.rs (1 hunks)
  • src/rpc/registry/actors/verified_reg.rs (1 hunks)
  • src/shim/actors/state_load.rs (1 hunks)
  • src/shim/actors/version.rs (1 hunks)
  • src/shim/version.rs (1 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). (3)
  • GitHub Check: tests-release
  • GitHub Check: tests
  • GitHub Check: Build forest binaries on Linux AMD64
🔇 Additional comments (23)
src/lotus_json/actors/states/vesting_funds.rs (1)

7-7: LGTM! Import updated correctly.

The macro import path has been successfully updated from paste::paste to pastey::paste. All macro usage sites remain unchanged, which is correct for this dependency migration.

src/lotus_json/actors/params/reward_params.rs (1)

8-8: LGTM! Import updated correctly.

The macro import has been properly migrated to pastey::paste without affecting any functionality.

src/lotus_json/actors/params/multisig_params.rs (1)

10-10: LGTM! Import updated correctly.

The macro import path has been successfully updated to use pastey::paste.

src/lotus_json/actors/params/cron_params.rs (1)

6-6: LGTM! Import updated correctly.

The macro import has been properly migrated to pastey::paste.

src/rpc/registry/actors/verified_reg.rs (1)

9-9: LGTM! Import updated correctly.

The macro import path has been successfully updated to pastey::paste. This file also uses fvm_actor_utils::receiver::UniversalReceiverParams (line 197), which explains the addition of fvm_actor_utils to Cargo.toml.

src/shim/version.rs (1)

13-13: LGTM! Import updated correctly.

The macro import has been properly migrated to pastey::paste.

src/lotus_json/actors/params/paych_params.rs (1)

9-9: LGTM! Import updated correctly.

The macro import path has been successfully updated to use pastey::paste. All macro invocations throughout this file remain unchanged, which is correct for this dependency migration.

Cargo.toml (1)

93-93: LGTM! Dependency migration verified.

The addition of pastey = "0.1" and fvm_actor_utils = "14" is correct. pastey is a fork and drop-in replacement for paste that exposes the same paste! macro, and the project is actively published with ongoing development. The replacement addresses the unmaintained paste crate (RUSTSEC-2024-0436) while maintaining compatibility.

src/lotus_json/mod.rs (1)

251-257: Inline pastey::paste! usage is correct

Direct qualification inside the macro keeps scope clean and matches the rest of the migration. No behavioral change.

Also applies to: 263-270

src/lotus_json/actors/params/eam_params.rs (1)

6-6: Import updated to pastey::paste — OK

Migration is straightforward; macro usage below remains valid.

src/lotus_json/actors/states/evm_state.rs (1)

7-7: pastey import is correct here

Compiles the same; versioned paste! concatenations remain intact.

src/lotus_json/actors/params/account_params.rs (1)

7-7: Switched to pastey::paste — looks good

No API or behavior change; consistent with repo-wide migration.

src/lotus_json/actors/params/verified_reg_params.rs (1)

11-11: Migration to pastey verified—no issues found

All old paste::paste imports successfully replaced with pastey::paste across the codebase (23 files confirmed). Cargo.toml properly includes pastey = "0.1" dependency. Security advisory in deny.toml correctly flags unmaintained status of original paste crate, validating this migration decision.

src/lotus_json/bytecode_hash.rs (1)

5-5: LGTM - Clean migration from deprecated paste to pastey crate.

This import change is part of a consistent codebase-wide migration addressing RUSTSEC-2024-0436. The macro invocation sites remain unchanged, confirming pastey provides a drop-in compatible API.

src/lotus_json/actors/params/init_params.rs (1)

8-8: LGTM - Consistent migration to pastey.

The import update aligns with the repository-wide migration from the deprecated paste crate.

src/lotus_json/actors/params/evm_params.rs (1)

8-8: LGTM - Import migration applied correctly.

src/lotus_json/transient_data.rs (1)

7-7: LGTM - Migration applied correctly.

src/shim/actors/version.rs (1)

6-6: LGTM - Import update applied correctly.

src/lotus_json/actors/params/market_params.rs (1)

15-15: LGTM - Crate migration applied correctly.

src/shim/actors/state_load.rs (1)

4-4: LGTM - Migration applied correctly.

src/lotus_json/actors/params/power_params.rs (1)

12-12: LGTM - Import migration completed successfully.

This completes the consistent migration across all reviewed files from the deprecated paste crate to pastey, addressing RUSTSEC-2024-0436.

src/lotus_json/actors/params/miner_params.rs (1)

18-18: LGTM! Clean migration to maintained crate.

The import change correctly replaces the deprecated paste crate with pastey. This addresses the security advisory RUSTSEC-2024-0436 while maintaining identical macro usage patterns throughout the file.

src/lotus_json/filter_estimate.rs (1)

6-6: LGTM! Import migration completed correctly.

The replacement of paste::paste with pastey::paste is correct and maintains full compatibility with the existing macro usage in this file.


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

@hanabi1224 hanabi1224 marked this pull request as ready for review October 28, 2025 15:00
@hanabi1224 hanabi1224 requested a review from a team as a code owner October 28, 2025 15:00
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and sudo-shashank and removed request for a team October 28, 2025 15:00

# optional dependencies
console-subscriber = { version = "0.4", features = ["parking_lot"], optional = true }
fvm_actor_utils = "14.0.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These 2 do not belong to the optional section

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit c50ecb0 Oct 28, 2025
45 checks passed
@LesnyRumcajs LesnyRumcajs deleted the hm/pastey branch October 28, 2025 16:24
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