Skip to content

Require filesystem for the dev targets that fetch SRS powers or key files - #3586

Merged
cbeck88 merged 2 commits into
stagingfrom
fix/varuna-bench-srs-files
Oct 21, 2026
Merged

cbeck88 merged 2 commits into
stagingfrom
fix/varuna-bench-srs-files

Conversation

@cbeck88

@cbeck88 cbeck88 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

PR #3565 changed two things that break some dev targets:

  • snarkvm-parameters fetches SRS powers files and shipped key files only with the filesystem feature. Without it, the crate does no I/O.
  • Its dev-dependencies no longer turn filesystem on for every bench and example. The no-filesystem tests need it off.

Builds that depend on snarkvm with default features still get filesystem. The targets below did not ask for it, so they stopped:

  • The varuna and varuna_verifier benches build circuits larger than the embedded powers. They panic with MissingPowers in circuit_setup.
  • The inclusion, setup and translation examples fail with MissingPowers. srs_shared_keys fails with "Filesystem access is disabled".

This PR adds filesystem to the required-features of each of these targets. Cargo then names the missing feature instead of failing at run time. The usage comments and the key-generation scripts in parameters/scripts pass the feature.

Commits

  • 29c0de3: require filesystem for the varuna benches.
  • b5c269a: require filesystem for the parameters examples.

Test Plan

  • cargo bench -p snarkvm-algorithms --features test,filesystem --bench varuna -- --warm-up-time 0.1 --measurement-time 0.1 runs all 11 bench functions without a panic.
  • cargo bench -p snarkvm-algorithms --features test,filesystem --bench varuna_verifier -- --generate generates and verifies the proof. A run without arguments times verification. -- --clean deletes the artifacts.
  • Without filesystem, each of the four examples fails as described above. With it, translation testnet runs to completion.
  • cargo build -p snarkvm-parameters --example setup without features stops with cargo's required-features error.
  • cargo clippy -p snarkvm-algorithms --all-targets --features test,filesystem -- -D warnings and cargo clippy -p snarkvm-parameters --examples --all-features -- -D warnings pass.
  • cargo +nightly-2026-04-02 fmt --all -- --check passes.

Documentation

The benches and examples now need --features filesystem. The usage comments and the parameters/scripts show it.

Backwards compatibility

This PR changes only bench and example targets, their comments and the key-generation scripts. It does not change library code, consensus or tests.

A cargo check --examples --benches without features now skips these targets. CI's lint job runs clippy with --all-features, so it still checks them. The Windows job's cargo check --examples --benches --tests in parameters no longer compiles the four examples.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M5p1wUhWpX37vHyFJmRnFh

Since sans-io parameters landed, the SRS fetches powers files only with
the filesystem feature, and snarkvm-algorithms no longer enables it for
its dev targets. The varuna benches build circuits above the embedded
powers, so without filesystem they panic with MissingPowers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5p1wUhWpX37vHyFJmRnFh
`inclusion`, `setup`, `srs_shared_keys` and `translation` read SRS powers
beyond the embedded file, or the shipped key files. Since sans-io
parameters landed, `snarkvm-parameters` fetches neither without
`filesystem`, and its dev builds no longer enable it, so each example
stopped with `MissingPowers` or "Filesystem access is disabled". Cargo now
names the missing feature instead, and the usage comments and the
key-generation scripts pass it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M5p1wUhWpX37vHyFJmRnFh
@cbeck88
cbeck88 requested a review from brunoffranca October 20, 2026 21:03
@cbeck88 cbeck88 changed the title Require filesystem for the varuna benches Require filesystem for the dev targets that fetch SRS powers or key files Oct 20, 2026
@cbeck88
cbeck88 merged commit e380c71 into staging Oct 21, 2026
19 checks passed
@cbeck88
cbeck88 deleted the fix/varuna-bench-srs-files branch October 21, 2026 13:04
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.

2 participants