The G2 point inputs to the precompile must be checked if on the curve E(F_p^2) but also if in the G2 subgroup.
This is required by the specification of the EIP-197 and implemented in common EVMs (geth, revm, evmone, besu).
The ecpairing_fuzz_invalid_g2_subgroup test from lambdaclass/zksync_era_precompiles#234 should fail in case the subgroup check is missing in the implementation.
Context: EcPairing.yul#L1634
Description:
The G2 point inputs to the precompile must be checked if on the curve
E(F_p^2)
but also if in the G2 subgroup.This is required by the specification of the EIP-197 and implemented in common EVMs (geth, revm, evmone, besu).
The
ecpairing_fuzz_invalid_g2_subgroup
test from lambdaclass/zksync_era_precompiles#234 should fail in case the subgroup check is missing in the implementation.Recommendation:
Keep the G2 subgroup check in the implementation.
zkSync:
Spearbit: