Description
Provekit currently enforces that a program has exactly one ACIR function/circuit entry point:
Guard location: https://github.com/worldfnd/provekit/blob/main/provekit/r1cs-compiler/src/noir_proof_scheme.rs#L41
ensure!(program.bytecode.functions.len() == 1, "Program must have one entry point");
Problem
Noir programs that use #[fold] compile into multiple ACIR functions/circuits (one entry point + one or more folded subcircuits), so functions.len() > 1.
As a result, provekit unconditionally rejects fold programs before R1CS lowering or proving even begins — this is not a test script issue but a limitation in the compiler frontend.
Impact
- Any Noir program using
#[fold] attributes cannot be proved with provekit.
- The error is misleading: the program is valid Noir but does not fit provekit's current single-function assumption.
Description
Provekit currently enforces that a program has exactly one ACIR function/circuit entry point:
Guard location: https://github.com/worldfnd/provekit/blob/main/provekit/r1cs-compiler/src/noir_proof_scheme.rs#L41
Problem
Noir programs that use
#[fold]compile into multiple ACIR functions/circuits (one entry point + one or more folded subcircuits), sofunctions.len() > 1.As a result, provekit unconditionally rejects fold programs before R1CS lowering or proving even begins — this is not a test script issue but a limitation in the compiler frontend.
Impact
#[fold]attributes cannot be proved with provekit.