Skip to content

Commit

Permalink
MSM/Serialization: add method add_constraint in trait env
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Feb 29, 2024
1 parent 0c5a8f2 commit da9a45f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions msm/src/serialization/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ pub trait InterpreterEnv {
+ std::ops::Mul<Self::Variable, Output = Self::Variable>
+ std::fmt::Debug;

fn add_constraint(&mut self, cst: Self::Variable);

fn copy(&mut self, x: &Self::Variable, position: Self::Position) -> Self::Variable;

fn get_column_for_kimchi_limb(j: usize) -> Self::Position;
Expand Down
4 changes: 4 additions & 0 deletions msm/src/serialization/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ impl<Fp: Field> InterpreterEnv for Env<Fp> {
// values. Let's see later
type Variable = u128;

fn add_constraint(&mut self, cst: Self::Variable) {
assert_eq!(cst, 0);
}

fn constant(value: u128) -> Self::Variable {
value
}
Expand Down

0 comments on commit da9a45f

Please sign in to comment.