wborgeaud
406df34990
Merge from main
2021-04-26 11:00:59 +02:00
wborgeaud
2dfdc39680
More progress on arity
2021-04-26 10:58:27 +02:00
Daniel Lubarov
110a7bc6d9
Fill in a few missing field methods
2021-04-25 18:09:43 -07:00
Daniel Lubarov
5cf8c50abf
Merge pull request #15 from mir-protocol/lagrange_interp
...
Interpolants of arbitrary (point, value) lists
2021-04-24 20:14:09 -07:00
Daniel Lubarov
06bb902f23
Barycentric formula
2021-04-24 20:11:00 -07:00
Daniel Lubarov
035d15bc3d
Interpolants of arbitrary (point, value) lists
...
Closes #10 . This combines Lagrange interpolation with FFTs as mentioned there.
I was previously thinking that all our polynomial encodings might as well just use power-of-two length vectors, so they'll be "FFT-ready", with no need to trim/pad. This sort of breaks that assumption though, as e.g. I think we'll want to compute interpolants with three coefficients in the batch opening argument.
I think we can still skip trimming/padding in most cases, since it the majority of our polynomials will have power-of-two-minus-1 degrees with high probability. But we'll now have one or two uses where that's not the case.
2021-04-24 19:20:18 -07:00
Daniel Lubarov
6c85771ecb
Merge pull request #19 from mir-protocol/prover_use_trees
...
Have the prover use the new MerkleTree API
2021-04-24 11:20:44 -07:00
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
518470a2d7
Merge pull request #20 from mir-protocol/beta_gamma
...
Properly use the three betas and gammas
2021-04-24 10:54:32 -07:00
Daniel Lubarov
7ffb9cf9b2
Merge pull request #17 from mir-protocol/rescue_bench
...
Make Rescue a bit faster
2021-04-24 10:53:52 -07:00
Daniel Lubarov
d18210d6f1
Merge pull request #16 from mir-protocol/clippy
...
Address some clippy warnings
2021-04-24 10:42:01 -07:00
Daniel Lubarov
03113e85ba
Merge pull request #18 from mir-protocol/no_next_access
...
Remove access to "next" wire & constant values
2021-04-24 10:38:37 -07:00
Daniel Lubarov
4f9aa8879b
Properly use the three betas and gammas
...
... for the three different `Z`s we use. Before I was just using the first value as a temporary thing.
2021-04-23 14:25:24 -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
80775eadb1
Make Rescue a bit faster
...
... by switching to Rescue Prime (which has a smaller security margin), and precomputing an addition chain for the exponent used in the cubic root calculation. Also adds a benchmark.
2021-04-23 13:25:29 -07:00
Daniel Lubarov
af4c8734ce
Address some clippy warnings
2021-04-23 12:35:19 -07:00
Daniel Lubarov
c684193033
Rename a couple vars
2021-04-23 09:24:01 -07:00
wborgeaud
8b429ff0f1
Clean tests
2021-04-23 15:25:18 +02:00
wborgeaud
3dcdc8835c
Working Merkle subtree proofs
2021-04-23 11:05:31 +02:00
Daniel Lubarov
9c50e61f96
cargo fmt
2021-04-23 00:01:41 -07:00
Daniel Lubarov
a9e7ff800e
Merge pull request #13 from mir-protocol/hash_instance
...
Seed Challenger with a hash of the instance
2021-04-23 00:00:59 -07:00
Daniel Lubarov
c31ef237e4
Merge pull request #14 from mir-protocol/port_more_tests
...
A few more tests, ported (with some adaptations) from plonky1
2021-04-23 00:00:25 -07:00
Daniel Lubarov
a5206f97a2
Better generator_order per William's comment
2021-04-22 23:59:37 -07:00
Daniel Lubarov
84a71c9ca5
A few more tests, ported (with some adaptations) from plonky1
2021-04-22 21:51:40 -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
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