Commit Graph

2136 Commits

Author SHA1 Message Date
therealyingtong ba75da27bb gadget::utilities: Introduce ternary expression helper. 2021-11-30 10:39:01 -05:00
therealyingtong 421891f065 Benchmark proof creation and verification for RATE = 2, 8, 11. 2021-11-30 10:03:49 -05:00
therealyingtong 9b76556503 poseidon: Make gadget tests generic over WIDTH, RATE 2021-11-30 10:03:49 -05:00
therealyingtong b63c868591 poseidon: Make Spec trait methods not take (&self) parameter. 2021-11-30 10:02:16 -05:00
therealyingtong e0a0a0d509 book: Introduce RangeCheck macro. 2021-11-30 09:30:43 -05:00
str4d bb1f7b83e4
Merge pull request #410 from zcash/update-changelog
Add missing CHANGELOG entry
2021-11-30 05:00:20 +00:00
therealyingtong 409bbf36a0 mul::complete: Replace k_minus_one with one_minus_k. 2021-11-29 21:45:49 -05:00
therealyingtong 303bdc3f65 Replace local bool_check expressions with utilities::bool_check(). 2021-11-29 21:45:48 -05:00
therealyingtong 4fb434f88d gadget::utilities: Use range_check in bool_check. 2021-11-29 20:50:31 -05:00
therealyingtong 36f1d18705 gadget::utilities: Use N - x in range_check. 2021-11-29 20:50:31 -05:00
str4d aa251befbc
Merge pull request #240 from zcash/update-halo2
Migrate to latest halo2 revision
2021-11-29 20:19:58 +00:00
str4d 68b790c7da
Merge pull request #239 from nuttycom/di_from_bytes
Add construction of DiversifierIndex directly from bytes.
2021-11-29 17:46:44 +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
therealyingtong 61c431edc7 Update examples to use AssignedCell. 2021-11-27 10:08:01 -05:00
therealyingtong 36183bd01a Return AssignedCell from circuit::Region::assign_* APIs. 2021-11-27 10:07:39 -05:00
therealyingtong 4aabf7c1ca circuit.rs: Introduce AssignedCell struct. 2021-11-27 08:49:12 -05:00
Jack Grigg 99d03e0d25 Migrate to latest halo2 revision 2021-11-26 16:24:26 +00:00
str4d 01ec8dca1d
Merge pull request #220 from zcash/bench-poseidon
Generalise Poseidon gadget over `WIDTH`, `RATE`
2021-11-26 16:22:52 +00:00
Kris Nuttycombe 14c4b40dfc Add construction of DiversifierIndex directly from bytes. 2021-11-24 18:09:25 -07:00
Jack Grigg 0c36d69748 Add missing CHANGELOG entry 2021-11-23 23:42:26 +00:00
str4d 8bfc58b7c7
Merge pull request #385 from zcash/perm-not-enabled
Introduce plonk::Error::ColumnNotInPermutation error.
2021-11-23 22:23:00 +00:00
therealyingtong 9bb29018ac poseidon::pow5: Undo circuit change.
Co-authored-by: str4d <jack@electriccoin.co>
2021-11-23 15:38:55 -05:00
ying tong 79123629da
Docfixes and minor refactors.
Co-authored-by: str4d <jack@electriccoin.co>
2021-11-23 15:29:56 -05:00
therealyingtong 90e5715bf7 multiopen: Replace test_coherence with proptest. 2021-11-23 09:45:00 -05:00
str4d 067e26822d
Merge pull request #238 from zcash/reddsa-0.1.0
Use reddsa 0.1 instead of the git dependency
2021-11-23 14:12:19 +00:00
Jack Grigg 1cd9e7d4d4 Use reddsa 0.1 instead of the git dependency 2021-11-19 23:10:46 +00:00
str4d faae7ac2ea
Merge pull request #224 from zcash/poseidon-api
Allow passing `CellValue` as input to Poseidon gadget.
2021-11-19 17:25:25 +00:00
therealyingtong fe1bc97ab4 Generalise Pow5T3 chip to be generic over WIDTH, RATE. 2021-11-19 00:50:04 -05:00
therealyingtong 0417e233c3 poseidon: Return CellValue from squeeze() 2021-11-19 00:04:27 -05:00
therealyingtong de37248749 Allow passing CellValue as input word to Poseidon gadget.
Update circuit description.
2021-11-18 23:47:57 -05:00
str4d 069aa1dd17
Merge pull request #376 from zcash/364-mockprover-constraint-values
dev: Collect values of queried cells for unsatisfied constraints
2021-11-18 19:23:42 +00:00
therealyingtong ee595bfabb Introduce plonk::Error::ColumnNotInPermutation error.
This is raised when a copy constraint involves a column that has
not been included in the permutation.
2021-11-17 15:46:34 +01:00
ying tong 9dc5002d55
Merge pull request #403 from zcash/402-improve-k-too-small-errors
Improve error message when `k` is too small
2021-11-17 15:27:39 +01:00
ying tong dfcea20569
Merge pull request #218 from zcash/zcash_note_encryption-batchdomain
Migrate to `zcash_note_encryption::BatchDomain`
2021-11-17 15:13:57 +01:00
str4d 465afd162e
Merge pull request #229 from zcash/228-fix-ivk-to_bytes
Fix `IncomingViewingKey::to_bytes`
2021-11-17 13:30:54 +00:00
Jack Grigg 8c018eff7e Migrate to `zcash_note_encryption::BatchDomain` 2021-11-17 12:15:21 +00:00
Jack Grigg 235cd791b4 Fix `IncomingViewingKey::to_bytes`
`slice::copy_from_slice` panics if the source and destination slices are
not the same length.

Closes zcash/orchard#228.
2021-11-17 12:12:20 +00:00
str4d d43ad00b8d
Merge pull request #223 from dconnolly/patch-1
Add `orchard::circuit::Instance::from_parts()`
2021-11-17 11:12:16 +00:00
Jack Grigg 72a731cba1 Remove `minimum_k` from `Error::NotEnoughRowsAvailable`
Due to this error being detected and returned early, in practice
`minimum_k` would always be `current_k + 1`, and the error would be
returned repeatedly (as more of the circuit could be processed) until
`k` was set large enough. We now simply suggest that the user try a
larger value of `k`.
2021-11-17 08:07:42 +00:00
Jack Grigg 64680a1a2d dev: Handle too-small `k` error in `CircuitLayout::render`
In most places within `CircuitLayout`, we are flexible on `k`. However,
for tracking selectors we need to know the number of rows. We could
change this, but given that we also want the number of rows to be
accurate for rendering unusable rows, we can instead use this as an
opportunity to inform the user that they will need to bump `k`.
2021-11-16 14:20:57 +00:00
Jack Grigg eb88a2ebef Replace `Error::BoundsFailure` uses with `Error::NotEnoughRowsAvailable`
The remaining uses of `Error::BoundsFailure` that are exposed to the
user, are for invalid column indices.
2021-11-15 22:50:35 +00:00
Jack Grigg d055acda31 Augment `Error::NotEnoughRowsAvailable` with current and min-required k
This makes the error message more useful, by informing the user of a
possible solution.
2021-11-15 21:44:51 +00:00