Add new fixed generators for the output circuit
This commit is contained in:
parent
ec7323159c
commit
5118fd5008
|
@ -788,7 +788,7 @@ mod test {
|
||||||
for _ in 0..100 {
|
for _ in 0..100 {
|
||||||
let mut cs = TestConstraintSystem::<Bls12>::new();
|
let mut cs = TestConstraintSystem::<Bls12>::new();
|
||||||
|
|
||||||
let p = params.generator(FixedGenerators::NoteCommitmentRandomization);
|
let p = params.generator(FixedGenerators::NoteCommitmentRandomness);
|
||||||
let s = Fs::rand(rng);
|
let s = Fs::rand(rng);
|
||||||
let q = p.mul(s, params);
|
let q = p.mul(s, params);
|
||||||
let (x1, y1) = q.into_xy();
|
let (x1, y1) = q.into_xy();
|
||||||
|
@ -805,7 +805,7 @@ mod test {
|
||||||
|
|
||||||
let q = fixed_base_multiplication(
|
let q = fixed_base_multiplication(
|
||||||
cs.namespace(|| "multiplication"),
|
cs.namespace(|| "multiplication"),
|
||||||
FixedGenerators::NoteCommitmentRandomization,
|
FixedGenerators::NoteCommitmentRandomness,
|
||||||
&s_bits,
|
&s_bits,
|
||||||
params
|
params
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
|
@ -67,8 +67,11 @@ impl JubjubEngine for Bls12 {
|
||||||
/// exponent.
|
/// exponent.
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum FixedGenerators {
|
pub enum FixedGenerators {
|
||||||
NoteCommitmentRandomization = 0,
|
NoteCommitmentRandomness = 0,
|
||||||
Max = 1
|
ProvingPublicKey = 1,
|
||||||
|
ValueCommitmentValue = 2,
|
||||||
|
ValueCommitmentRandomness = 3,
|
||||||
|
Max = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct JubjubBls12 {
|
pub struct JubjubBls12 {
|
||||||
|
|
Loading…
Reference in New Issue