lambdaclass / zksync_era_precompiles

Yul precompile library to speedup elliptic curves operations.
Apache License 2.0
51 stars 19 forks source link

Function `g2JacobianAdd` does not support same inputs #245

Closed IAvecilla closed 7 months ago

IAvecilla commented 7 months ago

Context: EcPairing.yul#L501

Description: g2JacobianAdd requires inputs to be a two different points in Jacobian coordinates. It returns inf if they are the same.

Recommendation: Update doc comment of this function and stress this requirements. g2JacobianDouble should be used instead.

zkSync:

Spearbit: