Sean Bowe
145d096dcd
Distinguish between simple and non-simple selectors, and allow the former in lookup arguments.
2021-07-22 10:07:20 -06:00
Sean Bowe
382cd5a7ea
Create actual selector columns only during an optimization pass.
2021-07-21 12:55:19 -06:00
str4d
c0d2aa1286
Merge branch 'main' into coset-optimization
2021-07-19 14:43:37 +01:00
Sean Bowe
99a0e675f1
Minor changes to comments.
2021-07-14 09:46:29 -06:00
Sean Bowe
74f3e1c6d9
Fix omitted notation to explicitly designate l_last and l_blind as polynomials.
2021-07-13 16:30:52 -06:00
Sean Bowe
8caafc0abf
Change n to u in sanity check.
2021-07-13 16:12:21 -06:00
Sean Bowe
827132302a
Remove the ability to rotate when switching to the extended domain.
2021-07-12 12:57:09 -06:00
Sean Bowe
a091795aca
Switch to computing only Rotation::cur() cosets until rotation is needed.
2021-07-12 12:53:12 -06:00
Sean Bowe
fc946d99bf
Use Option in sanity-check rather than a random value.
2021-07-09 12:47:36 -06:00
Sean Bowe
9e6277ef6b
Make `usable_rows` temporary to avoid duplicative code.
2021-07-09 12:45:51 -06:00
Sean Bowe
326cae153e
Fix minor typos in comments.
2021-07-09 12:44:27 -06:00
Sean Bowe
90be1c29ab
Fix bug in sanity check during lookup argument witness creation.
2021-07-09 12:41:52 -06:00
Sean Bowe
7c66323d87
Rename l_cover to l_blind for clarity.
2021-07-09 09:22:25 -06:00
Sean Bowe
1f1b705fa6
Make lookup argument perfectly zero-knowledge and complete.
2021-07-08 14:52:44 -06:00
Sean Bowe
fd91b6b42c
Allow MSMs to be queried and not just raw commitments.
...
This allows us to avoid some interstitial arithmetic in the vanishing argument.
2021-07-01 12:42:24 -06:00
Daira Hopwood
209144981a
Remove needless borrows that are immediately dereferenced:
...
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-06-21 18:19:15 +01:00
therealyingtong
502f0c85dc
Input as associated type on EncodedChallenge
...
Use Input as an associated type instead of a type parameter, to
reduce infection
Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
2021-05-07 22:21:54 +08:00
therealyingtong
32f011d52d
Replace ChallengeSpace with EncodedChallenge API
...
Co-authored-by: Sean Bowe <ewillbefull@gmail.com>
2021-05-01 09:30:08 +08:00
therealyingtong
1a61eaa5d9
Propagate type changes
2021-04-23 19:18:41 +08:00
Jack Grigg
b4ed5295fe
Migrate to group traits
...
The `Curve` trait is now `CurveExt: group::prime::PrimeCurve`, and
`CurveAffine` is now `CurveAffine: group::prime::PrimeCurveAffine`.
There is no `CurveAffine` trait in `group`, and it's a widely-used
trait in this crate, so we don't rename it to `CurveAffineExt`.
2021-02-22 20:20:23 +00:00
Jack Grigg
7037d55320
Rename Curve and CurveAffine properties to match group traits
2021-02-22 20:05:08 +00:00
Daira Hopwood
4d61ad8ff5
Need a borrow here.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-18 23:50:19 +00:00
therealyingtong
d29246b49b
Rename const_* -> constant_*
2021-02-18 15:41:36 -07:00
therealyingtong
4bf46fc349
Add Expression::Const variant
2021-02-18 15:41:36 -07:00
therealyingtong
6a7f869f66
Clippy fixes
2021-02-18 15:41:36 -07:00
therealyingtong
df2d818891
Account for Rotations of LagrangeCoeff values
2021-02-18 15:41:36 -07:00
therealyingtong
8e56b415fb
Rename column -> expression for lookups
2021-02-18 15:41:36 -07:00
therealyingtong
aca6de61f8
Evaluate Expressions and all variants
...
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-02-18 15:41:36 -07:00
therealyingtong
d8534e1c50
Pass Expressions to meta.lookup()
2021-02-18 15:41:35 -07:00
Daira Hopwood
760d69bd2c
Rename "auxiliary column" to "instance column" in the book and in code. fixes #181
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-02-14 21:09:49 +00:00
Sean Bowe
4b960a7c0c
cargo fmt
2021-02-14 09:28:51 -07:00
Kris Nuttycombe
74b2aa715f
Require Rotation instead of i32 for relative rows in circuits.
...
Co-authored-by: str4d <thestr4d@gmail.com>
2021-01-14 11:57:32 -07:00
Jack Grigg
d95e4e4724
clippy: Remove unnecessary Result
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
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
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
c5e0364962
Remove the Read/Write type parameters from Transcript{Read,Write}.
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
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
therealyingtong
4273bbb2ba
[Documentation] Consistently use zero-based numbering
2020-12-06 07:10:09 +08:00
ying tong
30c13d5a6a
Further cleanups
...
Co-authored-by: ebfull <ewillbefull@gmail.com>
2020-12-05 13:14:50 +08:00
ying tong
ecc805fa35
Correct privacy of lookup structs + minor cleanups
...
Co-authored-by: str4d <jack@electriccoin.co>
2020-12-04 09:19:15 +08:00
therealyingtong
2284bbd0d8
Deduplicate Argument::commit_permuted() and rename {input,table}_values -> {input,table}_columns
2020-12-03 14:00:16 +08:00
therealyingtong
9a3d1b1d05
Optimisations and documentation updates
2020-12-03 12:54:25 +08:00
therealyingtong
e51ab7eaa7
Linearise state transition from Argument -> Permuted -> Committed
2020-12-03 12:11:00 +08:00
therealyingtong
0c81e9adab
Use lookup mod in plonk::prover and plonk::verifier
2020-12-03 10:50:20 +08:00
therealyingtong
19c1b20063
Add lookup::verifier methods
2020-12-03 10:50:20 +08:00
therealyingtong
c692311a12
Add Evaluated::open() and Evaluated::build() to lookup::prover
2020-12-03 10:50:20 +08:00
therealyingtong
6ccf58fc7c
Add Constructed::evaluate() to lookup::prover
2020-12-03 10:50:20 +08:00