338 Commits

Author SHA1 Message Date
Nicholas Ward
7a7bf371eb fmt 2021-09-15 17:55:15 -07:00
Nicholas Ward
c207a02852 changes and fixes (z --> most_significant_diff) 2021-09-15 17:55:15 -07:00
Nicholas Ward
44dc1cd4ed removed z 2021-09-15 17:55:15 -07:00
Nicholas Ward
677165fda7 range check of chunks 2021-09-15 17:55:15 -07:00
Nicholas Ward
a68094d378 eval_unfiltered_recusively 2021-09-15 17:55:15 -07:00
Nicholas Ward
806f4af92c eval_unfiltered_base 2021-09-15 17:55:15 -07:00
Nicholas Ward
8a4259cc28 addressed comments 2021-09-15 17:55:15 -07:00
Nicholas Ward
1a1358c081 cleanup (using reduce_with_powers) 2021-09-15 17:55:15 -07:00
Nicholas Ward
9fe6dab045 cleanup 2021-09-15 17:55:15 -07:00
Nicholas Ward
2f0ba9f98f cleanup (references) 2021-09-15 17:55:15 -07:00
Nicholas Ward
8efa5a54b1 fixed test (first is actually smaller than second :P) 2021-09-15 17:55:15 -07:00
Nicholas Ward
26c3edf465 removed copies 2021-09-15 17:55:15 -07:00
Nicholas Ward
8a726d5a86 fmt 2021-09-15 17:55:15 -07:00
Nicholas Ward
4eda0e9e9b fix (z calculated incorrectly) 2021-09-15 17:55:15 -07:00
Nicholas Ward
63246bc2f7 fix (wires were out of order) 2021-09-15 17:55:15 -07:00
Nicholas Ward
75ff36decb fmt 2021-09-15 17:55:15 -07:00
Nicholas Ward
6807c14c41 fix 2021-09-15 17:55:15 -07:00
Nicholas Ward
4484a42d93 test_gate_constraints 2021-09-15 17:55:15 -07:00
Nicholas Ward
18738e5984 fixes 2021-09-15 17:55:15 -07:00
Nicholas Ward
8731f8136f some tests 2021-09-15 17:55:15 -07:00
Nicholas Ward
542bc6283c added num_bits 2021-09-15 17:55:15 -07:00
Nicholas Ward
ada79f7072 cleanup 2021-09-15 17:55:15 -07:00
Nicholas Ward
93e6bc626d fixed errors 2021-09-15 17:55:15 -07:00
Nicholas Ward
9fa0500390 comparison gate 2021-09-15 17:55:15 -07:00
Daniel Lubarov
b3008b9475
Some changes to generator_indices_by_watches (#234)
* Some changes to generator_indices_by_watches

- Index generators by the representatives (in disjoint-set forest terminology) of their watched targets, rather than the watched targets themselves.  Enqueuing generators based on their watch lists then works correctly, so we no longer need the step where we reenqueue all generators.
- In #195, it was pointed out that this slows down witness generation a bit. I moved the indexing code to preprocessing, so the prover is a bit faster (~7ms for me).

* Outdated comment

* Panic instead of infinite loop if we get stuck

* BTree

* fmt
2021-09-13 16:38:55 -07:00
Daniel Lubarov
91f7b4e300
Replace CrandallQuarticField with a more generic QuarticExtension (#232)
* Replace `CrandallQuarticField` with a more generic `QuarticExtension`

And likewise for `CrandallQuadraticField`.

There are a few parameters which we can't automatically derive (in const Rust), so I specified them in a `AutoExtendable` trait.

This would make it fairly easy to add extension fields for `GoldilocksField` and any future fields.

* Attempt to derive 2-adicity, see Hamish's feedback

* Simplify TWO_ADICITY based on chat with Hamish

* PR feedback

* Merge AutoExtendable into Extendable (#235)
2021-09-13 11:45:17 -07:00
Daniel Lubarov
3bc34c59d8
Refactor GMiMC code (#224)
* Refactor GMiMC code

Adds a sub-trait of `Field` called `GMiMCInterface`, which is similar to `PoseidonInterface`.

This lets us have different fields with different GMiMC constants in a type-safe way.

* Remove `Interface`

* Const generic for width
2021-09-07 18:28:28 -07:00
Nicholas Ward
c07f99ac81 merge 2021-09-06 21:38:52 -07:00
Daniel Lubarov
236a143abf
Move some Field members to a Field64 subtrait (#213)
* Move some Field members to a Field64 subtrait

I.e. move anything specific to 64-bit fields.

Also, relatedly,
- Tweak a bunch of prover code to require `Field64`, since 64-bit stuff is used in a couple places, like the FRI proof-of-work
- Remove `bits()`, which was unused and assumed a 64-bit field
- Rename a couple methods to reflect that they're u64 variants

There are no functional changes.

* Field64 -> PrimeField

* Remove `exp_u32`, `kth_root_u32`

* PrimeField: PrimeField

* Move `to_canonical_biguint` as well

* Add back from_noncanonical_u128
2021-09-05 10:27:11 -07:00
Nicholas Ward
0e24719908 fixes 2021-09-04 22:31:12 -07:00
Nicholas Ward
1fb7eeb03e variable-sized tests 2021-09-04 16:29:33 -07:00
Nicholas Ward
f01d373d1e made switch_bool wires routeable 2021-09-04 16:28:10 -07:00
Daniel Lubarov
f89f49249a wip 2021-09-04 16:27:40 -07:00
Nicholas Ward
d1fea5cfd3 witnessgenerator 2021-09-03 18:07:51 -07:00
Nicholas Ward
10d016a92c chunk size as field 2021-09-03 18:07:21 -07:00
Nicholas Ward
3ad0365967 fixed infinite loop 2021-09-03 18:07:21 -07:00
Nicholas Ward
485d4862ff fixes 2021-09-03 18:07:21 -07:00
Nicholas Ward
4ea1df82ba fixes 2021-09-03 18:07:21 -07:00
Nicholas Ward
c2439557bf fix 2021-09-03 18:07:21 -07:00
Nicholas Ward
0f6e9c5b68 progress 2021-09-03 18:07:21 -07:00
Nicholas Ward
a1d5f5b6fe progress 2021-09-03 18:07:20 -07:00
Nicholas Ward
f9a47ade33 fixes 2021-09-03 18:07:20 -07:00
Nicholas Ward
2d5f362c6a fixes 2021-09-03 18:07:20 -07:00
Nicholas Ward
013c8bb612 progress 2021-09-03 18:07:20 -07:00
Nicholas Ward
2ab37e688f progress 2021-09-03 18:07:20 -07:00
Nicholas Ward
b0a855a9c3 progress on permutation 2021-09-03 18:07:20 -07:00
Jakub Nabaglo
c4fd0919b6
Save 3% on eval_unfiltered_base (#206)
* Save 3% on eval_unfiltered_base

Again, remove a few allocations/deallocations.

* Minor style
2021-08-28 15:00:47 -07:00
wborgeaud
69a945547a route, assert_equal -> connect 2021-08-24 08:25:11 +02:00
wborgeaud
cd1bd9e77b
Merge pull request #195 from mir-protocol/partition_witness
Remove `CopyGenerator`s and add new `PartitionWitness`
2021-08-24 08:16:35 +02:00
Nicholas Ward
8f75a8de7f Merge commit '717efbb' 2021-08-23 14:22:20 -07:00