Repository navigation
Conversation
beck-8
left a comment
There was a problem hiding this comment.
downloading fresh parameters cannot repair corrupted files already present in the cache. This should be addressed before merging.
| continue; | ||
| } | ||
|
|
||
| if dest_path.exists() { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
That was my intention, let me double check that. To be fair, I didn't manually test that scenario. Will do now.
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.