Skip to content

Commit

Permalink
📝 Replace todo into unimplemnted. and delete some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
sheagrief committed Aug 1, 2024
1 parent 3500e62 commit 86da687
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 60 deletions.
2 changes: 1 addition & 1 deletion mpc-algebra/src/crh/pedersen/pedersen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<C: ProjectiveCurve, W: Window> TwoToOneCRH for CRH<C, W> {
// .for_each(|(b, l_b)| *b = *l_b);

// <Self as CRHTrait>::evaluate(parameters, &buffer)
todo!()
unimplemented!()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ where
// let y_bytes = self.y.to_bytes()?;
// x_bytes.extend_from_slice(&y_bytes);
// Ok(x_bytes)
todo!()
unimplemented!()
}

#[tracing::instrument(target = "r1cs")]
Expand All @@ -1064,6 +1064,6 @@ where
// x_bytes.extend_from_slice(&y_bytes);

// Ok(x_bytes)
todo!()
unimplemented!()
}
}
3 changes: 0 additions & 3 deletions mpc-algebra/src/r1cs_helper/mpc_boolean.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct MpcAllocatedBool<F: PrimeField> {
}

pub(crate) fn bool_to_field<F: PrimeField>(val: impl Borrow<bool>) -> F {
// TODO: MPC Fieldの元として返す
if *val.borrow() {
F::one()
} else {
Expand All @@ -42,10 +41,8 @@ impl<F: PrimeField> MpcAllocatedBool<F> {
pub fn value(&self) -> Result<bool, SynthesisError> {
let value = self.cs.assigned_value(self.variable).get()?;
if value.is_zero() {
println!("ZEROZEROZERO.");
Ok(false)
} else if value.is_one() {
println!("ONEONEONE");
Ok(true)
} else {
unreachable!("Incorrect value assigned: {:?}", value);
Expand Down
2 changes: 0 additions & 2 deletions mpc-algebra/src/r1cs_helper/mpc_fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ use crate::{
Reveal,
};

// TODO: MpcAllocatedFp is required?

/// Represents a variable in the constraint system whose
/// value can be an arbitrary field element.
#[derive(Debug, Clone)]
Expand Down
Loading

0 comments on commit 86da687

Please sign in to comment.