28 Commits

Author SHA1 Message Date
wborgeaud
2bbcf17699 Test eval_unfiltered_* functions 2021-08-02 14:17:42 +02:00
Daniel Lubarov
018fb005f8
Move stuff around (#135)
No functional changes here. The biggest change was moving certain files into new directories like `plonk` and `iop` (for things like `Challenger` that could be used in STARKs or other IOPs). I also split a few files, renames, etc, but again nothing functional, so I don't think a careful review is necessary (just a sanity check).
2021-07-29 22:00:29 -07:00
Daniel Lubarov
e382decc9f Import fixes 2021-07-29 11:45:58 -07:00
Daniel Lubarov
bcf524bed0
Have add_gate take a generic type instead of GateRef (#125)
* Have add_gate take a generic type instead of GateRef

There are a couple advantages
- Users writing their own gates won't need to know about the `GateRef` wrapper; it's more of an internal thing now.
- Easier access to gate methods requiring `self` -- for example, `split_le_base` can just call `gate_type.limbs()` now.

* Update comment

* Always insert
2021-07-22 23:48:03 -07:00
wborgeaud
d8b8161cb9
Merge pull request #122 from mir-protocol/eval_unfilterd_base
Manually implement `eval_unfiltered_base` for all gates
2021-07-23 08:12:01 +02:00
wborgeaud
3a24e8f4c1 Manually implement eval_unfiltered_base for all gates 2021-07-22 14:00:55 +02:00
wborgeaud
b68be57615 Simplify interpolation test 2021-07-22 13:33:57 +02:00
Daniel Lubarov
eb18c7ea33
Faster witness generation (#116)
Saves ~300ms in the test. The main change is to have generators return fixed-size `Vec`s instead of `HashMap`s, which have more overhead.
2021-07-21 08:26:34 -07:00
Daniel Lubarov
b8ce1d1967
Public inputs (#113)
With this approach, we don't need `Target::PublicInput`; any routable `Target` can be marked as a public input via `register_public_input`.  The circuit itself hashes these targets, and routes the hash output to the first four wires of a `PublicInputGate`, which is placed at an arbitrary location in the circuit.

All gates have direct access to the purported hash of public inputs. We could think of them as accessing `PI_hash_i(x)` (as in Plonk), but these are now (four) constant functions, so they effectively have direct access to the hash itself.

`PublicInputGate` checks that its first four wires match this purported public input hash. The other gates ignore the hash.

Resolves #64.
2021-07-21 08:26:19 -07:00
wborgeaud
a4c86a6b08 lagrange.rs -> interpolation.rs 2021-06-18 11:44:06 +02:00
wborgeaud
b44a01c975 Merge main 2021-06-15 09:20:00 +02:00
wborgeaud
4ed03f4fb1 Fix InterpolationGenerator dependencies. 2021-06-11 19:06:12 +02:00
wborgeaud
5200d70cf0 Add interpolation gadgets 2021-06-11 16:22:29 +02:00
wborgeaud
9adf5bb43f Use ExtensionAlgebra + new CircuitBuilder::mul_extension 2021-06-09 10:51:50 +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
Daniel Lubarov
db1ef913e0 Remove quartic_quartic 2021-06-08 10:08:17 -07:00
wborgeaud
c674d6c1f6 Remove unused imports 2021-06-08 12:53:04 +02:00
wborgeaud
19a38682ab Minor tweaks 2021-06-08 12:49:45 +02:00
wborgeaud
070dc7c9f1 s/ext_ext/ext_algebra 2021-06-08 11:30:39 +02:00
wborgeaud
d727f84a56 Working test 2021-06-08 11:18:21 +02:00
wborgeaud
5678c7ebda Added ExtensionAlgebra 2021-06-08 10:58:03 +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
4f6e9fb2e0 Recursive evaluation for interpolation gate. 2021-05-24 17:31:55 +02:00
Daniel Lubarov
741dc4c94c Tweaks to bench_ldes 2021-05-22 09:38:07 -07:00
Daniel Lubarov
a4be58557e Fix GMiMCGate 2021-05-20 05:35:16 -07:00
Daniel Lubarov
747974558f Add test_low_degree for other gates 2021-05-20 05:27:56 -07:00
Daniel Lubarov
621b097a70 Address most feedback 2021-05-20 05:15:25 -07:00
Daniel Lubarov
d05513475c Not just quartic 2021-05-19 23:07:24 -07:00