-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Parametrization of lib.rs Tests for Various Evaluation Engines
[microsoft/171](microsoft/Nova#171) introduced enhanced genericity in tests to facilitate unit testing across diverse curve cycles. Since then, the lib.rs tests, being designed to verify certain behaviors of the decider SNARK, tend to embed the use of a RelaxedR1CSSnark<G, EE>. They do this under the alias (where the test carefully chooses a specific import path for RelaxedR1CSSnark): ```rust type S1<G> = RelaxedR1CSSnark<G, ipa_pc::EvaluationEgine<G>> ``` Effectively, this constrains the PCS utilized by that decider to the IPA, even if the only thing the test function needed to be specific about is `RelaxedR1CSSnark`. Hence, these generic tests then had to accommodate constraints facilitating the use of the IPA, specifically: ``` <G::CE as CommitmentEngineTrait<G>>::CommitmentKey: CommitmentKeyExtTrait<G> ``` This is because the IPA operates exclusively with a "splittable" key, a concept delineated by the CommitmentKeyExtTrait. However, two core adjustments are required: - For the inclusion of different PCSs (for instance, Zeromorph), it's imperative to render `EE<G>: EvaluationEngineTrait<G>` configurable. - Parametrizing the tests based on the `EvaluationEngineTrait` implementation eliminates boundaries associated with `CommitmentKeyExtTrait`. Such boundaries matching the `EvaluationEngine` and `CommitmentEngine` only materialize when the scheme is instantiated (i.e., during test invocation), a pointwhere they are seamlessly met. The present PR effects this parametrization, effectively making the lib.rs tests functions variable based on the evaluation engine in use.
- Loading branch information
1 parent
c657b04
commit 9c22e34
Showing
1 changed file
with
40 additions
and
43 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