Skip to content

Make the SRS and circuit key cache directories configurable #3422

Description

@jpraynaud

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions