Commit Graph

12 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
therealyingtong 153a08c755 query_any: panic if query_fixed is called with non-cur Rotation. 2022-12-09 16:47:14 +08:00
Jack Grigg cb819e47e9 Migrate to `ff` revision without `FieldExt` 2022-11-30 19:35:26 +00:00
ebfull 61a1f63fcb
Merge pull request #623 from zcash/table-col-equality
Allow `enable_equality` on `TableColumn`
2022-09-13 08:03:20 -06:00
Jack Grigg 349908d539 halo2_proofs: Narrow `clippy::too_many_arguments` lint override
This enables the lint to show up on new PRs.
2022-09-09 18:15:10 +00:00
han0110 8ff5b1e3af feat: make `Expression::{Fixed,Advice,Instance}` to wrap their own `Query` struct 2022-07-15 10:33:47 -04:00
therealyingtong 28fbc5b4fe Allow enable_equality on TableColumn 2022-07-06 11:29:25 -04:00
Jack Grigg 47f25ad632 halo2_proofs: Replace `Option<V>` with `Value<V>` 2022-06-08 23:03:16 +00:00
Jack Grigg d93846f8fd Note that `Constraints::with_selector` accepts arrays from 1.53 2022-04-20 10:55:55 +00:00
Jack Grigg 78de8a5c94 Add a `Constraints` helper
There are two existing patterns for constructing a gate from a set of
constraints with a common selector:

- Create an iterator of constraints, where each constraint includes the
  selector:
  ```
  vec![
      ("foo", selector.clone() * foo),
      ("bar", selector.clone() * bar),
      ("baz", selector * bar),
  ]
  ```
  This requires the user to write O(n) `selector.clone()` calls.

- Create an iterator of constraints, and then map the selector in:
  ```
  vec![
      ("foo", foo),
      ("bar", bar),
      ("baz", bar),
  ].into_iter().map(move |(name, poly)| (name, selector.clone() * poly))
  ```
  This looks cleaner overall, but the API is not as intuitive, and it
  is messier when the constraints are named.

The `Constraints` struct provides a third, clearer API:
```
Constraints::with_selector(
    selector,
    vec![
        ("foo", foo),
        ("bar", bar),
        ("baz", bar),
    ],
)
```
This focuses on the structure of the constraints, and handles the
selector application for the user.
2022-04-20 10:55:50 +00:00
Sean Bowe 819bc3c2f5
Stop placing the selector_map (which is an internal API detail) in the pinned verification key. 2022-03-16 14:19:13 -06:00
Jack Grigg 3c6558f049 Move `halo2` code into `halo2_proofs` crate 2022-01-20 18:50:43 +00:00