test pedersen hash constraint numbers

This commit is contained in:
collin 2021-03-23 14:16:51 -07:00
parent ae9ba51b7d
commit f16bb70da9
2 changed files with 15 additions and 16 deletions

View File

@ -20,8 +20,6 @@ circuit PedersenHash {
// The 'pedersen-hash' main function.
function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {
let pedersen = PedersenHash::new(parameters);
let output = pedersen.hash(hash_input);
console.log("{}", output);
return output
return pedersen.hash(hash_input)
}

View File

@ -113,19 +113,20 @@ impl<E: PairingEngine> ConstraintSystem<E::Fr> for CircuitSynthesizer<E> {
}
fn pop_namespace(&mut self) {
if let Some(ns) = self.namespaces.pop() {
for idx in ns.constraint_indices {
self.constraints.remove(idx);
}
for idx in ns.private_var_indices {
self.private_variables.remove(idx);
}
for idx in ns.public_var_indices {
self.public_variables.remove(idx);
}
}
// Todo @ljedrz: Fix constraint system optimizations.
// if let Some(ns) = self.namespaces.pop() {
// for idx in ns.constraint_indices {
// self.constraints.remove(idx);
// }
//
// for idx in ns.private_var_indices {
// self.private_variables.remove(idx);
// }
//
// for idx in ns.public_var_indices {
// self.public_variables.remove(idx);
// }
// }
}
fn get_root(&mut self) -> &mut Self::Root {