Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start dummy implementation of InterpreterEnv for Env in witness #1861

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel it should be OK, indeed all our limbs are strictly smaller... And whatever FFMul we do it'll be on 15 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