Skip to content

Commit

Permalink
revert: "fix: add nonce constraint to fp" (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam authored Aug 29, 2024
1 parent c658081 commit 9a21bf6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions crates/core/machine/src/syscall/precompiles/fptower/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::air::MemoryAirBuilder;
use generic_array::GenericArray;
use itertools::Itertools;
use num::{BigUint, Zero};
use p3_air::{Air, AirBuilder, BaseAir};
use p3_air::{Air, BaseAir};
use p3_field::{AbstractField, PrimeField32};
use p3_matrix::{dense::RowMajorMatrix, Matrix};
use sp1_core_executor::{
Expand Down Expand Up @@ -202,18 +202,11 @@ where
let main = builder.main();
let local = main.row_slice(0);
let local: &FpOpCols<AB::Var, P> = (*local).borrow();
let next = main.row_slice(1);
let next: &FpOpCols<AB::Var, P> = (*next).borrow();

// Check that nonce is incremented.
builder.when_first_row().assert_zero(local.nonce);
builder.when_transition().assert_eq(local.nonce + AB::Expr::one(), next.nonce);

// Check that operations flags are boolean.
builder.assert_bool(local.is_add);
builder.assert_bool(local.is_sub);
builder.assert_bool(local.is_mul);

// Check that only one of them is set.
builder.assert_eq(local.is_add + local.is_sub + local.is_mul, AB::Expr::one());

Expand Down

0 comments on commit 9a21bf6

Please sign in to comment.