Skip to content

chore: Cache files downloaded from cache#10950

Closed
spalladino wants to merge 2 commits intomasterfrom
palla/cache-cache
Closed

chore: Cache files downloaded from cache#10950
spalladino wants to merge 2 commits intomasterfrom
palla/cache-cache

Conversation

@spalladino
Copy link
Contributor

To avoid a roundtrip to S3 to re-download every artifact on cache_download, we store a local file with the file prefix that points to the latest downloaded file version (ie hash), so we don't re-donwload it we already have it.

This required changing the arity of the cache_download and cache_upload scripts, so they accept the key and version for each artifact separately.

In addition, to avoid issues with the nargo show-program-hash being indeterministic, we also store "symlink" files in the cache for each circuit and vk. These are text files named after the entire hash of the circuits folder, that contain the nargo-computed hash of the circuit. This acts as another key for the same artifact.

@spalladino spalladino marked this pull request as ready for review December 23, 2024 21:19
To avoid a roundtrip to S3 to re-download every artifact on
cache_download, we store a local file with the file prefix that points
to the latest downloaded file version (ie hash), so we don't re-donwload
it we already have it.

This required changing the arity of the cache_download and cache_upload
scripts, so they accept the key and version for each artifact
separately.

In addition, to avoid issues with the nargo `show-program-hash` being
indeterministic, we also store "symlink" files in the cache for each
circuit and vk. These are text files named after the entire hash of the
circuits folder, that contain the nargo-computed hash of the circuit.
This acts as another key for the same artifact.
@spalladino spalladino marked this pull request as draft January 3, 2025 14:18
@spalladino
Copy link
Contributor Author

Downgraded to draft since it needs more testing, and #11030 seems like a better approach.

@spalladino
Copy link
Contributor Author

Closing in favor of #11040

@spalladino spalladino closed this Jan 8, 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.

1 participant