Skip to content

feat(cli): prover config file - #881

Open
ColoCarletti wants to merge 3 commits into
mainfrom
prover-config-file
Open

feat(cli): prover config file#881
ColoCarletti wants to merge 3 commits into
mainfrom
prover-config-file

Conversation

@ColoCarletti

@ColoCarletti ColoCarletti commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Adds cli prove --config prover.toml (also on verify, for blowup): a single TOML profile for the prover's tuning knobs, which today are spread across env vars and hardcoded constants. Proofs are unaffected, these knobs only shape how the work is scheduled and split.

  • [prove] blowup and epoch_size_log2;
  • [tables] per-table row caps in log2 (previously compile-time constants);
  • [scheduler] table_parallelism and vram_budget_mb;
  • [gpu] thresholds, mempool and kill switches.

The file is a diff over the code defaults: every key is optional, machine-computed defaults (cores, VRAM) stay computed, and unknown keys are rejected so typos fail loudly.

  • Precedence: explicit CLI flag > env var > file > code default, so existing scripts and env-based tooling keep working unchanged. When a set env var shadows a file key, the CLI prints a warning naming the variable, so a stale export can never silently ignore the file.
  • Ships docs/prover.example.toml fully commented with the defaults annotated, plus a full-coverage parse fixture in tests.

One file consolidates what was spread across CLI flags, env vars and
hardcoded constants: [prove] blowup/epoch_size_log2, [tables] per-table
row caps (log2), [scheduler] table_parallelism/vram_budget_mb, and [gpu]
thresholds and kill-switches. The file is a diff over the code defaults —
every key optional, unknown keys rejected — with precedence
CLI flag > env var > file > default, so existing scripts are unaffected.
Ships docs/prover.example.toml (fully commented, defaults annotated) and
a full-coverage parse fixture.
# Conflicts:
#	prover/src/continuation.rs
Comment thread bin/cli/src/main.rs
file_cfg.prove.epoch_size_log2.map(|v| {
parse_epoch_size_log2(&v.to_string()).unwrap_or_else(|e| {
eprintln!("config [prove].epoch_size_log2: {e}");
std::process::exit(2);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be an ExitCode::FAILURE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants