Skip to content

Commit

Permalink
Start dummy implementation of InterpreterEnv for Env in witness
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Feb 28, 2024
1 parent 84e2a62 commit e061d34
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions msm/src/serialization/witness.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use ark_ff::Field;

use crate::columns::Column;
use crate::serialization::interpreter::InterpreterEnv;
use crate::LIMBS_NUM;

/// Environment for the serializer interpreter
Expand All @@ -16,6 +18,18 @@ pub struct Env<const N: usize, Fp> {
pub intermediate_limbs: [Fp; 19],
}

impl<const N: usize, Fp: Field> InterpreterEnv for Env<N, Fp> {
type Position = Column;

// FIXME: is u128 ok? I think so, we only have 15 bits, 88 bits and 4 bits
// values. Let's see later
type Variable = u128;

fn deserialize_field_element(&mut self) {
// TODO
}
}

impl<const N: usize, Fp: Field> Env<N, Fp> {
pub fn create(kimchi_limbs: [[Fp; 3]; N]) -> Self {
Self {
Expand Down

0 comments on commit e061d34

Please sign in to comment.