Make the SRS and circuit key cache directories configurable

Open
#3,422 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@HusseinAdeiza is already working on this.

Since Sep 27, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Start in circuits/key_provider.rs at for_non_recursive_circuit and for_recursive_circuit, then inspect the Default implementation in circuits/trusted_setup.rs. Trace how the aggregator and signer reach protocol/aggregate_signature/clerk.rs, and verify the configured cache location is threaded through while the temporary directory remains the default. Document cache disk-space and persistence expectations.

Written by the indexing model from the issue text.

Description

cryptography :closed_lock_with_key: to-groom :thinking:

Why

Both caches are hardcoded under std::env::temp_dir(). On a node, /tmp can be a tmpfs, can be wiped on reboot and is not sized for a multi hundred megabyte SRS, so an operator has no way to place the cache on suitable storage.

What

Let the cache location be chosen by the caller, and keep the current temporary directory only as the default.

How

  • Expose the cache root of KeyProvider instead of hardcoding std::env::temp_dir() (circuits/key_provider.rs, for_non_recursive_circuit and for_recursive_circuit)
  • Expose the cache root of TrustedSetupProvider instead of hardcoding it in its Default implementation (circuits/trusted_setup.rs)
  • Thread the configured location from the aggregator and the signer down to Clerk (protocol/aggregate_signature/clerk.rs)
  • Document the disk space and the persistence expectations of the cache directory
Dominant language
Rust
Stars
155
Forks
52
Avg merge
2d 17h
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IntersectMBO/mithril

All issues in IntersectMBO/mithril

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.