Skip to content

fix: update cache clearing calls #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

fix: update cache clearing calls #513

wants to merge 1 commit into from

Conversation

vmx
Copy link
Contributor

@vmx vmx commented Jan 15, 2025

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
Copy link
Member

BigLep commented Jul 7, 2025

@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
Copy link
Contributor Author

vmx commented Jul 7, 2025

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
Copy link
Member

BigLep commented Jul 22, 2025

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
Copy link

@Copilot Copilot AI left a comment

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

@@ -82,3 +82,8 @@ c-headers = ["safer-ffi/headers"]
# This feature enables a fixed number of discarded rows for TreeR. The `FIL_PROOFS_ROWS_TO_DISCARD`
# setting is ignored, no `TemporaryAux` file will be written.
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" }
Copy link
Preview

Copilot AI Aug 12, 2025

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.


[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" }
Copy link
Preview

Copilot AI Aug 12, 2025

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.

[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" }
Copy link
Preview

Copilot AI Aug 12, 2025

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
Copy link
Member

BigLep commented Aug 12, 2025

@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

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.

2 participants