Commit Graph

16 Commits

Author SHA1 Message Date
Georg Wiese
3813a4a1b9 Add variant of fingerprint() that yields intermediate columns (#2072)
Depends on #2151.

This PR solves all performance issues with `std::fingerprint`. It now
has two functions:
- `fingerprint()`: Is similar to a pre-#1985 version of `fingerprint()`.
It computes the fingerprint in a recursive way. It should *not* be used
to generate expressions, because they would be exponentially large. To
prevent that, I changed the type so that it can only be applied to `fe`.
- `fingerprint_inter()`: Is the analog for expressions. It stores
intermediate results in intermediate columns. Because of that, it needs
to be a `constr` function. It generates $O(n)$ intermediate columns of
constant size.

I also added a test for the `fingerprint_inter` function and changed all
protocols (bus, permutation, lookup) to use `fingerprint_inter` to
generate constraints.
2024-11-27 11:43:50 +00:00
chriseth
0edb7686cc Check length. (#1806) 2024-09-19 14:04:38 +00:00
Steve Wang
24633912ed Array reverse helper (#1805)
Really small. Just thought might not be appropriate to put in Keccak.
2024-09-13 17:17:40 +00:00
chriseth
b7f89d9d45 Add degree checks. (#1370)
Co-authored-by: Leo <leo@powdrlabs.com>
2024-05-13 08:32:31 +00:00
chriseth
3e43e33796 Constr as user-defined enum (#1252)
Turns some of the built-in types into user types in the prelude.
2024-05-01 10:29:19 +00:00
chriseth
880aed444d The prelude (#1329)
Co-authored-by: Georg Wiese <georgwiese@gmail.com>
2024-04-30 12:19:54 +00:00
chriseth
75968f286a Btree data structure (#1299)
Co-authored-by: Georg Wiese <georgwiese@gmail.com>
2024-04-30 09:40:58 +00:00
chriseth
13e5084315 Sort. (#1254)
Needs generic enums.
2024-04-23 22:19:08 +00:00
Georg Wiese
f87a760071 Hints for arithmetic machine 2024-03-18 11:57:40 +01:00
chriseth
97ed14c48b Type checking. 2024-03-01 17:36:54 +01:00
Georg Wiese
e82d6f5249 Refactor PoseidonGL machine 2024-02-21 14:11:16 +01:00
Georg Wiese
d5825738f3 PoseidonBN254: Use intermediate polynomials instead of witness columns 2024-02-21 12:24:01 +01:00
Georg Wiese
aa3955801c Refactor PoseidonBN254 2024-02-15 18:15:08 +01:00
chriseth
2765e59a9f Add types. 2024-02-06 10:25:04 +01:00
chriseth
6ba444213d Improve stdlib. 2024-01-23 20:29:59 +01:00
chriseth
b0f5a80cf7 Builtin functions. 2024-01-23 20:29:59 +01:00