Commit graph

265 commits

Author SHA1 Message Date
Jack Grigg
d95e4e4724
clippy: Remove unnecessary Result 2021-01-14 08:46:25 -07:00
Jack Grigg
ec8c925587
doc: Fix broken intra-doc link 2021-01-14 08:46:25 -07:00
Jack Grigg
95314d0f69
clippy: Add type definitions for complex types 2021-01-14 08:46:23 -07:00
Jack Grigg
75915f67ed
clippy: Small cleanups 2021-01-14 08:43:25 -07:00
Jack Grigg
6dd7595438
clippy: Remove useless actions
- Dropping a reference does nothing.
- Dropping a Copy type drops a copy.
- No need to clone the last usage of a variable.
2021-01-14 08:43:25 -07:00
Jack Grigg
6983bd1bbc
clippy: Use Option::ok_or_else to construct errors from functions 2021-01-14 08:43:25 -07:00
Sean Bowe
ec2d8db8cb
Multiopen prover never needed evals to be specified.
The Lagrange interpolation we were doing was pointless. kate_division sheds the constant
term off each time it is invoked because the quotient polynomial isn't affected by it.
This means we were modifying coefficients that end up getting discarded anyway; the
quotient polynomial coefficients are already determined exactly by the leading coefficients
and the fact that a root exists at each of the points.
2021-01-13 17:22:32 -07:00
ebfull
ccca639591
Merge pull request #111 from zcash/transcript-api-2
New Transcript API (and modified commitment scheme)
2021-01-13 16:50:47 -07:00
Sean Bowe
1f510016d8
Simplifications to some logic.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-01-13 15:51:48 -07:00
Sean Bowe
775151a67d
Change absorb_ to read_ in subprotocols. 2021-01-13 15:47:35 -07:00
Sean Bowe
9a26ef1acd
Refactor the Committed structure. 2021-01-13 15:44:37 -07:00
Sean Bowe
cc6b0bb7f2
Rename blind to \xi for consistency. 2021-01-13 15:24:44 -07:00
Sean Bowe
47d021ceb3
Add reference to issue in TODO comment. 2021-01-13 08:41:14 -07:00
ebfull
1e4b449934
Merge pull request #125 from zcash/circuit-traits
Circuit component traits
2021-01-12 09:23:21 -07:00
Sean Bowe
e1a772d6e1
Remove transcript forking API. 2021-01-12 07:40:31 -07:00
Sean Bowe
f308eb969c
Remove deterministic square root calculation as it's no longer needed. 2021-01-12 07:40:26 -07:00
Sean Bowe
98c1d80c90
Avoid square challenges and forking in inner product argument
This modifies the scheme to be almost identical to the construction
outlined in Appenix A.2 of "Proof-Carrying Data from Accumulation
Schemes" (https://eprint.iacr.org/2020/499). The only remaining
difference is that we do not compute [v] U but instead subtract
[v] G_0 from the commitment before opening.
2021-01-12 07:40:20 -07:00
Jack Grigg
d94e9b3daf Remove unnecessary trailing semicolon 2021-01-08 02:22:16 +00:00
Jack Grigg
f24b60b5b0 Add a placeholder module for gadgets 2021-01-08 01:55:10 +00:00
Jack Grigg
7e2406cc77 Implement a simple single-chip layouter 2021-01-08 01:54:44 +00:00
Jack Grigg
17da891b25 General traits and structs for implementing circuits 2021-01-08 01:54:18 +00:00
Jack Grigg
08da49353e Fix clippy lints in MockProver 2021-01-07 12:42:04 +00:00
Jack Grigg
8590211585 Remove unnecessary parts from MockProver per review comments 2021-01-06 21:52:56 +00:00
Jack Grigg
49f1598c0e Add example to MockProver documentation
Also fixes a bug in MockProver::verify (which was exposing an internal
implementation detail as an incorrect row numbering).
2021-01-06 21:52:56 +00:00
Jack Grigg
64b06735bf Expose MockProver in crate, and add documentation 2021-01-06 21:52:56 +00:00
therealyingtong
fb939f17a9 Add permutation check to MockProver 2021-01-06 21:52:56 +00:00
Jack Grigg
6eebf3994b Add MockProver for developing circuits 2021-01-06 21:52:56 +00:00
Sean Bowe
c8dedf2ec3
Fix challenge multiplications as per #119. 2021-01-06 10:47:06 -07:00
Sean Bowe
c5e0364962
Remove the Read/Write type parameters from Transcript{Read,Write}. 2021-01-06 10:45:11 -07:00
Sean Bowe
dff5a3a692
Generate the URS using a homebrew mixture of blake2b and try-and-increment. 2021-01-06 10:45:11 -07:00
Sean Bowe
a2999accb5
Rename DummyHash{Reader,Writer} to DummyHash{Read,Write}. 2021-01-06 10:45:11 -07:00
Sean Bowe
7ffd28a1b5
Remove unnecessary separate msm from commitment::verify_proof. 2021-01-06 10:45:11 -07:00
Sean Bowe
4ecbfb548e
Remove unnecessary lifetimes. 2021-01-06 10:45:11 -07:00
Sean Bowe
06552eec44
Update the PLONK implementation to adapt to the new transcript API. 2021-01-06 10:45:11 -07:00
Sean Bowe
5be7d9525d
Update multiopen APIs to reflect changes made to Transcript APIs 2021-01-06 10:45:10 -07:00
Sean Bowe
d30c6b62e4
Modification of the polynomial commitment scheme to compensate for Transcript API changes. 2021-01-06 10:40:26 -07:00
Sean Bowe
fb232ddec0
Change API for dealing with transcripts to integrate proof reading/writing. 2021-01-06 10:39:11 -07:00
Jack Grigg
f49e1e6177 Fix breakage of trait resolution in Rust 1.49.0
Previously, `ChallengeScalar` could use the operator traits defined on
the `F: Field` type it wrapped, due to its `impl Deref<Target = F>`.
This was technically ambiguous, and Rust 1.49.0 makes that ambiguity an
error.

We could fix this by adding operator impls with `ChallengeScalar` on the
RHS, but that would conflict with zcash/halo2#111. Instead we manually
dereference every challenge scalar when used in an arithmetic operation.
2021-01-06 00:48:29 +00:00
Jack Grigg
90c50fdd11 Refactor permutation proofs to reflect the separate permutations 2020-12-22 23:51:32 +00:00
Jack Grigg
62cace289b Add a few comments to the permutation construction code
We mainly point at the design document that describes the algorithm.
2020-12-22 20:25:33 +00:00
Jack Grigg
838d21f2be Refactor permutation keygen to reflect the separate permutations 2020-12-22 18:11:42 +00:00
Sean Bowe
9df7b5386f
Account more rigorously for the degrees of permutations' and lookups' constraints. 2020-12-22 08:59:08 -07:00
Sean Bowe
65ed1d8568
Check h_evals/h_commitments lengths in vanishing argument verifier. 2020-12-22 08:59:06 -07:00
Jack Grigg
8389389d37 model: metrics 0.13.0-alpha.13 2020-12-22 12:27:36 +00:00
Sean Bowe
c25b7e7d09
cargo fmt 2020-12-13 10:37:32 -07:00
ebfull
7c0e56a44e
Merge pull request #84 from zcash/pasta-curves
Replace Tweedle curves with Pasta curves
2020-12-13 08:51:52 -07:00
Sean Bowe
1c0daa5478
Add leading zeroes to hex in some constants. 2020-12-11 13:25:18 -07:00
ebfull
0101014268
Use constants where applicable in field implementations
Co-authored-by: str4d <jack@electriccoin.co>
2020-12-11 11:54:32 -07:00
therealyingtong
8360b94f89 Extract plonk::vanishing::{Argument, Proof} from prover and verifier
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2020-12-08 00:57:14 +08:00
Sean Bowe
81345e0cf1
Change ZETA constant of Fp to make it consistent with the endomorphism over Fq. 2020-12-07 09:42:33 -07:00