-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use common DATA_DIRECTORY env var #10268
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,8 @@ export type ProverConfig = ActualProverConfig & { | |
nodeUrl?: string; | ||
/** Identifier of the prover */ | ||
proverId: Fr; | ||
/** Where to store temporary data */ | ||
cacheDir?: string; | ||
|
||
dataDirectory?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same problem, we'd have to depend on |
||
dataStoreMapSizeKB: number; | ||
proverAgentCount: number; | ||
}; | ||
|
||
|
@@ -36,7 +35,8 @@ export const ProverConfigSchema = z.object({ | |
realProofs: z.boolean(), | ||
proverId: schemas.Fr, | ||
proverTestDelayMs: z.number(), | ||
cacheDir: z.string().optional(), | ||
dataDirectory: z.string().optional(), | ||
dataStoreMapSizeKB: z.number(), | ||
proverAgentCount: z.number(), | ||
}) satisfies ZodFor<ProverConfig>; | ||
|
||
|
@@ -61,16 +61,20 @@ export const proverConfigMappings: ConfigMappingsType<ProverConfig> = { | |
description: 'Artificial delay to introduce to all operations to the test prover.', | ||
...numberConfigHelper(0), | ||
}, | ||
cacheDir: { | ||
env: 'PROVER_CACHE_DIR', | ||
description: 'Where to store cache data generated while proving', | ||
defaultValue: '/tmp/aztec-prover', | ||
}, | ||
proverAgentCount: { | ||
env: 'PROVER_AGENT_COUNT', | ||
description: 'The number of prover agents to start', | ||
...numberConfigHelper(1), | ||
}, | ||
dataDirectory: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here |
||
env: 'DATA_DIRECTORY', | ||
description: 'Optional dir to store data. If omitted will store in memory.', | ||
}, | ||
dataStoreMapSizeKB: { | ||
env: 'DATA_STORE_MAP_SIZE_KB', | ||
description: 'DB mapping size to be applied to all key/value stores', | ||
...numberConfigHelper(128 * 1_024 * 1_024), // Defaulted to 128 GB | ||
}, | ||
}; | ||
|
||
function parseProverId(str: string) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can
...dataConfigMappings
be done instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not without adding a dependency on
@aztec/kv-store
to@aztec/circuit-types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it feels wrong then that
circuit-types
contains configuration types for apps. It seems much too low level for that.