29 Commits

Author SHA1 Message Date
Robin Salen
349beae143
Do not panic on wire set twice or generator not run issues (#1611)
* Do not panic on wire set twice or generator not run issues

* No std
2024-08-08 03:53:14 +09:00
Robin Salen
cfe4448341
Implement Default for DefaultGateSerializer and DefaultGeneratorSerializer (#1531)
* Implement Default for DefaultGateSerializer and DefaultGeneratorSerializer

* Apply comments

* Update doc

* Clippy
2024-02-18 14:34:00 +00:00
Robin Salen
9f8c152222
Remove unused attributes 2023-08-02 08:54:20 -04:00
Robin Salen
8b35fefb3b
Rename cd to common_data for consistency
Cf review
2023-07-13 19:34:32 -04:00
Robin Salen
544aff27b6
Also provide CommonCircuitData in serialization of gates and generators 2023-07-13 19:27:51 -04:00
Robin Salen
b43d6c1d67
Add CommonCircuitData to generators deserialization method 2023-07-13 19:27:50 -04:00
Robin Salen
d684ee2d8d
Switch Field type of generators to be F: RichField + Extendable<D> 2023-07-13 19:27:50 -04:00
Hamish Ivey-Law
2c5f6fd62a
Fix compile time problems and generic hash implementation (#1024)
* Fix egregious magic number.

* Remove generic consts from core permutations.

* Remove redundant `where` clauses.

* Remove HashConfig and friends.

* Refactor Permutation code.

* Remove redundant `where` clauses and `use`s.

* Introduce AlgebraicPermutation to wrap `[Target; WIDTH]`s.

* Remove `generic_const_expr` feature from plonky2!

* Remove `generic_const_expr` feature from plonky2!

* Compile time fixed! Start removing `generic_const_expr` from evm.

* Remove redundant `where` clauses from Starky.

* Remove `generic_const_expr`s from benchmarks.

* Remove redundant HASH_SIZE `where` clause.

* Clippy.

* Fix unrelated OsRng issue in `bench_recursion`.

* Fix function doc.
2023-05-11 02:59:02 +10:00
Robin Salen
2a9c5cfd32
Add serialization check in square_root example 2023-04-20 07:59:37 +02:00
Robin Salen
f71139d934
Add serialisation support for gates, generators, and various structs
Co-authored-by: Sebastien La Duca <sladuca777@gmail.com>
2023-04-20 07:59:36 +02:00
Robin Salen
9ee47ab745
Move HashConfig into GenericConfig associated types 2023-04-01 09:54:14 -04:00
Robin Salen
e857c020bf
Make hash functions generic 2023-03-31 18:55:06 -04:00
Daniel Lubarov
92974aa105 A few more cyclic recursion changes
In preparation for adding the zkEVM aggregation circuit. Mainly,

- Adds a `WitnessWrite` trait, a sub-trait of `Witness`, and move the write methods to it. `GeneratedValues` impls `WitnessWrite`, which lets generators like `DummyProofGenerator` access all our write methods like `set_proof_with_pis_target`. Also removes some duplication.

- Remove `set_cyclic_recursion_data_target` - now that dummy proof data is automatically populated, all that remains is populating `condition` and the cyclic proof + VK. I think it's easy enough for callers to do this; the steps are the same as with `conditionally_verify_proof`. This way there's no cyclic-recursion-specific API to learn about.

- Split `cyclic_recursion` into two variants, one which checks the current circuit or a dummy, and a more general one which checks the current circuit or some other circuit. We can use the latter to build a more efficient aggregation circuit, where we check another aggregation proof or an EVM proof, with no dummy proofs involved.
2022-12-11 22:43:26 -08:00
Brandon H. Gomes
e2cdd5a954
feat: upgrade Sampling APIs
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-03 08:26:03 -07:00
Brandon H. Gomes
11600b93c0
fix: do a first round of a core replacement
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-02 16:54:41 -07:00
wborgeaud
b97ec3bda1 New clippy lint 2022-10-25 10:50:40 +02:00
Nicholas Ward
e2811550e1 addressed comments 2022-09-26 20:34:17 -07:00
Nicholas Ward
7d7269b26d nit 2022-09-26 16:17:04 -07:00
Nicholas Ward
20053ac4c7 documentation 2022-09-26 15:58:28 -07:00
Nicholas Ward
33d97eff1c moved sqrt to PrimeField 2022-09-26 11:31:11 -07:00
Nicholas Ward
a053372176 cleanup and documentation 2022-09-26 11:19:09 -07:00
Nicholas Ward
3bc1e65a7a fix 2022-09-26 11:11:41 -07:00
Nicholas Ward
59acd9436c fmt 2022-09-26 10:44:51 -07:00
Nicholas Ward
d239d3ffb5 fix 2022-09-26 10:44:43 -07:00
Nicholas Ward
880bc87bb1 sqrt 2022-09-26 10:43:18 -07:00
Nicholas Ward
bda96e84ee working on SquareRootGenerator instead of SquareGenerator 2022-09-25 20:14:23 -07:00
Nicholas Ward
b21883c321 fmt 2022-09-25 20:14:23 -07:00
Nicholas Ward
b271a71a74 square root example: use generator 2022-09-25 20:14:23 -07:00
Nicholas Ward
8bd5f43c45 oops, included other examples 2022-09-25 20:14:23 -07:00