Skip to content

Commit f99f545

Browse files
author
jagdeep sidhu
committed
Update root.rs
1 parent 2a717ef commit f99f545

File tree

1 file changed

+7
-3
lines changed
  • crates/recursion/circuit/src/machine

1 file changed

+7
-3
lines changed

crates/recursion/circuit/src/machine/root.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,16 @@ where
7676
pub fn verify(
7777
builder: &mut Builder<C>,
7878
machine: &StarkMachine<SC, A>,
79-
input: SP1CompressWithVKeyWitnessVariable<C, SC>,
79+
mut input: SP1CompressWithVKeyWitnessVariable<C, SC>,
8080
value_assertions: bool,
8181
kind: PublicValuesOutputDigest,
8282
) {
83-
// Assert that the program is complete.
84-
builder.assert_felt_eq(input.compress_var.is_complete, C::F::one());
83+
// Root verifier always verifies a *complete* execution.
84+
//
85+
// We force `is_complete = 1` inside the circuit (instead of trusting a witness-provided
86+
// value) to avoid witness-layout sensitivity in downstream consumers and ensure that
87+
// completeness assumptions are circuit-enforced.
88+
input.compress_var.is_complete = builder.eval(C::F::one());
8589
// Verify the proof, as a compress proof.
8690
SP1CompressWithVKeyVerifier::verify(builder, machine, input, value_assertions, kind);
8791
}

0 commit comments

Comments
 (0)