Fix unconversion
This commit is contained in:
parent
75ce9df311
commit
4fdb8ff9f5
|
@ -45,9 +45,11 @@ impl From<Proof> for ArkProof<Bn<Parameters>> {
|
||||||
x: proof.0 .0,
|
x: proof.0 .0,
|
||||||
y: proof.0 .1,
|
y: proof.0 .1,
|
||||||
},
|
},
|
||||||
|
#[rustfmt::skip] // Rustfmt inserts some confusing spaces
|
||||||
b: ark_circom::ethereum::G2 {
|
b: ark_circom::ethereum::G2 {
|
||||||
x: proof.1 .0,
|
// The order of coefficients is flipped.
|
||||||
y: proof.1 .1,
|
x: [proof.1.0[1], proof.1.0[0]],
|
||||||
|
y: [proof.1.1[1], proof.1.1[0]],
|
||||||
},
|
},
|
||||||
c: ark_circom::ethereum::G1 {
|
c: ark_circom::ethereum::G1 {
|
||||||
x: proof.2 .0,
|
x: proof.2 .0,
|
||||||
|
@ -129,7 +131,7 @@ pub fn generate_proof(
|
||||||
|
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
|
||||||
let proof = create_proof_with_reduction_and_matrices::<_, CircomReduction>(
|
let ark_proof = create_proof_with_reduction_and_matrices::<_, CircomReduction>(
|
||||||
&ZKEY.0,
|
&ZKEY.0,
|
||||||
r,
|
r,
|
||||||
s,
|
s,
|
||||||
|
@ -137,8 +139,8 @@ pub fn generate_proof(
|
||||||
ZKEY.1.num_instance_variables,
|
ZKEY.1.num_instance_variables,
|
||||||
ZKEY.1.num_constraints,
|
ZKEY.1.num_constraints,
|
||||||
full_assignment.as_slice(),
|
full_assignment.as_slice(),
|
||||||
)?
|
)?;
|
||||||
.into();
|
let proof = ark_proof.into();
|
||||||
|
|
||||||
println!("proof generation took: {:.2?}", now.elapsed());
|
println!("proof generation took: {:.2?}", now.elapsed());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue