Skip to content

Fresh checkout cannot build because trusted_setup.bin is missing and gitignored #1

Description

@blacks1ne

Description

metavm-zkp unconditionally embeds crates/zkp/src/scheme/trusted_setup.bin with include_bytes!, but the file is absent from a fresh checkout. There is no build.rs, setup script, or README step that creates it. The repository-wide *.bin rule also ignores the required path.

Because the RISC-V, EVM, and SBF crates all depend on metavm-zkp, this blocks every advertised proving binary and almost the entire workspace test suite.

Reproduction

At revision 12d28e2, with the documented sibling monorepo present:

$ test -e crates/zkp/src/scheme/trusted_setup.bin; echo $?
1

$ git check-ignore -v crates/zkp/src/scheme/trusted_setup.bin
.gitignore:2:*.bin  crates/zkp/src/scheme/trusted_setup.bin

$ cargo check --workspace
error: couldn't read `crates/zkp/src/scheme/trusted_setup.bin`: No such file or directory (os error 2)
  --> crates/zkp/src/scheme/bls12381_scheme.rs:15:35
   |
15 | static TRUSTED_SETUP_BIN: &[u8] = include_bytes!("trusted_setup.bin");

Cargo successfully resolved and compiled the external and sibling-monorepo dependencies before reaching this error.

Expected behavior

The README's cargo build --release command should work from a clean checkout, or the README should provide a complete deterministic setup step.

Suggested resolution

Provide one auditable path:

  • Check in the required artifact, add a narrow .gitignore exception, and document its provenance, license, format, and checksum; or
  • Add a checked-in deterministic generator/converter and an explicit setup command that verifies its input and output checksums.

If the asset cannot be distributed, feature-gate BLS12-381 so the rest of the workspace can compile without it and adjust the CLI defaults.

The loader documentation implies an expected size of 399,464 bytes: an 8-byte header, 4,096 G1 monomial points, 4,096 G1 Lagrange points, and 65 G2 points.

Acceptance criteria

  • cargo check --workspace succeeds from a clean checkout with documented prerequisites.
  • Default BLS12-381 binaries compile without undocumented local state.
  • Setup provenance and checksum are documented.
  • CI validates this from a clean checkout.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions