Commit Graph

107 Commits

Author SHA1 Message Date
Daira Emma Hopwood 3eb4ec5c19 Change Daira Emma's name in `authors` fields.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-29 21:54:04 +00:00
Daira Emma Hopwood 3cd1bed5a2 The test-dev-graph features needs plotters/ttf to be able to draw text.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-23 14:17:31 +00:00
Daira Emma Hopwood 44f7002288 Set `rust-version` to 1.60 in `{halo2,halo2_proofs,halo2_gadgets}/Cargo.toml`.
It was already 1.60 in `rust-toolchain.toml` in the workspace root, but
that is not used when building in the subdirectories.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-11-23 14:17:31 +00:00
therealyingtong f4293c2962 Revert commit zcash/halo2@65a89f099b 2023-06-21 11:32:17 +08:00
therealyingtong 496887bb75 poseidon_hash_longer_input: Test real proof generation.
This test passes the MockProver, but fails to generate a real proof.
2023-06-21 11:32:17 +08:00
Sean Bowe 3ba777944f Release 0.3.0 of halo2_proofs and halo2_gadgets 2023-03-21 19:35:30 -06:00
Jack Grigg 38222cba76 cargo fmt 2023-03-07 17:30:03 +00:00
CarloModicaPortfolio ba52d72ae4 fixing mistake in decorator of MyCircuit struct 2023-02-15 17:48:32 +01:00
CarloModicaPortfolio cdf5260b04 fixing mistake in decorator 2023-02-15 17:47:44 +01:00
CarloModicaPortfolio 272315b87b update of SHA256 to pull #654 2023-02-15 17:22:57 +01:00
Jack Grigg c4abcd5fd1 Disable default features of halo2_proofs in other crates
Now that `multicore` is a default feature instead of just being always
on, we can ensure it is not enabled just as a result of depending on
`halo2_gadgets` or `halo2`.
2023-02-14 19:06:18 +00:00
Jack Grigg 280f838c5c Constrain `inferno` transitive dependency to our MSRV
`inferno 0.11.5` raised its MSRV to 1.64.0. Adding this range constraint
is fine because it's only a dev-dependency.
2023-02-14 18:16:50 +00:00
Jack Grigg 09f9c095d0 Bump MSRV to 1.60
- `blake2b_simd 1.0.1` raised its MSRV to 1.59.
- `proptest 1.1.0` added a dependency on `unarray` which has an implicit
  MSRV of 1.60.
2023-02-10 18:09:11 +00:00
str4d 94b454ca2f
Merge pull request #723 from ImmanuelSegol/feat/avoid-wasm-error
bug fix - wasm pack compile error
2023-01-20 23:55:57 +00:00
dante 9eb8eadbd7
chore: instance columns for poseidon bench (#712) 2023-01-20 23:08:24 +00:00
ImmanuelSegol aae4dce533 Fix rustc type inferring bug by pinning some types
This has been occurring spuriously during development for a while, but
only when other compilation issues were present. However, now that it
also occurs when using wasm-pack, we are fixing it.

Co-authored-by: Jack Grigg <jack@electriccoin.co>
2023-01-20 22:45:50 +00:00
ebfull 476980efcd
Merge pull request #633 from zcash/fixed-cur
Only allow fixed queries at `Rotation::cur`
2023-01-10 12:44:47 -07:00
Jack Grigg 4b804a141a Make SHA-256 gadget a nightly feature
This was effectively the meaning of the prior `unstable` feature flag.
2023-01-03 19:12:39 +00:00
Jack Grigg 01323b9eb6 Add harness for `nightly -> beta -> stable` dev workflow
Part of zcash/halo2#707.
2023-01-03 19:12:39 +00:00
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 1d9790b2ce Migrate to published `ff 0.13` 2022-12-06 04:55:21 +00:00
Jack Grigg cb819e47e9 Migrate to `ff` revision without `FieldExt` 2022-11-30 19:35:26 +00:00
Daira Hopwood 23f63a8f50 Fix nightly clippy complaints.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-11-30 15:13:55 +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
Kris Nuttycombe b3f7db16f8 Fix beta clippy complaints. 2022-11-30 14:57:15 +00:00
Jack Grigg 02eb00a303 halo2_gadgets: Add missing changelog entry 2022-11-30 04:48:06 +00:00
Jack Grigg 49b2324f0a Replace unnecessary dependencies on `FieldExt` trait 2022-11-30 03:41:19 +00:00
Jack Grigg 63e6bd882c poseidon: Refactor MDS generation into a helper method 2022-11-30 03:39:16 +00:00
Jack Grigg ffc8e24fb2 Reduce feature surface of `plotters`
`plotters 0.3.3` updated from `font-kit 0.10.0` to `0.11.0`. This is an
internal dependency and ostensibly wouldn't be a breaking change, except
that `font-kit 0.11.0` added a dependency on `yeslogic-fontconfig-sys`
which has additional system dependency requirements. This had the effect
of breaking compilation in a non-breaking release.

However, `font-kit` is only required for `BitMapBackend`, which is not
part of our public API and is only used by some of the `halo2_gadgets`
tests. So we can avoid affecting our downstream users by disabling the
default-enabled features of `plotters`.
2022-09-12 18:31:04 +00:00
Jack Grigg 54f653a569 halo2_gadgets: Rename `dev-graph` feature flag to `test-dev-graph`
This feature flag is not part of the public API, but only for
conditionally rendering sub-circuit graphs. Renaming it stops the
feature from being enabled in the workspace when we only want to enable
the `dev-graph` feature flag of `halo2_proofs`, which _is_ part of its
public API.
2022-09-12 18:07:18 +00:00
Jack Grigg 66242e0076 halo2_gadgets: Remove dead code
For the dead code we want to retain, we now allow it explicitly, so we
can remove the blanket lint override.
2022-09-09 17:57:37 +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 2c06d83ae9 halo2_gadgets 0.2.0 2022-06-23 17:41:52 +00:00
Jack Grigg 7a22f3c9b6 halo2_proofs 0.2.0 2022-06-23 17:40:23 +00:00
Jack Grigg f0861db20b halo2_gadgets: Silence clippy lints
They are in code generated by macros from the `uint` crate, that we
can't do anything about from here.
2022-06-23 17:37:19 +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 5f1fb166d1 halo2_gadgets: Reduce allocations during var-mul 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
ying tong 34b2e77a57
Merge pull request #467 from zcash/sha256-tweaks
SHA-256 chip tweaks
2022-05-25 12:51:16 +08:00
Jack Grigg e36041d198 halo2_gadgets 0.1.0
Closes zcash/halo2#460.
2022-05-10 22:05:30 +00:00
Jack Grigg 3bc0c598ef halo2_proofs 0.1.0
Closes zcash/halo2#426.
2022-05-10 22:01:21 +00:00
Jack Grigg 91e1106a1e halo2_gadgets: Address review comments 2022-05-10 21:35:52 +00:00
Jack Grigg 4b802a7d07 halo2_gadgets: Documentation fixes 2022-05-10 20:31:35 +00:00
Jack Grigg a94a2bc552 halo2_gadgets: Various small code cleanups
Also documents a superfluous constraint, for removal in some future
breaking change.
2022-05-10 20:26:30 +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 18edad5df6 halo2_gadgets: Use separate field names for var-mul incomplete selectors
The previous tuple was confusing because tuple indices are zero-indexed,
while the selector names are one-indexed.
2022-05-10 20:04:30 +00:00
Jack Grigg 56fc8960c6 halo2_gadgets: Extract a common `DoubleAndAdd` helper struct
Both variable-base scalar mul and Sinsemilla use double-and-add with
incomplete addition on a single row, but they do so in slightly
different ways. Some of these are intentional (needing to look up the
y-coordinate vs constrain it), while others are accidental (different
concrete signs in otherwise-identical constraints that make their ASTs
incompatible).

The new `DoubleAndAdd` helper struct extracts the logic that is common
to both implementations, specifically the helper definitions of `x_r`
and `Y_A`. In a future breaking change, we can refactor both gadgets to
share more of this logic, so we are defining the incomplete addition
logic in fewer places.
2022-05-10 20:04:30 +00:00