You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Replace `proofs-per-universe` configuration with
`max-proof-cache-size`, allowing proof cache limits to be defined by
total memory size instead of proof count.
- Add logic to parse and handle human-readable size values
(e.g., "32MB").
- Update default configuration and related comments.
- Adjust `NewMultiverseStore` to use parsed cache size values and
improve error handling.
// defaultMaxProofCacheSize is the default maximum size of the proof
19
+
// cache expressed as a human-readable string type so that we can
20
+
// present it directly to CLI users.
21
+
defaultMaxProofCacheSize="32MB"
22
+
)
23
+
15
24
// MultiverseCacheConfig is the configuration for the different multiverse
16
25
// caches that exist.
17
26
//
18
27
//nolint:lll
19
28
typeMultiverseCacheConfigstruct {
20
-
// ProofsPerUniverse is the number of proofs that are cached per
21
-
// universe. This number needs to be multiplied by the total number of
22
-
// universes to get the total number of proofs that are cached. There is
23
-
// no limit to the number of universes that can hold cached keys, so a
24
-
// cache is created for each universe that receives a request.
25
-
ProofsPerUniverseuint64`long:"proofs-per-universe" description:"The number of proofs that are cached per universe."`
29
+
// MaxProofCacheSize is the maximum size of the proof cache expressed
30
+
// as a human-readable string, for example, "32MB" or "1GB".
31
+
MaxProofCacheSizestring`long:"max-proof-cache-size" description:"The maximum total size of the cached proofs. Accepts human readable values such as 32MB or 1GB."`
26
32
27
33
// LeavesNumCachedUniverses is the number of universes that can have a
28
34
// cache of leaf keys. Each cached universe can have up to
@@ -56,7 +62,7 @@ type MultiverseCacheConfig struct {
0 commit comments