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
Why
Both caches are hardcoded under
std::env::temp_dir(). On a node,/tmpcan 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
KeyProviderinstead of hardcodingstd::env::temp_dir()(circuits/key_provider.rs,for_non_recursive_circuitandfor_recursive_circuit)TrustedSetupProviderinstead of hardcoding it in itsDefaultimplementation (circuits/trusted_setup.rs)Clerk(protocol/aggregate_signature/clerk.rs)