9 Commits

Author SHA1 Message Date
wborgeaud
b58d5d6747 Move u32 stuff to plonky2_u32 crate 2022-04-06 08:50:45 +02:00
wborgeaud
08e255a2bb Remove params in GateInstance 2022-02-16 09:02:21 +01:00
wborgeaud
6d2c9b11a6 Merge branch 'main' into batchable
# Conflicts:
#	plonky2/src/gates/gmimc.rs
#	plonky2/src/hash/gmimc.rs
#	plonky2/src/plonk/circuit_builder.rs
2022-02-15 14:43:12 +01:00
wborgeaud
b104dfce2a Working 2022-02-14 19:37:24 +01:00
Daniel Lubarov
cfe52ad604
Add PrimeField, PrimeField64 traits (#457)
* Add PrimeField, PrimeField64 traits

* fix

* fixes

* fix

* `to_biguint` -> `to_canonical_biguint`
2022-02-09 21:50:18 -08:00
wborgeaud
c0cfff1480 Clippy 2022-02-02 16:07:16 +01:00
wborgeaud
ff949f40bc Works everywhere except Waksman 2022-02-02 16:02:22 +01:00
Daniel Lubarov
43800ba23d
Rename PrimeField -> Field64 (#454)
* Rename `PrimeField` -> `Field64`

And add TODOs for moving around various methods which aren't well-defined in their current traits, or would be well-defined in a supertrait.

* fix test

* TODOs as per PR feedback
2022-02-01 22:40:19 -08:00
Daniel Lubarov
c126641c5d
Split into crates (#406)
* Split into crates

I kept other changes to a minimum, so 95% of this is just moving things. One complication that came up is that since `PrimeField` is now outside the plonky2 crate, these two impls now conflict:
```
impl<F: PrimeField> From<HashOut<F>> for Vec<u8> { ... }
impl<F: PrimeField> From<HashOut<F>> for Vec<F> { ... }
```
with this note:
```
note: upstream crates may add a new impl of trait `plonky2_field::field_types::PrimeField` for type `u8` in future versions
```
I worked around this by adding a `GenericHashOut` trait with methods like `to_bytes()` instead of overloading `From`/`Into`. Personally I prefer the explicitness anyway.

* Move out permutation network stuff also

* Fix imports

* Fix import

* Also move out insertion

* Comment

* fmt

* PR feedback
2021-12-28 11:51:13 -08:00