Remove TODO's in favor of github issues.
This commit is contained in:
parent
6841763ae7
commit
42514e7c47
|
@ -5,7 +5,7 @@ pub mod boolean;
|
|||
pub mod uint32;
|
||||
pub mod blake2s;
|
||||
pub mod num;
|
||||
pub mod mont; // TODO: rename
|
||||
pub mod mont;
|
||||
pub mod pedersen_hash;
|
||||
|
||||
use bellman::SynthesisError;
|
||||
|
|
|
@ -27,7 +27,6 @@ use ::jubjub::{
|
|||
};
|
||||
|
||||
pub struct EdwardsPoint<E: Engine, Var> {
|
||||
// TODO: make these not pub
|
||||
pub x: AllocatedNum<E, Var>,
|
||||
pub y: AllocatedNum<E, Var>
|
||||
}
|
||||
|
@ -107,7 +106,6 @@ impl<E: JubjubEngine, Var: Copy> EdwardsPoint<E, Var> {
|
|||
Ok(t0)
|
||||
},
|
||||
None => {
|
||||
// TODO: add more descriptive error
|
||||
Err(SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +136,6 @@ impl<E: JubjubEngine, Var: Copy> EdwardsPoint<E, Var> {
|
|||
Ok(t0)
|
||||
},
|
||||
None => {
|
||||
// TODO: add more descriptive error
|
||||
Err(SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
|
@ -188,7 +185,6 @@ impl<E: JubjubEngine, Var: Copy> MontgomeryPoint<E, Var> {
|
|||
Ok(t0)
|
||||
},
|
||||
None => {
|
||||
// TODO: add more descriptive error
|
||||
Err(SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +211,6 @@ impl<E: JubjubEngine, Var: Copy> MontgomeryPoint<E, Var> {
|
|||
Ok(t0)
|
||||
},
|
||||
None => {
|
||||
// TODO: add more descriptive error
|
||||
Err(SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +370,6 @@ impl<E: JubjubEngine, Var: Copy> MontgomeryPoint<E, Var> {
|
|||
Ok(n)
|
||||
},
|
||||
None => {
|
||||
// TODO: add more descriptive error
|
||||
Err(SynthesisError::AssignmentMissing)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,9 @@ pub fn pedersen_hash<E: JubjubEngine, CS, Var: Copy>(
|
|||
) -> Result<EdwardsPoint<E, Var>, SynthesisError>
|
||||
where CS: ConstraintSystem<E, Variable=Var>
|
||||
{
|
||||
// Unnecessary if forced personalization is introduced
|
||||
assert!(bits.len() > 0);
|
||||
|
||||
let mut edwards_result = None;
|
||||
let mut bits = bits.iter();
|
||||
let mut segment_generators = params.pedersen_circuit_generators().iter();
|
||||
|
@ -118,7 +121,6 @@ pub fn pedersen_hash<E: JubjubEngine, CS, Var: Copy>(
|
|||
segment_i += 1;
|
||||
}
|
||||
|
||||
// TODO: maybe assert bits.len() > 0
|
||||
Ok(edwards_result.unwrap())
|
||||
}
|
||||
|
||||
|
@ -131,10 +133,6 @@ fn lookup3_xy_with_conditional_negation<E: Engine, CS, Var: Copy>(
|
|||
) -> Result<(AllocatedNum<E, Var>, AllocatedNum<E, Var>), SynthesisError>
|
||||
where CS: ConstraintSystem<E, Variable=Var>
|
||||
{
|
||||
// TODO: This can be made into a 2-constraint lookup
|
||||
// if it can return linear combinations rather than
|
||||
// allocated numbers.
|
||||
|
||||
assert_eq!(bits.len(), 3);
|
||||
assert_eq!(coords.len(), 4);
|
||||
|
||||
|
|
|
@ -108,7 +108,6 @@ impl JubjubBls12 {
|
|||
let mut cur = 0;
|
||||
let mut pedersen_hash_generators = vec![];
|
||||
|
||||
// TODO: pre-generate the right amount
|
||||
while pedersen_hash_generators.len() < 10 {
|
||||
let gh = group_hash(&[cur], &tmp);
|
||||
cur += 1;
|
||||
|
|
|
@ -58,7 +58,6 @@ pub fn pedersen_hash<E, I>(
|
|||
break;
|
||||
}
|
||||
|
||||
// TODO: use wNAF or something
|
||||
let mut tmp = generators.next().expect("we don't have enough generators").clone();
|
||||
tmp = tmp.mul(acc, params);
|
||||
result = result.add(&tmp, params);
|
||||
|
|
Loading…
Reference in New Issue