-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Parametrization of lib.rs tests for various EvaluationEngines #70
Merged
Conversation
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
[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.
huitseeker
force-pushed
the
ee_in_tests
branch
from
October 13, 2023 18:38
9c22e34
to
9cd26c4
Compare
huitseeker
changed the title
refactor: Parametrization of lib.rs Tests for Various Evaluation Engines
refactor: Parametrization of lib.rs tests for various EvaluationEngines
Oct 13, 2023
2 tasks
mpenciak
approved these changes
Oct 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
mpenciak
pushed a commit
to mpenciak/arecibo
that referenced
this pull request
Oct 27, 2023
…nes (lurk-lang#70) [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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
microsoft/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):
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:
This is because the IPA operates exclusively with a "splittable" key, a concept delineated by the CommitmentKeyExtTrait.
However, two core adjustments are required:
EE<G>: EvaluationEngineTrait<G>
configurable.EvaluationEngineTrait
implementation eliminates boundaries associated withCommitmentKeyExtTrait
. Such boundaries matching theEvaluationEngine
andCommitmentEngine
only materialize when the scheme is instantiated (i.e., during test invocation), a point where 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.