Jack Grigg
b1ce38405a
Use `core` instead of `std` where possible
2022-04-28 20:20:23 +00:00
Jack Grigg
52449ef88f
Migrate to `halo2::plonk::Constraints` helper
2022-04-28 19:52:55 +00:00
Jack Grigg
4574d4793a
Migrate to 2021 edition
2022-04-28 17:23:30 +00:00
str4d
2c0aed712a
Merge pull request #308 from zcash/improve-debug-impls
...
Improve `Debug` impls
2022-04-06 18:59:33 +01:00
str4d
7c2cc814de
Merge pull request #288 from rex4539/typos
...
Fix typos
2022-04-06 18:23:17 +01:00
Jack Grigg
6941fe1109
Make `Debug` impl for `Proof` much less verbose
...
For the default `{:?}` debug formatting we now only print the length of
the proof, while `{#?}` continues to print the full byte vector.
2022-04-06 17:21:48 +00:00
therealyingtong
a0424984c6
Add explicit scoping for viewing keys and addresses
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-30 20:49:37 +08:00
Jack Grigg
d6d1dbea14
Update serialized proof test case for circuit changes
2022-03-22 17:59:56 +00:00
Jack Grigg
6c9ff19342
Merge branch 'main' into non-consensus-changes-on-branchid-c4cd541e
2022-03-22 17:55:59 +00:00
Jack Grigg
795fb78d2d
Add serialized proof test case
...
Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
2022-03-16 19:47:00 +00:00
Dimitris Apostolou
b96533a2b8
Fix typos
2022-02-18 23:31:27 +02:00
Jack Grigg
17ad25ee35
Merge branch 'non-consensus-changes-on-branchid-c4cd541e' into merge-non-consensus-changes
2022-02-15 22:46:47 +00:00
Daira Hopwood
e92d1167af
The address used to derive g_d_old and pk_d_old is the recipient address of the note being spent.
2022-02-15 14:39:32 -07:00
Kris Nuttycombe
5d5e289197
Remove default_diversifier and default_address methods.
2022-02-15 14:39:32 -07:00
str4d
4ae32ef98a
Merge pull request #282 from zcash/clone-unauthorized-bundle
...
Add `Clone` impls to various structs
2022-02-12 03:23:11 +00:00
Jack Grigg
c4cd541e6c
Add `Clone` impls to various structs
...
This enables `InProgress<Unproven, Unauthorized>: Clone`, which allows
the bundle returned by `Builder::build` to be cloned. In pure-Rust
wallets this should not be necessary, but it is required for `zcashd`
due to FFI-crossing.
2022-02-12 02:04:52 +00:00
therealyingtong
f74cb9e4d3
Delete gadgets and their primitives; add `halo2_gadgets` dependency.
2022-01-29 01:57:01 +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
therealyingtong
85b481af35
sinsemilla::merkle: Remove MERKLE_DEPTH constant.
2022-01-27 08:14:41 +08:00
therealyingtong
191b5df0cb
circuit.rs: Tidy up imports.
2022-01-27 08:09:29 +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
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
Jack Grigg
0e1220acc9
Merge branch 'main' into orchard-mainnet-circuit
2021-12-20 15:20:33 +00:00
str4d
b13b9677cf
Merge pull request #254 from zcash/pasta_curves-prep
...
Remove various usages of `FieldExt` methods
2021-12-16 12:07:50 +00:00
Jack Grigg
bfc65d5985
poseidon: Remove `self` parameter from `Domain` trait methods
...
For almost all the sponge constructions defined in the Poseidon paper,
the domain can be defined completely statically. Variable-length hashing
requires knowledge of the message length, but that can be provided to
the fixed padding function in a subsequent commit, and in any case we
can't use variable-length inputs in a circuit.
2021-12-10 02:40:33 +00:00
Jack Grigg
6f0cab5ffd
Replace `FieldExt::from_u64` with `PrimeField: From<u64>`
2021-12-09 15:38:36 +00:00
Jack Grigg
bacdf67428
Remove the `CellValue` type
...
In order to make the changeover easier to review, we redefined
`CellValue<F>` to be `AssignedCell<F, F>`. Now we remove that type and
rename throughout the codebase.
2021-12-08 02:10:17 +00:00
Jack Grigg
65a89f099b
Replace `gadget::utilities::copy` with `AssignedCell::copy_advice`
...
Also replaces other copy-advice implementations that weren't using
`copy`.
2021-12-08 01:50:02 +00:00
Jack Grigg
3079800f42
Remove `Var::new` trait method
...
As the underlying `Region` methods now return `AssignedCell` instead of
`Cell`, we can simplify all the places where we then constructed a
`CellValue` struct.
2021-12-08 01:48:17 +00:00
Jack Grigg
50b4600a1a
circuit: Remove `Copy` impl from `CellValue`
...
We will be replacing it with `halo2::circuit::AssignedCell`, which does
not impl `Copy`.
2021-12-08 01:43:00 +00:00
str4d
55567f31ed
Merge pull request #248 from zcash/ecc-config-refactor
...
circuit: Refactor `EccConfig` away from `impl From<EccConfig>`.
2021-12-08 01:40:14 +00:00
Jack Grigg
fe7796b884
circuit: Ensure that the real proof length matches calculated length
2021-12-06 19:44:44 +00:00
Jack Grigg
e2c300368b
circuit: Pin the proof size
...
This is to ensure that if any future circuit changes are made, their
effect on the proof size (if any) will be noticed.
2021-12-06 18:01:55 +00:00
therealyingtong
2ec480ef6b
utilities::lookup_range_check: Derive Copy for LookupRangeCheckConfig.
2021-12-02 14:55:37 -05:00
therealyingtong
421891f065
Benchmark proof creation and verification for RATE = 2, 8, 11.
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
Jack Grigg
99d03e0d25
Migrate to latest halo2 revision
2021-11-26 16:24:26 +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
Deirdre Connolly
568e24cd5f
Derive Clone for circuit::Instance
2021-11-04 23:30:57 -04:00
Deirdre Connolly
7412dfe79a
Update src/circuit.rs
...
Co-authored-by: str4d <thestr4d@gmail.com>
2021-11-04 17:54:30 -04:00
Deirdre Connolly
e51e92e848
Add `orchard::circuit::Instance::from_parts()`
2021-11-03 23:24:54 -04:00
therealyingtong
764c445a81
Rename poseidon::nullifier -> poseidon::p128pow5t3.
2021-10-12 11:58:27 +02:00
therealyingtong
c80ccba801
Witness cm_old using Point::new().
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-09-28 20:31:32 +01:00
therealyingtong
a5a6e78d42
src/circuit.rs: Use NonIdentityPoint for all witnessed points.
...
The witnessed points are cm_old, g_d_old, pk_d_old, ak.
g_d_new and pk_d_new are currently also witnessed as affine points,
which diverges from the spec.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-09-28 13:13:25 -06:00
Sean Bowe
f9aa765787
Add test against hardcoded pinned verification key
2021-09-28 12:54:13 -06:00
therealyingtong
1f2132a8c0
Use correct MERKLE_DEPTH_ORCHARD in proptests.
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-09-16 21:37:59 +02:00