Closed hussein-aitlahcen closed 1 year ago
cc @yelhousni
cc @yelhousni
It seems I missed this issue too :) Will have a look!
What test vector did you use to hit this issue? in the error below addStep
is used in the second iteration of the Miller loop to replace doubleAndAddStep(Qacc,-Q)
(2Qacc-Q
) by addStep(Qacc,Q)
(Qacc+Q
). At this iteration, Qacc=2Q
so edge cases should not happen in the addition 2Q+Q
(no need to use addUnifedStep
). Maybe you provided a point Q=0
?
I no longer have the regression test (my bad really...). But I know we were on a pretty outdated develop commit prior to https://github.com/Consensys/gnark/pull/603. Maybe #603 solved it (I will see if I hit the issue again without the addStepUnified). I don't think we were having a zero point in Q
as the pairing check would have failed in the end? Also I noticed the gnark-crypto pairing algorithm do use an addition that handle the zero case in the miller loop, that's why I went in this direction. I'll let you know anyway, thanks for the help!
closing this, but feel free to re-open if you find a regression test on master
.
Hi,
I quickly hit an issue when trying to do many different pairing checks and can reproduce an issue where the
addStep
called in the miller loop is failing with something that look like a zero point addition:If I patch addStep with a variant similar to AddUnified the error disappear and the pairing check is passing. Is this a corner case we don't handle in gnark yet, i.e. can the miller loop hit zero point when doing the addition?