Skip to content

Commit

Permalink
o1vm/mips: fix tests related to the new inverse scratch state
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Nov 21, 2024
1 parent a8b60d7 commit 8be102a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion o1vm/src/interpreters/mips/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ use kimchi_msm::{
use std::ops::{Index, IndexMut};
use strum::EnumCount;

use super::{witness::SCRATCH_SIZE_INVERSE, ITypeInstruction, JTypeInstruction, RTypeInstruction};
pub use super::{
witness::SCRATCH_SIZE_INVERSE, ITypeInstruction, JTypeInstruction, RTypeInstruction,
};

/// The number of hashes performed so far in the block
pub(crate) const MIPS_HASH_COUNTER_OFF: usize = 80;
Expand Down
9 changes: 6 additions & 3 deletions o1vm/src/pickles/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ use super::{
};
use crate::{
interpreters::mips::{
constraints as mips_constraints, interpreter, interpreter::InterpreterEnv, Instruction,
column::SCRATCH_SIZE_INVERSE,
constraints as mips_constraints,
interpreter::{self, InterpreterEnv},
Instruction,
},
pickles::{verifier::verify, MAXIMUM_DEGREE_CONSTRAINTS, TOTAL_NUMBER_OF_CONSTRAINTS},
};
Expand Down Expand Up @@ -84,7 +87,7 @@ fn test_small_circuit() {
let proof_input = ProofInputs::<Pallas> {
evaluations: WitnessColumns {
scratch: std::array::from_fn(|_| zero_to_n_minus_one(8)),
scratch_inverse: std::array::from_fn(|_| zero_to_n_minus_one(8)),
scratch_inverse: std::array::from_fn(|_| (0..8).map(|_| Fq::zero()).collect()),
instruction_counter: zero_to_n_minus_one(8)
.into_iter()
.map(|x| x + Fq::one())
Expand All @@ -96,7 +99,7 @@ fn test_small_circuit() {
},
};
let mut expr = Expr::zero();
for i in 0..SCRATCH_SIZE + 2 {
for i in 0..SCRATCH_SIZE + SCRATCH_SIZE_INVERSE + 2 {
expr += Expr::cell(Column::Relation(i), CurrOrNext::Curr);
}
let mut rng = make_test_rng(None);
Expand Down

0 comments on commit 8be102a

Please sign in to comment.