Skip to content

fix: update cache clearing calls - #513

Closed
vmx wants to merge 1 commit into
masterfrom
clear-api-cleanup
Closed

fix: update cache clearing calls#513
vmx wants to merge 1 commit into
masterfrom
clear-api-cleanup

Conversation

@vmx

@vmx vmx commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

The API in rust-filecoin-proofs-api was changed, but the public interface of the FFI does not change.

The API in `rust-filecoin-proofs-api` was changed, but the public interface
of the FFI does not change.
@BigLep

BigLep commented Jul 7, 2025

Copy link
Copy Markdown
Member

@vmx : I missed this one back in Jun. What are the next steps for making this ready for review (or should it be abandoned)?

@vmx

vmx commented Jul 7, 2025

Copy link
Copy Markdown
Contributor Author

Using the released versions of the proofs crates should be enough. This was the breaking change that triggered the 19.0 release of the proofs.

@BigLep

BigLep commented Jul 22, 2025

Copy link
Copy Markdown
Member

Note for implementers: lets update once filecoin-project/rust-filecoin-proofs-api#109 lands and then mark ready for review.

@BigLep
BigLep requested a review from Copilot August 12, 2025 03:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the cache clearing functionality to align with API changes in the rust-filecoin-proofs-api dependency while preserving the public FFI interface. The sector size parameter is no longer required by the underlying API but is retained for backward compatibility.

  • Removed sector size parameter from underlying cache clearing function calls
  • Updated function signatures to mark sector size as unused with underscore prefix
  • Added Git patch dependencies to use updated versions of Filecoin proof libraries

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
rust/src/proofs/api.rs Updated cache clearing functions to remove sector size from API calls while keeping parameter for compatibility
rust/Cargo.toml Added Git patches for updated Filecoin proof dependencies

Comment thread rust/Cargo.toml
fixed-rows-to-discard = ["filecoin-proofs-api/fixed-rows-to-discard"]

[patch.crates-io]
filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api" }

Copilot AI Aug 12, 2025

Copy link

Choose a reason for hiding this comment

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

Git dependencies without specific commit hashes or tags can lead to non-reproducible builds. Consider pinning to a specific commit hash or tag to ensure consistent builds across environments.

Suggested change
filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api" }
filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api", rev = "a1b2c3d4e5f6g7h8i9j0k" }

Copilot uses AI. Check for mistakes.
Comment thread rust/Cargo.toml

[patch.crates-io]
filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api" }
filecoin-proofs = { git = "https://github.com/filecoin-project/rust-fil-proofs" }

Copilot AI Aug 12, 2025

Copy link

Choose a reason for hiding this comment

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

Git dependencies without specific commit hashes or tags can lead to non-reproducible builds. Consider pinning to a specific commit hash or tag to ensure consistent builds across environments.

Suggested change
filecoin-proofs = { git = "https://github.com/filecoin-project/rust-fil-proofs" }
filecoin-proofs = { git = "https://github.com/filecoin-project/rust-fil-proofs", rev = "a1b2c3d4e5f6g7h8i9j0k" }

Copilot uses AI. Check for mistakes.
Comment thread rust/Cargo.toml
[patch.crates-io]
filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api" }
filecoin-proofs = { git = "https://github.com/filecoin-project/rust-fil-proofs" }
storage-proofs-core = { git = "https://github.com/filecoin-project/rust-fil-proofs" }

Copilot AI Aug 12, 2025

Copy link

Choose a reason for hiding this comment

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

Git dependencies without specific commit hashes or tags can lead to non-reproducible builds. Consider pinning to a specific commit hash or tag to ensure consistent builds across environments.

Suggested change
storage-proofs-core = { git = "https://github.com/filecoin-project/rust-fil-proofs" }
storage-proofs-core = { git = "https://github.com/filecoin-project/rust-fil-proofs", rev = "b7e2c3a2e2e4e6b8e8c2a1d4f5a6b7c8d9e0f1a2" }

Copilot uses AI. Check for mistakes.
@BigLep

BigLep commented Aug 12, 2025

Copy link
Copy Markdown
Member

@copilot: make the necessary suggestions to account for the fact that there is a 19.0.0 release of rust-filecoin-proofs-api: https://github.com/filecoin-project/rust-filecoin-proofs-api/releases/tag/v19.0.0

@rjan90

rjan90 commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

With #536 being merged, bumping the proofs-api version to v19.0 with the breaking change approach. And the subsequent lotus-miner PR addressing these breaking changes here: filecoin-project/lotus#13268.

I think this PR can be closed.

@rjan90 rjan90 closed this Aug 15, 2025
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