15 Commits

Author SHA1 Message Date
wborgeaud
fb18232efd Generic config 2021-11-05 10:56:23 +01:00
Daniel Lubarov
01c2047a66 Outdated TODO 2021-10-03 22:22:30 -07:00
Daniel Lubarov
7bf257546e Minor 2021-09-26 16:28:09 -07:00
wborgeaud
b63d83aacf Add Poseidon gadget 2021-09-16 21:18:08 +02:00
Daniel Lubarov
c76eb9ddeb
Prepare for the switch to Poseidon (#228)
* Prepare for the switch to Poseidon

Everything will now select a permutation based on the `PERMUTATION_FAMILY` const.

The `Poseidon` variant won't work quite yet since the gate isn't in place; I left that as a `todo!()`

* fix
2021-09-13 10:22:25 -07:00
Daniel Lubarov
3bc34c59d8
Refactor GMiMC code (#224)
* Refactor GMiMC code

Adds a sub-trait of `Field` called `GMiMCInterface`, which is similar to `PoseidonInterface`.

This lets us have different fields with different GMiMC constants in a type-safe way.

* Remove `Interface`

* Const generic for width
2021-09-07 18:28:28 -07:00
Daniel Lubarov
236a143abf
Move some Field members to a Field64 subtrait (#213)
* Move some Field members to a Field64 subtrait

I.e. move anything specific to 64-bit fields.

Also, relatedly,
- Tweak a bunch of prover code to require `Field64`, since 64-bit stuff is used in a couple places, like the FRI proof-of-work
- Remove `bits()`, which was unused and assumed a 64-bit field
- Rename a couple methods to reflect that they're u64 variants

There are no functional changes.

* Field64 -> PrimeField

* Remove `exp_u32`, `kth_root_u32`

* PrimeField: PrimeField

* Move `to_canonical_biguint` as well

* Add back from_noncanonical_u128
2021-09-05 10:27:11 -07:00
wborgeaud
69a945547a route, assert_equal -> connect 2021-08-24 08:25:11 +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
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
467485c3f0 Remove accumulator wires in GMiMCGate 2021-07-22 14:33:02 +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
6b407e45ef Progress on FRI 2021-04-21 22:31:45 +02:00
wborgeaud
7ff4150679 Merge with merkle_proofs_2 2021-04-12 10:38:07 +02:00
Daniel Lubarov
4086b2b447 Arithmetic & permutation gadgets 2021-04-02 15:29:21 -07:00