-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Clang-tidy related There are many changes that silence warnings from `clang-tidy`. - Initializing class members when possible - Explicitly deleting copy constructors/assignment operators for non-copyable classes - Using `= default` for trivial destructors - Adding `noexcept` to move constructors/assignment - Using `auto` after `static_cast` to avoid duplication. - Using `std::move` when copying an argument like a `string` or `vector` to help the compiler (references may alias, so passing by value tells the compiler that this value is really constant) - Removing unused headers, and adding `#pragma once` to prevent import clashes. - Reorder some imports, and use the module-relative paths - Replace some `typedef` with `using` - Use `const auto& element : container` to prevent unnecessary copies. ## Circuit Constructor - Replace `n` by `num_gates` to prevent clashes with `n` we use to refer to the `subgroup_size` - Added comments about things that seemed fishy, (all marked with `TODO(Adrian)` - Removed `NUM_RESERVED_GATES` and `WireType` since they are not used/duplicated - Simplified `set_public_input`, though not sure if the removal of the `ASSERT` is correct. ## Composer - Refactor `compute_proving_key_base` - Take the `CircuitConstructor` by `const` reference and modify the behavior so we only modify the `proving_key`. We no longer add any padding or dummy gates to the constructor, and instead do the padding entirely over the polynomials. - Remove unnecessary zero-ing out of selector values by using the fact that polynomials are initialized to 0. - Explicitly state where the public inputs are stored. - Refactor `compute_witness_base` - Use explicit types when referencing the `circuit_constructor` and ensure we only get objects that we don't modify. - Create `array` of wires to handle the `program_width` more generally. - No longer modify the `circuit_constructor` wires to add padding, and instead add 0-padding to the wire polynomials. - Remove `fr::__copy` - Ensure all calls to `circuit_constructor` are `const` - PermutationHelper: Big refactor to clarify handling of public inputs. - Simplify `cycle_node` behavior, and more generically handle different number of columns, and remove confusing `WireType` enum. - Make `compute_wire_copy_cycles` return a vector of `CyclicPermutation` for clarity. - Remove `resize` by noting that the number of cycles is equal to the number of `variables` - Reverse the order in which we were applying each `CyclicPermutation` to the `sigma` polynomials. Now, each `cycle_node` will map to the next one in the list. - Add comments to explain what parts of the function are necessary for our public input handling. - Changed the `composer_test` to also test for public inputs. - Add many more tests to ensure the permutation polynomials that we create have the expected form. - Compare results with the `public_input_delta` ## Prover & Verifier - Comment-out the `work_queue` related members. - Restore `gamma` challenge that was removed due to a misunderstanding - Remove default argument `beta = 1` for the `grand_product` computation. ## Sumcheck - Add `#pragma once` to headers - Modify the `GrandProductComputationRelation` to work with `Z_perm` that has the first coefficient equal to 0. - Handle `public_input_delta` in `GrandProductComputationRelation` - Modify `GrandProductInitializationRelation` to instead check that the last "real" value of `Z_perm_shift` is 0. In the current ZK-less situation, this is not necessary since it will be guaranteed by Gemini shift opening. But leaving it here for later. - Renamed `LAGRANGE_1` to `LAGRANGE_FIRST` to be consistent with other parts of the code.
- Loading branch information
Showing
25 changed files
with
537 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.