Skip to content

fix: use global Filecoin proof parameter cache - #204

Open
galargh wants to merge 3 commits into
mainfrom
issue-181
Open

galargh wants to merge 3 commits into
mainfrom
issue-181

Conversation

@galargh

@galargh galargh commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #181

In this PR, I replace the custom proof parameters cache path (~/.foc-devnet/docker/volumes/cache/filecoin-proof-parameters) with the global one /var/tmp/filecoin-proof-parameters.

Before use, we use Lotus to check if the cache holds the parameters we need. If it does, it is used in read-only mode. Otherwise, we use the downloader as we normally would.

@FilOzzy FilOzzy added this to FOC Sep 8, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Sep 8, 2026
@FilOzzy FilOzzy moved this from 📌 Triage to ⌨️ In Progress in FOC Sep 8, 2026
@galargh
galargh marked this pull request as ready for review October 23, 2026 23:36
@galargh
galargh requested review from beck-8 and rvagg as code owners October 23, 2026 23:36

@beck-8 beck-8 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

downloading fresh parameters cannot repair corrupted files already present in the cache. This should be addressed before merging.

continue;
}

if dest_path.exists() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If the global cache contains a corrupted or truncated parameter file, verify_proof_parameters() will fail and trigger a fresh download into staging. However, this branch keeps the corrupted destination file and discards the valid replacement. Both download paths then report success while the cache remains invalid.

Could we replace files that failed validation while preserving valid cached files, and validate the final cache before returning success?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That was my intention, let me double check that. To be fair, I didn't manually test that scenario. Will do now.

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

Labels

None yet

Projects

Status: ⌨️ In Progress

Development

Successfully merging this pull request may close these issues.

Use the global Filecoin proof parameter cache

3 participants