Skip to content

Commit

Permalink
fix: remove extra constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
shuklaayush committed Feb 18, 2024
1 parent fe3beae commit 7c9c498
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions evm_arithmetization/src/keccak/keccak_stark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,7 @@ impl<F: RichField + Extendable<D>, const D: usize> Stark<F, D> for KeccakStark<F
let next_values = vars.get_next_values();

// If this is not the final step, the filter must be off.
let final_step = local_values[reg_step(NUM_ROUNDS - 1)];
let not_final_step = P::ONES - final_step;
yield_constr.constraint(not_final_step * final_step);
let not_final_step = P::ONES - local_values[reg_step(NUM_ROUNDS - 1)];

// If this is not the final step or a padding row,
// the local and next timestamps must match.
Expand Down Expand Up @@ -443,10 +441,7 @@ impl<F: RichField + Extendable<D>, const D: usize> Stark<F, D> for KeccakStark<F
let next_values = vars.get_next_values();

// If this is not the final step, the filter must be off.
let final_step = local_values[reg_step(NUM_ROUNDS - 1)];
let not_final_step = builder.sub_extension(one_ext, final_step);
let constraint = builder.mul_extension(not_final_step, final_step);
yield_constr.constraint(builder, constraint);
let not_final_step = builder.sub_extension(one_ext, local_values[reg_step(NUM_ROUNDS - 1)]);

// If this is not the final step or a padding row,
// the local and next timestamps must match.
Expand Down

0 comments on commit 7c9c498

Please sign in to comment.