mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-06 20:20:34 +00:00
Recover from OpeningProof::create() failure in PLONK prover
This commit is contained in:
parent
69a612fb59
commit
33261ec1a0
1 changed files with 3 additions and 10 deletions
|
|
@ -578,18 +578,11 @@ impl<C: CurveAffine> Proof<C> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
let opening = OpeningProof::create(¶ms, &mut transcript, &f_poly, f_blind_dup, x_6);
|
||||||
|
|
||||||
// Check U
|
if opening.is_ok() {
|
||||||
let u_x = transcript.clone().squeeze();
|
|
||||||
// y^2 = x^3 + B
|
|
||||||
let u_y2 = u_x.square() * &u_x + &C::b();
|
|
||||||
|
|
||||||
if let Some(_) = u_y2.deterministic_sqrt() {
|
|
||||||
final_q_evals = q_evals;
|
final_q_evals = q_evals;
|
||||||
let opening =
|
break opening.unwrap();
|
||||||
OpeningProof::create(¶ms, &mut transcript, &f_poly, f_blind_dup, x_6)
|
|
||||||
.unwrap();
|
|
||||||
break opening;
|
|
||||||
} else {
|
} else {
|
||||||
f_blind += C::Scalar::one();
|
f_blind += C::Scalar::one();
|
||||||
f_commitment = (f_commitment + params.h).to_affine();
|
f_commitment = (f_commitment + params.h).to_affine();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue