arkworks-rs / r1cs-std

R1CS constraints for bits, fields, and elliptic curves
https://www.arkworks.rs
Apache License 2.0
137 stars 59 forks source link

Let `Radix2Domain::offset` to be `FpVar` instead of `F` #65

Closed tsunrise closed 3 years ago

tsunrise commented 3 years ago

Description

Current Radix2Domain does not support non-constant offset. This PR adds that functionality.

Highlighted Changes:

closes: #64


Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.

weikengchen commented 3 years ago

The change looks good. Although this is a breaking change, the Radix2Domain in r1cs_std is not used very often downstream (most are using the Radix2Domain in ark-ff), and I think renaming makes sense.

weikengchen commented 3 years ago

will wait for @ValarDragon for a final review