Commit Graph

16 Commits

Author SHA1 Message Date
Las Safin 1613445cdb
Fix compilation with rustc 1.57.0
The type inference algorithm seems to have been simplified,
meaning that the combination of T::from(x.into()) doesn't work anymore.

In any case, the code was also incomprehensible to a human, as it's not clear
by which "route" it does the transformation. It took me a few minutes to
figure out it's a `u64`.
2022-01-20 16:24:33 +00:00
Jack Grigg 9297a938ab Remove `FieldExt::from_u64` usage from SHA-256 example 2021-12-25 13:34:36 +00:00
Jack Grigg a62f9451d1 sha256: Fix `AssignedCell` `From` impls for `AssignedBits` and `Bits`
zcash/halo2#337 had been updated to account for `AssignedCell`, before
the change to simplify its bounds was made. `AssignedCell` now requires
the `From` impls to take `&VR`.
2021-12-03 02:53:14 +00:00
therealyingtong 620b4a8b9c sha256: Update to use new AssignedCell API. 2021-11-28 13:42:10 -05:00
therealyingtong b805f85f9f sha256: Update Error::SynthesisError -> Error::Synthesis 2021-11-27 10:22:52 -05:00
therealyingtong be1c0c080f Introduce AssignedBits<LEN> type. 2021-11-27 10:22:52 -05:00
therealyingtong b9230861f7 Introduce RoundIdx enum instead of using i32.
This is a more secure way to distinguish the initial round from
the main rounds.
2021-11-27 10:22:52 -05:00
therealyingtong 78e6e9f695 Use AssignedCell for CellValue{16,32}. 2021-11-27 10:22:52 -05:00
therealyingtong 0443740895 sha256: Replace fixed columns with selectors. 2021-11-27 10:22:52 -05:00
therealyingtong e1c132d664 sha256: Use assign_table() API for lookup table. 2021-11-27 10:22:52 -05:00
therealyingtong ee5bc8184a Remove unwrap()s in synthesis. 2021-11-27 10:22:52 -05:00
therealyingtong 66268cf192 Update sha256 example to work with new API 2021-11-27 10:22:52 -05:00
Jack Grigg 353a07cef1 `ConstraintSystem::lookup`: Move lookup queries into a closure
This matches `ConstraintSystem::create_gate`.

At the same time, we bind the input and table expressions together as a
"table map" by requiring the closure to return a vector of tuples. This
ensures they are always the same length.
2021-05-27 00:53:31 +01:00
therealyingtong fe2ab0bc7b Fix SHA256 example 2021-05-14 21:20:53 +08:00
Jack Grigg a688c8b03d sha256: Fix / silence lints 2021-02-25 20:34:07 +00:00
Jack Grigg e41fd7ca12 Move SHA-256 gadget and chip into examples 2021-02-25 20:01:44 +00:00