Commit Graph

17 Commits

Author SHA1 Message Date
therealyingtong 41c87eac0f Restrict query_fixed to current Rotation.
query_fixed no longer takes a Rotation argument and can only be
used to query the current rotation.
2022-12-09 16:47:19 +08:00
Jack Grigg cb819e47e9 Migrate to `ff` revision without `FieldExt` 2022-11-30 19:35:26 +00:00
Daira Hopwood c387aa7204 Fix additional beta clippy complaints.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-30 15:13:55 +00:00
Jack Grigg 73282ba6b8 halo2_gadgets: Be explicit about `*EccPoint` construction without checks
These are all cases inside the ECC chip, where we are inherently
producing valid coordinate pairs as a result of the constraints being
implemented, but it is useful to be explicit about the contract being
asserted at each point we construct `EccPoint` or `NonIdentityEccPoint`.
2022-09-09 17:56:00 +00:00
Jack Grigg 5ed3d2501f halo2_gadgets: Replace `Option<V>` with `Value<V>` 2022-06-08 23:31:25 +00:00
Jack Grigg 515f97769f halo2_gadgets: Enable more inversions to be batched during synthesis 2022-06-08 00:50:16 +00:00
Jack Grigg c1007d8c23 halo2_gadgets: Add protocol rule links for the chip constraints
Part of zcash/zcash#3957.
2022-05-25 22:41:04 +00:00
Jack Grigg 4b802a7d07 halo2_gadgets: Documentation fixes 2022-05-10 20:31:35 +00:00
Jack Grigg ff01e4a1f9 halo2_gadgets: Refactor `ScalarFixed::windows_usize`
It no longer relies on the `SqrtRatio::get_lower_32` method, which is
specific to that trait and not intended for external usage.
2022-05-10 20:26:30 +00:00
Jack Grigg 692fee099d halo2_gadgets: Clean up `ecc::chip::mul_fixed::Config` logic
- We were redundantly storing the `x_p` and `y_p` columns.
- `Config::add_incomplete` was redundantly copying.

Co-authored-by: therealyingtong <yingtong@z.cash>
2022-05-10 20:04:30 +00:00
Jack Grigg 85b0b7c065 halo2_gadgets: Refactor `ecc::chip::mul_fixed::Config` word assignment logic
Co-authored-by: therealyingtong <yingtong@z.cash>
2022-05-10 20:04:30 +00:00
Jack Grigg 3486703bd2 halo2_gadgets: Refactor fixed-base scalar mul gadget APIs
The new `EccInstructions` instructions, and the corresponding changes to
existing instructions, enable chips to choose when to witness or constrain
the scalars, and simplify scalar reuse (though reuse is not implemented
for `EccChip` yet).

`FixedPoint::mul` and `FixedPointShort::mul` now has the same API style
as `NonIdentityPoint::mul`.
2022-05-09 15:48:55 +00:00
Jack Grigg b02800466a halo2_gadgets: Migrate chip gates to `Constraints::with_selector`
Only one gate couldn't be migrated without altering the Orchard circuit.
2022-04-24 22:13:38 +00:00
therealyingtong 7c7c281000 Visibility fixes. 2022-01-28 23:38:22 +08:00
Jack Grigg 9a12beee73 halo2_gadgets: Rename `halo2` to `halo2_proofs`
The previous commit renamed `halo2_proofs` back to `halo2` temporarily
to keep the commit size down. This commit performs the rename in a
single pass.
2022-01-27 23:32:04 +00:00
Jack Grigg 5202ec6eda Integrate `halo2_gadgets` into the workspace
THe SHA-256 example gadget has been moved into the `halo2_gadgets` crate
behind an `unstable` feature flag.
2022-01-27 23:32:04 +00:00
Jack Grigg a2367abcaf Migrate to `halo2_gadgets` crate in subdir
- The crate module structure from `orchard` has been flattened.
- The book pages we want to include in `halo2` have been moved to their
  target location, to avoid any conflicts during the merge.
- Common files that already exist in zcash/halo2 have been removed.
2022-01-27 23:08:01 +00:00