71 Commits

Author SHA1 Message Date
Daniel Lubarov
519533d4b7
Benchmark tweaks (#83)
- Configure FRI with a list of arities that's more appropriate for a 2^14 instance. The previous config resulted in a huge final polynomial.
- Log the blinding factors, and other logging tweaks.
2021-07-01 10:53:42 -07:00
Daniel Lubarov
95a875e28d
Allow virtual targets to be routed (#84)
As in plonky1. The semantics of virtual targets in plonky1 were rather weird, but I think it's somewhat better here, since we already separate `generate_copy` and `assert_equal` methods. Users now make more of an explicit choice -- they can use a `VirtualTarget` for the witness generation only using `generate_copy`, or they can involve it in copy constraints.
2021-07-01 08:12:12 -07:00
Daniel Lubarov
03179e5674 Couple fixes related to blinding
- `self.gates` -> `self.gate_instances`
- Some tests were using a single binary FRI reduction, which doesn't provide enough succinctness for our blinding scheme to work. This caused `blinding_counts` to continue until it overflowed.
2021-06-30 12:54:45 -07:00
wborgeaud
69fff573fe
Merge pull request #76 from mir-protocol/add_routed_wires
Increase number of routed wires to 28 and add a new `ArithmeticExtensionGate`
2021-06-30 08:32:25 +02:00
wborgeaud
a017e79f65 Merge branch 'main' into add_routed_wires
# Conflicts:
#	src/gadgets/arithmetic.rs
2021-06-30 08:30:10 +02:00
Nicholas Ward
46ff079674
Merge pull request #80 from mir-protocol/blinding_factors
Blinding factors
2021-06-29 23:20:07 -07:00
Daniel Lubarov
f1e3474fcb
Simple reduce (#78)
* Simple reduce

* Fix bug causing test failure
2021-06-29 12:33:11 -07:00
Nicholas Ward
ce47eac72e fix 2021-06-29 11:04:05 -07:00
Nicholas Ward
d599664f22 merge 2021-06-29 10:07:05 -07:00
wborgeaud
bae3777bcd Use max filtered degree found with the tree method in CircuitBuilder::build 2021-06-29 14:00:34 +02:00
wborgeaud
493e81d786 Merge branch 'main' into lower_max_constraint_degree
# Conflicts:
#	src/circuit_builder.rs
2021-06-29 13:48:41 +02:00
Nicholas Ward
d5457bf414 fixed arithmetic, and added comments 2021-06-28 23:08:24 -07:00
Nicholas Ward
40f5346009 cargo fmt 2021-06-28 17:07:27 -07:00
Nicholas Ward
5aa0960154 minor fixes 2021-06-28 17:07:09 -07:00
Nicholas Ward
01493303f8 blinding 2021-06-28 09:45:56 -07:00
Daniel Lubarov
7734aed62c
Performance tweaks (#77) 2021-06-28 08:56:36 -07:00
wborgeaud
12e81acccf Optimize the degree of the tree returned by Tree::from_gates to allow non-power of 2 degree. 2021-06-28 11:27:43 +02:00
wborgeaud
e195fe58ed Merge branch 'main' into add_routed_wires 2021-06-25 13:53:30 +02:00
wborgeaud
810d1869a1 Minor improvements 2021-06-25 11:49:29 +02:00
wborgeaud
625377b4c0 Merge constant and sigma polynomials 2021-06-25 11:24:26 +02:00
Nicholas Ward
249c8a8378 calculating number of blinding gates needed 2021-06-24 22:02:20 -07:00
wborgeaud
54a15c012c Fixed bug and add division test in the base field. 2021-06-24 22:38:40 +02:00
wborgeaud
21e7e8fdad Merge branch 'main' into permutation_argument
# Conflicts:
#	src/circuit_builder.rs
2021-06-24 22:35:13 +02:00
wborgeaud
8aa9c7b816 Merge branch 'main' into gate_tree
# Conflicts:
#	src/circuit_data.rs
#	src/witness.rs
2021-06-24 20:58:17 +02:00
wborgeaud
2a38f8656f PR feedback 2021-06-24 20:53:15 +02:00
wborgeaud
54315d1735 Remove GatePrefixes to avoid using a HashMap 2021-06-24 18:08:39 +02:00
wborgeaud
ef7561fc84 Merge branch 'main' into permutation_argument
# Conflicts:
#	src/circuit_builder.rs
#	src/circuit_data.rs
#	src/polynomial/commitment.rs
#	src/prover.rs
#	src/witness.rs
2021-06-24 10:51:18 +02:00
wborgeaud
8796c73362 Change MulExtensionGate to ArithmeticExtensionGate and change gadgets to use the new wires in this gate. 2021-06-23 18:04:43 +02:00
wborgeaud
747f1875af Add todo for public inputs 2021-06-23 14:26:05 +02:00
wborgeaud
6c864ca522 Merge branch 'main' into fix_target_partition
# Conflicts:
#	src/witness.rs
2021-06-23 14:17:02 +02:00
wborgeaud
bc90909fa3 Add check of copy constraints after witness generation 2021-06-23 14:16:05 +02:00
wborgeaud
3bc27c65ef Rollback to previous semantics 2021-06-23 13:46:19 +02:00
wborgeaud
680d7a6389 Add eval_filtered methods 2021-06-22 17:10:36 +02:00
wborgeaud
5acbb674ad Add prefix to constant polys 2021-06-22 16:54:20 +02:00
wborgeaud
aec6f21792 Test with tree from all gates. 2021-06-22 16:07:35 +02:00
wborgeaud
cfa3d3a660 Added comments 2021-06-22 15:34:50 +02:00
wborgeaud
da3d34a0d4 Working gate tree generation 2021-06-22 14:31:46 +02:00
wborgeaud
a71909ba15 Implement compute_z and rewrite of compute_vanishing_polys 2021-06-17 15:49:21 +02:00
wborgeaud
1b99f8272f Merge branch 'main' into permutation_argument 2021-06-17 14:00:44 +02:00
wborgeaud
a6acd14dfa Minor rewrites and optimizations 2021-06-16 17:43:41 +02:00
wborgeaud
ea6a724560 Enforce copy constraints in partial witness generation. 2021-06-14 17:02:52 +02:00
wborgeaud
7f63276623 Merge branch 'main' into recursive_verifier 2021-06-09 10:04:45 +02:00
Daniel Lubarov
72c2e19bc5
Bit of verifier work (#54)
* Bit of verifier work

* Minor

* next_plonk_zs now available after William's changes
2021-06-08 21:23:52 -07:00
wborgeaud
8cf2758b6c Division gadget for extension field 2021-06-07 17:55:27 +02:00
wborgeaud
51c06d74ee Recursive PoW 2021-06-04 16:02:48 +02:00
Daniel Lubarov
cb7f8c8b8c
Draw challenge points from the extension field (#51)
* Draw challenge points from the extension field

* Now building

* Misc

* Default eval_unfiltered_base

* fmt

* A few field settings

* Add to Sage

* Display tweak

* eval_filtered_base

* Quartic in bench

* Missing methods

* Fix tests

* PR feedback
2021-05-30 13:25:53 -07:00
wborgeaud
ce0507ba12 Blinding parameter can be set differently for each Merkle tree in a FRI proof. 2021-05-11 09:56:21 +02:00
wborgeaud
1bae3a02f6 Batch open for PLONK 2021-05-07 11:30:03 +02:00
Daniel Lubarov
aaa0e4aa4a Port over some code for the permutation argument
This is mostly copy/pasted from plonky1, although there are some differences. E.g. in plonky2 virtual targets are not routable, so they're no longer added as partitions.
2021-04-25 17:02:02 -07:00
Daniel Lubarov
a50ba9f590 More unnecessary clones 2021-04-24 11:20:28 -07:00