Skip to content
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

113 pifac tests #459

Merged
merged 16 commits into from
Aug 16, 2023
Merged

113 pifac tests #459

merged 16 commits into from
Aug 16, 2023

Conversation

hridambasu
Copy link

Closes #113

@hridambasu hridambasu requested a review from marsella July 31, 2023 19:03
Copy link

@marsella marsella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor nits on this test.

You noted that some tests already exist but they are actually not complete as is. There's some discussion and checklists in the comments of #113. Please add the missing pieces noted there, and double check whether anything else is also missing.

src/zkp/pifac.rs Outdated Show resolved Hide resolved
src/zkp/pifac.rs Outdated Show resolved Hide resolved
src/zkp/pifac.rs Outdated Show resolved Hide resolved
src/zkp/pifac.rs Outdated Show resolved Hide resolved
src/zkp/pifac.rs Outdated Show resolved Hide resolved
Copy link

@marsella marsella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding some additional tests. There are still a few things missing that are noted in the comments on the original issue:

  • The test_no_small_factors_proof_negative_cases needs to be broken into smaller tests. The monolithic thing is hard to read and hard to know what's being tested and there's no reason for it to be one giant test full of independent assertions.
  • Many of the pre-existing tests are not testing what they claim to be testing. Many assertions are failing because the test is being proved and verified with different common inputs, but the comments suggest that the tests are validating properties on the secret inputs. These need to be fixed or removed.

src/zkp/pifac.rs Outdated Show resolved Hide resolved
src/zkp/pifac.rs Outdated Show resolved Hide resolved
src/zkp/pifac.rs Show resolved Hide resolved
@hridambasu
Copy link
Author

@marsella Fixed all your comments. Didn't notice any check related to common input in stead of secret input. If you do notice, please let me know and I'll fix them.

Copy link

@marsella marsella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't notice any check related to common input in stead of secret input. If you do notice, please let me know and I'll fix them.

I made a separate issue #465 to address my remaining concern.

In a call a while ago, we talked about documenting test_modulus_cannot_have_large_factors to explain how the range check in the proof looks for "too large", not "too small", despite the name of the proof. This needs to be captured somewhere before this can be merged.

Otherwise looks good.

@marsella
Copy link

@hridambasu Please write documentation about the range check in the proof either in the original testing issue (to close the loop) or in the documentation for the proof in the code. Then I will approve.

@hridambasu
Copy link
Author

@marsella I documented this in the original issue.

@hridambasu hridambasu merged commit ee1dc64 into main Aug 16, 2023
2 checks passed
@hridambasu hridambasu deleted the 113-pifac-tests branch August 16, 2023 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write tests for PiFacProof
2 participants