IntersectMBO / IntersectMBO/mithril

Make the SRS and circuit key cache directories configurable

Open
#3,422 0 comments 0 reactions 0 assignees View on GitHub
cryptography :closed_lock_with_key: to-groom :thinking:
Dominant language
Rust
Stars
154
Forks
51
Avg merge
1d 23h
Merged PRs (30d)
38

Description

## 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

Contributor guide

Open the contributing guide

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.