Commit graph

25 commits

Author SHA1 Message Date
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
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
5be7d9525d
Update multiopen APIs to reflect changes made to Transcript APIs 2021-01-06 10:45:10 -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
2e6ca274a4 Fix challenge types in poly::multiopen and poly::commitment
The argument to the poly::commitment prover and verifier was mistakenly
represented as a challenge, when in fact the commitments may be opened at
any scalar (which just happens to be a challenge within poly::multiopen).

The poly::commitment APIs are now public again.
2020-12-01 22:34:18 +00:00
Jack Grigg
f0723dbbcc multiopen: Rename [x_4, x_5] challenges to [x_1, x_2]
Also added types for these challenges, even though it's not technically
necessary yet because we don't pass these around anywhere.
2020-12-01 21:42:32 +00:00
Jack Grigg
eb7ce442f9 Rename ChallengeX6 to ChallengeZ 2020-12-01 21:40:16 +00:00
Jack Grigg
f63f3ff2af Introduce typed challenge scalars
This also centralises the challenge generation logic in Challenge::get,
ensuring it is consistent across the codebase.
2020-12-01 21:09:03 +00:00
Jack Grigg
cdbc41148a Migrate to ff traits
The `Field` trait in this crate is now `FieldExt: ff::PrimeField`.
2020-12-01 20:55:03 +00:00
therealyingtong
43337dea1b Make Transcript generic over curve points
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2020-11-16 21:26:46 +00:00
therealyingtong
a30719c245 Minor changes to multiopen
Co-authored-by: ebfull <ewillbefull@gmail.com>
2020-10-18 20:09:40 +08:00
Sean Bowe
1e9f7f37c6
Minor improvements to multiopen. 2020-10-15 17:16:44 -06:00
Sean Bowe
9d572c181d
Remove unnecessary enumeration in multiopen prover. 2020-10-15 17:12:17 -06:00
Sean Bowe
685bf79613
Relocate x_5 challenge sampling location to simplify logic. 2020-10-15 17:11:06 -06:00
Sean Bowe
123cacc7cc
Remove additional unnecessary vector clone from multiopen prover. 2020-10-15 17:06:35 -06:00
Sean Bowe
55ef4ea1f7
Unify the construct_intermediate_sets function between multiopen prover and verifier. 2020-10-15 17:01:30 -06:00
therealyingtong
2f7b46ffa1 Remove use of parallelize() from multiopen::prover 2020-10-14 08:16:14 +08:00
therealyingtong
742c15bb51 Minor changes and documentation 2020-10-14 08:15:00 +08:00
therealyingtong
088118cc5d Refactor lagrange_interpolate() method
Co-authored-by: daira <daira@electriccoin.co>
Co-authored-by: str4d <jack@z.cash>
2020-10-14 00:35:36 +08:00
therealyingtong
1441193de1 Refactoring from initial code review
Co-authored-by: ebfull <ewillbefull@gmail.com>
2020-10-14 00:35:36 +08:00
therealyingtong
6cd74999ff Use ProverQuery and construct_intermediate_sets() in prover 2020-10-14 00:35:25 +08:00
therealyingtong
9378d0cc70 Define construct_intermediate_sets() helper method for multiopen prover and verifier 2020-10-14 00:35:25 +08:00
therealyingtong
cbe4415870 Introduce Query and CommitmentData structs for multiopen 2020-10-14 00:35:25 +08:00
therealyingtong
c3d0a172a7 Create multiopen abstraction 2020-10-14 00:35:25 +08:00