45 Commits

Author SHA1 Message Date
bing
8326db604c
refactor: remove usage of unstable generic_const_exprs in starky (#1300) 2023-10-23 20:20:00 -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
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
Brandon H. Gomes
5dfe1b412e
feat: add no-std support for starky
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-04 16:04:10 -07:00
Brandon H. Gomes
fc3f63398d
wip: start moving starky to no-std
Signed-off-by: Brandon H. Gomes <bhgomes@pm.me>
2022-11-03 12:17:03 -07:00
Daniel Lubarov
e73d01a037
packed_field -> packed (#584)
* `packed_field` -> `packed`

For cleaner imports; "field" is usually clear from context

* fix
2022-06-27 15:07:52 -07:00
Daniel Lubarov
3346d3f902
field_types -> types (#583)
* `field_types` -> `types`

Here too, I think "field" is usually clear from context, e.g. in `use plonky2::field::types::Field;`.

* fixes

* fmt
2022-06-27 12:24:09 -07:00
Daniel Lubarov
410e03349c
extension_field -> extension (#581)
It seems redundant in most contexts, e.g. `use plonky2::field::extension_field::Extendable;`. One could import `extension_field`, but it's not that common in Rust, and `field::extension` is now about as short.
2022-06-27 07:18:21 -07:00
wborgeaud
b3f873c66a Finish test 2022-05-19 11:10:10 +02:00
wborgeaud
2bc5b24c52 Start 2022-05-19 10:22:57 +02:00
wborgeaud
b606d99e07 Use *_circuit suffix for gadgets 2022-05-17 11:04:35 +02:00
Daniel Lubarov
7d6c0a448d
Halo2 style lookup arguments in System Zero (#513)
* Halo2 style lookup arguments in System Zero

It's a really nice and simple protocol, particularly for the verifier since the constraints are trivial (aside from the underlying batched permutation checks, which we already support). See the [Halo2 book](https://zcash.github.io/halo2/design/proving-system/lookup.html) and this [talk](https://www.youtube.com/watch?v=YlTt12s7vGE&t=5237s) by @daira.

Previously we generated the whole trace in row-wise form, but it's much more efficient to generate these "permuted" columns column-wise. So I changed our STARK framework to accept the trace in column-wise form. STARK impls now have the flexibility to do some generation row-wise and some column-wise (without extra costs; there's a single transpose as before).

* sorting

* fixes

* PR feedback

* into_iter

* timing
2022-03-16 17:37:34 -07:00
wborgeaud
150d764440 Simplification 2022-02-22 17:00:08 +01:00
wborgeaud
6cd2fc62b5 Should work (does not) 2022-02-22 11:44:24 +01:00
wborgeaud
56e269e27a Working (not recursively) 2022-02-22 10:37:08 +01:00
wborgeaud
85c1e1d5e0 Should work (does not) 2022-02-21 18:00:03 +01:00
Daniel Lubarov
bc3685587c
Rename constraint methods (#497)
Most of our constraints apply to all rows, and it seems safest to make that the "default".
2022-02-20 16:48:31 -08:00
wborgeaud
42d6532120 PR feedback 2022-02-15 08:35:57 +01:00
wborgeaud
acd62f1221 Changes after #481 2022-02-15 08:17:07 +01:00
wborgeaud
7820ba965c Minor 2022-02-14 10:23:26 +01:00
wborgeaud
1686cb021f verify_stark_proof -> recursively_verify_stark_proof 2022-02-14 10:20:59 +01:00
wborgeaud
6dca4e26af Unused 2022-02-14 10:16:02 +01:00
wborgeaud
cff39c5550 Change visibility 2022-02-14 10:12:24 +01:00
wborgeaud
80e3c928bb Clippy 2022-02-14 10:00:37 +01:00
wborgeaud
b0de3328c1 Working 2022-02-14 09:53:33 +01:00
wborgeaud
24c201477c Recursive stark test (failing) 2022-02-10 16:14:18 +01:00
wborgeaud
3aa192a7f6 Add witness generation for stark proofs 2022-02-10 16:04:46 +01:00
wborgeaud
fcef5a57f5 Fibonacci recursive constraints 2022-02-07 10:25:01 +01:00
wborgeaud
431bde2c72 Fix number of quotient polys 2022-02-04 17:04:07 +01:00
wborgeaud
978e14030c Fix degree 2022-02-04 16:39:34 +01:00
wborgeaud
6b2b8b6e5d Use stark degree in compute_quotient 2022-02-04 16:36:22 +01:00
wborgeaud
1011c302ac Add test for system zero 2022-02-04 16:02:45 +01:00
wborgeaud
d99cabded9 Working 2022-02-04 15:56:59 +01:00
wborgeaud
bff763e3e7 Add distinction between (non-)wrapping constraints 2022-02-02 11:23:03 +01:00
wborgeaud
1e04f4f5a4 Comments 2022-02-01 17:34:03 +01:00
wborgeaud
984f44b281 Fix lde -> coset_lde bug 2022-02-01 14:41:27 +01:00
wborgeaud
f2369f4fae Test pass 2022-02-01 10:48:53 +01:00
wborgeaud
b0738c2094 Fix degree issue 2022-01-31 21:05:23 +01:00
wborgeaud
92ea4b65d1 Constraint check working 2022-01-31 18:00:07 +01:00
wborgeaud
c73f32ef2b Remove initial values from Fibonacci STARK state 2022-01-28 13:59:43 +01:00
wborgeaud
e78630ae81 PR feedback 2022-01-28 05:02:31 +01:00
wborgeaud
b6cb72b629 Comments 2022-01-27 13:27:06 +01:00
wborgeaud
1770e83c63 Clippy 2022-01-27 13:02:36 +01:00
wborgeaud
4a2681034e Working prover 2022-01-27 12:58:56 +01:00