Commit Graph

1170 Commits

Author SHA1 Message Date
Jack Grigg c1447d6af2 Fix broken main branch
This was a non-code merge conflict between zcash/halo2#217 and main,
that caused CI to break after the PR merged.
2022-02-08 15:19:56 +00:00
Jack Grigg ce301a6aa3 Shuffle spends and recipients before pairing them into Actions
Callers cannot assume that any specific output corresponds to a specific
Orchard recipient, and must trial-decrypt all outputs to find the ones
belonging to them. This is consistent with higher-layer semantics like
having Unified Addresses as recipients (where the mapping from recipient
to a specific output would become much more complex).

Closes zcash/orchard#203.

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-02-07 22:37:37 +00:00
str4d 40491385c6
Merge pull request #217 from zcash/update-halo2-gadgets
Delete gadgets and introduce halo2_gadgets dependency.
2022-02-03 21:23:42 +00:00
str4d 1f4acdf878
Merge pull request #270 from zcash/derive-internal-keys
Derive internal keys.
2022-02-03 00:42:23 +00:00
str4d d270edaa14
Merge pull request #274 from nuttycom/beta_lints
Use beta lints instead of nightly.
2022-02-01 16:01:57 +00:00
Kris Nuttycombe e8e108405b Use beta lints instead of nightly. 2022-02-01 07:33:31 -07:00
therealyingtong 91e22e4f92 Use internal keys test vectors. 2022-02-01 18:55:21 +08:00
therealyingtong 9cf4e10d4f Remove InternalSpendingKey, introduce FullViewingKey::rivk_internal. 2022-02-01 18:55:21 +08:00
therealyingtong 99119f04fa Derive internal full viewing key. 2022-02-01 18:55:21 +08:00
therealyingtong 2412e83400 Derive internal spending key. 2022-02-01 18:55:21 +08:00
therealyingtong dc7c699a4a spec: Add PrfExpand::OrchardRivkInternal variant. 2022-02-01 18:55:21 +08:00
therealyingtong 942f0846b6 Only enable halo2_gadgets test-dependencies in dev. 2022-01-29 02:07:55 +08:00
therealyingtong f74cb9e4d3 Delete gadgets and their primitives; add `halo2_gadgets` dependency. 2022-01-29 01:57:01 +08:00
Jack Grigg f300cea2c8 Fix clippy lints
These became stable lints between 1.51 and 1.54.
2022-01-28 23:00:00 +08:00
Jack Grigg 2b333d642c pasta_curves 0.3
The MSRV is now 1.54.0, because reddsa 0.2.0 included a fix to its
nightly CI that inadvertently bumped its MSRV.

The `halo2` crate is now the `halo2_proofs` crate, but we're avoiding
the cross-repo crate rename until after `halo2_gadgets` is extracted.

This also brings in the 20% prover performance improvement from
zcash/halo2#447.
2022-01-28 22:59:59 +08:00
str4d 159ab53da5
Merge pull request #186 from zcash/refactor-gadget-crates
Prepare to extract gadgets into crates
2022-01-27 17:53:18 +00:00
therealyingtong a2868262b3 Minor cleanups and fixes. 2022-01-28 00:45:44 +08:00
therealyingtong 91bc1edf8f constants::sinsemilla: Remove Q_ and S_PERSONALIZATION.
These are part of the sinsemilla gadget and are not Orchard-specific.
They will live in primitives::sinsemilla.
2022-01-27 21:14:15 +08:00
therealyingtong 28f2d7a84b Provide compute_lagrange_coeffs() functionality in ECCChip.
This involves moving helper functions from src/constants to a new
module, ecc::chip::constants.

Co-authored-by: Jack Grigg <jack@electriccoin.co>
2022-01-27 21:14:15 +08:00
therealyingtong 85b481af35 sinsemilla::merkle: Remove MERKLE_DEPTH constant. 2022-01-27 08:14:41 +08:00
therealyingtong 31259d089c ecc::chip::mul_fixed: Reintroduce build_constants() closure for constants. 2022-01-27 08:11:52 +08:00
therealyingtong f0e9daf722 gadget::ecc: Clean up bounds four FixedPointBaseField, FixedPointShort. 2022-01-27 08:10:18 +08:00
therealyingtong 191b5df0cb circuit.rs: Tidy up imports. 2022-01-27 08:09:29 +08:00
therealyingtong a5cfd2cfc6 circuit::gadget: Remove Orchard-specific names from gadget consts.
- L_ORCHARD_BASE -> pallas::Base::NUM_BITS,
- L_ORCHARD_SCALAR -> pallas::Scalar::NUM_BITS,
- L_VALUE -> L_SCALAR_SHORT,
- MERKLE_DEPTH_ORCHARD -> MERKLE_DEPTH.
2022-01-19 00:47:01 +08:00
therealyingtong 1a3cbeb896 Refactor src/constants and primitives::sinsemilla::constants. 2022-01-19 00:46:12 +08:00
therealyingtong d37db53e0b Implement utility functions inside `gadgets` module.
Instead of importing utility functions from the `orchard` crate,
the `gadgets` module now implements its own:

- lebs2ip
- i2lebsp
- decompose_word
2022-01-19 00:45:18 +08:00
therealyingtong 06ad0b6925 ecc: Introduce FixedPoints trait with Full, Base, Short associated types. 2022-01-19 00:43:52 +08:00
therealyingtong 5f8716d66a gadget::sinsemilla: Move Orchard-specific inputs into src/circuit.
The sinsemilla submodules note_commit and commit_ivk are tailored
for input lengths specific to Orchard. They have been moved out of
the gadget folder and into the circuit folder.

This also involves changing the visibility of some getter functions
to be usable outside gadget::sinsemilla.
2022-01-19 00:43:52 +08:00
str4d 3e0449ed35
Merge pull request #271 from zcash/tests-pasta-prep
Migrate tests from `FieldExt::rand` to `Field::random`
2022-01-18 14:48:07 +00:00
Jack Grigg a83a0b3fd0 Migrate tests from `FieldExt::rand` to `Field::random`
These were missed in zcash/orchard#254.
2022-01-18 14:30:55 +00:00
str4d dabf364b86
Merge pull request #268 from zcash/update-mockprover-errors
Update `halo2` revision
2022-01-05 14:15:42 +00:00
therealyingtong 1b4dfe4f81 Update Changelog. 2022-01-05 22:14:08 +08:00
therealyingtong d4d167c216 Use MockProver::FailureLocation in gadget unit tests.
This was introduced in halo2#433.
2022-01-05 21:30:45 +08:00
therealyingtong 5b26c7d67a Pass rng to create_proof API.
As of halo2#444, all APIs now take `R: RngCore` arguments instead of
internally depending on `rand::rngs::OsRng`.
2022-01-05 21:30:45 +08:00
therealyingtong f28edd886c Remove .into() from arguments to enable_equality().
As of halo2#416, this is handled internally by the function.
2022-01-05 21:30:45 +08:00
therealyingtong a5ffc3bb47 Update halo2 revision. 2022-01-05 21:30:45 +08:00
str4d 5742eb5c52
Merge pull request #269 from zcash/pin-dependencies
Pin `pprof = 0.6.1`.
2022-01-05 12:27:32 +00:00
therealyingtong 1c11a424e5 Pin pprof to 0.6.1. 2022-01-05 19:44:52 +08:00
str4d 54cdc051fe
Merge pull request #237 from zcash/orchard-mainnet-circuit
Orchard proposed mainnet circuit
2021-12-20 17:49:57 +00:00
str4d 40cc3cb728
Merge pull request #267 from zcash/crate-cleanups
Crate cleanups
2021-12-20 17:35:53 +00:00
Jack Grigg d11fbd4a56 Remove `ValueSum::from_raw`
There is no reason for crate users to be constructing `ValueSum`
directly. We no longer use it to represent `valueBalanceOrchard`,
instead requiring the user to specify their own type.
2021-12-20 16:08:44 +00:00
Jack Grigg 04af08d343 Fix documentation of `orchard::value` module
Closes zcash/orchard#142.
2021-12-20 16:05:33 +00:00
Jack Grigg d84764f2db Remove outdated doc comment on `MerkleHashOrchard`
Closes zcash/orchard#245.
2021-12-20 15:24:48 +00:00
Jack Grigg 0e1220acc9 Merge branch 'main' into orchard-mainnet-circuit 2021-12-20 15:20:33 +00:00
str4d a061a861b3
Merge pull request #266 from zcash/release-0.1.0-beta.1
Release 0.1.0-beta.1
2021-12-17 22:30:14 +00:00
Jack Grigg f98431175a orchard 0.1.0-beta.1 2021-12-17 22:10:35 +00:00
Jack Grigg 369b99ee3f Add `doc_cfg` annotations 2021-12-17 22:08:58 +00:00
Jack Grigg bb04300059 zcash_note_encryption 0.1 2021-12-17 22:08:23 +00:00
Jack Grigg af236a34ad blake2b_simd 1 2021-12-17 17:06:37 +00:00
Jack Grigg f468e604e3 pprof 0.6 2021-12-17 17:05:23 +00:00