mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 11:12:48 +03:00
test pedersen hash constraint numbers
This commit is contained in:
parent
ae9ba51b7d
commit
f16bb70da9
@ -20,8 +20,6 @@ circuit PedersenHash {
|
|||||||
// The 'pedersen-hash' main function.
|
// The 'pedersen-hash' main function.
|
||||||
function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {
|
function main(hash_input: [bool; 256], const parameters: [group; 256]) -> group {
|
||||||
let pedersen = PedersenHash::new(parameters);
|
let pedersen = PedersenHash::new(parameters);
|
||||||
let output = pedersen.hash(hash_input);
|
return pedersen.hash(hash_input)
|
||||||
console.log("{}", output);
|
|
||||||
return output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,19 +113,20 @@ impl<E: PairingEngine> ConstraintSystem<E::Fr> for CircuitSynthesizer<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn pop_namespace(&mut self) {
|
fn pop_namespace(&mut self) {
|
||||||
if let Some(ns) = self.namespaces.pop() {
|
// Todo @ljedrz: Fix constraint system optimizations.
|
||||||
for idx in ns.constraint_indices {
|
// if let Some(ns) = self.namespaces.pop() {
|
||||||
self.constraints.remove(idx);
|
// 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.private_var_indices {
|
||||||
}
|
// self.private_variables.remove(idx);
|
||||||
|
// }
|
||||||
for idx in ns.public_var_indices {
|
//
|
||||||
self.public_variables.remove(idx);
|
// for idx in ns.public_var_indices {
|
||||||
}
|
// self.public_variables.remove(idx);
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_root(&mut self) -> &mut Self::Root {
|
fn get_root(&mut self) -> &mut Self::Root {
|
||||||
|
Loading…
Reference in New Issue
Block a user