Re-implement an ecc circuits with halo2.
- Generate witness outside of synthesize.
- Support multi-threading for witness generation.
- Use 3 limbs for bn256 Fp over Fr integer.
- Reduce lookup.
- Support bn256 pairing check over bn256 Fr circuit. See
test_bn256_pairing_chip_over_bn256_fr
for usage. - Support bls12_381 pairing check over bn256 Fr circuit. See
test_bls12_381_pairing_chip_over_bn256_fr
for usage.
- I tried to optimize msm by group points like pippenger, but the benefit is small. The bottleneck is on the
pick_candidates
if the window size is large.
- Because
pick_candidates
is current bottleneck, I thinkwnaf
can be used to reduce the select count.