22 Commits

Author SHA1 Message Date
Daniel Lubarov
a50ba9f590 More unnecessary clones 2021-04-24 11:20:28 -07:00
Daniel Lubarov
6d164adc6a Have the prover use the new MerkleTree API
Before it was storing leaf data and Merkle roots, but nothing in between, since it wasn't yet interacting with intermediate layers (but it will once we hook up the FRI code).
2021-04-24 11:15:11 -07:00
Daniel Lubarov
b18f152c43 Remove access to "next" wire & constant values
As discussed, it seems like the batch opening argument will be a significant cost, and we can reduce that cost by not including shifted openings (except for `Z`s which need them).
2021-04-23 13:54:35 -07:00
Daniel Lubarov
9c50e61f96 cargo fmt 2021-04-23 00:01:41 -07:00
Daniel Lubarov
b7bc1bf313 Seed Challenger with a hash of the instance
I think this is the recommended way to apply Fiat-Shamir, to avoid any possible attacks like taking someone else's proof and using it to prove a slightly different statement.
2021-04-22 16:38:49 -07:00
Daniel Lubarov
41e1b64623 Basic arithmetic methods 2021-04-21 11:48:17 -07:00
Daniel Lubarov
959aaccae6 Merkle proofs 2021-04-08 09:38:57 -07:00
Daniel Lubarov
37761a32e8 Simplify as per William's comment 2021-04-04 15:26:38 -07:00
Daniel Lubarov
cb1c69e50f Validate that the cosets for Plonk's permutation argument are disjoint
When we had a large field, we could just pick random shifts, and get disjoint cosets with high probability. With a 64-bit field, I think the probability of a collision is non-negligible (something like 1 in a million), so we should probably verify that the cosets are disjoint.

If there are any concerns with this method (or if it's just confusing), I think it would also be reasonable to use the brute force approach of explicitly computing the cosets and checking that they're disjoint. I coded that as well, and it took like 80ms, so not really a big deal since it's a one-time preprocessing cost.

Also fixes some overflow bugs in the inversion code.
2021-04-04 14:34:33 -07:00
Daniel Lubarov
4086b2b447 Arithmetic & permutation gadgets 2021-04-02 15:29:21 -07:00
Daniel Lubarov
aea4eeaaae Minor 2021-04-02 14:00:26 -07:00
Daniel Lubarov
cca79a992c Sponges etc 2021-03-31 21:15:24 -07:00
Daniel Lubarov
347206d161 Add Z terms in vanishing poly 2021-03-30 23:12:47 -07:00
Daniel Lubarov
3c262a8c49 Fix some warnings 2021-03-30 20:16:20 -07:00
Daniel Lubarov
6c8dfb97ac Refactor polynomial code 2021-03-30 13:30:31 -07:00
Daniel Lubarov
44eeb505eb Tweaks 2021-03-30 10:02:00 -07:00
Daniel Lubarov
f42120482a No more polynomial programming abstraction
It was too expensive.
2021-03-28 19:52:01 -07:00
Daniel Lubarov
ba96ab4e99 More prover work 2021-03-26 23:51:48 -07:00
Daniel Lubarov
5f92611df1 Bit of prover work 2021-03-21 11:57:33 -07:00
Daniel Lubarov
75b9340000 Tweak APIs 2021-03-21 11:29:47 -07:00
Daniel Lubarov
ea33c5567f GMiMC, witness generation 2021-03-01 13:40:05 -08:00
Daniel Lubarov
9fdff8ea08 Gate infra 2021-02-26 13:18:41 -08:00