Commit graph

48 commits

Author SHA1 Message Date
Jack Grigg
db0477a606 impl<F: FieldExt> {Neg, Sub} for Expression<F> 2021-02-01 21:42:57 +00:00
Jack Grigg
0a378c3d0f Require Circuit::Config implement Clone instead of Copy 2021-02-01 19:05:19 +00:00
Jack Grigg
82da677add Add name field to ConstraintSystem::create_gate
The name has type `&'static str`, as gates apply to every row and thus
do not require any runtime information to name.
2021-02-01 18:38:13 +00:00
Jack Grigg
bf771a7446 Add namespacing and gadget name collection to Layouter 2021-02-01 18:38:04 +00:00
Jack Grigg
60061f64fd Add name field to Layouter::assign_region 2021-02-01 18:34:24 +00:00
Jack Grigg
4c3adf59d5 Add annotations to Region::{assign_advice, assign_fixed}
This enables circuits to annotate individual cells with variable names
or similar protocol-specific metadata.
2021-02-01 18:33:25 +00:00
therealyingtong
02b5b8442b Refactor PLONK prover 2021-01-31 11:45:40 +08:00
therealyingtong
faf5da15c9 Track column usage in RegionShape.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2021-01-28 10:55:02 +08: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
Kris Nuttycombe
483cb1139f Remove rotations from ConstraintSystem 2021-01-14 11:35:23 -07:00
therealyingtong
e5f55a8576 Abstract add_rotation() helper in plonk::circuit 2020-12-06 07:19:44 +08:00
ying tong
30c13d5a6a Further cleanups
Co-authored-by: ebfull <ewillbefull@gmail.com>
2020-12-05 13:14:50 +08:00
therealyingtong
9a3d1b1d05 Optimisations and documentation updates 2020-12-03 12:54:25 +08:00
therealyingtong
0a85e93714 Add lookup to circuit and test 2020-12-03 10:50:20 +08:00
therealyingtong
0c81e9adab Use lookup mod in plonk::prover and plonk::verifier 2020-12-03 10:50:20 +08:00
therealyingtong
5d891e029d Add fixed_values to ProvingKey 2020-12-03 10:50:20 +08:00
Jack Grigg
66240800a3 Move permutation keygen into plonk::permutation::keygen 2020-12-01 21:10:31 +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
ying tong
a856137619 Minor refactors
Co-authored-by: str4d <jack@electriccoin.co>
2020-11-11 13:56:34 +08:00
therealyingtong
766caf9214 Make getters for column index() and column_type() 2020-11-10 00:45:52 +08:00
therealyingtong
0519a522aa Use TryFrom to convert Column<Any> to other column types 2020-11-10 00:39:08 +08:00
therealyingtong
22b6d5bd70 Cleanups in circuit.rs 2020-11-07 14:27:38 +08:00
therealyingtong
34c6cba537 Add generic query_any_index() and get_any_query_index methods 2020-11-06 12:39:51 +08:00
therealyingtong
075988ae4e Introduce Column struct and ColumnType trait 2020-11-06 11:29:42 +08:00
therealyingtong
2034179d82 Rename wire -> column 2020-11-06 11:18:12 +08:00
Sean Bowe
e275d78c7d
Simplify permutations field of ConstraintSystem
Co-authored-by: therealyingtong <yingtong@electriccoin.co>
2020-09-29 08:51:00 -06:00
Sean Bowe
73d494a72d
Various changes, including restoring permutation argument to advice wires only for now. 2020-09-19 13:31:56 -06:00
therealyingtong
0bdcbb6c67
Introduce Wire enum for use in permutations 2020-09-19 12:39:04 -06:00
therealyingtong
a257308ba2
Add aux wires to ConstraintSystem 2020-09-19 12:39:04 -06:00
therealyingtong
0caf1d2087
Provide aux_commitments to verifier and aux_lagrange_polys to prover 2020-09-19 12:39:04 -06:00
Sean Bowe
643077b150
Rename ConstraintSystem to Assignment, and MetaCircuit to ConstraintSystem. 2020-09-13 10:30:02 -06:00
Sean Bowe
116659c1ba
Refactor module tree. 2020-09-07 13:07:51 -06:00
Sean Bowe
190242a4e9
Remove redundant permutation_queries vector. 2020-09-06 14:18:05 -06:00
Sean Bowe
d7132404ba
Index into q_evals consistently between prover and verifier. 2020-09-05 12:08:56 -06:00
Sean Bowe
335b629724
Avoid redundant wire queries by searching for an existing query. 2020-09-03 14:26:00 -06:00
Sean Bowe
160dabe9c5
Cleanups for verifier of permutation argument 2020-09-02 13:15:40 -06:00
therealyingtong
c44a020de7
Permutation checks in verifier 2020-09-03 00:45:03 +08:00
Sean Bowe
dc5df10832
Update structured reference string and API for permutation argument. 2020-08-31 10:01:09 -06:00
therealyingtong
85fd924b15
WIP implement copy() on Variables 2020-08-31 21:51:49 +08:00
Sean Bowe
35c4bd4dd9
Improve naming of offsets/indexes and mappings. 2020-08-27 13:27:24 -06:00
Sean Bowe
ad106f1119
(WIP) broken implementation of generalized PLONK 2020-08-27 10:10:55 -06:00
Sean Bowe
6051814c4b
Split coset step up so that we can query wires at multiple spots. 2020-08-24 13:50:52 -06:00
Sean Bowe
36f9e87056
Implementation of gate/query API 2020-08-24 08:28:42 -06:00
Sean Bowe
c20f3fdf1a
Give fixed and advice wires separate types 2020-08-23 13:26:04 -06:00
Sean Bowe
7edffe0197
Allow commitments to generic advice wire polynomials 2020-08-22 16:10:27 -06:00
Sean Bowe
c16141be9a
Introduce Variable type 2020-08-22 15:15:39 -06:00
Sean Bowe
9dfc6ac379
Add first pieces of the API. 2020-08-22 15:09:47 -06:00
Sean Bowe
dd1ad9f114
Initial commit 2020-08-22 14:15:39 -06:00