therealyingtong
059af49f46
Circuit::synthesize: New note commitment integrity.
2021-07-21 20:35:43 +08:00
therealyingtong
1a1a65af4a
Circuit::synthesize(): Old note commmitment integrity.
2021-07-21 20:35:43 +08:00
therealyingtong
f31dd28a8e
Circuit::synthesize(): Diversified address integrity.
2021-07-21 20:35:43 +08:00
therealyingtong
f431100a7a
Circuit::synthesize(): Spend authority.
2021-07-21 20:35:43 +08:00
therealyingtong
48b862f13f
Circuit::synthesize(): Nullifier integrity.
2021-07-21 20:35:43 +08:00
therealyingtong
626ee482bf
Circuit::synthesize(): Value commitment integrity.
2021-07-21 20:35:43 +08:00
therealyingtong
4ba8762dcd
Circuit::synthesize(): Merkle path validity.
2021-07-21 20:35:43 +08:00
therealyingtong
b64fd5ac81
Circuit::synthesize(): Witness private variables.
...
Load private variables that are used across multiple checks into
the circuit.
2021-07-21 20:35:43 +08:00
therealyingtong
23af4d72ee
Circuit::synthesize(): Load the Sinsemilla generator lookup table.
2021-07-21 20:35:43 +08:00
therealyingtong
a369004037
Circuit::configure(): Define Config and configure Circuit.
...
The Action Circuit configuration uses 10 advice columns. It contains:
- a single EccConfig (10 advice columns);
- two SinsemillaConfigs (5 advice columns each);
- two MerkleConfigs (5 advice columns each);
- a PoseidonConfig, (4 advice columns);
- a PLONKConfig for standard PLONK operations (3 advice columns);
and some infrastructure to handle public inputs (subject to change
at the time of commit).
The 5-column configs are placed side-by-side in the circuit to
optimize space usage.
Gate creation is delegated to the configure() function of each
respective Chip.
2021-07-21 20:35:43 +08:00
therealyingtong
bdf2d6d9f8
circuit.rs: Define Circuit fields, impl Default for Circuit
...
The Default Circuit sets all fields to None. This is used as a
placeholder in src/builder.rs.
The circuit in the Circuit::round_trip() test has been filled in.
2021-07-21 20:35:43 +08:00
Jack Grigg
654f1b4613
Add selector to dummy circuit
...
We need to ensure that no gates are active on the blinding factor rows.
2021-07-19 12:53:38 +01:00
Jack Grigg
15f9d254d9
Migrate to latest `halo2` API
...
- `halo2::plonk::{create_proof, verify_proof}` now take instance columns
as slices of values.
- `halo2::plonk::Permutation` has been replaced by a global permutation,
to which columns can be added with `ConstraintSystem::enable_equality`.
- The introduction of blinding rows means that various tests now require
larger circuit parameters.
2021-07-19 12:53:38 +01:00
Jack Grigg
d47a7d2105
Migrate to latest halo2 Circuit APIs
...
- The `Circuit` trait now has a `FloorPlanner` associated type.
- `circuit_layout` has been replaced by `CircuitLayout`.
2021-07-15 11:22:25 +01:00
Jack Grigg
06f7d7fbe0
Add `Bundle<Authorized, _>::dynamic_usage` method
...
This will be used by `zcashd` as part of tracking the memory usage of
transactions.
2021-06-22 16:06:49 +01:00
Jack Grigg
62642fd804
Add `Bundle<Authorized, _>::verify_proof` API
2021-06-21 13:38:43 +01:00
Jack Grigg
de78186503
Store anchors as pallas::Base instead of [u8; 32]
...
This matches what we store in `MerklePath`, and better enforces the
required type.
2021-06-12 21:35:37 +01:00
Jack Grigg
dfa3fbb19b
Migrate to latest revision of halo2
2021-06-01 17:37:44 +01:00
Jack Grigg
cdfd2ab0f9
Remove clones from types that now impl Copy
2021-05-28 12:10:54 +01:00
Kris Nuttycombe
800e540875
Make the `Bundle` type implement `Clone`
...
This is required for proptest generation that handles shrinking
correctly in librustzcash.
2021-05-13 15:35:44 -06:00
Kris Nuttycombe
e72d74ccd6
Remove extraneous pub exports from the root.
2021-05-05 11:46:24 -06:00
Kris Nuttycombe
7ea8900a58
Implement AsRef for Proof
2021-05-05 11:39:07 -06:00
Kris Nuttycombe
25c90dda4b
Add fast generation for not-consensus-valid authorized bundles and actions.
2021-04-29 16:14:16 -06:00
Kris Nuttycombe
4d89d45332
Add proptest generators for action and bundle types.
2021-04-28 18:04:17 -06:00
Kris Nuttycombe
a5c9fb953b
Add accessors necessary for zip-225 write.
2021-04-28 18:02:36 -06:00
Kris Nuttycombe
e743198a50
Expose constructors required for ZIP-225 parsing.
2021-04-28 18:02:36 -06:00
Jack Grigg
52d87e257c
Return SpendingKey from Note::dummy
...
We need the spending keys to create valid spendAuth signatures for
Actions containing dummy spent notes.
2021-04-27 12:26:24 +12:00
Jack Grigg
4c4400cb63
Proving and verifying keys, and placeholder proof logic
2021-04-23 01:08:43 +12:00
Jack Grigg
bbf2dc271e
Add ECC gadgets and instructions
...
Migrated from the halo2 crate; we may re-upstream them later (or move
gadgets into their own crate) once we've stabilised them.
2021-02-25 18:11:46 +00:00
Jack Grigg
1b9f6450cb
Add skeleton for actions and bundles
2021-01-20 20:31:09 +00:00