wborgeaud
3dcdc8835c
Working Merkle subtree proofs
2021-04-23 11:05:31 +02:00
wborgeaud
13519e66ab
Merkle subtree proofs - WIP
2021-04-22 22:33:29 +02:00
wborgeaud
4491d5ad9f
Merge pull request #12 from mir-protocol/fri
...
FRI - Added base FRI implementation.
2021-04-22 22:29:51 +02:00
wborgeaud
4b75f16efd
Merge master
2021-04-22 22:27:55 +02:00
wborgeaud
d5433ffe24
PoW fixes based on PR comments
2021-04-22 22:21:24 +02:00
wborgeaud
a1023e0ca6
Added PoW
2021-04-22 15:50:08 +02:00
wborgeaud
4d31f5e37b
Fixes from PR comments
2021-04-22 09:27:59 +02:00
Daniel Lubarov
b49e629e26
Merge pull request #11 from mir-protocol/arithmetic
...
Basic arithmetic methods
2021-04-21 14:20:02 -07:00
wborgeaud
6b3aa02b01
Merge master
2021-04-21 22:36:06 +02:00
wborgeaud
6b407e45ef
Progress on FRI
2021-04-21 22:31:45 +02:00
Daniel Lubarov
41e1b64623
Basic arithmetic methods
2021-04-21 11:48:17 -07:00
Daniel Lubarov
70f4f2aab8
Minimal num_wires
2021-04-16 21:40:51 -07:00
Daniel Lubarov
62dccedda4
Fix id() to include (generic) R param
2021-04-16 09:01:54 -07:00
Daniel Lubarov
9c2b7334c8
Merge pull request #9 from mir-protocol/merkle_proofs_2
...
Merkle proofs
2021-04-12 19:16:20 -07:00
Daniel Lubarov
30b845e6b3
Add generator to circuit
2021-04-12 10:18:16 -07:00
wborgeaud
7ff4150679
Merge with merkle_proofs_2
2021-04-12 10:38:07 +02:00
wborgeaud
5abd49bf47
Merge
2021-04-12 10:34:40 +02:00
Daniel Lubarov
7d9bb073f4
Switch to "overwrite mode" sponges
...
And fix a bug where the rate was assumed to be width - 1 (which was true in plonky 1).
2021-04-10 21:32:11 -07:00
Daniel Lubarov
a14ddc3b03
Fix constraint count
2021-04-10 14:54:46 -07:00
Daniel Lubarov
b183579886
Finish up recursive Merkle proofs
2021-04-09 12:53:33 -07:00
Daniel Lubarov
93b73fb89a
Recursive Merkle proofs
2021-04-09 12:40:43 -07:00
Daniel Lubarov
04f74446fa
Misc fixes to get tests green again
2021-04-09 11:40:51 -07:00
Daniel Lubarov
f807db388b
Add bench_field_mul_interleaved benchmark
2021-04-09 10:26:21 -07:00
wborgeaud
aa50387d36
Started implementing FRI
2021-04-09 18:24:19 +02:00
Daniel Lubarov
959aaccae6
Merkle proofs
2021-04-08 09:38:57 -07:00
Daniel Lubarov
0c07fcf0ae
Licenses
2021-04-08 09:37:08 -07:00
Daniel Lubarov
1ab12c3dfd
Merge pull request #7 from mir-protocol/merkle_proofs
...
Candidate API for Merkle proof data
2021-04-07 10:19:02 -07:00
Daniel Lubarov
0cd7339940
Fixes based on PR feedback
2021-04-07 09:10:06 -07:00
Daniel Lubarov
9a8a7b6105
Non-circuit version
2021-04-06 19:22:12 -07:00
Daniel Lubarov
e8eb658f8e
Candidate API for Merkle proof data
...
Does this make sense? I think other libraries tend to include the leaf's index (either as an integer, or a series of bits indicating left/right turns) as part of a "proof". In FRI, the leaf indices are chosen by the verifier, so I thought that approach might be sort of redundant. Let me know what you think though.
2021-04-06 19:17:38 -07:00
Daniel Lubarov
88a84d5be3
Merge pull request #6 from mir-protocol/bin_reorg
...
Split main into multiple binaries
2021-04-06 13:25:33 -07:00
Daniel Lubarov
5fe8d633b6
Split main into multiple binaries
...
... and other minor refactoring.
`bench_recursion` will be the default bin run by `cargo run`; the otheres can be selected with the `--bin` flag.
We could probably delete some of the other binaries later. E.g. `field_search` might not be useful any more. `bench_fft` should maybe be converted to a benchmark (although there are some pros and cons, e.g. the bench framework has a minimum number of runs, and isn't helpful in testing multi-core performance).
2021-04-06 13:23:47 -07:00
Daniel Lubarov
2f54cedb5d
Merge pull request #5 from mir-protocol/validate_cosets
...
Validate that the cosets involved in Plonk's permutation argument are disjoint
2021-04-05 12:23:22 -07:00
Daniel Lubarov
74ce37250e
Avoid separate exp calls
2021-04-05 11:39:16 -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
22f7c359af
Fix visibility
2021-04-03 15:30:33 -07:00
Daniel Lubarov
524005579d
Comments etc
2021-04-02 20:58:19 -07:00
Daniel Lubarov
9b158103d2
Rename
2021-04-02 20:34:27 -07:00
Daniel Lubarov
80e87becb8
Minor refactor
2021-04-02 19:15:39 -07:00
Daniel Lubarov
facbe117fb
Move some stuff into Field
2021-04-02 19:04:26 -07:00
Daniel Lubarov
78860cc3db
Final fixes
2021-04-02 18:29:33 -07:00
Daniel Lubarov
572a55ed29
Fix to_canonical_u64
2021-04-02 18:23:22 -07:00
Daniel Lubarov
285ec16599
Fix neg
2021-04-02 18:12:44 -07:00
Daniel Lubarov
c25c689ef0
More tests, ported from plonky1
2021-04-02 17:49:57 -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
8565e5015d
Minor
2021-04-01 20:39:21 -07:00
Daniel Lubarov
524a974de3
Parallelize vanishing poly computation
2021-04-01 13:46:24 -07:00
Daniel Lubarov
8302c10f21
Multiple vanishing polys, and multiple associated quotient polys
...
With different random alphas
2021-04-01 13:22:54 -07:00